Martin Escardo 13 Jun 2026.

An equivalent copy of the ordinal ๐Ÿšโ‚€, for convenience.

\begin{code}

{-# OPTIONS --safe --without-K #-}

module Ordinals.Two where

open import MLTT.Spartan
open import MLTT.Two-Properties
open import Ordinals.Notions hiding (_โ‰บโ‚‚_)
open import Ordinals.Type
open import UF.Subsingletons
open import UF.DiscreteAndSeparated

_โ‰บโ‚‚_ : ๐Ÿš โ†’ ๐Ÿš โ†’ ๐“คโ‚€ ฬ‡
b โ‰บโ‚‚ c = (b ๏ผ โ‚€) ร— (c ๏ผ โ‚)

โ‰บโ‚‚-left : {x y : ๐Ÿš} โ†’ x โ‰บโ‚‚ y โ†’ x ๏ผ โ‚€
โ‰บโ‚‚-left = prโ‚

โ‰บโ‚‚-right : {x y : ๐Ÿš} โ†’ x โ‰บโ‚‚ y โ†’ y ๏ผ โ‚
โ‰บโ‚‚-right = prโ‚‚

โ‰บโ‚‚-left-right : {x y : ๐Ÿš} โ†’ x ๏ผ โ‚€ โ†’ y ๏ผ โ‚ โ†’ x โ‰บโ‚‚ y
โ‰บโ‚‚-left-right = _,_

๐Ÿšโ‚’ : Ordinal ๐“คโ‚€
๐Ÿšโ‚’ = ๐Ÿš ,
     (ฮป b c โ†’ (b ๏ผ โ‚€) ร— (c ๏ผ โ‚)) ,
     (ฮป b c โ†’ ร—-is-prop ๐Ÿš-is-set ๐Ÿš-is-set) ,
     I ,
     II ,
     (ฮป _ _ _ (eโ‚€ , _) (_ , eโ‚) โ†’ eโ‚€ , eโ‚)
 where
  I : is-well-founded (ฮป b c โ†’ (b ๏ผ โ‚€) ร— (c ๏ผ โ‚))
  I โ‚€ = acc (ฮป _ (_ , ฮฝ) โ†’ ๐Ÿ˜-elim (zero-is-not-one ฮฝ))
  I โ‚ = acc (ฮป b (eโ‚€ , _) โ†’ acc (ฮป c (_ , eโ‚) โ†’ ๐Ÿ˜-elim
                                                 (zero-is-not-one
                                                   (eโ‚€ โปยน โˆ™ eโ‚))))

  II : is-extensional (ฮป b c โ†’ (b ๏ผ โ‚€) ร— (c ๏ผ โ‚))
  II โ‚€ โ‚€ f g = refl
  II โ‚€ โ‚ f g = ๐Ÿ˜-elim (zero-is-not-one (prโ‚‚ (g โ‚€ (refl , refl))))
  II โ‚ โ‚€ f g = ๐Ÿ˜-elim (zero-is-not-one (prโ‚‚ (f โ‚€ (refl , refl))))
  II โ‚ โ‚ f g = refl

open import UF.FunExt

module _ (fe : FunExt) where

 open import Ordinals.Arithmetic fe renaming (๐Ÿšโ‚’ to ๐Ÿšโ‚’-standard)
 open import Ordinals.Equivalence
 open import Ordinals.Maps
 open import Ordinals.Underlying
 open import UF.Equiv

 ๐Ÿšโ‚€-agrees-with-๐Ÿšโ‚€-standard : ๐Ÿšโ‚’ โ‰ƒโ‚’ ๐Ÿšโ‚’-standard {๐“ค}
 ๐Ÿšโ‚€-agrees-with-๐Ÿšโ‚€-standard = f ,
                              f-is-order-preserving ,
                              qinvs-are-equivs f (g , gf , fg) ,
                              g-is-order-preserving
  where
   f : โŸจ ๐Ÿšโ‚’ โŸฉ โ†’ โŸจ ๐Ÿšโ‚’-standard โŸฉ
   f โ‚€ = inl โ‹†
   f โ‚ = inr โ‹†

   f-is-order-preserving : is-order-preserving ๐Ÿšโ‚’ ๐Ÿšโ‚’-standard f
   f-is-order-preserving โ‚€ โ‚ (refl , refl) = โ‹†

   g : โŸจ ๐Ÿšโ‚’-standard โŸฉ โ†’ โŸจ ๐Ÿšโ‚’ โŸฉ
   g (inl โ‹†) = โ‚€
   g (inr โ‹†) = โ‚

   fg : f โˆ˜ g โˆผ id
   fg (inl โ‹†) = refl
   fg (inr โ‹†) = refl

   gf : g โˆ˜ f โˆผ id
   gf โ‚€ = refl
   gf โ‚ = refl

   g-is-order-preserving : is-order-preserving ๐Ÿšโ‚’-standard ๐Ÿšโ‚’ g
   g-is-order-preserving (inl โ‹†) (inl โ‹†) l = ๐Ÿ˜-elim l
   g-is-order-preserving (inl โ‹†) (inr โ‹†) โ‹† = (refl , refl)
   g-is-order-preserving (inr โ‹†) (inl โ‹†) l = ๐Ÿ˜-elim l
   g-is-order-preserving (inr โ‹†) (inr โ‹†) l = ๐Ÿ˜-elim l

\end{code}