Tom de Jong, Nicolai Kraus, Fredrik Nordvall Forsberg, Chuangjie Xu 6 November 2024 Refactored between November 2024 and January 2025. We define types expressing what ordinal exponentiation should be for zero, successor and supremum exponents, and we record a few properties that follow immediately follow from those specifications. \begin{code} {-# OPTIONS --safe --without-K --exact-split #-} open import UF.PropTrunc open import UF.Size open import UF.Univalence module Ordinals.Exponentiation.Specification (ua : Univalence) (pt : propositional-truncations-exist) (sr : Set-Replacement pt) where open import MLTT.Spartan open import UF.ClassicalLogic open import UF.FunExt open import UF.Subsingletons open import UF.Subsingletons-FunExt open import UF.UA-FunExt open import UF.UniverseEmbedding private fe : FunExt fe = Univalence-gives-FunExt ua fe' : Fun-Ext fe' = Univalence-gives-Fun-Ext ua open import Ordinals.AdditionProperties ua open import Ordinals.Arithmetic fe open import Ordinals.Maps open import Ordinals.MultiplicationProperties ua open import Ordinals.OrdinalOfOrdinals ua open import Ordinals.OrdinalOfOrdinalsSuprema ua open import Ordinals.Type open import Ordinals.Underlying open PropositionalTruncation pt open suprema pt sr \end{code} In what follows F should be thought of as implementing ordinal exponentiation with base Ξ±, i.e. F Ξ² produces the ordinal Ξ±^Ξ². The three requirements below, together with πβ^Ξ² οΌ πβ for Ξ² β πβ, classically *define* ordinal exponentiation. \begin{code} module _ {π€ π₯ : Universe} (Ξ± : Ordinal π€) (F : Ordinal π₯ β Ordinal (π€ β π₯)) where exp-specification-zero : (π€ β π₯) βΊ Μ exp-specification-zero = F (πβ {π₯}) οΌ πβ exp-specification-succ : (π€ β π₯) βΊ Μ exp-specification-succ = (Ξ² : Ordinal π₯) β F (Ξ² +β πβ) οΌ (F Ξ² Γβ Ξ±) exp-specification-sup-generalized : (π€ β π₯) βΊ Μ exp-specification-sup-generalized = Ξ± β πβ β {I : π₯ Μ } β β₯ I β₯ β (Ξ² : I β Ordinal π₯) β F (sup Ξ²) οΌ sup (Ξ» (i : Lift π€ I) β F (Ξ² (lower i))) module _ (Ξ± : Ordinal π€) (F : Ordinal π€ β Ordinal π€) where exp-specification-sup : π€ βΊ Μ exp-specification-sup = Ξ± β πβ β {I : π€ Μ } β β₯ I β₯ β (Ξ² : I β Ordinal π€) β F (sup Ξ²) οΌ sup (F β Ξ²) exp-specification-sup-from-generalized : exp-specification-sup-generalized Ξ± F β exp-specification-sup exp-specification-sup-from-generalized Ο l {I} I-inh Ξ² = Ο l I-inh Ξ² β e where e : sup (F β Ξ² β lower) οΌ sup (F β Ξ²) e = β΄-antisym _ _ (sup-composition-β΄ lower (F β Ξ²)) (sup-composition-β΄ (lift π€) (F β Ξ² β lower)) \end{code} Added 29 January 2025 by Tom de Jong. \begin{code} exp-specification-sup-strong : π€ βΊ Μ exp-specification-sup-strong = Ξ± β πβ β (I : π€ Μ ) β (Ξ² : I β Ordinal π€) β F (sup Ξ²) οΌ sup (cases {X = π{π€}} (Ξ» _ β πβ) (F β Ξ²)) exp-specification-sup-strong-implies-monotonicity : exp-specification-sup-strong β Ξ± β πβ β is-monotone (OO π€) (OO π€) F exp-specification-sup-strong-implies-monotonicity Ο Ξ±-nonzero Ξ² Ξ³ l = transport (F Ξ² βΌ_) (ap F (e β»ΒΉ)) k where Ξ : π{π€} + π{π€} β Ordinal π€ Ξ = cases (Ξ» _ β Ξ²) (Ξ» _ β Ξ³) e : Ξ³ οΌ sup Ξ e = β΄-antisym Ξ³ (sup Ξ) (sup-is-upper-bound Ξ (inr β)) (sup-is-lower-bound-of-upper-bounds Ξ Ξ³ (dep-cases (Ξ» _ β βΌ-gives-β΄ Ξ² Ξ³ l) (Ξ» _ β β΄-refl Ξ³))) k : F Ξ² βΌ F (sup Ξ) k = transportβ»ΒΉ (F Ξ² βΌ_) (Ο Ξ±-nonzero (π + π) Ξ) (β΄-gives-βΌ (F Ξ²) (sup (cases (Ξ» _ β πβ) (F β Ξ))) (sup-is-upper-bound _ (inr (inl β)))) exp-specification-zero-from-strong-sup-specification : exp-specification-sup-strong β Ξ± β πβ β exp-specification-zero Ξ± F exp-specification-zero-from-strong-sup-specification Ο Ξ±-nonzero = F πβ οΌβ¨ ap F I β© F (sup Ξ΅) οΌβ¨ Ο Ξ±-nonzero π Ξ΅ β© sup Ξ΅' οΌβ¨ II β© πβ β where Ξ΅ : π β Ordinal π€ Ξ΅ = π-elim Ξ΅' : π + π β Ordinal π€ Ξ΅' = cases (Ξ» _ β πβ) (F β Ξ΅) I : πβ οΌ sup Ξ΅ I = β΄-antisym πβ (sup Ξ΅) (πβ-least-β΄ (sup Ξ΅)) (sup-is-lower-bound-of-upper-bounds Ξ΅ πβ π-induction) II : sup Ξ΅' οΌ πβ II = β΄-antisym (sup Ξ΅') πβ (sup-is-lower-bound-of-upper-bounds Ξ΅' πβ (dep-cases (Ξ» _ β β΄-refl πβ) π-induction)) (sup-is-upper-bound Ξ΅' (inl β)) exp-specification-sup-from-strong : exp-specification-sup-strong β exp-specification-sup exp-specification-sup-from-strong specβ Ξ±-nonzero {I} I-inh Ξ² = F (sup Ξ²) οΌβ¨ specβ Ξ±-nonzero I Ξ² β© sup (cases (Ξ» _ β πβ) (F β Ξ²)) οΌβ¨ e β© sup (F β Ξ²) β where specβ : exp-specification-zero Ξ± F specβ = exp-specification-zero-from-strong-sup-specification specβ Ξ±-nonzero F-monotone : is-monotone (OO π€) (OO π€) F F-monotone = exp-specification-sup-strong-implies-monotonicity specβ Ξ±-nonzero e = β΄-antisym _ _ (sup-is-lower-bound-of-upper-bounds (cases (Ξ» _ β πβ) (F β Ξ²)) (sup (F β Ξ²)) ub) (sup-composition-β΄ inr (cases (Ξ» _ β πβ) (Ξ» x β F (Ξ² x)))) where ub : (x : π + I) β cases (Ξ» _ β πβ) (F β Ξ²) x β΄ sup (F β Ξ²) ub (inr i) = sup-is-upper-bound (F β Ξ²) i ub (inl β) = β₯β₯-rec (β΄-is-prop-valued πβ (sup (F β Ξ²))) ub' I-inh where ub' : I β πβ β΄ sup (F β Ξ²) ub' i = β΄-trans πβ (F (Ξ² i)) (sup (F β Ξ²)) (βΌ-gives-β΄ πβ (F (Ξ² i)) (transport (_βΌ F (Ξ² i)) specβ (F-monotone πβ (Ξ² i) (πβ-least (Ξ² i))))) (sup-is-upper-bound (F β Ξ²) i) exp-specification-sup-strong-if-EM : EM π€ β exp-specification-zero Ξ± F β exp-specification-sup β exp-specification-sup-strong exp-specification-sup-strong-if-EM em specβ specβ Ξ±-nonzero I Ξ² = ΞΊ (em β₯ I β₯ β₯β₯-is-prop) where G : π + I β Ordinal π€ G = cases (Ξ» _ β πβ) (F β Ξ²) ΞΊ : is-decidable β₯ I β₯ β F (sup Ξ²) οΌ sup G ΞΊ (inl I-inh) = β₯β₯-rec (underlying-type-is-set fe (OO π€)) h I-inh where h : I β F (sup Ξ²) οΌ sup G h i = F (sup Ξ²) οΌβ¨ specβ Ξ±-nonzero I-inh Ξ² β© sup (F β Ξ²) οΌβ¨ β΄-antisym (sup (F β Ξ²)) (sup G) hβ hβ β© sup G β where hβ : sup (F β Ξ²) β΄ sup G hβ = sup-composition-β΄ inr G hβ : sup G β΄ sup (F β Ξ²) hβ = sup-is-lower-bound-of-upper-bounds G (sup (F β Ξ²)) hβ where hβ : (x : π + I) β G x β΄ sup (F β Ξ²) hβ (inr i) = sup-is-upper-bound (F β Ξ²) i hβ (inl β) = β΄-trans πβ (F (Ξ² i)) (sup (F β Ξ²)) (βΌ-gives-β΄ πβ (F (Ξ² i)) (transport (_βΌ F (Ξ² i)) specβ (is-monotone-if-continuous F (specβ Ξ±-nonzero) πβ (Ξ² i) (πβ-least (Ξ² i))))) (sup-is-upper-bound (F β Ξ²) i) ΞΊ (inr I-empty) = F (sup Ξ²) οΌβ¨ ap F eβ β© F πβ οΌβ¨ specβ β© πβ οΌβ¨ eβ β»ΒΉ β© sup G β where eβ : sup Ξ² οΌ πβ eβ = β΄-antisym (sup Ξ²) πβ (sup-is-lower-bound-of-upper-bounds Ξ² πβ (Ξ» i β π-elim (I-empty β£ i β£))) (πβ-least-β΄ (sup Ξ²)) eβ : sup G οΌ πβ eβ = β΄-antisym (sup G) πβ (sup-is-lower-bound-of-upper-bounds G πβ (dep-cases (Ξ» _ β β΄-refl πβ) (Ξ» i β π-elim (I-empty β£ i β£)))) (sup-is-upper-bound G (inl β)) \end{code} The appealing thing about the strong supremum specification is that, together with the successor specification, it uniquely specifies exponentiation with a nonzero base. \begin{code} exp-strong-specification-uniquely-specifies-exp' : (Ξ± : Ordinal π€) β Ξ± β πβ β (F G : Ordinal π€ β Ordinal π€) β exp-specification-sup-strong Ξ± F β exp-specification-succ Ξ± F β exp-specification-sup-strong Ξ± G β exp-specification-succ Ξ± G β F βΌ G exp-strong-specification-uniquely-specifies-exp' {π€} Ξ± Ξ±-nonzero F G F-eqβ F-eqβ G-eqβ G-eqβ = transfinite-induction-on-OO _ e where e : (Ξ² : Ordinal π€) β ((b : β¨ Ξ² β©) β F (Ξ² β b) οΌ G (Ξ² β b)) β F Ξ² οΌ G Ξ² e Ξ² IH = F Ξ² οΌβ¨ I β© F (sup Ξ» b β (Ξ² β b) +β πβ) οΌβ¨ II β© sup (cases (Ξ» _ β πβ) (Ξ» b β F ((Ξ² β b) +β πβ))) οΌβ¨ III β© sup (cases (Ξ» _ β πβ) (Ξ» b β F (Ξ² β b) Γβ Ξ±)) οΌβ¨ IV β© sup (cases (Ξ» _ β πβ) (Ξ» b β G (Ξ² β b) Γβ Ξ±)) οΌβ¨ V β© sup (cases (Ξ» _ β πβ) (Ξ» b β G ((Ξ² β b) +β πβ))) οΌβ¨ VI β© G (sup (Ξ» b β (Ξ² β b) +β πβ)) οΌβ¨ VII β© G Ξ² β where I = ap F (supremum-of-successors-of-initial-segments pt sr Ξ²) II = F-eqβ Ξ±-nonzero β¨ Ξ² β© (Ξ» b β (Ξ² β b) +β πβ) III = ap (Ξ» - β sup (cases (Ξ» (_ : π{π€}) β πβ) -)) (dfunext fe' (Ξ» b β F-eqβ (Ξ² β b))) IV = ap (Ξ» - β sup (cases (Ξ» (_ : π{π€}) β πβ) -)) (dfunext fe' (Ξ» b β ap (_Γβ Ξ±) (IH b))) V = ap (Ξ» - β sup (cases (Ξ» (_ : π{π€}) β πβ) -)) (dfunext fe' (Ξ» b β (G-eqβ (Ξ² β b)) β»ΒΉ)) VI = (G-eqβ Ξ±-nonzero β¨ Ξ² β© (Ξ» b β (Ξ² β b) +β πβ)) β»ΒΉ VII = ap G ((supremum-of-successors-of-initial-segments pt sr Ξ²) β»ΒΉ) exp-strong-specification-uniquely-specifies-exp : (Ξ± : Ordinal π€) β Ξ± β πβ β is-prop (Ξ£ F κ (Ordinal π€ β Ordinal π€) , exp-specification-sup-strong Ξ± F Γ exp-specification-succ Ξ± F) exp-strong-specification-uniquely-specifies-exp {π€} Ξ± Ξ±-nonzero = (Ξ» (F , F-eqβ , F-eqβ) (G , G-eqβ , G-eqβ) β to-subtype-οΌ (Ξ» H β Γ-is-prop (Ξ β-is-prop fe' (Ξ» _ _ _ β underlying-type-is-set fe (OO π€))) (Ξ -is-prop fe' (Ξ» _ β underlying-type-is-set fe (OO π€)))) (dfunext fe' (exp-strong-specification-uniquely-specifies-exp' Ξ± Ξ±-nonzero F G F-eqβ F-eqβ G-eqβ G-eqβ))) \end{code} The following special cases follow directly from the specification. \begin{code} module _ (Ξ± : Ordinal π€) (exp-Ξ± : Ordinal π€ β Ordinal π€) (exp-zero : exp-specification-zero Ξ± exp-Ξ±) (exp-succ : exp-specification-succ Ξ± exp-Ξ±) where πβ-neutral-exp : exp-Ξ± πβ οΌ Ξ± πβ-neutral-exp = exp-Ξ± πβ οΌβ¨ ap (exp-Ξ±) (πβ-left-neutral πβ β»ΒΉ) β© exp-Ξ± (πβ {π€} +β πβ) οΌβ¨ exp-succ πβ β© exp-Ξ± (πβ) Γβ Ξ± οΌβ¨ ap (_Γβ Ξ±) exp-zero β© πβ Γβ Ξ± οΌβ¨ πβ-left-neutral-Γβ Ξ± β© Ξ± β exp-πβ-is-Γβ : exp-Ξ± πβ οΌ Ξ± Γβ Ξ± exp-πβ-is-Γβ = exp-Ξ± (πβ +β πβ) οΌβ¨ exp-succ πβ β© exp-Ξ± πβ Γβ Ξ± οΌβ¨ ap (_Γβ Ξ±) πβ-neutral-exp β© Ξ± Γβ Ξ± β \end{code} The specification for suprema implies monotonicity. \begin{code} exp-is-monotone-in-exponent : (Ξ± : Ordinal π€) (exp-Ξ± : Ordinal π₯ β Ordinal (π€ β π₯)) β (Ξ± β πβ) β exp-specification-sup-generalized Ξ± exp-Ξ± β is-monotone (OO π₯) (OO (π€ β π₯)) exp-Ξ± exp-is-monotone-in-exponent Ξ± exp-Ξ± Ξ½ exp-sup = is-monotone-if-continuous-generalized exp-Ξ± (exp-sup Ξ½) \end{code}