{-# OPTIONS --cubical-compatible --safe #-}
open import Level
open import Ordinals
module HODBase {n : Level } (O : Ordinals {n} ) where
open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ )
open import Relation.Binary.PropositionalEquality hiding ( [_] )
open import Data.Nat.Properties
open import Data.Empty
open import Data.Unit
open import Relation.Nullary
open import Relation.Binary hiding (_⇔_)
open import Relation.Binary.Core hiding (_⇔_)
open import logic
import OrdUtil
open import nat
open Ordinals.Ordinals O
open Ordinals.IsOrdinals isOrdinal
open OrdUtil O
record OD : Set (suc n ) where
field
def : (x : Ordinal ) → Set n
open OD
open _∧_
open _∨_
open Bool
record _==_ ( a b : OD ) : Set n where
field
eq→ : ∀ { x : Ordinal } → def a x → def b x
eq← : ∀ { x : Ordinal } → def b x → def a x
==-refl : { x : OD } → x == x
==-refl {x} = record { eq→ = λ x → x ; eq← = λ x → x }
open _==_
==-trans : { x y z : OD } → x == y → y == z → x == z
==-trans x=y y=z = record { eq→ = λ {m} t → eq→ y=z (eq→ x=y t) ; eq← = λ {m} t → eq← x=y (eq← y=z t) }
==-sym : { x y : OD } → x == y → y == x
==-sym x=y = record { eq→ = λ {m} t → eq← x=y t ; eq← = λ {m} t → eq→ x=y t }
⇔→== : { x y : OD } → ( {z : Ordinal } → (def x z ⇔ def y z)) → x == y
eq→ ( ⇔→== {x} {y} eq ) {z} m = proj1 eq m
eq← ( ⇔→== {x} {y} eq ) {z} m = proj2 eq m
Ords : OD
Ords = record { def = λ x → Lift n ⊤ }
record HOD : Set (suc n) where
field
od : OD
odmax : Ordinal
<odmax : {y : Ordinal} → def od y → y o< odmax
open HOD
record ODAxiom : Set (suc n) where
field
& : HOD → Ordinal
* : Ordinal → HOD
c<→o< : {x y : HOD } → def (od y) ( & x ) → & x o< & y
⊆→o≤ : {y z : HOD } → ({x : Ordinal} → def (od y) x → def (od z) x ) → & y o< osuc (& z)
*iso : {x : HOD } → od (* ( & x )) == od x
&iso : {x : Ordinal } → & ( * x ) ≡ x
==→o≡ : {x y : HOD } → (od x == od y) → (& x) ≡ (& y)
==-Setoid : Setoid (suc n) n
==-Setoid = record { _≈_ = λ x y → od x == od y ; Carrier = HOD
; isEquivalence = record { refl = ==-refl ; sym = ==-sym ; trans = ==-trans } }