Mercurial > hg > Members > kono > Proof > ZF-in-agda
changeset 655:b602e3f070df
UChain rewrite
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 01 Jul 2022 14:36:38 +0900 |
parents | 6df8b836e983 |
children | db9477c80dce |
files | src/zorn.agda |
diffstat | 1 files changed, 74 insertions(+), 60 deletions(-) [+] |
line wrap: on
line diff
--- a/src/zorn.agda Thu Jun 30 10:40:24 2022 +0900 +++ b/src/zorn.agda Fri Jul 01 14:36:38 2022 +0900 @@ -233,17 +233,39 @@ field x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x ) -record ZChain1 ( z : Ordinal ) : Set (Level.suc n) where +record UChain (chain : Ordinal → HOD) (x : Ordinal) (z : Ordinal) : Set n where + -- Union of supf z which o< x field - supf : Ordinal → HOD - chain-mono : {x : Ordinal} → x o≤ z → supf x ⊆' supf z + u : Ordinal + u<x : u o< x + chain∋z : odef (chain u) z -ZChain0 : (A : HOD ) → Set (Level.suc n) -ZChain0 A = ZChain1 ( & A ) +Chain-uniq : (A : HOD ) ( f : Ordinal → Ordinal ) → {y : Ordinal} (ay : odef A y) → (x : Ordinal) + → ( Ordinal → HOD ) → Set (Level.suc n) +Chain-uniq A f {y} ay x chain with Oprev-p x +... | yes op = st1 where + px = Oprev.oprev op + st1 : Set (Level.suc n) + st1 with ODC.∋-p O A (* x) + ... | no noax = chain x ≡ chain px + ... | yes ax with ODC.p∨¬p O ( HasPrev A (chain px) ax f ) + ... | case1 pr = chain x ≡ chain px + ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (chain px) ax ) + ... | case1 is-sup = chain x ≡ schain where + schain : HOD + schain = record { od = record { def = λ x → odef (chain px) x ∨ (FClosure A f y x) } ; odmax = & A ; <odmax = λ {y} sy → {!!} } + ... | case2 ¬x=sup = chain x ≡ chain px +... | no ¬ox = chain x ≡ record { od = record { def = λ z → odef A z ∧ ( UChain chain z x ∨ FClosure A f y z ) ; odmax = & A ; <odmax = λ {y} sy → {!!} } } -record ZChain ( A : HOD ) (init : Ordinal) ( f : Ordinal → Ordinal ) (zc0 : ZChain0 A ) ( z : Ordinal ) : Set (Level.suc n) where +record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) {y : Ordinal } (ay : odef A y ) ( z : Ordinal ) : Set (Level.suc n) where + field + chain : Ordinal → HOD + chain-mono : {x : Ordinal} → x o≤ z → chain x ⊆' chain z + chain-uniq : Chain-uniq A f ay z chain + +record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) {init : Ordinal} (ay : odef A init) (zc0 : ZChain1 A f ay (& A) ) ( z : Ordinal ) : Set (Level.suc n) where chain : HOD - chain = ZChain1.supf zc0 z + chain = ZChain1.chain zc0 z field chain⊆A : chain ⊆' A chain∋init : odef chain init @@ -254,14 +276,6 @@ → HasPrev A chain ab f ∨ IsSup A chain ab → * a < * b → odef chain b -record UZFChain ( A : HOD ) ( f : Ordinal → Ordinal ) (zc0 : ZChain0 A ) (x y : Ordinal) - (prev : (z : Ordinal) → z o< x → ZChain A y f zc0 z) (z : Ordinal) : Set n where - -- Union of ZFChain from y which has maximality o< x - field - u : Ordinal - u<x : u o< x - chain∋z : odef (ZChain.chain (prev u u<x )) z - record Maximal ( A : HOD ) : Set (Level.suc n) where field maximal : HOD @@ -333,7 +347,7 @@ cf-is-≤-monotonic : (nmx : ¬ Maximal A ) → ≤-monotonic-f A ( cf nmx ) cf-is-≤-monotonic nmx x ax = ⟪ case2 (proj1 ( cf-is-<-monotonic nmx x ax )) , proj2 ( cf-is-<-monotonic nmx x ax ) ⟫ - sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc0 : ZChain0 A) (zc : ZChain A (& s) f zc0 (& A) ) + sp0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc0 : ZChain1 A f as0 (& A) ) (zc : ZChain A f as0 zc0 (& A) ) (total : IsTotalOrderSet (ZChain.chain zc) ) → SUP A (ZChain.chain zc) sp0 f mf zc0 zc total = supP (ZChain.chain zc) (ZChain.chain⊆A zc) total zc< : {x y z : Ordinal} → {P : Set n} → (x o< y → P) → x o< z → z o< y → P @@ -342,7 +356,7 @@ --- --- the maximum chain has fix point of any ≤-monotonic function --- - fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc0 : ZChain0 A ) (zc : ZChain A (& s) f zc0 (& A) ) + fixpoint : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc0 : ZChain1 A f as0 (& A)) (zc : ZChain A f as0 zc0 (& A) ) → (total : IsTotalOrderSet (ZChain.chain zc) ) → f (& (SUP.sup (sp0 f mf zc0 zc total ))) ≡ & (SUP.sup (sp0 f mf zc0 zc total)) fixpoint f mf zc0 zc total = z14 where @@ -391,7 +405,7 @@ -- ZChain forces fix point on any ≤-monotonic function (fixpoint) -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain -- - z04 : (nmx : ¬ Maximal A ) → (zc0 : ZChain0 A) (zc : ZChain A (& s) (cf nmx) zc0 (& A)) → IsTotalOrderSet (ZChain.chain zc) → ⊥ + z04 : (nmx : ¬ Maximal A ) → (zc0 : ZChain1 A (cf nmx) as0 (& A)) (zc : ZChain A (cf nmx) as0 zc0 (& A)) → IsTotalOrderSet (ZChain.chain zc) → ⊥ z04 nmx zc0 zc total = <-irr0 {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.A∋maximal sp1 )))) (subst (λ k → odef A (& k)) (sym *iso) (SUP.A∋maximal sp1) ) (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc0 zc total ))) -- x ≡ f x ̄ @@ -405,50 +419,52 @@ -- sind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) - → ((z : Ordinal) → z o< x → ZChain1 z ) → ZChain1 x + → ((z : Ordinal) → z o< x → ZChain1 A f ay z ) → ZChain1 A f ay x sind f mf {y} ay x prev with Oprev-p x ... | yes op = sc4 where open ZChain1 px = Oprev.oprev op - sc : ZChain1 px + sc : ZChain1 A f ay px sc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) - no-ext : ZChain1 x - no-ext = record { supf = s01 ; chain-mono = ? } where + no-ext : ZChain1 A f ay x + no-ext = record { chain = s01 ; chain-mono = ? ; chain-uniq = ? } where s01 : Ordinal → HOD - s01 z = supf (prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc )) z + s01 z = chain (prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc )) z - sc4 : ZChain1 x + sc4 : ZChain1 A f ay x sc4 with ODC.∋-p O A (* x) ... | no noax = {!!} - ... | yes ax with ODC.p∨¬p O ( HasPrev A (ZChain1.supf sc x) ax f ) + ... | yes ax with ODC.p∨¬p O ( HasPrev A (ZChain1.chain sc x) ax f ) ... | case1 pr = {!!} - ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain1.supf sc x) ax ) + ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain1.chain sc x) ax ) ... | case1 is-sup = {!!} where -- A∋sc -- x is a sup of zc - sup0 : SUP A (ZChain1.supf sc x ) + sup0 : SUP A (ZChain1.chain sc x ) sup0 = record { sup = * x ; A∋maximal = ax ; x<sup = x21 } where - x21 : {y : HOD} → (ZChain1.supf sc x) ∋ y → (y ≡ * x) ∨ (y < * x) + x21 : {y : HOD} → (ZChain1.chain sc x) ∋ y → (y ≡ * x) ∨ (y < * x) x21 {y} zy with IsSup.x<sup is-sup zy ... | case1 y=x = case1 (subst₂ (λ j k → j ≡ * k ) *iso &iso ( cong (*) y=x) ) ... | case2 y<x = case2 (subst₂ (λ j k → j < * k ) *iso &iso y<x ) sp : HOD sp = SUP.sup sup0 schain : HOD - schain = record { od = record { def = λ x → odef (ZChain1.supf sc x) x ∨ (FClosure A f (& sp) x) } ; odmax = & A ; <odmax = λ {y} sy → {!!} } + schain = record { od = record { def = λ x → odef (ZChain1.chain sc x) x ∨ (FClosure A f (& sp) x) } ; odmax = & A ; <odmax = λ {y} sy → {!!} } ... | case2 ¬x=sup = {!!} - ... | no ¬ox = {!!} + ... | no ¬ox = ? where + sc5 : HOD + sc5 = record { od = record { def = λ z → odef A z ∧ UChain ? x z } ; odmax = & A ; <odmax = λ {y} sy → {!!} } - ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (zc0 : ZChain0 A) → (x : Ordinal) - → ((z : Ordinal) → z o< x → ZChain A y f zc0 z) → ZChain A y f zc0 x - ind f mf {y} ay zc0 x prev with Oprev-p x + ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) → (zc0 : ZChain1 A f ay (& A)) + → ((z : Ordinal) → z o< x → ZChain A f ay zc0 z) → ZChain A f ay zc0 x + ind f mf {y} ay x zc0 prev with Oprev-p x ... | yes op = zc4 where -- -- we have previous ordinal to use induction -- px = Oprev.oprev op supf : Ordinal → HOD - supf = ZChain1.supf zc0 - zc : ZChain A y f zc0 (Oprev.oprev op) + supf = ZChain1.chain zc0 + zc : ZChain A f ay zc0 (Oprev.oprev op) zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) zc-b<x : (b : Ordinal ) → b o< x → b o< osuc px zc-b<x b lt = subst (λ k → b o< k ) (sym (Oprev.oprev=x op)) lt @@ -459,7 +475,7 @@ -- no-extenion : ( {a b : Ordinal} → odef (ZChain.chain zc) a → b o< osuc x → (ab : odef A b) → HasPrev A (ZChain.chain zc) ab f ∨ IsSup A (ZChain.chain zc) ab → - * a < * b → odef (ZChain.chain zc) b ) → ZChain A y f zc0 x + * a < * b → odef (ZChain.chain zc) b ) → ZChain A f ay ? x no-extenion is-max = record { chain⊆A = ? -- subst (λ k → k ⊆' A ) {!!} (ZChain.chain⊆A zc) ; initial = subst (λ k → {y₁ : Ordinal} → odef k y₁ → * y ≤ * y₁ ) {!!} (ZChain.initial zc) ; f-next = subst (λ k → {a : Ordinal} → odef k a → odef k (f a) ) {!!} (ZChain.f-next zc) @@ -483,7 +499,7 @@ ... | tri≈ ¬a b₁ ¬c = ⊥-elim (¬a b<x ) ... | tri> ¬a ¬b c = ⊥-elim (¬a b<x ) - zc4 : ZChain A y f zc0 x + zc4 : ZChain A f ay zc0 x zc4 with ODC.∋-p O A (* x) ... | no noax = no-extenion zc1 where -- ¬ A ∋ p, just skip zc1 : {a b : Ordinal} → odef (ZChain.chain zc) a → b o< osuc x → (ab : odef A b) → @@ -615,26 +631,24 @@ ... | no ¬ox = record { chain⊆A = {!!} ; f-next = {!!} ; f-total = ? ; initial = {!!} ; chain∋init = {!!} ; is-max = {!!} } where --- limit ordinal case supf : Ordinal → HOD - supf = ZChain1.supf zc0 - Uz⊆A : {z : Ordinal} → UZFChain A f zc0 x y prev z ∨ FClosure A f y z → odef A z - Uz⊆A {z} (case1 u) = ZChain.chain⊆A ( prev (UZFChain.u u) (UZFChain.u<x u) ) (UZFChain.chain∋z u) - Uz⊆A (case2 lt) = A∋fc _ f mf lt - uzc : {z : Ordinal} → (u : UZFChain A f zc0 x y prev z) → ZChain A y f zc0 (UZFChain.u u) - uzc {z} u = prev (UZFChain.u u) (UZFChain.u<x u) + supf = ZChain1.chain zc0 + uzc : {z : Ordinal} → (u : UChain supf x z) → ZChain A f ay zc0 (UChain.u u) + uzc {z} u = prev (UChain.u u) (UChain.u<x u) Uz : HOD - Uz = record { od = record { def = λ z → UZFChain A f zc0 x y prev z ∨ FClosure A f y z } ; odmax = & A - ; <odmax = λ lt → subst (λ k → k o< & A ) &iso (c<→o< (subst (λ k → odef A k ) (sym &iso) (Uz⊆A lt))) } + Uz = record { od = record { def = λ z → odef A z ∧ ( UChain supf z x ∨ FClosure A f y z ) } ; odmax = & A ; <odmax = ? } u-next : {z : Ordinal} → odef Uz z → odef Uz (f z) - u-next {z} (case1 u) = case1 record { u = UZFChain.u u ; u<x = UZFChain.u<x u ; chain∋z = ZChain.f-next ( uzc u ) (UZFChain.chain∋z u) } - u-next {z} (case2 u) = case2 ( fsuc _ u ) + u-next {z} = ? + -- (case1 u) = case1 record { u = UChain.u u ; u<x = UChain.u<x u ; chain∋z = ZChain.f-next ( uzc u ) (UChain.chain∋z u) } + -- u-next {z} (case2 u) = case2 ( fsuc _ u ) u-initial : {z : Ordinal} → odef Uz z → * y ≤ * z - u-initial {z} (case1 u) = ZChain.initial ( uzc u ) (UZFChain.chain∋z u) - u-initial {z} (case2 u) = s≤fc _ f mf u + u-initial {z} = ? + -- (case1 u) = ZChain.initial ( uzc u ) (UChain.chain∋z u) + -- u-initial {z} (case2 u) = s≤fc _ f mf u u-chain∋init : odef Uz y - u-chain∋init = case2 ( init ay ) + u-chain∋init = ? -- case2 ( init ay ) supf0 : Ordinal → HOD supf0 z with trio< z x - ... | tri< a ¬b ¬c = ZChain1.supf zc0 z + ... | tri< a ¬b ¬c = ZChain1.chain zc0 z ... | tri≈ ¬a b ¬c = Uz ... | tri> ¬a ¬b c = Uz u-mono : {z : Ordinal} {w : Ordinal} → z o≤ w → w o≤ x → supf0 z ⊆' supf0 w @@ -646,9 +660,9 @@ ... | tri< a ¬b ¬c = ⊥-elim ( ¬b refl ) ... | tri≈ ¬a b ¬c = refl ... | tri> ¬a ¬b c = refl - seq<x : {b : Ordinal } → (b<x : b o< x ) → ZChain1.supf zc0 b ≡ supf0 b + seq<x : {b : Ordinal } → (b<x : b o< x ) → ZChain1.chain zc0 b ≡ supf0 b seq<x {b} b<x with trio< b x - ... | tri< a ¬b ¬c = cong (λ k → ZChain1.supf zc0 b) o<-irr -- b<x ≡ a + ... | tri< a ¬b ¬c = cong (λ k → ZChain1.chain zc0 b) o<-irr -- b<x ≡ a ... | tri≈ ¬a b₁ ¬c = ⊥-elim (¬a b<x ) ... | tri> ¬a ¬b c = ⊥-elim (¬a b<x ) ord≤< : {x y z : Ordinal} → x o< z → z o≤ y → x o< y @@ -656,11 +670,11 @@ ... | case1 z=y = subst (λ k → x o< k ) z=y x<z ... | case2 z<y = ordtrans x<z z<y - SZ0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ya : odef A y) → ZChain0 A - SZ0 f mf ay = TransFinite {λ z → ZChain1 z} (sind f mf ay ) (& A) + SZ0 : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain1 A f ay (& A) + SZ0 f mf ay = TransFinite {λ z → ZChain1 A f ay z} (sind f mf ay ) (& A) - SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ya : odef A y) → ZChain A y f (SZ0 f mf ya) (& A) - SZ f mf {y} ay = TransFinite {λ z → ZChain A y f (SZ0 f mf ay) z } (ind f mf ay (SZ0 f mf ay) ) (& A) + SZ : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) → {y : Ordinal} (ay : odef A y) → ZChain A f ay (SZ0 f mf ay) (& A) + SZ f mf {y} ay = TransFinite {λ z → ZChain A f ay (SZ0 f mf ay) z } (λ x → ind f mf ay x (SZ0 f mf ay) ) (& A) zorn00 : Maximal A zorn00 with is-o∅ ( & HasMaximal ) -- we have no Level (suc n) LEM @@ -678,9 +692,9 @@ nmx mx = ∅< {HasMaximal} zc5 ( ≡o∅→=od∅ ¬Maximal ) where zc5 : odef A (& (Maximal.maximal mx)) ∧ (( y : Ordinal ) → odef A y → ¬ (* (& (Maximal.maximal mx)) < * y)) zc5 = ⟪ Maximal.A∋maximal mx , (λ y ay mx<y → Maximal.¬maximal<x mx (subst (λ k → odef A k ) (sym &iso) ay) (subst (λ k → k < * y) *iso mx<y) ) ⟫ - zc0 : ZChain0 A - zc0 = TransFinite {λ z → ZChain1 z} (sind (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as )) (& A) - zorn04 : ZChain A (& s) (cf nmx) zc0 (& A) + zc0 : ZChain1 A (cf nmx) as0 (& A) + zc0 = TransFinite {λ z → ZChain1 A (cf nmx) as0 z} (sind (cf nmx) (cf-is-≤-monotonic nmx) as0) (& A) + zorn04 : ZChain A (cf nmx) as0 zc0 (& A) zorn04 = SZ (cf nmx) (cf-is-≤-monotonic nmx) (subst (λ k → odef A k ) &iso as ) total : IsTotalOrderSet (ZChain.chain zorn04) total {a} {b} = zorn06 where