Tom de Jong, 28 October 2022 - 7 November 2022.
In collaboration with Nicolai Kraus, Fredrik Nordvall Forsberg and Chuangjie Xu.
Following [Pow75], in constructive set theory an ordinal is [Def. 9.4.1, AR10],
defined as a transitive set of transitive sets.
We consider the subtype πα΅Κ³α΅ of the cumulative hierarchy π of set theoretic
ordinals in π (see UF/CumulativeHierarchy.lagda and [Section 10.5, Uni13] for
more on π).
We show that (πα΅Κ³α΅,β) is a ordinal, in the type theoretic sense of [Uni13],
i.e. it is a well-founded, extensional and transitive order. Moreover, we prove
that (πα΅Κ³α΅,β) and the ordinal Ord of type theoretic ordinals are isomorphic.
This is interesting for at least two reasons:
(1) It shows that the set theoretic and type theoretic notions of ordinal
coincide in HoTT.
(2) It shows that a nontrivial subtype of π, a complicated HIT, can be defined
internally in univalent type theory without HITs (β ) other than set
quotients.
(β ): This was also done through other means by Gylterud [Gyl18] who gave a
non-HIT construction of the cumulative hiearchy π.
After Fredrik Nordvall Forsberg's talk at the workshop in honour of Thorsten
Altenkirch's 60th birthday
(https://www.cs.nott.ac.uk/~psznk/events/thorsten60/#fred), Andreas Abel asked
how/whether we can relate set theoretic ordinals and type theoretic ordinals
through Aczel's [Acz78] type theoretic interpretation of set theory. Since the
cumulative hierarchy π may be seen as an internal refinement of Aczel's
interpretation in HoTT, the theorem announced above provides an answer to
Andreas' question.
There are some directions for future work recorded at the end of this file.
References
----------
[Acz77] Peter Aczel
An introduction to inductive definitions
In Jon Barwise (ed.) Handbook of Mathematical Logic
Volume 90 of Studies in Logic and the Foundations of Mathematics
Pages 739β782
North-Holland Publishing Company
1977
doi:10.1016/S0049-237X(08)71120-0
[Acz78] Peter Aczel
The type theoretic interpretation of constructive set theory
In A. MacIntyre, L. Pacholski, and J. Paris (eds.) Logic Colloquium β77
Volume 96 of Studies in Logic and the Foundations of Mathematics
Pages 55β66
North-Holland Publishing Company
1978
doi:10.1016/S0049-237X(08)71989-X
[AR10] Peter Aczel and Michael Rathjen
Notes on Constructive Set Theory
Book draft
https://www1.maths.leeds.ac.uk/~rathjen/book.pdf
2010
[Pow75] William C. Powell
Extending GΓΆdelβs negative interpretation to ZF
Volume 40, Issue 2 of Journal of Symbolic Logic
Pages 221β229
1975
doi:10.2307/2271902
[Gyl18] HΓ₯kon Robbestad Gylterud
From Multisets to Sets in Homotopy Type Theory
Volue 83, Issue 3 of The Journal of Symbolic Logic
Pages 1132β1146
2018
doi:10.1017/jsl.2017.84
[Uni13] The Univalent Foundations Program
Homotopy Type Theory: Univalent Foundations of Mathematics
https://homotopytypetheory.org/book
Institute for Advanced Study
2013
\begin{code}
{-# OPTIONS --safe --without-K --lossy-unification #-}
open import MLTT.Spartan
open import UF.PropTrunc
open import UF.Univalence
module Ordinals.CumulativeHierarchy
(pt : propositional-truncations-exist)
(ua : Univalence)
(π€ : Universe)
where
open PropositionalTruncation pt
open import UF.Base hiding (_β_)
open import UF.Equiv
open import UF.FunExt
open import UF.Subsingletons
open import UF.Subsingletons-FunExt
open import UF.UA-FunExt
private
fe : Fun-Ext
fe = Univalence-gives-Fun-Ext ua
fe' : FunExt
fe' _ _ = fe
pe : Prop-Ext
pe = Univalence-gives-Prop-Ext ua
open import Ordinals.Equivalence
open import Ordinals.Notions
open import Ordinals.OrdinalOfOrdinals ua
open import Ordinals.Type hiding (Ord)
open import Ordinals.Underlying
open import UF.CumulativeHierarchy pt fe pe
module ordinal-of-set-theoretic-ordinals
(ch : cumulative-hierarchy-exists π€)
where
open cumulative-hierarchy-exists ch
\end{code}
We start by defining a set theoretic ordinal to be a transitive set whose
elements are again transitive sets, as announced above.
\begin{code}
is-transitive-set : π β π€ βΊ Μ
is-transitive-set x = (u : π) (v : π) β u β x β v β u β v β x
being-transitive-set-is-prop : {x : π} β is-prop (is-transitive-set x)
being-transitive-set-is-prop = Ξ β-is-prop fe (Ξ» _ _ _ _ β β-is-prop-valued)
is-set-theoretic-ordinal : π β π€ βΊ Μ
is-set-theoretic-ordinal x = is-transitive-set x
Γ ((y : π) β y β x β is-transitive-set y)
being-set-theoretic-ordinal-is-prop : {x : π} β is-prop (is-set-theoretic-ordinal x)
being-set-theoretic-ordinal-is-prop =
Γ-is-prop being-transitive-set-is-prop
(Ξ β-is-prop fe (Ξ» _ _ β being-transitive-set-is-prop))
transitive-set-if-set-theoretic-ordinal : {x : π}
β is-set-theoretic-ordinal x
β is-transitive-set x
transitive-set-if-set-theoretic-ordinal = prβ
transitive-set-if-element-of-set-theoretic-ordinal : {x : π}
β is-set-theoretic-ordinal x
β {y : π} β y β x
β is-transitive-set y
transitive-set-if-element-of-set-theoretic-ordinal Ο {y} m = prβ Ο y m
being-set-theoretic-ordinal-is-hereditary : {x : π} β is-set-theoretic-ordinal x
β {y : π}
β y β x β is-set-theoretic-ordinal y
being-set-theoretic-ordinal-is-hereditary {x} (t , Ο) {y} m =
Ο y m , (Ξ» z n β Ο z (t y z m n))
\end{code}
Restricting our attention to those elements of π that are set theoretic
ordinals, we show that the membership relation β makes this subtype into a type
theoretic ordinal.
\begin{code}
πα΅Κ³α΅ : π€ βΊ Μ
πα΅Κ³α΅ = Ξ£ x κ π , is-set-theoretic-ordinal x
πα΅Κ³α΅-is-subtype : {x y : πα΅Κ³α΅} β prβ x οΌ prβ y β x οΌ y
πα΅Κ³α΅-is-subtype = to-subtype-οΌ (Ξ» _ β being-set-theoretic-ordinal-is-prop)
_βα΅Κ³α΅_ : πα΅Κ³α΅ β πα΅Κ³α΅ β π€ βΊ Μ
_βα΅Κ³α΅_ (x , _) (y , _) = x β y
βα΅Κ³α΅-is-extensional : is-extensional _βα΅Κ³α΅_
βα΅Κ³α΅-is-extensional (x , u) (y , v) s t =
πα΅Κ³α΅-is-subtype
(β-extensionality
x y
(Ξ» z m β s (z , being-set-theoretic-ordinal-is-hereditary u m) m)
(Ξ» z m β t (z , being-set-theoretic-ordinal-is-hereditary v m) m))
βα΅Κ³α΅-is-transitive : is-transitive _βα΅Κ³α΅_
βα΅Κ³α΅-is-transitive (x , _) (y , _) (z , Ο) x-in-y y-in-z =
transitive-set-if-set-theoretic-ordinal Ο y x y-in-z x-in-y
β-is-well-founded : is-well-founded _β_
β-is-well-founded = β-induction (is-accessible _β_)
(Ξ» x β accessibility-is-prop _β_ fe' x)
(Ξ» x IH β acc IH)
βα΅Κ³α΅-is-well-founded : is-well-founded _βα΅Κ³α΅_
βα΅Κ³α΅-is-well-founded = transfinite-induction-converse _βα΅Κ³α΅_ W
where
W : is-Well-founded _βα΅Κ³α΅_
W P IH = (Ξ» (x , Ο) β Q-holds-everywhere x Ο)
where
Q : π β π€ βΊ Μ
Q x = (Ο : is-set-theoretic-ordinal x) β P (x , Ο)
Q-holds-everywhere : (x : π) β Q x
Q-holds-everywhere = transfinite-induction _β_ β-is-well-founded Q f
where
f : (x : π) β ((y : π) β y β x β Q y) β Q x
f x IH' Ο = IH (x , Ο) g
where
g : (y : πα΅Κ³α΅) β y βα΅Κ³α΅ (x , Ο) β P y
g (y , Ο) y-in-x = IH' y y-in-x Ο
πα΄Όα΄Ώα΄° : Ordinal (π€ βΊ)
πα΄Όα΄Ώα΄° = πα΅Κ³α΅ , _βα΅Κ³α΅_
, (Ξ» x y β β-is-prop-valued)
, βα΅Κ³α΅-is-well-founded
, βα΅Κ³α΅-is-extensional
, βα΅Κ³α΅-is-transitive
\end{code}
We now work towards proving that πα΄Όα΄Ώα΄° and Ord, the ordinal of type theoretic
ordinals, are isomorphic (as type theoretic ordinals).
We start by defining a map Ord β π by transfinite recursion on Ord.
\begin{code}
private
Ord : π€ βΊ Μ
Ord = Ordinal π€
Ord-to-π : Ord β π
Ord-to-π = transfinite-recursion-on-OO π (Ξ» Ξ± f β π-set f)
Ord-to-π-behaviour : (Ξ± : Ord) β Ord-to-π Ξ± οΌ π-set (Ξ» a β Ord-to-π (Ξ± β a))
Ord-to-π-behaviour = transfinite-recursion-on-OO-behaviour π (Ξ» a f β π-set f)
β-of-Ord-to-π : (Ξ± : Ord) (x : π)
β x β Ord-to-π Ξ± οΌ (β a κ β¨ Ξ± β© , Ord-to-π (Ξ± β a) οΌ x)
β-of-Ord-to-π Ξ± x =
x β Ord-to-π Ξ± οΌβ¨ ap (x β_) (Ord-to-π-behaviour Ξ±) β©
x β π-set (Ξ» a β Ord-to-π (Ξ± β a)) οΌβ¨ β-for-π-sets x _ β©
(β a κ β¨ Ξ± β© , Ord-to-π (Ξ± β a) οΌ x) β
to-β-of-Ord-to-π : (Ξ± : Ord) {x : π}
β (β a κ β¨ Ξ± β© , Ord-to-π (Ξ± β a) οΌ x) β x β Ord-to-π Ξ±
to-β-of-Ord-to-π Ξ± {x} = Idtofunβ»ΒΉ (β-of-Ord-to-π Ξ± x)
from-β-of-Ord-to-π : (Ξ± : Ord) {x : π}
β x β Ord-to-π Ξ± β (β a κ β¨ Ξ± β© , Ord-to-π (Ξ± β a) οΌ x)
from-β-of-Ord-to-π Ξ± {x} = Idtofun (β-of-Ord-to-π Ξ± x)
\end{code}
The map Ord β π preserves the strict and weak order.
\begin{code}
Ord-to-π-preserves-strict-order : (Ξ± Ξ² : Ord) β Ξ± β² Ξ² β Ord-to-π Ξ± β Ord-to-π Ξ²
Ord-to-π-preserves-strict-order Ξ± Ξ² (b , refl) = to-β-of-Ord-to-π Ξ² β£ b , refl β£
Ord-to-π-preserves-weak-order : (Ξ± Ξ² : Ord) β Ξ± β΄ Ξ² β Ord-to-π Ξ± β Ord-to-π Ξ²
Ord-to-π-preserves-weak-order Ξ± Ξ² l x m = to-β-of-Ord-to-π Ξ² m'
where
l' : (a : β¨ Ξ± β©) β Ξ£ b κ β¨ Ξ² β© , Ξ± β a οΌ Ξ² β b
l' = from-βΌ (β΄-gives-βΌ Ξ± Ξ² l)
m' : β b κ β¨ Ξ² β© , Ord-to-π (Ξ² β b) οΌ x
m' = β₯β₯-functor h (from-β-of-Ord-to-π Ξ± m)
where
h : (Ξ£ a κ β¨ Ξ± β© , Ord-to-π (Ξ± β a) οΌ x)
β (Ξ£ b κ β¨ Ξ² β© , Ord-to-π (Ξ² β b) οΌ x)
h (a , refl) = (b , ap Ord-to-π (e β»ΒΉ))
where
b : β¨ Ξ² β©
b = prβ (l' a)
e : Ξ± β a οΌ Ξ² β b
e = prβ (l' a)
\end{code}
An argument by transfinite induction shows that the map Ord-to-π is left
cancellable, which yields a quick proof that Ord-to-π not only preserves the
strict order, but also reflects it. It follows that Ord-to-π also reflects the
weak order.
\begin{code}
Ord-to-π-is-left-cancellable : (Ξ± Ξ² : Ord) β Ord-to-π Ξ± οΌ Ord-to-π Ξ² β Ξ± οΌ Ξ²
Ord-to-π-is-left-cancellable = transfinite-induction-on-OO _ f
where
f : (Ξ± : Ord)
β ((a : β¨ Ξ± β©) (Ξ² : Ord) β Ord-to-π (Ξ± β a) οΌ Ord-to-π Ξ² β (Ξ± β a) οΌ Ξ²)
β (Ξ² : Ord) β Ord-to-π Ξ± οΌ Ord-to-π Ξ² β Ξ± οΌ Ξ²
f Ξ± IH Ξ² e = β΄-antisym Ξ± Ξ² (to-β΄ Ξ± Ξ² gβ) (to-β΄ Ξ² Ξ± gβ)
where
gβ : (a : β¨ Ξ± β©) β (Ξ± β a) β² Ξ²
gβ a = β₯β₯-rec (β²-is-prop-valued (Ξ± β a) Ξ²) h (from-β-of-Ord-to-π Ξ² m)
where
h : (Ξ£ b κ β¨ Ξ² β© , Ord-to-π (Ξ² β b) οΌ Ord-to-π (Ξ± β a)) β (Ξ± β a) β² Ξ²
h (b , e) = (b , (IH a (Ξ² β b) (e β»ΒΉ)))
m : Ord-to-π (Ξ± β a) β Ord-to-π Ξ²
m = transport (Ord-to-π (Ξ± β a) β_) e
(to-β-of-Ord-to-π Ξ± β£ a , refl β£)
gβ : (b : β¨ Ξ² β©) β (Ξ² β b) β² Ξ±
gβ b = β₯β₯-rec (β²-is-prop-valued (Ξ² β b) Ξ±) h (from-β-of-Ord-to-π Ξ± m)
where
h : (Ξ£ a κ β¨ Ξ± β© , Ord-to-π (Ξ± β a) οΌ Ord-to-π (Ξ² β b)) β (Ξ² β b) β² Ξ±
h (a , e) = (a , ((IH a (Ξ² β b) e) β»ΒΉ))
m : Ord-to-π (Ξ² β b) β Ord-to-π Ξ±
m = transport (Ord-to-π (Ξ² β b) β_) (e β»ΒΉ)
(to-β-of-Ord-to-π Ξ² β£ b , refl β£)
Ord-to-π-reflects-strict-order : (Ξ± Ξ² : Ord) β Ord-to-π Ξ± β Ord-to-π Ξ² β Ξ± β² Ξ²
Ord-to-π-reflects-strict-order Ξ± Ξ² m = β₯β₯-rec (β²-is-prop-valued Ξ± Ξ²) h m'
where
h : (Ξ£ b κ β¨ Ξ² β© , Ord-to-π (Ξ² β b) οΌ Ord-to-π Ξ±) β Ξ± β² Ξ²
h (b , e) = (b , ((Ord-to-π-is-left-cancellable (Ξ² β b) Ξ± e) β»ΒΉ))
m' : β b κ β¨ Ξ² β© , Ord-to-π (Ξ² β b) οΌ Ord-to-π Ξ±
m' = from-β-of-Ord-to-π Ξ² m
Ord-to-π-reflects-weak-order : (Ξ± Ξ² : Ord) β Ord-to-π Ξ± β Ord-to-π Ξ² β Ξ± β΄ Ξ²
Ord-to-π-reflects-weak-order Ξ± Ξ² s = to-β΄ Ξ± Ξ² h
where
h : (a : β¨ Ξ± β©) β (Ξ± β a) β² Ξ²
h a = Ord-to-π-reflects-strict-order (Ξ± β a) Ξ² m
where
m : Ord-to-π (Ξ± β a) β Ord-to-π Ξ²
m = s (Ord-to-π (Ξ± β a)) (to-β-of-Ord-to-π Ξ± β£ a , refl β£)
\end{code}
The map Ord β π constructed above actually factors through the subtype πα΅Κ³α΅.
(The proof is quite straightforward, but the formal proof is slightly long,
because we need to use from-β-of-Ord-to-π and to-β-of-Ord-to-π as we don't have
judgemental computation rules for π.)
\begin{code}
Ord-to-πα΅Κ³α΅ : Ord β πα΅Κ³α΅
Ord-to-πα΅Κ³α΅ Ξ± = (Ord-to-π Ξ± , Ο Ξ±)
where
Ο : (Ξ² : Ord) β is-transitive-set (Ord-to-π Ξ²)
Ο Ξ² x y x-in-Ξ² y-in-x = to-β-of-Ord-to-π Ξ² (β₯β₯-rec β-is-prop lemma x-in-Ξ²')
where
x-in-Ξ²' : β b κ β¨ Ξ² β© , Ord-to-π (Ξ² β b) οΌ x
x-in-Ξ²' = from-β-of-Ord-to-π Ξ² x-in-Ξ²
lemma : (Ξ£ b κ β¨ Ξ² β© , Ord-to-π (Ξ² β b) οΌ x)
β β c κ β¨ Ξ² β© , Ord-to-π (Ξ² β c) οΌ y
lemma (b , refl) = β₯β₯-functor h y-in-Ξ²βb
where
h : (Ξ£ c κ β¨ Ξ² β b β© , Ord-to-π ((Ξ² β b) β c) οΌ y)
β Ξ£ d κ β¨ Ξ² β© , Ord-to-π (Ξ² β d) οΌ y
h ((c , l) , refl) = (c , ap Ord-to-π ((iterated-β Ξ² b c l) β»ΒΉ))
y-in-Ξ²βb : β c κ β¨ Ξ² β b β© , Ord-to-π ((Ξ² β b) β c) οΌ y
y-in-Ξ²βb = from-β-of-Ord-to-π (Ξ² β b) y-in-x
Ο : (Ξ² : Ord) β is-set-theoretic-ordinal (Ord-to-π Ξ²)
Ο = transfinite-induction-on-OO
(Ξ» - β is-set-theoretic-ordinal (Ord-to-π -))
Ο'
where
Ο' : (Ξ² : Ord)
β ((b : β¨ Ξ² β©) β is-set-theoretic-ordinal (Ord-to-π (Ξ² β b)))
β is-set-theoretic-ordinal (Ord-to-π Ξ²)
Ο' Ξ² IH = (Ο Ξ² , Ο')
where
Ο' : (y : π) β y β Ord-to-π Ξ² β is-transitive-set y
Ο' y m = β₯β₯-rec being-transitive-set-is-prop h (from-β-of-Ord-to-π Ξ² m)
where
h : (Ξ£ b κ β¨ Ξ² β© , Ord-to-π (Ξ² β b) οΌ y) β is-transitive-set y
h (b , refl) = Ο (Ξ² β b)
Ord-to-πα΅Κ³α΅-is-left-cancellable : {Ξ± Ξ² : Ord}
β Ord-to-πα΅Κ³α΅ Ξ± οΌ Ord-to-πα΅Κ³α΅ Ξ² β Ξ± οΌ Ξ²
Ord-to-πα΅Κ³α΅-is-left-cancellable {Ξ±} {Ξ²} e =
Ord-to-π-is-left-cancellable Ξ± Ξ² (ap prβ e)
\end{code}
To show that Ord-to-πα΅Κ³α΅ is an isomorphism of ordinals it now suffices to prove
that it is split surjective.
We construct a map π β Ord by recursion on π by sending π-set {A} f to the
supremum of ordinals β (Ο (f a) + π) indexed by a : A.
This is a familiar construction in set theory, see e.g. [Def. 9.3.4, AR10],
where the ordinal above is the "rank" of the set. This map (but with the domain
an arbitrary well founded order) also appears at the bottom of [Acz77, p. 743].
\begin{code}
open import Ordinals.Arithmetic fe'
open import Ordinals.AdditionProperties ua
open import Ordinals.OrdinalOfOrdinalsSuprema ua
open import Quotient.Type hiding (is-prop-valued)
open import Quotient.GivesSetReplacement
module π-to-Ord-construction
(sq : set-quotients-exist)
where
open suprema pt (set-replacement-from-set-quotients-and-prop-trunc sq pt)
private
π-to-Ord-aux : {A : π€ Μ } β (A β π) β (A β Ord) β Ord
π-to-Ord-aux _ r = sup (Ξ» a β r a +β πβ)
π-to-Ord-packaged : Ξ£ Ο κ (π β Ord) , ({A : π€ Μ } (f : A β π)
(r : A β Ordinal π€)
β Ο (π-set f) οΌ π-to-Ord-aux f r)
π-to-Ord-packaged =
π-recursion-with-computation (the-type-of-ordinals-is-a-set (ua π€) fe) Ο Ο
where
Ο = π-to-Ord-aux
monotone-lemma : {A B : π€ Μ } (f : A β π) (g : B β π)
β (rβ : A β Ord) (rβ : B β Ord)
β ((a : A) β β₯ Ξ£ b κ B , Ξ£ p κ f a οΌ g b , rβ a οΌ rβ b β₯)
β Ο f rβ β΄ Ο g rβ
monotone-lemma {A} {B} f g rβ rβ e =
sup-is-lower-bound-of-upper-bounds (Ξ» a β rβ a +β πβ) (Ο g rβ) Ο
where
Ο : (a : A) β (rβ a +β πβ) β΄ Ο g rβ
Ο a = β₯β₯-rec (β΄-is-prop-valued _ _) Ο (e a)
where
Ο : (Ξ£ b κ B , Ξ£ p κ f a οΌ g b , rβ a οΌ rβ b)
β (rβ a +β πβ) β΄ Ο g rβ
Ο (b , _ , q) = β΄-trans _ (rβ b +β πβ) _ k l
where
k : (rβ a +β πβ) β΄ (rβ b +β πβ)
k = ββ-to-β΄ _ _ (idtoeqβ _ _ (ap (_+β πβ) q))
l : (rβ b +β πβ) β΄ Ο g rβ
l = sup-is-upper-bound _ b
Ο : {A B : π€ Μ } (f : A β π) (g : B β π)
β (rβ : A β Ord) (rβ : B β Ord)
β ((a : A) β β₯ Ξ£ b κ B , Ξ£ p κ f a οΌ g b , rβ a οΌ rβ b β₯)
β ((b : B) β β₯ Ξ£ a κ A , Ξ£ p κ g b οΌ f a , rβ b οΌ rβ a β₯)
β f β g
β Ο f rβ οΌ Ο g rβ
Ο {A} {B} f g rβ rβ eβ eβ _ =
β΄-antisym (Ο f rβ) (Ο g rβ)
(monotone-lemma f g rβ rβ eβ)
(monotone-lemma g f rβ rβ eβ)
π-to-Ord : π β Ord
π-to-Ord = prβ (π-to-Ord-packaged)
\end{code}
The below records the behaviour on π-sets that we announced above.
\begin{code}
π-to-Ord-behaviour-on-π-sets :
{A : π€ Μ } (f : A β π)
β π-to-Ord (π-set f) οΌ sup (Ξ» a β π-to-Ord (f a) +β πβ)
π-to-Ord-behaviour-on-π-sets f = prβ π-to-Ord-packaged f (Ξ» a β π-to-Ord (f a))
πα΅Κ³α΅-to-Ord : πα΅Κ³α΅ β Ord
πα΅Κ³α΅-to-Ord = π-to-Ord β prβ
\end{code}
We show that Ord-to-π is a split surjection by showing that πα΅Κ³α΅-to-Ord is a
section of it. The fact that we are restricting the inputs to set theoretic
ordinals is crucial in proving one of the inequalities.
\begin{code}
π-to-Ord-is-section-of-Ord-to-π : (x : π)
β is-set-theoretic-ordinal x
β Ord-to-π (π-to-Ord x) οΌ x
π-to-Ord-is-section-of-Ord-to-π =
π-prop-induction _ (Ξ» x β Ξ -is-prop fe (Ξ» _ β π-is-large-set)) Ο
where
Ο : {A : π€ Μ } (f : A β π)
β ((a : A) β is-set-theoretic-ordinal (f a)
β Ord-to-π (π-to-Ord (f a)) οΌ f a)
β is-set-theoretic-ordinal (π-set f)
β Ord-to-π (π-to-Ord (π-set f)) οΌ π-set f
Ο {A} f IH Ο =
Ord-to-π (π-to-Ord (π-set f)) οΌβ¨ β¦
1β¦ β©
Ord-to-π s οΌβ¨ β¦
2β¦ β©
π-set (Ξ» y β Ord-to-π (s β y)) οΌβ¨ β¦
3β¦ β©
π-set f β
where
s : Ord
s = sup (Ξ» a β π-to-Ord (f a) +β πβ)
β¦
1β¦ = ap Ord-to-π (π-to-Ord-behaviour-on-π-sets f)
β¦
2β¦ = Ord-to-π-behaviour s
β¦
3β¦ = π-set-ext _ _ (eβ , eβ)
where
c : (a : A) β Ord
c a = π-to-Ord (f a) +β πβ
abstract
u : (a : A) β β¨ c a β© β β¨ s β©
u a = prβ (sup-is-upper-bound _ a)
IH' : (a : A) β Ord-to-π (π-to-Ord (f a)) οΌ f a
IH' a = IH a (being-set-theoretic-ordinal-is-hereditary Ο
(to-β-of-π-set β£ a , refl β£))
lemmaβ : (a : A) β Ord-to-π (c a β inr β) οΌ f a
lemmaβ a = Ord-to-π (c a β inr β) οΌβ¨ ap Ord-to-π β¦
eβ¦ β©
Ord-to-π (π-to-Ord (f a)) οΌβ¨ IH' a β©
f a β
where
β¦
eβ¦ : c a β inr β οΌ π-to-Ord (f a)
β¦
eβ¦ = successor-lemma-right (π-to-Ord (f a))
lemmaβ : (a : A) β Ord-to-π (s β u a (inr β)) οΌ f a
lemmaβ a = Ord-to-π (s β u a (inr β)) οΌβ¨ ap Ord-to-π β¦
eβ¦ β©
Ord-to-π (c a β inr β) οΌβ¨ lemmaβ a β©
f a β
where
β¦
eβ¦ : s β u a (inr β) οΌ c a β inr β
β¦
eβ¦ = initial-segment-of-sup-at-component _ a (inr β)
eβ : f β² (Ξ» y β Ord-to-π (s β y))
eβ a = β£ u a (inr β) , lemmaβ a β£
eβ : (Ξ» y β Ord-to-π (s β y)) β² f
eβ y =
β₯β₯-rec β-is-prop h
(initial-segment-of-sup-is-initial-segment-of-some-component _ y)
where
h : (Ξ£ a κ A , Ξ£ x κ β¨ c a β© , s β y οΌ c a β x)
β β a κ A , f a οΌ Ord-to-π (s β y)
h (a , inr β , e) = β£ a , (e' β»ΒΉ) β£
where
e' = Ord-to-π (s β y) οΌβ¨ ap Ord-to-π e β©
Ord-to-π (c a β inr β) οΌβ¨ lemmaβ a β©
f a β
h (a , inl x , e) = goal
where
β-claimβ : Ord-to-π (π-to-Ord (f a) β x) β f a
β-claimβ = transport (Ord-to-π (π-to-Ord (f a) β x) β_)
(IH' a)
(Ord-to-π-preserves-strict-order
(π-to-Ord (f a) β x)
(π-to-Ord (f a))
(x , refl))
β-claimβ : Ord-to-π (π-to-Ord (f a) β x) β π-set f
β-claimβ = transitive-set-if-set-theoretic-ordinal Ο
(f a)
(Ord-to-π (π-to-Ord (f a) β x))
(to-β-of-π-set β£ a , refl β£)
β-claimβ
goal : β a' κ A , f a' οΌ Ord-to-π (s β y)
goal = β₯β₯-functor g (from-β-of-π-set β-claimβ)
where
g : (Ξ£ a' κ A , f a' οΌ Ord-to-π (π-to-Ord (f a) β x))
β Ξ£ a' κ A , f a' οΌ Ord-to-π (s β y)
g (a' , p) = (a' , q)
where
q = f a' οΌβ¨ p β©
Ord-to-π (π-to-Ord (f a) β x) οΌβ¨ e' β©
Ord-to-π (s β y) β
where
β-fact : c a β inl x οΌ π-to-Ord (f a) β x
β-fact = +β-β-left x β»ΒΉ
e' = ap Ord-to-π (β-fact β»ΒΉ β e β»ΒΉ)
πα΅Κ³α΅-to-Ord-is-section-of-Ord-to-πα΅Κ³α΅ : Ord-to-πα΅Κ³α΅ β πα΅Κ³α΅-to-Ord βΌ id
πα΅Κ³α΅-to-Ord-is-section-of-Ord-to-πα΅Κ³α΅ (x , Ο) =
πα΅Κ³α΅-is-subtype (π-to-Ord-is-section-of-Ord-to-π x Ο)
\end{code}
Finally we obtain the result that ordinal of type theoretic ordinals is
isomorphic to the (type theoretic) ordinal πα΄Όα΄Ώα΄° of set theoretic ordinals.
\begin{code}
πα΅Κ³α΅-isomorphic-to-Ord : OO π€ ββ πα΄Όα΄Ώα΄°
πα΅Κ³α΅-isomorphic-to-Ord =
Ord-to-πα΅Κ³α΅ , order-preserving-reflecting-equivs-are-order-equivs
(OO π€) πα΄Όα΄Ώα΄° Ord-to-πα΅Κ³α΅
Ord-to-πα΅Κ³α΅-is-equiv
Ord-to-π-preserves-strict-order
Ord-to-π-reflects-strict-order
where
Ord-to-πα΅Κ³α΅-is-split-surjective : (x : πα΅Κ³α΅)
β Ξ£ Ξ± κ Ord , Ord-to-πα΅Κ³α΅ Ξ± οΌ x
Ord-to-πα΅Κ³α΅-is-split-surjective x = πα΅Κ³α΅-to-Ord x
, πα΅Κ³α΅-to-Ord-is-section-of-Ord-to-πα΅Κ³α΅ x
Ord-to-πα΅Κ³α΅-is-equiv : is-equiv (Ord-to-πα΅Κ³α΅)
Ord-to-πα΅Κ³α΅-is-equiv = lc-split-surjections-are-equivs
Ord-to-πα΅Κ³α΅
Ord-to-πα΅Κ³α΅-is-left-cancellable
Ord-to-πα΅Κ³α΅-is-split-surjective
\end{code}
Further work
------------
(1) The recursive nature of π-to-Ord is convenient because it allows us to prove
properties by induction. Moreover, the supremum yields an ordinal by
construction. It is possible to give a more direct presentation of
π-to-Ord (π-set {A} f)
however, that is nonrecursive.
Namely, we can show that π-to-Ord (π-set {A} f) οΌ (A/~ , <), where ~ identifies
elements of A that have the same image under f and [a] < [a'] is defined to hold
when f a β f a'.
It is straightforward to see that (A/~ , <) is in fact equivalent (but not equal
for size reasons) to the image of f, which in turn is equivalent to the total
space (Ξ£ y κ π , y β π-set f), so that the map π-to-Ord can be described (up to
equivalence) as x β¦ Ξ£ y κ π , y β x.
These observations are fully formalised in the file
Ordinals/CumulativeHierarchy-Addendum.lagda.
(2) On a separate note, we are currently working out the details of a related
presentation for all of π.