# HG changeset patch # User Shinji KONO # Date 1593935953 -32400 # Node ID ba3ebb9a16c68a42615322daab3b1563bd9bcfe2 # Parent 9f926b2210bc8d1869b5abd4df07c1c12faa3bcf# Parent 214a087c78a5bdb15fddc4db038bd9c179750344 HOD diff -r 9f926b2210bc -r ba3ebb9a16c6 .hgtags diff -r 9f926b2210bc -r ba3ebb9a16c6 BAlgbra.agda --- a/BAlgbra.agda Sun Jun 07 20:35:14 2020 +0900 +++ b/BAlgbra.agda Sun Jul 05 16:59:13 2020 +0900 @@ -19,60 +19,66 @@ open OD O open OD.OD open ODAxiom odAxiom +open HOD open _∧_ open _∨_ open Bool -_∩_ : ( A B : OD ) → OD -A ∩ B = record { def = λ x → def A x ∧ def B x } - -_∪_ : ( A B : OD ) → OD -A ∪ B = record { def = λ x → def A x ∨ def B x } +_∩_ : ( A B : HOD ) → HOD +A ∩ B = record { od = record { def = λ x → odef A x ∧ odef B x } ; + odmax = omin (odmax A) (odmax B) ; axiom of choice +--- With assuption of HOD is ordered, p ∨ ( ¬ p ) <=> axiom of choice --- -record choiced ( X : OD) : Set (suc n) where +record choiced ( X : HOD) : Set (suc n) where field - a-choice : OD + a-choice : HOD is-in : X ∋ a-choice +open HOD +_=h=_ : (x y : HOD) → Set n +x =h= y = od x == od y + open choiced OD→ZFC : ZFC OD→ZFC = record { - ZFSet = OD + ZFSet = HOD ; _∋_ = _∋_ - ; _≈_ = _==_ + ; _≈_ = _=h=_ ; ∅ = od∅ ; Select = Select ; isZFC = isZFC } where -- infixr 200 _∈_ -- infixr 230 _∩_ _∪_ - isZFC : IsZFC (OD ) _∋_ _==_ od∅ Select + isZFC : IsZFC (HOD ) _∋_ _=h=_ od∅ Select isZFC = record { choice-func = λ A {X} not A∋X → a-choice (choice-func X not ); choice = λ A {X} A∋X not → is-in (choice-func X not) } where - choice-func : (X : OD ) → ¬ ( X == od∅ ) → choiced X + choice-func : (X : HOD ) → ¬ ( X =h= od∅ ) → choiced X choice-func X not = have_to_find where ψ : ( ox : Ordinal ) → Set (suc n) - ψ ox = (( x : Ordinal ) → x o< ox → ( ¬ def X x )) ∨ choiced X + ψ ox = (( x : Ordinal ) → x o< ox → ( ¬ odef X x )) ∨ choiced X lemma-ord : ( ox : Ordinal ) → ψ ox - lemma-ord ox = TransFinite {ψ} induction ox where - ∋-p : (A x : OD ) → Dec ( A ∋ x ) + lemma-ord ox = TransFinite1 {ψ} induction ox where + ∋-p : (A x : HOD ) → Dec ( A ∋ x ) ∋-p A x with p∨¬p (Lift (suc n) ( A ∋ x )) -- LEM ∋-p A x | case1 (lift t) = yes t ∋-p A x | case2 t = no (λ x → t (lift x )) @@ -71,59 +75,61 @@ induction x prev with ∋-p X ( ord→od x) ... | yes p = case2 ( record { a-choice = ord→od x ; is-in = p } ) ... | no ¬p = lemma where - lemma1 : (y : Ordinal) → (y o< x → def X y → ⊥) ∨ choiced X + lemma1 : (y : Ordinal) → (y o< x → odef X y → ⊥) ∨ choiced X lemma1 y with ∋-p X (ord→od y) lemma1 y | yes y ¬a ¬b c = no ¬b -_,_ : OD → OD → OD -x , y = record { def = λ t → (t ≡ od→ord x ) ∨ ( t ≡ od→ord y ) } -- Ord (omax (od→ord x) (od→ord y)) +_,_ : HOD → HOD → HOD +x , y = record { od = record { def = λ t → (t ≡ od→ord x ) ∨ ( t ≡ od→ord y ) } ; odmax = omax (od→ord x) (od→ord y) ; z → subst (λ k → def (od y) k ) diso (incl lt (subst (λ k → def (od x) k ) (sym diso) x>z ))) + +power< : {A x : HOD } → x ⊆ A → Ord (osuc (od→ord A)) ∋ x +power< {A} {x} x⊆A = ⊆→o≤ (λ {y} x∋y → subst (λ k → def (od A) k) diso (lemma y x∋y ) ) where + lemma : (y : Ordinal) → def (od x) y → def (od A) (od→ord (ord→od y)) + lemma y x∋y = incl x⊆A (subst (λ k → def (od x) k ) (sym diso) x∋y ) + open import Data.Unit -ε-induction : { ψ : OD → Set (suc n)} - → ( {x : OD } → ({ y : OD } → x ∋ y → ψ y ) → ψ x ) - → (x : OD ) → ψ x +ε-induction : { ψ : HOD → Set n} + → ( {x : HOD } → ({ y : HOD } → x ∋ y → ψ y ) → ψ x ) + → (x : HOD ) → ψ x ε-induction {ψ} ind x = subst (λ k → ψ k ) oiso (ε-induction-ord (osuc (od→ord x)) <-osuc ) where induction : (ox : Ordinal) → ((oy : Ordinal) → oy o< ox → ψ (ord→od oy)) → ψ (ord→od ox) induction ox prev = ind ( λ {y} lt → subst (λ k → ψ k ) oiso (prev (od→ord y) (o<-subst (c<→o< lt) refl diso ))) ε-induction-ord : (ox : Ordinal) { oy : Ordinal } → oy o< ox → ψ (ord→od oy) ε-induction-ord ox {oy} lt = TransFinite {λ oy → ψ (ord→od oy)} induction oy --- minimal-2 : (x : OD ) → ( ne : ¬ (x == od∅ ) ) → (y : OD ) → ¬ ( def (minimal x ne) (od→ord y)) ∧ (def x (od→ord y) ) --- minimal-2 x ne y = contra-position ( ε-induction (λ {z} ind → {!!} ) x ) ( λ p → {!!} ) +ε-induction1 : { ψ : HOD → Set (suc n)} + → ( {x : HOD } → ({ y : HOD } → x ∋ y → ψ y ) → ψ x ) + → (x : HOD ) → ψ x +ε-induction1 {ψ} ind x = subst (λ k → ψ k ) oiso (ε-induction-ord (osuc (od→ord x)) <-osuc ) where + induction : (ox : Ordinal) → ((oy : Ordinal) → oy o< ox → ψ (ord→od oy)) → ψ (ord→od ox) + induction ox prev = ind ( λ {y} lt → subst (λ k → ψ k ) oiso (prev (od→ord y) (o<-subst (c<→o< lt) refl diso ))) + ε-induction-ord : (ox : Ordinal) { oy : Ordinal } → oy o< ox → ψ (ord→od oy) + ε-induction-ord ox {oy} lt = TransFinite1 {λ oy → ψ (ord→od oy)} induction oy -OD→ZF : ZF -OD→ZF = record { - ZFSet = OD +HOD→ZF : ZF +HOD→ZF = record { + ZFSet = HOD ; _∋_ = _∋_ - ; _≈_ = _==_ + ; _≈_ = _=h=_ ; ∅ = od∅ ; _,_ = _,_ ; Union = Union @@ -246,19 +283,43 @@ ; infinite = infinite ; isZF = isZF } where - ZFSet = OD -- is less than Ords because of maxod - Select : (X : OD ) → ((x : OD ) → Set n ) → OD - Select X ψ = record { def = λ x → ( def X x ∧ ψ ( ord→od x )) } - Replace : OD → (OD → OD ) → OD - Replace X ψ = record { def = λ x → (x o< sup-o ( λ x → od→ord (ψ x))) ∧ def (in-codomain X ψ) x } + ZFSet = HOD -- is less than Ords because of maxod + Select : (X : HOD ) → ((x : HOD ) → Set n ) → HOD + Select X ψ = record { od = record { def = λ x → ( odef X x ∧ ψ ( ord→od x )) } ; odmax = odmax X ; u ¬a ¬b c = ⊥-elim (not c) _∈_ : ( A B : ZFSet ) → Set n A ∈ B = B ∋ A - Power : OD → OD - Power A = Replace (Def (Ord (od→ord A))) ( λ x → A ∩ x ) + + OPwr : (A : HOD ) → HOD + OPwr A = Ord ( sup-o (Ord (osuc (od→ord A))) ( λ x A∋x → od→ord ( ZFSubset A (ord→od x)) ) ) + + Power : HOD → HOD + Power A = Replace (OPwr (Ord (od→ord A))) ( λ x → A ∩ x ) -- ｛_｝ : ZFSet → ZFSet -- ｛ x ｝ = ( x , x ) -- it works but we don't use @@ -267,12 +328,25 @@ isuc : {x : Ordinal } → infinite-d x → infinite-d (od→ord ( Union (ord→od x , (ord→od x , ord→od x ) ) )) - infinite : OD - infinite = record { def = λ x → infinite-d x } + -- ω can be diverged in our case, since we have no restriction on the corresponding ordinal of a pair. + -- We simply assumes nfinite-d y has a maximum. + -- + -- This means that many of OD cannot be HODs because of the od→ord mapping divergence. + -- We should have some axioms to prevent this, but it may complicate thins. + -- + postulate + ωmax : Ordinal + <ωmax : {y : Ordinal} → infinite-d y → y o< ωmax + + infinite : HOD + infinite = record { od = record { def = λ x → infinite-d x } ; odmax = ωmax ; ¬a ¬b c with (incl lt) (o<-subst c (sym diso) refl ) ... | ttt = ⊥-elim ( o<¬≡ refl (o<-subst ttt diso refl )) - union→ : (X z u : OD) → (X ∋ u) ∧ (u ∋ z) → Union X ∋ z + union→ : (X z u : HOD) → (X ∋ u) ∧ (u ∋ z) → Union X ∋ z union→ X z u xx not = ⊥-elim ( not (od→ord u) ( record { proj1 = proj1 xx - ; proj2 = subst ( λ k → def k (od→ord z)) (sym oiso) (proj2 xx) } )) - union← : (X z : OD) (X∋z : Union X ∋ z) → ¬ ( (u : OD ) → ¬ ((X ∋ u) ∧ (u ∋ z ))) + ; proj2 = subst ( λ k → odef k (od→ord z)) (sym oiso) (proj2 xx) } )) + union← : (X z : HOD) (X∋z : Union X ∋ z) → ¬ ( (u : HOD ) → ¬ ((X ∋ u) ∧ (u ∋ z ))) union← X z UX∋z = FExists _ lemma UX∋z where - lemma : {y : Ordinal} → def X y ∧ def (ord→od y) (od→ord z) → ¬ ((u : OD) → ¬ (X ∋ u) ∧ (u ∋ z)) - lemma {y} xx not = not (ord→od y) record { proj1 = subst ( λ k → def X k ) (sym diso) (proj1 xx ) ; proj2 = proj2 xx } + lemma : {y : Ordinal} → odef X y ∧ odef (ord→od y) (od→ord z) → ¬ ((u : HOD) → ¬ (X ∋ u) ∧ (u ∋ z)) + lemma {y} xx not = not (ord→od y) record { proj1 = subst ( λ k → odef X k ) (sym diso) (proj1 xx ) ; proj2 = proj2 xx } - ψiso : {ψ : OD → Set n} {x y : OD } → ψ x → x ≡ y → ψ y + ψiso : {ψ : HOD → Set n} {x y : HOD } → ψ x → x ≡ y → ψ y ψiso {ψ} t refl = t - selection : {ψ : OD → Set n} {X y : OD} → ((X ∋ y) ∧ ψ y) ⇔ (Select X ψ ∋ y) + selection : {ψ : HOD → Set n} {X y : HOD} → ((X ∋ y) ∧ ψ y) ⇔ (Select X ψ ∋ y) selection {ψ} {X} {y} = record { proj1 = λ cond → record { proj1 = proj1 cond ; proj2 = ψiso {ψ} (proj2 cond) (sym oiso) } ; proj2 = λ select → record { proj1 = proj1 select ; proj2 = ψiso {ψ} (proj2 select) oiso } } - replacement← : {ψ : OD → OD} (X x : OD) → X ∋ x → Replace X ψ ∋ ψ x - replacement← {ψ} X x lt = record { proj1 = sup-c< ψ {x} ; proj2 = lemma } where + sup-c< : (ψ : HOD → HOD) → {X x : HOD} → X ∋ x → od→ord (ψ x) o< (sup-o X (λ y X∋y → od→ord (ψ (ord→od y)))) + sup-c< ψ {X} {x} lt = subst (λ k → od→ord (ψ k) o< _ ) oiso (sup-o< X lt ) + replacement← : {ψ : HOD → HOD} (X x : HOD) → X ∋ x → Replace X ψ ∋ ψ x + replacement← {ψ} X x lt = record { proj1 = sup-c< ψ {X} {x} lt ; proj2 = lemma } where lemma : def (in-codomain X ψ) (od→ord (ψ x)) lemma not = ⊥-elim ( not ( od→ord x ) (record { proj1 = lt ; proj2 = cong (λ k → od→ord (ψ k)) (sym oiso)} )) - replacement→ : {ψ : OD → OD} (X x : OD) → (lt : Replace X ψ ∋ x) → ¬ ( (y : OD) → ¬ (x == ψ y)) + replacement→ : {ψ : HOD → HOD} (X x : HOD) → (lt : Replace X ψ ∋ x) → ¬ ( (y : HOD) → ¬ (x =h= ψ y)) replacement→ {ψ} X x lt = contra-position lemma (lemma2 (proj2 lt)) where - lemma2 : ¬ ((y : Ordinal) → ¬ def X y ∧ ((od→ord x) ≡ od→ord (ψ (ord→od y)))) - → ¬ ((y : Ordinal) → ¬ def X y ∧ (ord→od (od→ord x) == ψ (ord→od y))) + lemma2 : ¬ ((y : Ordinal) → ¬ odef X y ∧ ((od→ord x) ≡ od→ord (ψ (ord→od y)))) + → ¬ ((y : Ordinal) → ¬ odef X y ∧ (ord→od (od→ord x) =h= ψ (ord→od y))) lemma2 not not2 = not ( λ y d → not2 y (record { proj1 = proj1 d ; proj2 = lemma3 (proj2 d)})) where - lemma3 : {y : Ordinal } → (od→ord x ≡ od→ord (ψ (ord→od y))) → (ord→od (od→ord x) == ψ (ord→od y)) - lemma3 {y} eq = subst (λ k → ord→od (od→ord x) == k ) oiso (o≡→== eq ) - lemma : ( (y : OD) → ¬ (x == ψ y)) → ( (y : Ordinal) → ¬ def X y ∧ (ord→od (od→ord x) == ψ (ord→od y)) ) - lemma not y not2 = not (ord→od y) (subst (λ k → k == ψ (ord→od y)) oiso ( proj2 not2 )) + lemma3 : {y : Ordinal } → (od→ord x ≡ od→ord (ψ (ord→od y))) → (ord→od (od→ord x) =h= ψ (ord→od y)) + lemma3 {y} eq = subst (λ k → ord→od (od→ord x) =h= k ) oiso (o≡→== eq ) + lemma : ( (y : HOD) → ¬ (x =h= ψ y)) → ( (y : Ordinal) → ¬ odef X y ∧ (ord→od (od→ord x) =h= ψ (ord→od y)) ) + lemma not y not2 = not (ord→od y) (subst (λ k → k =h= ψ (ord→od y)) oiso ( proj2 not2 )) --- --- Power Set --- - --- First consider ordinals in OD + --- First consider ordinals in HOD --- - --- ZFSubset A x = record { def = λ y → def A y ∧ def x y } subset of A + --- ZFSubset A x = record { def = λ y → odef A y ∧ odef x y } subset of A -- -- - ∩-≡ : { a b : OD } → ({x : OD } → (a ∋ x → b ∋ x)) → a == ( b ∩ a ) + ∩-≡ : { a b : HOD } → ({x : HOD } → (a ∋ x → b ∋ x)) → a =h= ( b ∩ a ) ∩-≡ {a} {b} inc = record { eq→ = λ {x} x : (x y : OD) → OD +_=h=_ : (x y : HOD) → Set n +x =h= y = od x == od y + +<_,_> : (x y : HOD) → HOD < x , y > = (x , x ) , (x , y ) -exg-pair : { x y : OD } → (x , y ) == ( y , x ) +exg-pair : { x y : HOD } → (x , y ) =h= ( y , x ) exg-pair {x} {y} = record { eq→ = left ; eq← = right } where - left : {z : Ordinal} → def (x , y) z → def (y , x) z + left : {z : Ordinal} → odef (x , y) z → odef (y , x) z left (case1 t) = case2 t left (case2 t) = case1 t - right : {z : Ordinal} → def (y , x) z → def (x , y) z + right : {z : Ordinal} → odef (y , x) z → odef (x , y) z right (case1 t) = case2 t right (case2 t) = case1 t -ord≡→≡ : { x y : OD } → od→ord x ≡ od→ord y → x ≡ y +ord≡→≡ : { x y : HOD } → od→ord x ≡ od→ord y → x ≡ y ord≡→≡ eq = subst₂ (λ j k → j ≡ k ) oiso oiso ( cong ( λ k → ord→od k ) eq ) od≡→≡ : { x y : Ordinal } → ord→od x ≡ ord→od y → x ≡ y od≡→≡ eq = subst₂ (λ j k → j ≡ k ) diso diso ( cong ( λ k → od→ord k ) eq ) -eq-prod : { x x' y y' : OD } → x ≡ x' → y ≡ y' → < x , y > ≡ < x' , y' > +eq-prod : { x x' y y' : HOD } → x ≡ x' → y ≡ y' → < x , y > ≡ < x' , y' > eq-prod refl refl = refl -prod-eq : { x x' y y' : OD } → < x , y > == < x' , y' > → (x ≡ x' ) ∧ ( y ≡ y' ) +prod-eq : { x x' y y' : HOD } → < x , y > =h= < x' , y' > → (x ≡ x' ) ∧ ( y ≡ y' ) prod-eq {x} {x'} {y} {y'} eq = record { proj1 = lemmax ; proj2 = lemmay } where - lemma0 : {x y z : OD } → ( x , x ) == ( z , y ) → x ≡ y + lemma0 : {x y z : HOD } → ( x , x ) =h= ( z , y ) → x ≡ y lemma0 {x} {y} eq with trio< (od→ord x) (od→ord y) lemma0 {x} {y} eq | tri< a ¬b ¬c with eq← eq {od→ord y} (case2 refl) lemma0 {x} {y} eq | tri< a ¬b ¬c | case1 s = ⊥-elim ( o<¬≡ (sym s) a ) @@ -57,15 +61,15 @@ lemma0 {x} {y} eq | tri> ¬a ¬b c with eq← eq {od→ord y} (case2 refl) lemma0 {x} {y} eq | tri> ¬a ¬b c | case1 s = ⊥-elim ( o<¬≡ s c ) lemma0 {x} {y} eq | tri> ¬a ¬b c | case2 s = ⊥-elim ( o<¬≡ s c ) - lemma2 : {x y z : OD } → ( x , x ) == ( z , y ) → z ≡ y + lemma2 : {x y z : HOD } → ( x , x ) =h= ( z , y ) → z ≡ y lemma2 {x} {y} {z} eq = trans (sym (lemma0 lemma3 )) ( lemma0 eq ) where - lemma3 : ( x , x ) == ( y , z ) + lemma3 : ( x , x ) =h= ( y , z ) lemma3 = ==-trans eq exg-pair - lemma1 : {x y : OD } → ( x , x ) == ( y , y ) → x ≡ y + lemma1 : {x y : HOD } → ( x , x ) =h= ( y , y ) → x ≡ y lemma1 {x} {y} eq with eq← eq {od→ord y} (case2 refl) lemma1 {x} {y} eq | case1 s = ord≡→≡ (sym s) lemma1 {x} {y} eq | case2 s = ord≡→≡ (sym s) - lemma4 : {x y z : OD } → ( x , y ) == ( x , z ) → y ≡ z + lemma4 : {x y z : HOD } → ( x , y ) =h= ( x , z ) → y ≡ z lemma4 {x} {y} {z} eq with eq← eq {od→ord z} (case2 refl) lemma4 {x} {y} {z} eq | case1 s with ord≡→≡ s -- x ≡ z ... | refl with lemma2 (==-sym eq ) @@ -81,6 +85,9 @@ ... | refl with lemma4 eq -- with (x,y)≡(x,y') ... | eq1 = lemma4 (ord→== (cong (λ k → od→ord k ) eq1 )) +-- +-- unlike ordered pair, ZFProduct is not a HOD + data ord-pair : (p : Ordinal) → Set n where pair : (x y : Ordinal ) → ord-pair ( od→ord ( < ord→od x , ord→od y > ) ) @@ -94,35 +101,38 @@ pi1 : { p : Ordinal } → ord-pair p → Ordinal pi1 ( pair x y) = x -π1 : { p : OD } → ZFProduct ∋ p → OD +π1 : { p : HOD } → def ZFProduct (od→ord p) → HOD π1 lt = ord→od (pi1 lt ) pi2 : { p : Ordinal } → ord-pair p → Ordinal pi2 ( pair x y ) = y -π2 : { p : OD } → ZFProduct ∋ p → OD +π2 : { p : HOD } → def ZFProduct (od→ord p) → HOD π2 lt = ord→od (pi2 lt ) -op-cons : { ox oy : Ordinal } → ZFProduct ∋ < ord→od ox , ord→od oy > +op-cons : { ox oy : Ordinal } → def ZFProduct (od→ord ( < ord→od ox , ord→od oy > )) op-cons {ox} {oy} = pair ox oy -p-cons : ( x y : OD ) → ZFProduct ∋ < x , y > -p-cons x y = def-subst {_} {_} {ZFProduct} {od→ord (< x , y >)} (pair (od→ord x) ( od→ord y )) refl ( - let open ≡-Reasoning in begin - od→ord < ord→od (od→ord x) , ord→od (od→ord y) > - ≡⟨ cong₂ (λ j k → od→ord < j , k >) oiso oiso ⟩ - od→ord < x , y > - ∎ ) +def-subst : {Z : OD } {X : Ordinal }{z : OD } {x : Ordinal }→ def Z X → Z ≡ z → X ≡ x → def z x +def-subst df refl refl = df + +p-cons : ( x y : HOD ) → def ZFProduct (od→ord ( < x , y >)) +p-cons x y = def-subst {_} {_} {ZFProduct} {od→ord (< x , y >)} (pair (od→ord x) ( od→ord y )) refl ( + let open ≡-Reasoning in begin + od→ord < ord→od (od→ord x) , ord→od (od→ord y) > + ≡⟨ cong₂ (λ j k → od→ord < j , k >) oiso oiso ⟩ + od→ord < x , y > + ∎ ) op-iso : { op : Ordinal } → (q : ord-pair op ) → od→ord < ord→od (pi1 q) , ord→od (pi2 q) > ≡ op op-iso (pair ox oy) = refl -p-iso : { x : OD } → (p : ZFProduct ∋ x ) → < π1 p , π2 p > ≡ x +p-iso : { x : HOD } → (p : def ZFProduct (od→ord x) ) → < π1 p , π2 p > ≡ x p-iso {x} p = ord≡→≡ (op-iso p) -p-pi1 : { x y : OD } → (p : ZFProduct ∋ < x , y > ) → π1 p ≡ x +p-pi1 : { x y : HOD } → (p : def ZFProduct (od→ord < x , y >) ) → π1 p ≡ x p-pi1 {x} {y} p = proj1 ( prod-eq ( ord→== (op-iso p) )) -p-pi2 : { x y : OD } → (p : ZFProduct ∋ < x , y > ) → π2 p ≡ y +p-pi2 : { x y : HOD } → (p : def ZFProduct (od→ord < x , y >) ) → π2 p ≡ y p-pi2 {x} {y} p = proj2 ( prod-eq ( ord→== (op-iso p))) diff -r 9f926b2210bc -r ba3ebb9a16c6 Ordinals.agda --- a/Ordinals.agda Sun Jun 07 20:35:14 2020 +0900 +++ b/Ordinals.agda Sun Jul 05 16:59:13 2020 +0900 @@ -13,14 +13,19 @@ open import Relation.Binary open import Relation.Binary.Core -record IsOrdinals {n : Level} (ord : Set n) (o∅ : ord ) (osuc : ord → ord ) (_o<_ : ord → ord → Set n) : Set (suc (suc n)) where +record IsOrdinals {n : Level} (ord : Set n) (o∅ : ord ) (osuc : ord → ord ) (_o<_ : ord → ord → Set n) (next : ord → ord ) : Set (suc (suc n)) where field Otrans : {x y z : ord } → x o< y → y o< z → x o< z OTri : Trichotomous {n} _≡_ _o<_ ¬x<0 : { x : ord } → ¬ ( x o< o∅ ) <-osuc : { x : ord } → x o< osuc x osuc-≡< : { a x : ord } → x o< osuc a → (x ≡ a ) ∨ (x o< a) - TransFinite : { ψ : ord → Set (suc n) } + not-limit : ( x : ord ) → Dec ( ¬ ((y : ord) → ¬ (x ≡ osuc y) )) + next-limit : { y : ord } → (y o< next y ) ∧ ((x : ord) → x o< next y → osuc x o< next y ) + TransFinite : { ψ : ord → Set n } + → ( (x : ord) → ( (y : ord ) → y o< x → ψ y ) → ψ x ) + → ∀ (x : ord) → ψ x + TransFinite1 : { ψ : ord → Set (suc n) } → ( (x : ord) → ( (y : ord ) → y o< x → ψ y ) → ψ x ) → ∀ (x : ord) → ψ x @@ -31,7 +36,8 @@ o∅ : ord osuc : ord → ord _o<_ : ord → ord → Set n - isOrdinal : IsOrdinals ord o∅ osuc _o<_ + next : ord → ord + isOrdinal : IsOrdinals ord o∅ osuc _o<_ next module inOrdinal {n : Level} (O : Ordinals {n} ) where @@ -47,11 +53,16 @@ o∅ : Ordinal o∅ = Ordinals.o∅ O + next : Ordinal → Ordinal + next = Ordinals.next O + ¬x<0 = IsOrdinals.¬x<0 (Ordinals.isOrdinal O) osuc-≡< = IsOrdinals.osuc-≡< (Ordinals.isOrdinal O) <-osuc = IsOrdinals.<-osuc (Ordinals.isOrdinal O) TransFinite = IsOrdinals.TransFinite (Ordinals.isOrdinal O) - + TransFinite1 = IsOrdinals.TransFinite1 (Ordinals.isOrdinal O) + next-limit = IsOrdinals.next-limit (Ordinals.isOrdinal O) + o<-dom : { x y : Ordinal } → x o< y → Ordinal o<-dom {x} _ = x @@ -104,7 +115,7 @@ proj1 (osuc2 x y) ox ¬a ¬b c = x maxα x y | tri≈ ¬a refl ¬c = x - minα : Ordinal → Ordinal → Ordinal - minα x y with trio< x y - minα x y | tri< a ¬b ¬c = x - minα x y | tri> ¬a ¬b c = y - minα x y | tri≈ ¬a refl ¬c = x + omin : Ordinal → Ordinal → Ordinal + omin x y with trio< x y + omin x y | tri< a ¬b ¬c = x + omin x y | tri> ¬a ¬b c = y + omin x y | tri≈ ¬a refl ¬c = x - min1 : {x y z : Ordinal } → z o< x → z o< y → z o< minα x y + min1 : {x y z : Ordinal } → z o< x → z o< y → z o< omin x y min1 {x} {y} {z} z ) -record Func←cd { dom cod : OD } {f : Ordinal } : Set n where +record Func←cd { dom cod : HOD } {f : Ordinal } : Set n where field func-1 : Ordinal → Ordinal func→od∈Func-1 : Func dom cod ∋ func→od func-1 dom -od→func : { dom cod : OD } → {f : Ordinal } → def (Func dom cod ) f → Func←cd {dom} {cod} {f} -od→func {dom} {cod} {f} lt = record { func-1 = λ x → sup-o ( λ y → lemma x {!!} ) ; func→od∈Func-1 = record { proj1 = {!!} ; proj2 = {!!} } } where +od→func : { dom cod : HOD } → {f : Ordinal } → odef (Func dom cod ) f → Func←cd {dom} {cod} {f} +od→func {dom} {cod} {f} lt = record { func-1 = λ x → sup-o {!!} ( λ y lt → lemma x {!!} ) ; func→od∈Func-1 = record { proj1 = {!!} ; proj2 = {!!} } } where lemma : Ordinal → Ordinal → Ordinal - lemma x y with IsZF.power→ isZF (dom ⊗ cod) (ord→od f) (subst (λ k → def (Power (dom ⊗ cod)) k ) (sym diso) lt ) | ∋-p (ord→od f) (ord→od y) + lemma x y with IsZF.power→ isZF (dom ⊗ cod) (ord→od f) (subst (λ k → odef (Power (dom ⊗ cod)) k ) (sym diso) lt ) | ∋-p (ord→od f) (ord→od y) lemma x y | p | no n = o∅ lemma x y | p | yes f∋y = lemma2 (proj1 (ODC.double-neg-eilm O ( p {ord→od y} f∋y ))) where -- p : {y : OD} → f ∋ y → ¬ ¬ (dom ⊗ cod ∋ y) lemma2 : {p : Ordinal} → ord-pair p → Ordinal lemma2 (pair x1 y1) with ODC.decp O ( x1 ≡ x) lemma2 (pair x1 y1) | yes p = y1 lemma2 (pair x1 y1) | no ¬p = o∅ - fod : OD - fod = Replace dom ( λ x → < x , ord→od (sup-o ( λ y → lemma (od→ord x) {!!} )) > ) + fod : HOD + fod = Replace dom ( λ x → < x , ord→od (sup-o {!!} ( λ y lt → lemma (od→ord x) {!!} )) > ) open Func←cd @@ -91,18 +90,18 @@ -- X ---------------------------> Y -- ymap <- def Y y -- -record Onto (X Y : OD ) : Set n where +record Onto (X Y : HOD ) : Set n where field xmap : Ordinal ymap : Ordinal - xfunc : def (Func X Y) xmap - yfunc : def (Func Y X) ymap - onto-iso : {y : Ordinal } → (lty : def Y y ) → + xfunc : odef (Func X Y) xmap + yfunc : odef (Func Y X) ymap + onto-iso : {y : Ordinal } → (lty : odef Y y ) → func-1 ( od→func {X} {Y} {xmap} xfunc ) ( func-1 (od→func yfunc) y ) ≡ y open Onto -onto-restrict : {X Y Z : OD} → Onto X Y → Z ⊆ Y → Onto X Z +onto-restrict : {X Y Z : HOD} → Onto X Y → Z ⊆ Y → Onto X Z onto-restrict {X} {Y} {Z} onto Z⊆Y = record { xmap = xmap1 ; ymap = zmap @@ -114,23 +113,23 @@ xmap1 = od→ord (Select (ord→od (xmap onto)) {!!} ) zmap : Ordinal zmap = {!!} - xfunc1 : def (Func X Z) xmap1 + xfunc1 : odef (Func X Z) xmap1 xfunc1 = {!!} - zfunc : def (Func Z X) zmap + zfunc : odef (Func Z X) zmap zfunc = {!!} - onto-iso1 : {z : Ordinal } → (ltz : def Z z ) → func-1 (od→func xfunc1 ) (func-1 (od→func zfunc ) z ) ≡ z + onto-iso1 : {z : Ordinal } → (ltz : odef Z z ) → func-1 (od→func xfunc1 ) (func-1 (od→func zfunc ) z ) ≡ z onto-iso1 = {!!} -record Cardinal (X : OD ) : Set n where +record Cardinal (X : HOD ) : Set n where field cardinal : Ordinal conto : Onto X (Ord cardinal) cmax : ( y : Ordinal ) → cardinal o< y → ¬ Onto X (Ord y) -cardinal : (X : OD ) → Cardinal X +cardinal : (X : HOD ) → Cardinal X cardinal X = record { - cardinal = sup-o ( λ x → proj1 ( cardinal-p {!!}) ) + cardinal = sup-o {!!} ( λ x lt → proj1 ( cardinal-p {!!}) ) ; conto = onto ; cmax = cmax } where @@ -138,24 +137,24 @@ cardinal-p x with ODC.p∨¬p O ( Onto X (Ord x) ) cardinal-p x | case1 True = record { proj1 = x ; proj2 = yes True } cardinal-p x | case2 False = record { proj1 = o∅ ; proj2 = no False } - S = sup-o (λ x → proj1 (cardinal-p {!!})) - lemma1 : (x : Ordinal) → ((y : Ordinal) → y o< x → Lift (suc n) (y o< (osuc S) → Onto X (Ord y))) → - Lift (suc n) (x o< (osuc S) → Onto X (Ord x) ) + S = sup-o {!!} (λ x lt → proj1 (cardinal-p {!!})) + lemma1 : (x : Ordinal) → ((y : Ordinal) → y o< x → (y o< (osuc S) → Onto X (Ord y))) → + (x o< (osuc S) → Onto X (Ord x) ) lemma1 x prev with trio< x (osuc S) lemma1 x prev | tri< a ¬b ¬c with osuc-≡< a - lemma1 x prev | tri< a ¬b ¬c | case1 x=S = lift ( λ lt → {!!} ) - lemma1 x prev | tri< a ¬b ¬c | case2 x ¬a ¬b c = lift ( λ lt → ⊥-elim ( o<> c lt )) + ... | t = {!!} + lemma1 x prev | tri≈ ¬a b ¬c = ( λ lt → ⊥-elim ( o<¬≡ b lt )) + lemma1 x prev | tri> ¬a ¬b c = ( λ lt → ⊥-elim ( o<> c lt )) onto : Onto X (Ord S) - onto with TransFinite {λ x → Lift (suc n) ( x o< osuc S → Onto X (Ord x) ) } lemma1 S - ... | lift t = t <-osuc + onto with TransFinite {λ x → ( x o< osuc S → Onto X (Ord x) ) } lemma1 S + ... | t = t <-osuc cmax : (y : Ordinal) → S o< y → ¬ Onto X (Ord y) - cmax y lt ontoy = o<> lt (o<-subst {_} {_} {y} {S} - (sup-o< {λ x → proj1 ( cardinal-p {!!})}{{!!}} ) lemma refl ) where + cmax y lt ontoy = o<> lt (o<-subst {_} {_} {y} {S} {!!} lemma refl ) where + -- (sup-o< ? {λ x lt → proj1 ( cardinal-p {!!})}{{!!}} ) lemma refl ) where lemma : proj1 (cardinal-p y) ≡ y lemma with ODC.p∨¬p O ( Onto X (Ord y) ) lemma | case1 x = refl diff -r 9f926b2210bc -r ba3ebb9a16c6 filter.agda --- a/filter.agda Sun Jun 07 20:35:14 2020 +0900 +++ b/filter.agda Sun Jul 05 16:59:13 2020 +0900 @@ -13,80 +13,143 @@ open import Relation.Binary.Core open import Relation.Binary.PropositionalEquality open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ ) +import BAlgbra + +open BAlgbra O open inOrdinal O open OD O open OD.OD open ODAxiom odAxiom +import ODC + open _∧_ open _∨_ open Bool -_∩_ : ( A B : OD ) → OD -A ∩ B = record { def = λ x → def A x ∧ def B x } - -_∪_ : ( A B : OD ) → OD -A ∪ B = record { def = λ x → def A x ∨ def B x } - -_＼_ : ( A B : OD ) → OD -A ＼ B = record { def = λ x → def A x ∧ ( ¬ ( def B x ) ) } - - -record Filter ( L : OD ) : Set (suc n) where +-- Kunen p.76 and p.53, we use ⊆ +record Filter ( L : HOD ) : Set (suc n) where field - filter : OD - proper : ¬ ( filter ∋ od∅ ) - inL : filter ⊆ L - filter1 : { p q : OD } → q ⊆ L → filter ∋ p → p ⊆ q → filter ∋ q - filter2 : { p q : OD } → filter ∋ p → filter ∋ q → filter ∋ (p ∩ q) + filter : HOD + f⊆PL : filter ⊆ Power L + filter1 : { p q : HOD } → q ⊆ L → filter ∋ p → p ⊆ q → filter ∋ q + filter2 : { p q : HOD } → filter ∋ p → filter ∋ q → filter ∋ (p ∩ q) open Filter -L⊆L : (L : OD) → L ⊆ L -L⊆L L = record { incl = λ {x} lt → lt } +record prime-filter { L : HOD } (P : Filter L) : Set (suc (suc n)) where + field + proper : ¬ (filter P ∋ od∅) + prime : {p q : HOD } → filter P ∋ (p ∪ q) → ( filter P ∋ p ) ∨ ( filter P ∋ q ) + +record ultra-filter { L : HOD } (P : Filter L) : Set (suc (suc n)) where + field + proper : ¬ (filter P ∋ od∅) + ultra : {p : HOD } → p ⊆ L → ( filter P ∋ p ) ∨ ( filter P ∋ ( L ＼ p) ) -L-filter : {L : OD} → (P : Filter L ) → {p : OD} → filter P ∋ p → filter P ∋ L -L-filter {L} P {p} lt = filter1 P {p} {L} (L⊆L L) lt {!!} +open _⊆_ + +trans-⊆ : { A B C : HOD} → A ⊆ B → B ⊆ C → A ⊆ C +trans-⊆ A⊆B B⊆C = record { incl = λ x → incl B⊆C (incl A⊆B x) } -prime-filter : {L : OD} → Filter L → ∀ {p q : OD } → Set n -prime-filter {L} P {p} {q} = filter P ∋ ( p ∪ q) → ( filter P ∋ p ) ∨ ( filter P ∋ q ) +power→⊆ : ( A t : HOD) → Power A ∋ t → t ⊆ A +power→⊆ A t PA∋t = record { incl = λ {x} t∋x → ODC.double-neg-eilm O (t1 t∋x) } where + t1 : {x : HOD } → t ∋ x → ¬ ¬ (A ∋ x) + t1 = zf.IsZF.power→ isZF A t PA∋t -ultra-filter : {L : OD} → Filter L → ∀ {p : OD } → Set n -ultra-filter {L} P {p} = L ∋ p → ( filter P ∋ p ) ∨ ( filter P ∋ ( L ＼ p) ) +∈-filter : {L p : HOD} → (P : Filter L ) → filter P ∋ p → p ⊆ L +∈-filter {L} {p} P lt = power→⊆ L p ( incl (f⊆PL P) lt ) +∪-lemma1 : {L p q : HOD } → (p ∪ q) ⊆ L → p ⊆ L +∪-lemma1 {L} {p} {q} lt = record { incl = λ {x} p∋x → incl lt (case1 p∋x) } + +∪-lemma2 : {L p q : HOD } → (p ∪ q) ⊆ L → q ⊆ L +∪-lemma2 {L} {p} {q} lt = record { incl = λ {x} p∋x → incl lt (case2 p∋x) } -filter-lemma1 : {L : OD} → (P : Filter L) → ∀ {p q : OD } → ( ∀ (p : OD ) → ultra-filter {L} P {p} ) → prime-filter {L} P {p} {q} -filter-lemma1 {L} P {p} {q} u lt = {!!} +q∩q⊆q : {p q : HOD } → (q ∩ p) ⊆ q +q∩q⊆q = record { incl = λ lt → proj1 lt } -filter-lemma2 : {L : OD} → (P : Filter L) → ( ∀ {p q : OD } → prime-filter {L} P {p} {q}) → ∀ (p : OD ) → ultra-filter {L} P {p} -filter-lemma2 {L} P prime p with prime {!!} -... | t = {!!} +open HOD +_=h=_ : (x y : HOD) → Set n +x =h= y = od x == od y + +----- +-- +-- ultra filter is prime +-- -generated-filter : {L : OD} → Filter L → (p : OD ) → Filter ( record { def = λ x → def L x ∨ (x ≡ od→ord p) } ) -generated-filter {L} P p = record { - proper = {!!} ; - filter = {!!} ; inL = {!!} ; - filter1 = {!!} ; filter2 = {!!} - } +filter-lemma1 : {L : HOD} → (P : Filter L) → ∀ {p q : HOD } → ultra-filter P → prime-filter P +filter-lemma1 {L} P u = record { + proper = ultra-filter.proper u + ; prime = lemma3 + } where + lemma3 : {p q : HOD} → filter P ∋ (p ∪ q) → ( filter P ∋ p ) ∨ ( filter P ∋ q ) + lemma3 {p} {q} lt with ultra-filter.ultra u (∪-lemma1 (∈-filter P lt) ) + ... | case1 p∈P = case1 p∈P + ... | case2 ¬p∈P = case2 (filter1 P {q ∩ (L ＼ p)} (∪-lemma2 (∈-filter P lt)) lemma7 lemma8) where + lemma5 : ((p ∪ q ) ∩ (L ＼ p)) =h= (q ∩ (L ＼ p)) + lemma5 = record { eq→ = λ {x} lt → record { proj1 = lemma4 x lt ; proj2 = proj2 lt } + ; eq← = λ {x} lt → record { proj1 = case2 (proj1 lt) ; proj2 = proj2 lt } + } where + lemma4 : (x : Ordinal ) → odef ((p ∪ q) ∩ (L ＼ p)) x → odef q x + lemma4 x lt with proj1 lt + lemma4 x lt | case1 px = ⊥-elim ( proj2 (proj2 lt) px ) + lemma4 x lt | case2 qx = qx + lemma6 : filter P ∋ ((p ∪ q ) ∩ (L ＼ p)) + lemma6 = filter2 P lt ¬p∈P + lemma7 : filter P ∋ (q ∩ (L ＼ p)) + lemma7 = subst (λ k → filter P ∋ k ) (==→o≡ lemma5 ) lemma6 + lemma8 : (q ∩ (L ＼ p)) ⊆ q + lemma8 = q∩q⊆q -record Dense (P : OD ) : Set (suc n) where - field - dense : OD - incl : dense ⊆ P - dense-f : OD → OD - dense-p : { p : OD} → P ∋ p → p ⊆ (dense-f p) +----- +-- +-- if Filter contains L, prime filter is ultra +-- --- H(ω,2) = Power ( Power ω ) = Def ( Def ω)) +filter-lemma2 : {L : HOD} → (P : Filter L) → filter P ∋ L → prime-filter P → ultra-filter P +filter-lemma2 {L} P f∋L prime = record { + proper = prime-filter.proper prime + ; ultra = λ {p} p⊆L → prime-filter.prime prime (lemma p p⊆L) + } where + open _==_ + p+1-p=1 : {p : HOD} → p ⊆ L → L =h= (p ∪ (L ＼ p)) + eq→ (p+1-p=1 {p} p⊆L) {x} lt with ODC.decp O (odef p x) + eq→ (p+1-p=1 {p} p⊆L) {x} lt | yes p∋x = case1 p∋x + eq→ (p+1-p=1 {p} p⊆L) {x} lt | no ¬p = case2 (record { proj1 = lt ; proj2 = ¬p }) + eq← (p+1-p=1 {p} p⊆L) {x} ( case1 p∋x ) = subst (λ k → odef L k ) diso (incl p⊆L ( subst (λ k → odef p k) (sym diso) p∋x )) + eq← (p+1-p=1 {p} p⊆L) {x} ( case2 ¬p ) = proj1 ¬p + lemma : (p : HOD) → p ⊆ L → filter P ∋ (p ∪ (L ＼ p)) + lemma p p⊆L = subst (λ k → filter P ∋ k ) (==→o≡ (p+1-p=1 p⊆L)) f∋L -infinite = ZF.infinite OD→ZF - -module in-countable-ordinal {n : Level} where +record Dense (P : HOD ) : Set (suc n) where + field + dense : HOD + incl : dense ⊆ P + dense-f : HOD → HOD + dense-d : { p : HOD} → P ∋ p → dense ∋ dense-f p + dense-p : { p : HOD} → P ∋ p → p ⊆ (dense-f p) - import ordinal +-- the set of finite partial functions from ω to 2 +-- +-- ph2 : Nat → Set → 2 +-- ph2 : Nat → Maybe 2 +-- +-- Hω2 : Filter (Power (Power infinite)) - -- open ordinal.C-Ordinal-with-choice - -- both Power and infinite is too ZF, it is better to use simpler one - Hω2 : Filter (Power (Power infinite)) - Hω2 = {!!} +record Ideal ( L : HOD ) : Set (suc n) where + field + ideal : HOD + i⊆PL : ideal ⊆ Power L + ideal1 : { p q : HOD } → q ⊆ L → ideal ∋ p → q ⊆ p → ideal ∋ q + ideal2 : { p q : HOD } → ideal ∋ p → ideal ∋ q → ideal ∋ (p ∪ q) +open Ideal + +proper-ideal : {L : HOD} → (P : Ideal L ) → {p : HOD} → Set n +proper-ideal {L} P {p} = ideal P ∋ od∅ + +prime-ideal : {L : HOD} → Ideal L → ∀ {p q : HOD } → Set n +prime-ideal {L} P {p} {q} = ideal P ∋ ( p ∩ q) → ( ideal P ∋ p ) ∨ ( ideal P ∋ q ) + diff -r 9f926b2210bc -r ba3ebb9a16c6 ordinal.agda --- a/ordinal.agda Sun Jun 07 20:35:14 2020 +0900 +++ b/ordinal.agda Sun Jul 05 16:59:13 2020 +0900 @@ -211,6 +211,7 @@ ; o∅ = o∅ ; osuc = osuc ; _o<_ = _o<_ + ; next = next ; isOrdinal = record { Otrans = ordtrans ; OTri = trio< @@ -218,14 +219,36 @@ ; <-osuc = <-osuc ; osuc-≡< = osuc-≡< ; TransFinite = TransFinite1 + ; TransFinite1 = TransFinite2 + ; not-limit = not-limit + ; next-limit = next-limit } } where + next : Ordinal {suc n} → Ordinal {suc n} + next (ordinal lv ord) = ordinal (Suc lv) (Φ (Suc lv)) + next-limit : {y : Ordinal} → (y o< next y) ∧ ((x : Ordinal) → x o< next y → osuc x o< next y) + next-limit {y} = record { proj1 = case1 a