Martin Escardo 20-21 December 2012
\begin{code}
{-# OPTIONS --safe --without-K #-}
open import MLTT.Spartan
open import MLTT.Two-Properties
open import TypeTopology.CompactTypes
module Ordinals.InfProperty {๐ค ๐ฅ} {X : ๐ค ฬ } (_โค_ : X โ X โ ๐ฅ ฬ ) where
is-conditional-root : (X โ ๐) โ X โ ๐ค ฬ
is-conditional-root p xโ = (ฮฃ x ๊ X , p x ๏ผ โ) โ p xโ ๏ผ โ
is-roots-lower-bound : (X โ ๐) โ X โ ๐ค โ ๐ฅ ฬ
is-roots-lower-bound p l = (x : X) โ p x ๏ผ โ โ l โค x
is-upper-bound-of-lower-bounds : (X โ ๐) โ X โ ๐ค โ ๐ฅ ฬ
is-upper-bound-of-lower-bounds p u = (l : X) โ is-roots-lower-bound p l โ l โค u
is-roots-infimum : (X โ ๐) โ X โ ๐ค โ ๐ฅ ฬ
is-roots-infimum p x = is-roots-lower-bound p x
ร is-upper-bound-of-lower-bounds p x
has-inf : ๐ค โ ๐ฅ ฬ
has-inf = (p : X โ ๐) โ ฮฃ x ๊ X , is-conditional-root p x ร is-roots-infimum p x
has-inf-gives-compactโ : has-inf โ is-compactโ X
has-inf-gives-compactโ h p = f (h p)
where
f : (ฮฃ xโ ๊ X , is-conditional-root p xโ ร is-roots-infimum p xโ)
โ (ฮฃ xโ ๊ X , (p xโ ๏ผ โ โ (x : X) โ p x ๏ผ โ))
f (xโ , g , _) = (xโ , k)
where
g' : p xโ โ โ โ ยฌ (ฮฃ x ๊ X , p x ๏ผ โ)
g' = contrapositive g
u : ยฌ (ฮฃ x ๊ X , p x ๏ผ โ) โ (x : X) โ p x ๏ผ โ
u ฮฝ x = different-from-โ-equal-โ (ฮป (e : p x ๏ผ โ) โ ฮฝ (x , e))
k : p xโ ๏ผ โ โ (x : X) โ p x ๏ผ โ
k e = u (g' (equal-โ-different-from-โ e))
has-inf-gives-compact : has-inf โ is-compact X
has-inf-gives-compact = compactโ-types-are-compact โ has-inf-gives-compactโ
has-inf-gives-Compact : {๐ฆ : Universe} โ has-inf โ is-Compact X {๐ฆ}
has-inf-gives-Compact = compact-types-are-Compact โ has-inf-gives-compact
\end{code}
Added 28th August 2026. The infimum of a non-empty complemented subset
is a least element.
\begin{code}
is-least-root : (X โ ๐) โ X โ ๐ค โ ๐ฅ ฬ
is-least-root p xโ = (p xโ ๏ผ โ) ร is-roots-lower-bound p xโ
has-inf-gives-least-root : has-inf
โ (p : X โ ๐)
โ ยฌยฌ (ฮฃ x ๊ X , p x ๏ผ โ)
โ ฮฃ xโ ๊ X , is-least-root p xโ
has-inf-gives-least-root h p ฮฝ = f (h p)
where
f : (ฮฃ xโ ๊ X , is-conditional-root p xโ ร is-roots-infimum p xโ)
โ ฮฃ xโ ๊ X , is-least-root p xโ
f (xโ , cr , (lb , _)) = ฮณ (has-inf-gives-compact h p)
where
ฮณ : (ฮฃ x ๊ X , p x ๏ผ โ) + (ฮ x ๊ X , p x ๏ผ โ)
โ ฮฃ xโ ๊ X , is-least-root p xโ
ฮณ (inl ฯ) = xโ , cr ฯ , lb
ฮณ (inr u) = ๐-elim (ฮฝ (ฮป (x , e) โ zero-is-not-one (e โปยน โ u x)))
\end{code}
Added 2nd September 2026. The least element property for complemented
subsets.
\begin{code}
has-least-roots : ๐ค โ ๐ฅ ฬ
has-least-roots = (p : X โ ๐)
โ ยฌยฌ (ฮฃ x ๊ X , p x ๏ผ โ)
โ ฮฃ xโ ๊ X , is-least-root p xโ
has-inf-gives-least-roots : has-inf โ has-least-roots
has-inf-gives-least-roots = has-inf-gives-least-root
\end{code}