# HG changeset patch # User Shinji KONO # Date 1650208284 -32400 # Node ID f351c183e7124860e54fd8112480423985302ebb # Parent 8e36b5c35777fcd6b5a435d12b961fbb219c47e6 all-climb-case diff -r 8e36b5c35777 -r f351c183e712 src/zorn.agda --- a/src/zorn.agda Sun Apr 17 19:58:58 2022 +0900 +++ b/src/zorn.agda Mon Apr 18 00:11:24 2022 +0900 @@ -141,11 +141,11 @@ iy : IChain A y ic : ic-connect x iy -IChainSet : {A : HOD} → Element A → HOD -IChainSet {A} ax = record { od = record { def = λ y → odef A y ∧ IChained A (& (elm ax)) y } +IChainSet : (A : HOD) {x : Ordinal} → odef A x → HOD +IChainSet A {x} ax = record { od = record { def = λ y → odef A y ∧ IChained A x y } ; odmax = & A ; (A : HOD) {x : Ordinal} (ax : A ∋ * x) : Set n where field y : Ordinal - icy : odef (IChainSet {A} (me ax)) y + icy : odef (IChainSet A ax ) y y>x : x o< y record IChainSup> (A : HOD) {x : Ordinal} (ax : A ∋ * x) : Set n where @@ -170,13 +170,13 @@ -- finite IChain -ic→A∋y : (A : HOD) {x y : Ordinal} (ax : A ∋ * x) → odef (IChainSet {A} (me ax)) y → A ∋ * y +ic→A∋y : (A : HOD) {x y : Ordinal} (ax : A ∋ * x) → odef (IChainSet A ax) y → A ∋ * y ic→A∋y A {x} {y} ax ⟪ ay , _ ⟫ = subst (λ k → odef A k) (sym &iso) ay record InFiniteIChain (A : HOD) (max : Ordinal) {x : Ordinal} (ax : A ∋ * x) : Set n where field - chain A (ic→A∋y A ax cy) open import Data.Nat hiding (_<_) @@ -206,17 +206,17 @@ cton A s next y = cton0 A s next (is-elm y) cinext : (A : HOD) {x max : Ordinal } → (ax : A ∋ * x ) → (ifc : InFiniteIChain A max ax ) → Ordinal → Ordinal -cinext A ax ifc y with ODC.∋-p O (IChainSet (me ax)) (* y) -... | yes ics-y = IChainSup>.y ( InFiniteIChain.c-infinite ifc y (subst (λ k → odef (IChainSet (me ax)) k) &iso ics-y )) +cinext A ax ifc y with ODC.∋-p O (IChainSet A ax) (* y) +... | yes ics-y = IChainSup>.y ( InFiniteIChain.c-infinite ifc y (subst (λ k → odef (IChainSet A ax) k) &iso ics-y )) ... | no _ = o∅ InFCSet : (A : HOD) → {x max : Ordinal} (ax : A ∋ * x) → (ifc : InFiniteIChain A max ax ) → HOD -InFCSet A {x} ax ifc = ChainClosure (IChainSet {A} (me ax)) x (cinext A ax ifc ) +InFCSet A {x} ax ifc = ChainClosure (IChainSet A ax) x (cinext A ax ifc ) InFCSet⊆A : (A : HOD) → {x max : Ordinal} (ax : A ∋ * x) → (ifc : InFiniteIChain A max ax ) → InFCSet A ax ifc ⊆ A -InFCSet⊆A A {x} ax ifc = record { incl = λ {y} lt → incl (IChainSet⊆A (me ax)) ( - ct∈A (IChainSet {A} (me ax)) x (cinext A ax ifc) lt ) } +InFCSet⊆A A {x} ax ifc = record { incl = λ {y} lt → incl (IChainSet⊆A ax) ( + ct∈A (IChainSet A ax) x (cinext A ax ifc) lt ) } ChainClosure-is-total : (A : HOD) → {x max : Ordinal} (ax : A ∋ * x) → IsPartialOrderSet A @@ -226,10 +226,10 @@ ; trans = λ {x} {y} {z} → IsStrictPartialOrder.trans IPO {x} {y} {z} ; compare = cmp } where IPO : IsPartialOrderSet (InFCSet A ax ifc ) IPO = ⊆-IsPartialOrderSet record { incl = λ {y} lt → incl (InFCSet⊆A A {x} ax ifc) lt} PO - B = IChainSet {A} (me ax) + B = IChainSet A ax cnext = cinext A ax ifc ct02 : {oy : Ordinal} → (y : Chain B x cnext oy ) → A ∋ * oy - ct02 y = incl (IChainSet⊆A {A} (me ax)) (subst (λ k → odef (IChainSet (me ax)) k) (sym &iso) (ct∈A B x cnext y) ) + ct02 y = incl (IChainSet⊆A {A} ax) (subst (λ k → odef (IChainSet A ax) k) (sym &iso) (ct∈A B x cnext y) ) ct-inject : {ox oy : Ordinal} → (x1 : Chain B x cnext ox ) → (y : Chain B x cnext oy ) → (cton0 B x cnext x1) ≡ (cton0 B x cnext y) → ox ≡ oy ct-inject {ox} {ox} (cfirst x) (cfirst x₁) refl = refl @@ -243,21 +243,21 @@ ct-monotonic {ox} {oy} x1 (csuc oy1 ay y _) (s≤s lt) with NP.<-cmp ( cton0 B x cnext x1 ) ( cton0 B x cnext y ) ... | tri< a ¬b ¬c = ct07 where ct07 : * ox < * (cnext oy1) - ct07 with ODC.∋-p O (IChainSet {A} (me ax)) (* oy1) - ... | no not = ⊥-elim ( not (subst (λ k → odef (IChainSet {A} (me ax)) k ) (sym &iso) ay ) ) + ct07 with ODC.∋-p O (IChainSet A ax) (* oy1) + ... | no not = ⊥-elim ( not (subst (λ k → odef (IChainSet A ax) k ) (sym &iso) ay ) ) ... | yes ay1 = IsStrictPartialOrder.trans PO {me (ct02 x1) } {me (ct02 y)} {me ct031 } (ct-monotonic x1 y a ) ct011 where - ct031 : A ∋ * (IChainSup>.y (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet {A} (me ax)) k) &iso ay1 ) )) + ct031 : A ∋ * (IChainSup>.y (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet A ax) k) &iso ay1 ) )) ct031 = subst (λ k → odef A k ) (sym &iso) ( - IChainSup>.A∋y (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet {A} (me ax)) k) &iso ay1 )) ) - ct011 : * oy1 < * ( IChainSup>.y (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet {A} (me ax)) k) &iso ay1 )) ) - ct011 = IChainSup>.y>x (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet {A} (me ax)) k) &iso ay1 )) + IChainSup>.A∋y (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet A ax) k) &iso ay1 )) ) + ct011 : * oy1 < * ( IChainSup>.y (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet A ax) k) &iso ay1 )) ) + ct011 = IChainSup>.y>x (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet A ax) k) &iso ay1 )) ... | tri≈ ¬a b ¬c = ct11 where ct11 : * ox < * (cnext oy1) - ct11 with ODC.∋-p O (IChainSet {A} (me ax)) (* oy1) - ... | no not = ⊥-elim ( not (subst (λ k → odef (IChainSet {A} (me ax)) k ) (sym &iso) ay ) ) + ct11 with ODC.∋-p O (IChainSet A ax) (* oy1) + ... | no not = ⊥-elim ( not (subst (λ k → odef (IChainSet A ax) k ) (sym &iso) ay ) ) ... | yes ay1 = subst (λ k → * k < _) (sym (ct-inject _ _ b)) ct011 where - ct011 : * oy1 < * ( IChainSup>.y (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet {A} (me ax)) k) &iso ay1 )) ) - ct011 = IChainSup>.y>x (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet {A} (me ax)) k) &iso ay1 )) + ct011 : * oy1 < * ( IChainSup>.y (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet A ax) k) &iso ay1 )) ) + ct011 = IChainSup>.y>x (InFiniteIChain.c-infinite ifc oy1 (subst (λ k → odef (IChainSet A ax) k) &iso ay1 )) ... | tri> ¬a ¬b c = ⊥-elim ( nat-≤> lt c ) ct12 : {y z : Element (ChainClosure B x cnext) } → elm y ≡ elm z → elm y < elm z → ⊥ ct12 {y} {z} y=z y A (subst (λ k → odef A k ) (sym &iso) (proj1 icy) ) record Maximal ( A : HOD ) : Set (Level.suc n) where @@ -307,69 +307,58 @@ Zorn-lemma-3case : { A : HOD } → o∅ o< & A → IsPartialOrderSet A - → (x : Element A) → OSup> A (d→∋ A (is-elm x)) ∨ Maximal A ∨ InFiniteIChain A (& (elm x)) (d→∋ A (is-elm x)) -Zorn-lemma-3case {A} 0 A (d→∋ A ax) ∨ Maximal A ∨ InFiniteIChain A x (d→∋ A ax) +Zorn-lemma-3case {A} 0 A (d→∋ A (is-elm x)) ∨ Maximal A ∨ InFiniteIChain A (& (elm x)) (d→∋ A (is-elm x)) + zc2 : OSup> A (d→∋ A ax) ∨ Maximal A ∨ InFiniteIChain A x (d→∋ A ax ) zc2 with is-o∅ (& Gtx) ... | no not = case1 record { y = & y ; icy = zc4 ; y>x = proj2 zc3 } where y : HOD y = ODC.minimal O Gtx (λ eq → not (=od∅→≡o∅ eq)) - zc3 : odef ( IChainSet x ) (& y) ∧ ( & (elm x) o< (& y )) + zc3 : odef ( IChainSet A ax ) (& y) ∧ ( x o< (& y )) zc3 = ODC.x∋minimal O Gtx (λ eq → not (=od∅→≡o∅ eq)) - zc4 : odef (IChainSet (me (subst (OD.def (od A)) (sym &iso) (is-elm x)))) (& y) - zc4 = ⟪ proj1 (proj1 zc3) , subst (λ k → IChained A (& k) (& y) ) (sym *iso) (proj2 (proj1 zc3)) ⟫ + zc4 : odef (IChainSet A (subst (OD.def (od A)) (sym &iso) ax)) (& y) + zc4 = ⟪ proj1 (proj1 zc3) , (subst (λ k → IChained A k (& y)) (sym &iso) (proj2 (proj1 zc3))) ⟫ ... | yes nogt with is-o∅ (& HG) ... | no finite-chain = case2 (case1 record { maximal = y ; A∋maximal = proj1 zc3 ; ¬maximalx = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) yx = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) y ¬a ¬b c = ⊥-elim ( zc20 (* oy) zc22 (subst (λ k → & (elm x) o< k) (sym &iso) c )) - zc9 : (y : Ordinal) (cy : odef B y) → - IChainSup> A (ic→A∋y A (subst (OD.def (od A)) (sym &iso) (is-elm x)) cy) - zc9 y cy with is-o∅ (& (Nx y (proj1 cy) )) + ... | tri≈ ¬a b ¬c = ⊥-elim (¬IChained-refl A PO (subst₂ (λ j k → IChained A j k ) &iso b (proj2 icsy)) ) + ... | tri> ¬a ¬b c = ⊥-elim ( zc20 (* oy) zc22 (subst (λ k → x o< k) (sym &iso) c )) + zc91 : (y : Ordinal) (cy : odef B1 y) → IChainSup> A (ic→A∋y A (subst (OD.def (od A)) (sym &iso) ax) cy) + zc91 y cy with is-o∅ (& (Nx y (proj1 cy) )) ... | yes no-next = ⊥-elim zc16 where - zc18 : ¬ IChainSup> A (subst (odef A) (sym &iso) (proj1 (subst (λ k → odef (IChainSet (me (d→∋ A (is-elm x)))) k) (sym &iso) cy))) + zc18 : ¬ IChainSup> A (subst (odef A) (sym &iso) (proj1 (subst (λ k → odef (IChainSet A (d→∋ A ax)) k) (sym &iso) cy))) zc18 ics = ¬A∋x→A≡od∅ (Nx y (proj1 cy) ) ⟪ subst (λ k → odef A k ) (sym &iso) (IChainSup>.A∋y ics) , subst₂ (λ j k → j < k ) *iso (cong (*) (sym &iso))( IChainSup>.y>x ics) ⟫ no-next - zc17 : IsFC A {& (elm x)} (d→∋ A (is-elm x)) (& (* y)) - zc17 = record { icy = subst (λ k → odef (IChainSet (me (d→∋ A (is-elm x)))) k ) (sym &iso) cy ; c-finite = zc18 } + zc17 : IsFC A {x} (d→∋ A ax) (& (* y)) + zc17 = record { icy = subst (λ k → odef (IChainSet A (d→∋ A ax)) k) (sym &iso) cy ; c-finite = zc18 } zc16 : ⊥ zc16 = ¬A∋x→A≡od∅ HG ⟪ subst (λ k → odef A k ) (sym &iso) (proj1 cy ) , zc17 ⟫ inifite ... | no not = record { y = & zc13 ; A∋y = proj1 zc12 ; y>x = proj2 zc12 } where @@ -378,28 +367,27 @@ zc12 = ODC.x∋minimal O (Nx y (proj1 cy)) (λ eq → not (=od∅→≡o∅ eq )) all-climb-case : { A : HOD } → (0 A (d→∋ A (is-elm x) )) + → (( x : Ordinal ) → (ax : odef A (& (* x))) → OSup> A ax ) → InFiniteIChain A (& A) (d→∋ A (ODC.x∋minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0 A (subst (λ k → odef A k ) (sym &iso) ay ) - ac00 x y ay cy = record { y = z ; A∋y = az ; y>x = {!!} } where + ac00 : (y : Ordinal) (cy : odef (IChainSet A (d→∋ A ax)) y) → IChainSup> A (ic→A∋y A (d→∋ A ax) cy) + ac00 y cy = record { y = z ; A∋y = az ; y>x = y.y ( climb (me (subst (λ k → odef A k ) (sym &iso) ay) ) ) + z = OSup>.y ( climb y ay) az : odef A z - icy : odef (IChainSet {A} (me (subst (λ k → odef A k ) {!!} ay))) z - icy = OSup>.icy ( climb (me (subst (λ k → odef A k ) (sym &iso) ay) ) ) - az = {!!} - -- incl (IChainSet⊆A {A} ? ) (subst (λ k → odef (IChainSet {A} ? ) k ) ? (OSup>.icy ( climb (me (subst (λ k → odef A k ) (sym &iso) ay) ) ))) - - = OSup>.y ( climb (me (subst (λ k → odef A k ) (sym &iso) ay) ) ) - -- iy0 : IChained A (& (* (& (ODC.minimal O A (λ eq → ¬x<0 (subst (_o<_ o∅) (=od∅→≡o∅ eq) 0.icy ( climb y ay)))) + icy : odef (IChainSet A ay ) z + icy = OSup>.icy ( climb y ay ) + yx = zc1 y>x + zc4 with Zorn-lemma-3case 0x = zc1 {!!} ... | case2 (case1 x) = case2 x ... | case2 (case2 ex) = ⊥-elim (zc5 {!!} ) where FC : HOD - FC = IChainSet {A} (me ax) + FC = IChainSet A ax B : InFiniteIChain A x ax → HOD B ifc = InFCSet A ax ifc zc6 : (ifc : InFiniteIChain A x ax ) → ¬ SUP A (B ifc)