Mercurial > hg > Members > kono > Proof > ZF-in-agda
comparison src/zorn.agda @ 779:9e34893d9a03
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 29 Jul 2022 02:38:37 +0900 |
parents | 6aafa22c951a |
children | 10a036aeb688 |
comparison
equal
deleted
inserted
replaced
778:6aafa22c951a | 779:9e34893d9a03 |
---|---|
71 ≤-ftrans {x} {y} {z} (case1 refl ) (case1 refl ) = case1 refl | 71 ≤-ftrans {x} {y} {z} (case1 refl ) (case1 refl ) = case1 refl |
72 ≤-ftrans {x} {y} {z} (case1 refl ) (case2 y<z) = case2 y<z | 72 ≤-ftrans {x} {y} {z} (case1 refl ) (case2 y<z) = case2 y<z |
73 ≤-ftrans {x} {_} {z} (case2 x<y ) (case1 refl ) = case2 x<y | 73 ≤-ftrans {x} {_} {z} (case2 x<y ) (case1 refl ) = case2 x<y |
74 ≤-ftrans {x} {y} {z} (case2 x<y) (case2 y<z) = case2 ( IsStrictPartialOrder.trans PO x<y y<z ) | 74 ≤-ftrans {x} {y} {z} (case2 x<y) (case2 y<z) = case2 ( IsStrictPartialOrder.trans PO x<y y<z ) |
75 | 75 |
76 <-ftrans : {x y z : Ordinal } → x <= y → y <= z → x <= z | |
77 <-ftrans {x} {y} {z} (case1 refl ) (case1 refl ) = case1 refl | |
78 <-ftrans {x} {y} {z} (case1 refl ) (case2 y<z) = case2 y<z | |
79 <-ftrans {x} {_} {z} (case2 x<y ) (case1 refl ) = case2 x<y | |
80 <-ftrans {x} {y} {z} (case2 x<y) (case2 y<z) = case2 ( IsStrictPartialOrder.trans PO x<y y<z ) | |
81 | |
76 <=to≤ : {x y : Ordinal } → x <= y → * x ≤ * y | 82 <=to≤ : {x y : Ordinal } → x <= y → * x ≤ * y |
77 <=to≤ (case1 eq) = case1 (cong (*) eq) | 83 <=to≤ (case1 eq) = case1 (cong (*) eq) |
78 <=to≤ (case2 lt) = case2 lt | 84 <=to≤ (case2 lt) = case2 lt |
85 | |
86 ≤to<= : {x y : Ordinal } → * x ≤ * y → x <= y | |
87 ≤to<= (case1 eq) = case1 ( subst₂ (λ j k → j ≡ k ) &iso &iso (cong (&) eq) ) | |
88 ≤to<= (case2 lt) = case2 lt | |
79 | 89 |
80 <-irr : {a b : HOD} → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ | 90 <-irr : {a b : HOD} → (a ≡ b ) ∨ (a < b ) → b < a → ⊥ |
81 <-irr {a} {b} (case1 a=b) b<a = IsStrictPartialOrder.irrefl PO (sym a=b) b<a | 91 <-irr {a} {b} (case1 a=b) b<a = IsStrictPartialOrder.irrefl PO (sym a=b) b<a |
82 <-irr {a} {b} (case2 a<b) b<a = IsStrictPartialOrder.irrefl PO refl | 92 <-irr {a} {b} (case2 a<b) b<a = IsStrictPartialOrder.irrefl PO refl |
83 (IsStrictPartialOrder.trans PO b<a a<b) | 93 (IsStrictPartialOrder.trans PO b<a a<b) |
246 ay : odef B y | 256 ay : odef B y |
247 x=fy : x ≡ f y | 257 x=fy : x ≡ f y |
248 | 258 |
249 record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x) : Set n where | 259 record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x) : Set n where |
250 field | 260 field |
251 x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x ) | 261 x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x ) |
252 | 262 |
253 record SUP ( A B : HOD ) : Set (Level.suc n) where | 263 record SUP ( A B : HOD ) : Set (Level.suc n) where |
254 field | 264 field |
255 sup : HOD | 265 sup : HOD |
256 A∋maximal : A ∋ sup | 266 A∋maximal : A ∋ sup |
257 x<sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup ) -- B is Total, use positive | 267 x<sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup ) -- B is Total, use positive |
268 min-sup : {z : HOD } → B ∋ z → ( {x : HOD } → B ∋ x → (x ≡ z ) ∨ (x < z ) ) | |
269 → (z ≡ sup ) ∨ (sup < z ) | |
258 | 270 |
259 -- | 271 -- |
260 -- sup and its fclosure is in a chain HOD | 272 -- sup and its fclosure is in a chain HOD |
261 -- chain HOD is sorted by sup as Ordinal and <-ordered | 273 -- chain HOD is sorted by sup as Ordinal and <-ordered |
262 -- whole chain is a union of separated Chain | 274 -- whole chain is a union of separated Chain |
666 | 678 |
667 -- | 679 -- |
668 -- create all ZChains under o< x | 680 -- create all ZChains under o< x |
669 -- | 681 -- |
670 | 682 |
683 record FChain (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (x : Ordinal) : Set n where | |
684 field | |
685 supf : Ordinal → Ordinal | |
686 fcy<sup : { z : Ordinal ) → FClosure A f y z → z <= supf x | |
687 is-sup : ( z : Ordinal ) → (z<x : z o< x ) → { z1 : Ordinal } → FClosure A f (supf z) z1 → z1 <= supf x | |
688 is-minsup : ( x1 : Ordinal ) → | |
689 (( z : Ordinal ) → (z<x : z o< x ) → { z1 : Ordinal } → FClosure A f (supf z) z1 → z1 <= x1 ) → supf x <= x1 | |
690 order : {b s z1 : Ordinal} → b o< z → supf s o< supf b → FClosure A f (supf s) z1 → (z1 ≡ supf b) ∨ (z1 << supf b) | |
691 order = ? | |
692 | |
693 | |
694 fsupf : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal ) → FChain A f mf ay x | |
695 fsupf f mf {y} ay x = TransFinite0 find x where | |
696 find : (x : Ordinal ) → (( z : Ordinal ) → z o< x → FChain A f mf ay z ) → FChain A f mf ay x | |
697 find x prev with trio< o∅ x | |
698 ... | tri< a ¬b ¬c = ? | |
699 ... | tri≈ ¬a b ¬c = ? | |
700 ... | tri> ¬a ¬b c = ? | |
701 | |
671 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) | 702 ind : ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) {y : Ordinal} (ay : odef A y) → (x : Ordinal) |
672 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x | 703 → ((z : Ordinal) → z o< x → ZChain A f mf ay z) → ZChain A f mf ay x |
673 ind f mf {y} ay x prev with Oprev-p x | 704 ind f mf {y} ay x prev with Oprev-p x |
674 ... | yes op = zc4 where | 705 ... | yes op = zc4 where |
675 -- | 706 -- |
751 ptotal0 : IsTotalOrderSet pchain0 | 782 ptotal0 : IsTotalOrderSet pchain0 |
752 ptotal0 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where | 783 ptotal0 {a} {b} ca cb = subst₂ (λ j k → Tri (j < k) (j ≡ k) (k < j)) *iso *iso uz01 where |
753 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) | 784 uz01 : Tri (* (& a) < * (& b)) (* (& a) ≡ * (& b)) (* (& b) < * (& a) ) |
754 uz01 = chain-total A f mf ay psupf0 ( (proj2 ca)) ( (proj2 cb)) | 785 uz01 = chain-total A f mf ay psupf0 ( (proj2 ca)) ( (proj2 cb)) |
755 | 786 |
756 | |
757 usup : SUP A pchain0 | 787 usup : SUP A pchain0 |
758 usup = supP pchain0 (λ lt → proj1 lt) ptotal0 | 788 usup = supP pchain0 (λ lt → proj1 lt) ptotal0 |
759 spu = & (SUP.sup usup) | 789 spu = & (SUP.sup usup) |
760 | |
761 record Usupf ( w : Ordinal ) : Set n where | |
762 field | |
763 supf : Ordinal → Ordinal | |
764 uniq-supf : {z w1 : Ordinal } → z o< w1 → (w<x : w o< x) → (w1<w : w1 o< w) | |
765 → supf z ≡ ZChain.supf (prev w1 (ordtrans w1<w w<x )) z | |
766 | |
767 US : (w1 : Ordinal) → w1 o< x → Usupf w1 | |
768 US w1 w1<x = TransFinite0 uind w1 where | |
769 uind : (w : Ordinal) → ((z : Ordinal) → z o< w → Usupf z ) → Usupf w | |
770 uind w uprev with Oprev-p x | |
771 ... | yes op = record { supf = ? ; uniq-supf = ? } where | |
772 px = Oprev.oprev op | |
773 zc : ZChain A f mf ay (Oprev.oprev op) | |
774 zc = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc ) | |
775 supf : Ordinal → Ordinal | |
776 supf z with trio< z w | |
777 ... | tri< a ¬b ¬c = ZChain.supf (prev _ ?) z | |
778 ... | tri≈ ¬a b ¬c = ZChain.supf zc z | |
779 ... | tri> ¬a ¬b c = ZChain.supf zc z | |
780 us : {z : Ordinal } → z o< w → (w<x : w o< x) → supf z ≡ ZChain.supf (prev _ w<x) z | |
781 us {z} z<w w<x with trio< z w | |
782 ... | tri< a ¬b ¬c = u01 where | |
783 u02 : ? ≡ Usupf.supf (uprev z a) z | |
784 u02 = ? | |
785 u01 : ZChain.supf (prev ? ?) z ≡ ZChain.supf (prev w w<x) z | |
786 u01 = ? -- subst (λ k → k ≡ _ ) ? ( Usupf.uniq-supf (uprev _ ?) ? ? ) | |
787 ... | tri≈ ¬a b ¬c = ? | |
788 ... | tri> ¬a ¬b c = ? | |
789 ... | no wlim = record { supf = supf ; uniq-supf = ? } where | |
790 supf : Ordinal → Ordinal | |
791 supf z with trio< (osuc z) w | |
792 ... | tri< a ¬b ¬c = Usupf.supf ( uprev (osuc z) a ) z | |
793 ... | tri≈ ¬a b ¬c = spu | |
794 ... | tri> ¬a ¬b c = spu | |
795 us : {z : Ordinal} {w2 : Ordinal} → z o< w2 | |
796 → (w<x : w o< x) (w2<w : w2 o< w) → supf z ≡ ZChain.supf (prev w2 (ordtrans w2<w w<x)) z | |
797 us {z} {w2} z<w2 w<x w2<w with trio< (osuc z) w | |
798 ... | tri< a ¬b ¬c = ? where | |
799 u00 = Usupf.uniq-supf (uprev (osuc z) ?) ? ? ? | |
800 u01 = Usupf.uniq-supf (uprev w2 ?) ? ? ? | |
801 ... | tri≈ ¬a b ¬c = ? | |
802 ... | tri> ¬a ¬b c = ? | |
803 | |
804 | 790 |
805 psupf : Ordinal → Ordinal | 791 psupf : Ordinal → Ordinal |
806 psupf z with trio< z x | 792 psupf z with trio< z x |
807 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z | 793 ... | tri< a ¬b ¬c = ZChain.supf (pzc (osuc z) (ob<x lim a)) z |
808 ... | tri≈ ¬a b ¬c = spu -- ^^ this z dependcy have to be removed | 794 ... | tri≈ ¬a b ¬c = spu -- ^^ this z dependcy have to be removed |
819 zc20 : {z : Ordinal } → z ≡ x → spu ≡ psupf x | 805 zc20 : {z : Ordinal } → z ≡ x → spu ≡ psupf x |
820 zc20 {z} z=x with trio< z x | inspect psupf z | 806 zc20 {z} z=x with trio< z x | inspect psupf z |
821 ... | tri< a ¬b ¬c | _ = ⊥-elim ( ¬b z=x) | 807 ... | tri< a ¬b ¬c | _ = ⊥-elim ( ¬b z=x) |
822 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = subst (λ k → spu ≡ psupf k) b (sym eq1) | 808 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = subst (λ k → spu ≡ psupf k) b (sym eq1) |
823 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬b z=x) | 809 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬b z=x) |
810 | |
811 order : {b sup1 z1 : Ordinal} → b o< x → | |
812 psupf sup1 o< psupf b → | |
813 FClosure A f (psupf sup1) z1 → (z1 ≡ psupf b) ∨ (z1 << psupf b) | |
814 order {b} {s} {z1} b<x ps<pb fc = ? | |
824 | 815 |
825 csupf : (z : Ordinal) → odef (UnionCF A f mf ay psupf x) (psupf z) | 816 csupf : (z : Ordinal) → odef (UnionCF A f mf ay psupf x) (psupf z) |
826 csupf z with trio< z x | inspect psupf z | 817 csupf z with trio< z x | inspect psupf z |
827 ... | tri< z<x ¬b ¬c | record { eq = eq1 } = zc11 where | 818 ... | tri< z<x ¬b ¬c | record { eq = eq1 } = zc11 where |
828 ozc = pzc (osuc z) (ob<x lim z<x) | 819 ozc = pzc (osuc z) (ob<x lim z<x) |
834 az = proj1 zc12 | 825 az = proj1 zc12 |
835 zc20 : {z1 : Ordinal} → FClosure A f y z1 → (z1 ≡ psupf z) ∨ (z1 << psupf z) | 826 zc20 : {z1 : Ordinal} → FClosure A f y z1 → (z1 ≡ psupf z) ∨ (z1 << psupf z) |
836 zc20 {z1} fc with ZChain.fcy<sup ozc <-osuc fc | 827 zc20 {z1} fc with ZChain.fcy<sup ozc <-osuc fc |
837 ... | case1 eq = case1 (trans eq (sym eq1) ) | 828 ... | case1 eq = case1 (trans eq (sym eq1) ) |
838 ... | case2 lt = case2 (subst ( λ k → z1 << k ) (sym eq1) lt) | 829 ... | case2 lt = case2 (subst ( λ k → z1 << k ) (sym eq1) lt) |
839 zc21 : {sup1 z1 : Ordinal} → psupf sup1 o< psupf z → FClosure A f (psupf sup1) z1 → (z1 ≡ psupf z) ∨ (z1 << psupf z) | |
840 zc21 {s} {z1} s<z fc = zc22 where | |
841 zc25 : psupf z ≡ ZChain.supf ozc z | |
842 zc25 = psupf<z z<x | |
843 s<x : s o< x | |
844 s<x = {!!} | |
845 zc26 : psupf s ≡ ZChain.supf (pzc (osuc s) (ob<x lim s<x)) s | |
846 zc26 = psupf<z s<x | |
847 zc23 : ZChain.supf ozc s o< ZChain.supf ozc z | |
848 zc23 = {!!} | |
849 zc24 : FClosure A f (ZChain.supf ozc s) z1 | |
850 zc24 with trio< s x | |
851 ... | t = {!!} | |
852 zc22 : (z1 ≡ psupf z) ∨ (z1 << psupf z) | |
853 zc22 with ZChain.order ozc <-osuc zc23 zc24 | |
854 ... | case1 eq = case1 (trans eq (sym eq1) ) | |
855 ... | case2 lt = case2 (subst ( λ k → z1 << k ) (sym eq1) lt) | |
856 cp1 : ChainP A f mf ay psupf z (ZChain.supf ozc z) | 830 cp1 : ChainP A f mf ay psupf z (ZChain.supf ozc z) |
857 cp1 = record { fcy<sup = zc20 ; order = zc21 } | 831 cp1 = record { fcy<sup = zc20 ; order = order z<x } |
858 | |
859 --- u = supf u = supf z | 832 --- u = supf u = supf z |
860 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = ⟪ sa , ch-is-sup {!!} {!!} {!!} ⟫ where | 833 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = ⟪ sa , ch-is-sup {!!} {!!} {!!} ⟫ where |
861 sa = SUP.A∋maximal usup | 834 sa = SUP.A∋maximal usup |
862 ... | tri> ¬a ¬b c | record { eq = eq1 } = {!!} | 835 ... | tri> ¬a ¬b c | record { eq = eq1 } = {!!} |
863 | 836 |