Martin Escardo, Added 21st April 2022. Limit ordinals and suprema of families of ordinals. (Moved from another file to this new file 15th October 2024.) \begin{code} {-# OPTIONS --safe --without-K --lossy-unification #-} open import UF.Univalence module Ordinals.Limit (ua : Univalence) where open import UF.Equiv open import UF.FunExt open import UF.Subsingletons open import UF.UA-FunExt open import UF.PropTrunc open import UF.Size private fe : FunExt fe = Univalence-gives-FunExt ua fe' : Fun-Ext fe' {π€} {π₯} = fe π€ π₯ pe : PropExt pe = Univalence-gives-PropExt ua open import MLTT.Spartan open import Notation.CanonicalMap open import Ordinals.AdditionProperties ua open import Ordinals.Arithmetic fe open import Ordinals.ConvergentSequence ua open import Ordinals.Equivalence open import Ordinals.Maps open import Ordinals.OrdinalOfOrdinals ua open import Ordinals.OrdinalOfOrdinalsSuprema ua open import Ordinals.Type open import Ordinals.Underlying \end{code} One possible classical definition of limit ordinal. \begin{code} is-limit-ordinalβΊ : Ordinal π€ β π€ βΊ Μ is-limit-ordinalβΊ {π€} Ξ± = (Ξ² : Ordinal π€) β ((Ξ³ : Ordinal π€) β Ξ³ β² Ξ± β Ξ³ β΄ Ξ²) β Ξ± β΄ Ξ² \end{code} We give an equivalent definition below. Recall from the modules UF.Quotients.FromSetReplacement and UF.Quotients.GivesSetReplacement that the existence propositional truncations and the set-replacement property are together equivalent to the existence of small quotients. With them we can construct suprema of families of ordinals. \begin{code} module _ (pt : propositional-truncations-exist) (sr : Set-Replacement pt) where open suprema pt sr \end{code} Recall that, by definition, Ξ³ β² Ξ± iff Ξ³ is of the form Ξ± β x for some x : β¨ Ξ± β©. We define the "floor" of an ordinal to be the supremum of its predecessors: \begin{code} β_β : Ordinal π€ β Ordinal π€ β Ξ± β = sup (Ξ± β_) ββ-lower-bound : (Ξ± : Ordinal π€) β β Ξ± β β΄ Ξ± ββ-lower-bound Ξ± = sup-is-lower-bound-of-upper-bounds _ Ξ± (segment-β΄ Ξ±) is-limit-ordinal : Ordinal π€ β π€ Μ is-limit-ordinal Ξ± = Ξ± β΄ β Ξ± β is-limit-ordinal-fact : (Ξ± : Ordinal π€) β is-limit-ordinal Ξ± β Ξ± οΌ β Ξ± β is-limit-ordinal-fact Ξ± = (Ξ» β β β΄-antisym _ _ β (ββ-lower-bound Ξ±)) , (Ξ» p β transport (Ξ± β΄_) p (β΄-refl Ξ±)) ββ-of-successor : (Ξ± : Ordinal π€) β β Ξ± +β πβ β β΄ Ξ± ββ-of-successor Ξ± = sup-is-lower-bound-of-upper-bounds _ Ξ± h where h : (x : β¨ Ξ± +β πβ β©) β ((Ξ± +β πβ) β x) β΄ Ξ± h (inl x) = successor-lemma-left Ξ± x h (inr β) = transportβ»ΒΉ (_β΄ Ξ±) (successor-lemma-right Ξ±) (β΄-refl Ξ±) ββ-of-successor' : (Ξ± : Ordinal π€) β β Ξ± +β πβ β οΌ Ξ± ββ-of-successor' Ξ± = III where I : ((Ξ± +β πβ) β inr β) β΄ β Ξ± +β πβ β I = sup-is-upper-bound _ (inr β) II : Ξ± β΄ β Ξ± +β πβ β II = transport (_β΄ β Ξ± +β πβ β) (successor-lemma-right Ξ±) I III : β Ξ± +β πβ β οΌ Ξ± III = β΄-antisym _ _ (ββ-of-successor Ξ±) II successors-are-not-limit-ordinals : (Ξ± : Ordinal π€) β Β¬ is-limit-ordinal (Ξ± +β πβ) successors-are-not-limit-ordinals Ξ± le = irrefl (OO _) Ξ± II where I : (Ξ± +β πβ) β΄ Ξ± I = β΄-trans (Ξ± +β πβ) β Ξ± +β πβ β Ξ± le (ββ-of-successor Ξ±) II : Ξ± β² Ξ± II = β΄-gives-βΌ _ _ I Ξ± (successor-increasing Ξ±) \end{code} TODO (easy). Show that is-limit-ordinalβΊ Ξ± is logically equivalent to is-limit-ordinal Ξ±. \begin{code} ββ-monotone : (Ξ± Ξ² : Ordinal π€) β Ξ± β΄ Ξ² β β Ξ± β β΄ β Ξ² β ββ-monotone Ξ± Ξ² le = V where I : (y : β¨ Ξ² β©) β (Ξ² β y) β΄ β Ξ² β I = sup-is-upper-bound (Ξ² β_) II : (x : β¨ Ξ± β©) β (Ξ± β x) β² Ξ² II x = β΄-gives-βΌ _ _ le (Ξ± β x) (x , refl) III : (x : β¨ Ξ± β©) β Ξ£ y κ β¨ Ξ² β© , (Ξ± β x) οΌ (Ξ² β y) III = II IV : (x : β¨ Ξ± β©) β (Ξ± β x) β΄ β Ξ² β IV x = transportβ»ΒΉ (_β΄ β Ξ² β) (prβ (III x)) (I (prβ (III x))) V : sup (Ξ± β_) β΄ β Ξ² β V = sup-is-lower-bound-of-upper-bounds (Ξ± β_) β Ξ² β IV \end{code} We now give an example of an ordinal which is not a limit ordinal and also is not a successor ordinal unless LPO holds: \begin{code} open import CoNaturals.Type open import Notation.Order open import Naturals.Order ββ-of-ββ : β βββ β οΌ Ο ββ-of-ββ = c where a : β βββ β β΄ Ο a = sup-is-lower-bound-of-upper-bounds (βββ β_) Ο I where I : (u : β¨ βββ β©) β (βββ β u) β΄ Ο I u = βΌ-gives-β΄ (βββ β u) Ο II where II : (Ξ± : Ordinal π€β) β Ξ± β² (βββ β u) β Ξ± β² Ο II .((βββ β u) β (ΞΉ n , n , refl , p)) ((.(ΞΉ n) , n , refl , p) , refl) = XI where III : ΞΉ n βΊ u III = n , refl , p IV : ((βββ β u) β (ΞΉ n , n , refl , p)) οΌ βββ β ΞΉ n IV = iterated-β βββ u (ΞΉ n) III V : (βββ β ΞΉ n) ββ (Ο β n) V = f , fop , qinvs-are-equivs f (g , gf , fg) , gop where f : β¨ βββ β ΞΉ n β© β β¨ Ο β n β© f (.(ΞΉ k) , k , refl , q) = k , β-gives-< _ _ q g : β¨ Ο β n β© β β¨ βββ β ΞΉ n β© g (k , l) = (ΞΉ k , k , refl , <-gives-β _ _ l) fg : f β g βΌ id fg (k , l) = to-subtype-οΌ (Ξ» k β <-is-prop-valued k n) refl gf : g β f βΌ id gf (.(ΞΉ k) , k , refl , q) = to-subtype-οΌ (Ξ» u β βΊ-prop-valued fe' u (ΞΉ n)) refl fop : is-order-preserving (βββ β ΞΉ n) (Ο β n) f fop (.(ΞΉ k) , k , refl , q) (.(ΞΉ k') , k' , refl , q') (m , r , cc) = VIII where VI : k οΌ m VI = β-to-ββ-lc r VII : m < k' VII = β-gives-< _ _ cc VIII : k < k' VIII = transportβ»ΒΉ (_< k') VI VII gop : is-order-preserving (Ο β n) (βββ β ΞΉ n) g gop (k , l) (k' , l') β = k , refl , <-gives-β _ _ β IX : βββ β ΞΉ n οΌ Ο β n IX = eqtoidβ (ua π€β) fe' _ _ V X : (βββ β (ΞΉ n)) β² Ο X = n , IX XI : ((βββ β u) β (ΞΉ n , n , refl , p)) β² Ο XI = transportβ»ΒΉ (_β² Ο) IV X b : Ο β΄ β βββ β b = transport (_β΄ β βββ β) (ββ-of-successor' Ο) I where I : β Ο +β πβ β β΄ β βββ β I = ββ-monotone (Ο +β πβ) βββ Ο+π-is-β΄-ββ c : β βββ β οΌ Ο c = β΄-antisym _ _ a b ββ-is-not-limit : Β¬ is-limit-ordinal βββ ββ-is-not-limit β = III II where I = βββ οΌβ¨ lr-implication (is-limit-ordinal-fact βββ) β β© β βββ β οΌβ¨ ββ-of-ββ β© Ο β II : βββ ββ Ο II = idtoeqβ _ _ I III : Β¬ (βββ ββ Ο) III (f , e) = irrefl Ο (f β) VII where IV : is-largest Ο (f β) IV = order-equivs-preserve-largest βββ Ο f e β (Ξ» u t l β βΊβΌ-gives-βΊ t u β l (β-largest u)) V : f β βΊβ¨ Ο β© succ (f β) V = <-succ (f β) VI : succ (f β) βΌβ¨ Ο β© f β VI = IV (succ (f β)) VII : f β βΊβ¨ Ο β© f β VII = VI (f β) V open import Taboos.LPO ββ-successor-gives-LPO : (Ξ£ Ξ± κ Ordinal π€β , (βββ οΌ (Ξ± +β πβ))) β LPO ββ-successor-gives-LPO (Ξ± , p) = IV where I = Ξ± οΌβ¨ (ββ-of-successor' Ξ±)β»ΒΉ β© β Ξ± +β πβ β οΌβ¨ ap β_β (p β»ΒΉ) β© β βββ β οΌβ¨ ββ-of-ββ β© Ο β II : βββ οΌ (Ο +β πβ) II = transport (Ξ» - β βββ οΌ (- +β πβ)) I p III : βββ β΄ (Ο +β πβ) III = transport (βββ β΄_) II (β΄-refl βββ) IV : LPO IV = ββ-β΄-Ο+π-gives-LPO III open PropositionalTruncation pt ββ-successor-gives-LPO' : (β Ξ± κ Ordinal π€β , (βββ οΌ (Ξ± +β πβ))) β LPO ββ-successor-gives-LPO' = β₯β₯-rec (LPO-is-prop fe') ββ-successor-gives-LPO LPO-gives-ββ-successor : LPO β (Ξ£ Ξ± κ Ordinal π€β , (βββ οΌ (Ξ± +β πβ))) LPO-gives-ββ-successor lpo = Ο , ββ-is-successorβ lpo \end{code} Therefore, constructively, it is not necessarily the case that every ordinal is either a successor or a limit. TODO (1st June 2023). A classically equivalently definition of limit ordinal Ξ± is that there is some Ξ² < Ξ±, and for every Ξ² < Ξ± there is Ξ³ with Ξ² < Ξ³ < Ξ±. We have that ββ is a limit ordinal in this sense.