Martin Escardo 2018.
Classically, the ordinals Ο +β πβ and βββ are equal. Constructively,
we have (Ο +β πβ) β΄ βββ, but the inequality in the other direction is
equivalent to LPO.
\begin{code}
{-# OPTIONS --safe --without-K #-}
open import UF.Univalence
open import UF.FunExt
open import UF.UA-FunExt
module Ordinals.ConvergentSequence (ua : Univalence) where
private
fe : FunExt
fe = Univalence-gives-FunExt ua
fe' : Fun-Ext
fe' {π€} {π₯} = fe π€ π₯
open import MLTT.Spartan
open import Notation.CanonicalMap
open import Taboos.LPO
open import Naturals.Order
open import Ordinals.Arithmetic fe
open import Ordinals.OrdinalOfOrdinals ua
open import Ordinals.Type
open import Ordinals.Equivalence
open import Ordinals.Underlying
open import CoNaturals.Type
open import UF.Equiv
Ο+π-is-β΄-ββ : (Ο +β πβ) β΄ βββ
Ο+π-is-β΄-ββ = ΞΉπ , i , p
where
i : (x : β¨ Ο +β πβ β©) (y : β¨ βββ β©)
β y βΊβ¨ βββ β© ΞΉπ x
β Ξ£ x' κ β¨ Ο +β πβ β© , (x' βΊβ¨ Ο +β πβ β© x) Γ (ΞΉπ x' οΌ y)
i (inl m) y (n , r , l) = inl n , β-gives-< n m l , (r β»ΒΉ)
i (inr *) y (n , r , l) = inl n , * , (r β»ΒΉ)
p : (x y : β¨ Ο +β πβ β©)
β x βΊβ¨ Ο +β πβ β© y
β ΞΉπ x βΊβ¨ βββ β© ΞΉπ y
p (inl n) (inl m) l = β-to-ββ-order-preserving n m l
p (inl n) (inr *) * = β-βΊ-largest n
p (inr *) (inl m) l = π-elim l
p (inr *) (inr *) l = π-elim l
ββ-β΄-Ο+π-gives-LPO : βββ β΄ (Ο +β πβ) β LPO
ββ-β΄-Ο+π-gives-LPO l = Ξ³
where
b : (Ο +β πβ) ββ βββ
b = bisimilarity-gives-ordinal-equiv (Ο +β πβ) βββ Ο+π-is-β΄-ββ l
e : is-equiv ΞΉπ
e = prβ (ββ-gives-β (Ο +β πβ) βββ b)
Ξ³ : LPO
Ξ³ = ΞΉπ-has-section-gives-LPO (equivs-have-sections ΞΉπ e)
LPO-gives-ββ-β΄-Ο+π-gives : LPO β βββ β΄ (Ο +β πβ)
LPO-gives-ββ-β΄-Ο+π-gives lpo = (Ξ» x β ΞΉπ-inverse x (lpo x)) ,
(Ξ» x β i x (lpo x)) ,
(Ξ» x y β p x y (lpo x) (lpo y))
where
ΞΉπ-inverse-inl : (u : ββ) (d : is-decidable (Ξ£ n κ β , u οΌ ΞΉ n))
β (m : β) β u οΌ ΞΉ m β ΞΉπ-inverse u d οΌ inl m
ΞΉπ-inverse-inl . (ΞΉ n) (inl (n , refl)) m q = ap inl (β-to-ββ-lc q)
ΞΉπ-inverse-inl u (inr g) m q = π-elim (g (m , q))
i : (x : ββ) (d : is-decidable (Ξ£ n κ β , x οΌ ΞΉ n)) (y : β + π)
β y βΊβ¨ Ο +β πβ β© ΞΉπ-inverse x d
β Ξ£ x' κ ββ , (x' βΊβ¨ βββ β© x) Γ (ΞΉπ-inverse x' (lpo x') οΌ y)
i .(ΞΉ n) (inl (n , refl)) (inl m) l =
ΞΉ m ,
β-to-ββ-order-preserving m n l ,
ΞΉπ-inverse-inl (ΞΉ m) (lpo (ΞΉ m)) m refl
i .(ΞΉ n) (inl (n , refl)) (inr *) l = π-elim l
i x (inr g) (inl n) * =
ΞΉ n ,
transport (underlying-order βββ (ΞΉ n))
((not-finite-is-β (fe π€β π€β) (curry g)) β»ΒΉ)
(β-βΊ-largest n) ,
ΞΉπ-inverse-inl (ΞΉ n) (lpo (ΞΉ n)) n refl
i x (inr g) (inr *) l = π-elim l
p : (x y : ββ) (d : is-decidable (Ξ£ n κ β , x οΌ ΞΉ n))
(e : is-decidable (Ξ£ m κ β , y οΌ ΞΉ m))
β x βΊβ¨ βββ β© y
β ΞΉπ-inverse x d βΊβ¨ Ο +β πβ β© ΞΉπ-inverse y e
p .(ΞΉ n) .(ΞΉ m) (inl (n , refl)) (inl (m , refl)) (k , r , l) =
transportβ»ΒΉ (Ξ» - β - <β m) (β-to-ββ-lc r) (β-gives-< k m l)
p .(ΞΉ n) y (inl (n , refl)) (inr f) l = β
p x y (inr f) e (k , r , l) =
π-elim (β-is-not-finite k ((not-finite-is-β (fe π€β π€β) (curry f))β»ΒΉ β r))
ββ-is-successorβ : LPO β βββ ββ (Ο +β πβ)
ββ-is-successorβ lpo = bisimilarity-gives-ordinal-equiv
βββ
(Ο +β πβ)
(LPO-gives-ββ-β΄-Ο+π-gives lpo)
Ο+π-is-β΄-ββ
ββ-is-successorβ : LPO β ββ β (β + π)
ββ-is-successorβ lpo = ββ-gives-β βββ (Ο +β πβ) (ββ-is-successorβ lpo)
ββ-is-successorβ : LPO β βββ οΌ (Ο +β πβ)
ββ-is-successorβ lpo = eqtoidβ (ua π€β) fe' βββ (Ο +β πβ) (ββ-is-successorβ lpo)
ββ-is-successorβ : LPO β ββ οΌ (β + π)
ββ-is-successorβ lpo = eqtoid (ua π€β) ββ (β + π) (ββ-is-successorβ lpo)
\end{code}