Mercurial > hg > Members > kono > Proof > ZF-in-agda
comparison src/zorn.agda @ 990:9672214d4e13
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 17 Nov 2022 00:04:52 +0900 |
parents | ce713b5db3f3 |
children | c190f708862a |
comparison
equal
deleted
inserted
replaced
989:ce713b5db3f3 | 990:9672214d4e13 |
---|---|
80 <=-trans {x} {y} {z} (case2 x<y) (case2 y<z) = case2 ( IsStrictPartialOrder.trans PO x<y y<z ) | 80 <=-trans {x} {y} {z} (case2 x<y) (case2 y<z) = case2 ( IsStrictPartialOrder.trans PO x<y y<z ) |
81 | 81 |
82 ftrans<=-< : {x y z : Ordinal } → x <= y → y << z → x << z | 82 ftrans<=-< : {x y z : Ordinal } → x <= y → y << z → x << z |
83 ftrans<=-< {x} {y} {z} (case1 eq) y<z = subst (λ k → k < * z) (sym (cong (*) eq)) y<z | 83 ftrans<=-< {x} {y} {z} (case1 eq) y<z = subst (λ k → k < * z) (sym (cong (*) eq)) y<z |
84 ftrans<=-< {x} {y} {z} (case2 lt) y<z = IsStrictPartialOrder.trans PO lt y<z | 84 ftrans<=-< {x} {y} {z} (case2 lt) y<z = IsStrictPartialOrder.trans PO lt y<z |
85 | |
86 ftrans<-<= : {x y z : Ordinal } → x << y → y <= z → x << z | |
87 ftrans<-<= {x} {y} {z} x<y (case1 eq) = subst (λ k → * x < k ) ((cong (*) eq)) x<y | |
88 ftrans<-<= {x} {y} {z} x<y (case2 lt) = IsStrictPartialOrder.trans PO x<y lt | |
85 | 89 |
86 <=to≤ : {x y : Ordinal } → x <= y → * x ≤ * y | 90 <=to≤ : {x y : Ordinal } → x <= y → * x ≤ * y |
87 <=to≤ (case1 eq) = case1 (cong (*) eq) | 91 <=to≤ (case1 eq) = case1 (cong (*) eq) |
88 <=to≤ (case2 lt) = case2 lt | 92 <=to≤ (case2 lt) = case2 lt |
89 | 93 |
275 ch-init : {z : Ordinal } (fc : FClosure A f y z) → UChain A f mf ay supf x z | 279 ch-init : {z : Ordinal } (fc : FClosure A f y z) → UChain A f mf ay supf x z |
276 ch-is-sup : (u : Ordinal) {z : Ordinal } (u<x : supf u o< supf x) ( is-sup : ChainP A f mf ay supf u ) | 280 ch-is-sup : (u : Ordinal) {z : Ordinal } (u<x : supf u o< supf x) ( is-sup : ChainP A f mf ay supf u ) |
277 ( fc : FClosure A f (supf u) z ) → UChain A f mf ay supf x z | 281 ( fc : FClosure A f (supf u) z ) → UChain A f mf ay supf x z |
278 | 282 |
279 -- | 283 -- |
280 -- f (f ( ... (sup y))) f (f ( ... (sup z1))) | 284 -- f (f ( ... (supf y))) f (f ( ... (supf z1))) |
281 -- / | / | | 285 -- / | / | |
282 -- / | / | | 286 -- / | / | |
283 -- sup y < sup z1 < sup z2 | 287 -- supf y < supf z1 < supf z2 |
284 -- o< o< | 288 -- o< o< |
289 -- | |
290 -- if sup z1 ≡ sup z2, the chain is stopped at sup z1, then f (sup z1) ≡ sup z1 | |
291 | |
292 | |
293 fc-stop : ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) { a b : Ordinal } | |
294 → (aa : odef A a ) →( {y : Ordinal} → FClosure A f a y → (y ≡ b ) ∨ (y << b )) → a ≡ b → f a ≡ a | |
295 fc-stop A f mf {a} {b} aa x≤sup a=b with x≤sup (fsuc a (init aa refl )) | |
296 ... | case1 eq = trans eq (sym a=b) | |
297 ... | case2 lt = ⊥-elim (<-irr (case1 (cong (λ k → * (f k) ) (sym a=b))) (ftrans<-<= lt (≤to<= fc00 )) ) where | |
298 fc00 : * b ≤ * (f b) | |
299 fc00 = proj1 (mf _ (subst (λ k → odef A k) a=b aa )) | |
300 | |
301 -- | |
285 -- data UChain is total | 302 -- data UChain is total |
286 | 303 |
287 chain-total : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) | 304 chain-total : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
288 {s s1 a b : Ordinal } ( ca : UChain A f mf ay supf s a ) ( cb : UChain A f mf ay supf s1 b ) → Tri (* a < * b) (* a ≡ * b) (* b < * a ) | 305 {s s1 a b : Ordinal } ( ca : UChain A f mf ay supf s a ) ( cb : UChain A f mf ay supf s1 b ) → Tri (* a < * b) (* a ≡ * b) (* b < * a ) |
289 chain-total A f mf {y} ay supf {xa} {xb} {a} {b} ca cb = ct-ind xa xb ca cb where | 306 chain-total A f mf {y} ay supf {xa} {xb} {a} {b} ca cb = ct-ind xa xb ca cb where |
408 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where | 425 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where |
409 field | 426 field |
410 supf : Ordinal → Ordinal | 427 supf : Ordinal → Ordinal |
411 sup=u : {b : Ordinal} → (ab : odef A b) → b o≤ z | 428 sup=u : {b : Ordinal} → (ab : odef A b) → b o≤ z |
412 → IsSUP A (UnionCF A f mf ay supf b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf b) f b ) → supf b ≡ b | 429 → IsSUP A (UnionCF A f mf ay supf b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf b) f b ) → supf b ≡ b |
413 | 430 fcs<sup : {a b w : Ordinal } → a o< b → b o≤ z → FClosure A f (supf a) w → odef (UnionCF A f mf ay supf b) w |
414 asupf : {x : Ordinal } → odef A (supf x) | 431 asupf : {x : Ordinal } → odef A (supf x) |
415 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y | 432 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y |
416 supf-< : {x y : Ordinal } → supf x o< supf y → supf x << supf y | 433 supf-< : {x y : Ordinal } → supf x o< supf y → supf x << supf y |
417 supfmax : {x : Ordinal } → z o< x → supf x ≡ supf z | 434 supfmax : {x : Ordinal } → z o< x → supf x ≡ supf z |
418 | 435 |
717 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b | 734 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
718 m09 {s} {z} s<b fcz = order b<A s<b fcz | 735 m09 {s} {z} s<b fcz = order b<A s<b fcz |
719 m06 : ChainP A f mf ay supf b | 736 m06 : ChainP A f mf ay supf b |
720 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = m05 } | 737 m06 = record { fcy<sup = m08 ; order = m09 ; supu=u = m05 } |
721 ... | case1 sb=sx = ? where | 738 ... | case1 sb=sx = ? where |
739 b<A : b o< & A | |
740 b<A = z09 ab | |
722 m09 : IsSUP A (UnionCF A f mf ay (ZChain.supf zc) b) ab | 741 m09 : IsSUP A (UnionCF A f mf ay (ZChain.supf zc) b) ab |
723 m09 = proj2 is-sup | 742 m09 = proj2 is-sup |
724 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) f b | 743 m04 : ¬ HasPrev A (UnionCF A f mf ay supf b) f b |
725 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = | 744 m04 nhp = proj1 is-sup ( record { ax = HasPrev.ax nhp ; y = HasPrev.y nhp ; ay = |
726 chain-mono1 (o<→≤ b<x) (HasPrev.ay nhp) ; x=fy = HasPrev.x=fy nhp } ) | 745 chain-mono1 (o<→≤ b<x) (HasPrev.ay nhp) ; x=fy = HasPrev.x=fy nhp } ) |
727 m05 : ZChain.supf zc b ≡ b | 746 m05 : ZChain.supf zc b ≡ b |
728 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) ⟪ record { x≤sup = λ {z} uz → IsSUP.x≤sup (proj2 is-sup) uz } , m04 ⟫ | 747 m05 = ZChain.sup=u zc ab (o<→≤ (z09 ab) ) ⟪ record { x≤sup = λ {z} uz → IsSUP.x≤sup (proj2 is-sup) uz } , m04 ⟫ |
729 | |
730 m07 : MinSUP A (UnionCF A f mf ay supf (supf x)) -- supf z o< supf ( supf x ) | 748 m07 : MinSUP A (UnionCF A f mf ay supf (supf x)) -- supf z o< supf ( supf x ) |
731 m07 = ZChain.minsup zc (o<→≤ (z09 (ZChain.asupf zc))) | 749 m07 = ZChain.minsup zc (o<→≤ (z09 (ZChain.asupf zc))) |
750 m29 : x o≤ & A | |
751 m29 = ? | |
752 m15 : supf (supf x) ≡ MinSUP.sup m07 | |
753 m15 = ZChain.supf-is-minsup zc (o<→≤ (z09 (ZChain.asupf zc))) | |
754 m17 : MinSUP A (UnionCF A f mf ay supf x) -- supf z o< supf ( supf x ) | |
755 m17 = ZChain.minsup zc m29 | |
756 m18 : supf x ≡ MinSUP.sup m17 | |
757 m18 = ZChain.supf-is-minsup zc m29 | |
758 m10 : f (supf b) ≡ supf b | |
759 m10 = fc-stop A f mf (ZChain.asupf zc) m11 sb=sx where | |
760 m11 : {z : Ordinal} → FClosure A f (supf b) z → (z ≡ ZChain.supf zc x) ∨ (z << ZChain.supf zc x) | |
761 m11 {z} fc = subst (λ k → (z ≡ k) ∨ (z << k)) (sym m18) ( MinSUP.x≤sup m17 m13 ) where | |
762 m13 : odef (UnionCF A f mf ay supf x) z | |
763 m13 = ZChain.fcs<sup zc b<x m29 fc | |
764 m12 : odef (UnionCF A f mf ay supf (& A)) z | |
765 m12 = ZChain.fcs<sup zc ? ? fc | |
766 -- m14 : odef (UnionCF A f mf ay supf x) z | |
767 -- m14 = ZChain.fcs<sup zc ? ? | |
732 m08 : MinSUP A (UnionCF A f mf ay supf b) | 768 m08 : MinSUP A (UnionCF A f mf ay supf b) |
733 m08 = ZChain.minsup zc (o<→≤ (z09 ab)) -- supf z o< supf b | 769 m08 = ZChain.minsup zc (o<→≤ (z09 ab)) -- supf z o< supf b |
734 | 770 |
735 ... | no lim = record { is-max = is-max ; order = order } where | 771 ... | no lim = record { is-max = is-max ; order = order } where |
736 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → | 772 is-max : {a : Ordinal} {b : Ordinal} → odef (UnionCF A f mf ay supf x) a → |
739 * a < * b → odef (UnionCF A f mf ay supf x) b | 775 * a < * b → odef (UnionCF A f mf ay supf x) b |
740 is-max {a} {b} ua b<x ab P a<b with ODC.or-exclude O P | 776 is-max {a} {b} ua b<x ab P a<b with ODC.or-exclude O P |
741 is-max {a} {b} ua b<x ab P a<b | case1 has-prev = is-max-hp x {a} {b} ua ab has-prev a<b | 777 is-max {a} {b} ua b<x ab P a<b | case1 has-prev = is-max-hp x {a} {b} ua ab has-prev a<b |
742 is-max {a} {b} ua b<x ab P a<b | case2 is-sup with IsSUP.x≤sup (proj2 is-sup) (init-uchain A f mf ay ) | 778 is-max {a} {b} ua b<x ab P a<b | case2 is-sup with IsSUP.x≤sup (proj2 is-sup) (init-uchain A f mf ay ) |
743 ... | case1 b=y = ⟪ subst (λ k → odef A k ) b=y ay , ch-init (subst (λ k → FClosure A f y k ) b=y (init ay refl )) ⟫ | 779 ... | case1 b=y = ⟪ subst (λ k → odef A k ) b=y ay , ch-init (subst (λ k → FClosure A f y k ) b=y (init ay refl )) ⟫ |
744 ... | case2 y<b = ⟪ ab , ch-is-sup b sb<sx m06 (subst (λ k → FClosure A f k b) (sym m05) (init ab refl)) ⟫ where | 780 ... | case2 y<b with osuc-≡< (ZChain.supf-mono zc (o<→≤ b<x)) |
781 ... | case2 sb<sx = ⟪ ab , ch-is-sup b sb<sx m06 (subst (λ k → FClosure A f k b) (sym m05) (init ab refl)) ⟫ where | |
745 m09 : b o< & A | 782 m09 : b o< & A |
746 m09 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) | 783 m09 = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) ab)) |
747 sb<sx : supf b o< supf x | |
748 sb<sx = ? | |
749 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b | 784 m07 : {z : Ordinal} → FClosure A f y z → z <= ZChain.supf zc b |
750 m07 {z} fc = ZChain.fcy<sup zc (o<→≤ m09) fc | 785 m07 {z} fc = ZChain.fcy<sup zc (o<→≤ m09) fc |
751 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b | 786 m08 : {s z1 : Ordinal} → ZChain.supf zc s o< ZChain.supf zc b |
752 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b | 787 → FClosure A f (ZChain.supf zc s) z1 → z1 <= ZChain.supf zc b |
753 m08 {s} {z1} s<b fc = order m09 s<b fc | 788 m08 {s} {z1} s<b fc = order m09 s<b fc |
757 ; x=fy = HasPrev.x=fy nhp } ) | 792 ; x=fy = HasPrev.x=fy nhp } ) |
758 m05 : ZChain.supf zc b ≡ b | 793 m05 : ZChain.supf zc b ≡ b |
759 m05 = ZChain.sup=u zc ab (o<→≤ m09) ⟪ record { x≤sup = λ lt → IsSUP.x≤sup (proj2 is-sup) lt } , m04 ⟫ -- ZChain on x | 794 m05 = ZChain.sup=u zc ab (o<→≤ m09) ⟪ record { x≤sup = λ lt → IsSUP.x≤sup (proj2 is-sup) lt } , m04 ⟫ -- ZChain on x |
760 m06 : ChainP A f mf ay supf b | 795 m06 : ChainP A f mf ay supf b |
761 m06 = record { fcy<sup = m07 ; order = m08 ; supu=u = m05 } | 796 m06 = record { fcy<sup = m07 ; order = m08 ; supu=u = m05 } |
797 ... | case1 sb=sx = ? where | |
798 m17 : MinSUP A (UnionCF A f mf ay supf x) -- supf z o< supf ( supf x ) | |
799 m17 = ZChain.minsup zc ? | |
800 m18 : supf x ≡ MinSUP.sup m17 | |
801 m18 = ZChain.supf-is-minsup zc ? | |
802 m10 : f (supf b) ≡ supf b | |
803 m10 = fc-stop A f mf (ZChain.asupf zc) m11 sb=sx where | |
804 m11 : {z : Ordinal} → FClosure A f (supf b) z → (z ≡ ZChain.supf zc x) ∨ (z << ZChain.supf zc x) | |
805 m11 {z} fc = subst (λ k → (z ≡ k) ∨ (z << k)) (sym m18) ( MinSUP.x≤sup m17 m13 ) where | |
806 m13 : odef (UnionCF A f mf ay supf x) z | |
807 m13 = ZChain.fcs<sup zc b<x ? fc | |
762 | 808 |
763 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD | 809 uchain : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → HOD |
764 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = | 810 uchain f mf {y} ay = record { od = record { def = λ x → FClosure A f y x } ; odmax = & A ; <odmax = |
765 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } | 811 λ {z} cz → subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (A∋fc y f mf cz ))) } |
766 | 812 |