Mercurial > hg > Members > kono > Proof > ZF-in-agda
comparison src/zorn.agda @ 784:d83b0f7ece32
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 01 Aug 2022 10:46:21 +0900 |
parents | 195c3c7de021 |
children | 7472e3dc002b |
comparison
equal
deleted
inserted
replaced
783:195c3c7de021 | 784:d83b0f7ece32 |
---|---|
263 record SUP ( A B : HOD ) : Set (Level.suc n) where | 263 record SUP ( A B : HOD ) : Set (Level.suc n) where |
264 field | 264 field |
265 sup : HOD | 265 sup : HOD |
266 A∋maximal : A ∋ sup | 266 A∋maximal : A ∋ sup |
267 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 ) | |
270 | 268 |
271 -- | 269 -- |
272 -- sup and its fclosure is in a chain HOD | 270 -- sup and its fclosure is in a chain HOD |
273 -- chain HOD is sorted by sup as Ordinal and <-ordered | 271 -- chain HOD is sorted by sup as Ordinal and <-ordered |
274 -- whole chain is a union of separated Chain | 272 -- whole chain is a union of separated Chain |
311 f-total : IsTotalOrderSet chain | 309 f-total : IsTotalOrderSet chain |
312 | 310 |
313 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x) | 311 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x) |
314 supf-is-sup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ & (SUP.sup (sup x≤z) ) | 312 supf-is-sup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ & (SUP.sup (sup x≤z) ) |
315 sup=u : {b : Ordinal} → (ab : odef A b) → b o< z → IsSup A (UnionCF A f mf ay supf (osuc b)) ab → supf b ≡ b | 313 sup=u : {b : Ordinal} → (ab : odef A b) → b o< z → IsSup A (UnionCF A f mf ay supf (osuc b)) ab → supf b ≡ b |
316 csupf : (z : Ordinal ) → odef chain (supf z) | 314 csupf : {b : Ordinal } → b o≤ z → odef (UnionCF A f mf ay supf b) (supf b) |
317 csupf' : {b : Ordinal } → b o≤ z → odef (UnionCF A f mf ay supf b) (supf b) | 315 csupf = ? |
318 fcy<sup : {u w : Ordinal } → u o< z → FClosure A f y w → (w ≡ supf u ) ∨ ( w << supf u ) -- different from order because y o< supf | 316 fcy<sup : {u w : Ordinal } → u o< z → FClosure A f y w → (w ≡ supf u ) ∨ ( w << supf u ) -- different from order because y o< supf |
319 order : {b sup1 z1 : Ordinal} → b o< z → supf sup1 o< supf b → FClosure A f (supf sup1) z1 → (z1 ≡ supf b) ∨ (z1 << supf b) | 317 fcy<sup {u} {w} u<z fc with SUP.x<sup (sup (o<→≤ u<z)) ⟪ subst (λ k → odef A k ) (sym &iso) (A∋fc {A} y f mf fc) , ? ⟫ |
320 supf∈A : {u : Ordinal } → odef A (supf u) | |
321 supf∈A = ? | |
322 fcy<sup' : {u w : Ordinal } → u o< z → FClosure A f y w → (w ≡ supf u ) ∨ ( w << supf u ) -- different from order because y o< supf | |
323 fcy<sup' {u} {w} u<z fc with SUP.x<sup (sup (o<→≤ u<z)) ⟪ subst (λ k → odef A k ) (sym &iso) (A∋fc {A} y f mf fc) , ? ⟫ | |
324 ... | case1 eq = ? | 318 ... | case1 eq = ? |
325 ... | case2 lt = ? | 319 ... | case2 lt = ? |
326 fc∈A : {s z1 : Ordinal} → FClosure A f (supf s) z1 → odef chain z1 | 320 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) |
327 fc∈A {s} (fsuc x fc) = f-next (fc∈A {s} fc ) -- (supf s) ≡ z1 → init (supf s) | 321 order {b} {s} {.(f x)} b<z sf<sb (fsuc x fc) with proj1 (mf x (A∋fc _ f mf fc)) | order b<z sf<sb fc |
328 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) | |
329 order' {b} {s} {.(f x)} b<z sf<sb (fsuc x fc) with proj1 (mf x (A∋fc _ f mf fc)) | order' b<z sf<sb fc | |
330 ... | case1 eq | t = ? | 322 ... | case1 eq | t = ? |
331 ... | case2 lt | t = ? | 323 ... | case2 lt | t = ? |
332 order' {b} {s} {z1} b<z sf<sb (init x refl) = ? where | 324 order {b} {s} {z1} b<z sf<sb (init x refl) = ? where |
333 zc01 : s o≤ z | 325 zc01 : s o≤ z |
334 zc01 = ? | 326 zc01 = ? |
335 zc00 : ( * (supf s) ≡ SUP.sup (sup (o<→≤ b<z ))) ∨ ( * (supf s) < SUP.sup ( sup (o<→≤ b<z )) ) | 327 zc00 : ( * (supf s) ≡ SUP.sup (sup (o<→≤ b<z ))) ∨ ( * (supf s) < SUP.sup ( sup (o<→≤ b<z )) ) |
336 zc00 with csupf' zc01 | 328 zc00 with csupf zc01 |
337 ... | ⟪ ss , ch-init fc ⟫ = SUP.x<sup (sup (o<→≤ b<z)) ⟪ ? , ch-init ? ⟫ | 329 ... | ⟪ ss , ch-init fc ⟫ = SUP.x<sup (sup (o<→≤ b<z)) ⟪ ? , ch-init ? ⟫ |
338 ... | ⟪ ss , ch-is-sup us is-sup fc ⟫ = SUP.x<sup (sup (o<→≤ b<z)) ⟪ ? , ch-is-sup us ? ? ⟫ | 330 ... | ⟪ ss , ch-is-sup us is-sup fc ⟫ = SUP.x<sup (sup (o<→≤ b<z)) ⟪ ? , ch-is-sup us ? ? ⟫ |
339 | 331 |
340 | 332 |
341 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) | 333 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) |
348 record Maximal ( A : HOD ) : Set (Level.suc n) where | 340 record Maximal ( A : HOD ) : Set (Level.suc n) where |
349 field | 341 field |
350 maximal : HOD | 342 maximal : HOD |
351 A∋maximal : A ∋ maximal | 343 A∋maximal : A ∋ maximal |
352 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative | 344 ¬maximal<x : {x : HOD} → A ∋ x → ¬ maximal < x -- A is Partial, use negative |
353 | |
354 -- | |
355 | |
356 supf-unique : ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) | |
357 → {a b : Ordinal } → a o< b | |
358 → (za : ZChain A f mf ay (osuc a) ) → (zb : ZChain A f mf ay (osuc b) ) | |
359 → odef (UnionCF A f mf ay (ZChain.supf za) (osuc a)) (ZChain.supf za a) | |
360 → odef (UnionCF A f mf ay (ZChain.supf zb) (osuc b)) (ZChain.supf zb a) → ZChain.supf za a ≡ ZChain.supf zb a | |
361 supf-unique A f mf {y} ay {a} {b} a<b za zb ⟪ aa , ch-init fca ⟫ ⟪ ab , ch-init fcb ⟫ = ? where | |
362 supf = ZChain.supf za | |
363 supb = ZChain.supf zb | |
364 su00 : {u w : Ordinal } → u o< osuc a → FClosure A f y w → (w ≡ supf u ) ∨ ( w << supf u ) | |
365 su00 = ZChain.fcy<sup za | |
366 su01 : (supf a ≡ supb b ) ∨ ( supf a << supb b ) | |
367 su01 = ZChain.fcy<sup zb <-osuc fca | |
368 su02 : (supb a ≡ supf a ) ∨ ( supb a << supf a ) | |
369 su02 = ZChain.fcy<sup za <-osuc fcb | |
370 supf-unique A f mf {y} ay {a} a<b za zb ⟪ aa , ch-init fca ⟫ ⟪ ab , ch-is-sup ub is-supb fcb ⟫ = ? | |
371 supf-unique A f mf {y} ay {a} a<b za zb ⟪ aa , ch-is-sup ua is-supa fca ⟫ ⟪ ab , ch-init fcb ⟫ = ? | |
372 supf-unique A f mf {y} ay {a} a<b za zb ⟪ aa , ch-is-sup ua is-supa fca ⟫ ⟪ ab , ch-is-sup ub is-supb fcb ⟫ = ? | |
373 | 345 |
374 -- data UChain is total | 346 -- data UChain is total |
375 | 347 |
376 chain-total : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) | 348 chain-total : (A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) {y : Ordinal} (ay : odef A y) (supf : Ordinal → Ordinal ) |
377 {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 ) | 349 {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 ) |
756 pcy : odef pchain y | 728 pcy : odef pchain y |
757 pcy = ⟪ ay , ch-init (init ay refl) ⟫ | 729 pcy = ⟪ ay , ch-init (init ay refl) ⟫ |
758 | 730 |
759 supf0 = ZChain.supf zc | 731 supf0 = ZChain.supf zc |
760 | 732 |
761 csupf : (z : Ordinal) → odef (UnionCF A f mf ay supf0 x) (supf0 z) | |
762 csupf z with ZChain.csupf zc z | |
763 ... | ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ | |
764 ... | ⟪ az , ch-is-sup u is-sup fc ⟫ = ⟪ az , ch-is-sup u is-sup fc ⟫ | |
765 | |
766 -- if previous chain satisfies maximality, we caan reuse it | 733 -- if previous chain satisfies maximality, we caan reuse it |
767 -- | 734 -- |
768 no-extension : ZChain A f mf ay x | 735 no-extension : ZChain A f mf ay x |
769 no-extension = record { supf = supf0 | 736 no-extension = record { supf = supf0 |
770 ; initial = pinit ; chain∋init = pcy ; sup=u = {!!} ; order = {!!} ; fcy<sup = {!!} | 737 ; initial = pinit ; chain∋init = pcy ; sup=u = {!!} ; order = {!!} ; fcy<sup = {!!} |
827 zc20 : {z : Ordinal } → z ≡ x → spu ≡ psupf x | 794 zc20 : {z : Ordinal } → z ≡ x → spu ≡ psupf x |
828 zc20 {z} z=x with trio< z x | inspect psupf z | 795 zc20 {z} z=x with trio< z x | inspect psupf z |
829 ... | tri< a ¬b ¬c | _ = ⊥-elim ( ¬b z=x) | 796 ... | tri< a ¬b ¬c | _ = ⊥-elim ( ¬b z=x) |
830 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = subst (λ k → spu ≡ psupf k) b (sym eq1) | 797 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = subst (λ k → spu ≡ psupf k) b (sym eq1) |
831 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬b z=x) | 798 ... | tri> ¬a ¬b c | _ = ⊥-elim ( ¬b z=x) |
832 | |
833 order : {b sup1 z1 : Ordinal} → b o< x → | |
834 psupf sup1 o< psupf b → | |
835 FClosure A f (psupf sup1) z1 → (z1 ≡ psupf b) ∨ (z1 << psupf b) | |
836 order {b} {s} {z1} b<x ps<pb fc with trio< b x | |
837 ... | tri< a ¬b ¬c = ZChain.order uzc <-osuc zc21 zc20 where | |
838 uzc = pzc (osuc b) (ob<x lim a) | |
839 zc22 : psupf s ≡ ZChain.supf uzc s | |
840 zc22 with trio< s x | |
841 ... | tri< s<x ¬b ¬c = zc23 where | |
842 szc = pzc (osuc s) (ob<x lim s<x) | |
843 zc23 : ZChain.supf (pzc (osuc s) (ob<x lim s<x)) s ≡ ZChain.supf (pzc (osuc b) (ob<x lim a)) s | |
844 zc23 = ? | |
845 zc24 : odef (UnionCF A f mf ay (ZChain.supf (pzc (osuc s) (ob<x lim s<x))) (osuc s)) | |
846 (ZChain.supf (pzc (osuc s) (ob<x lim s<x)) s ) | |
847 zc24 = ZChain.csupf (pzc (osuc s) (ob<x lim s<x)) s | |
848 zc25 : odef (UnionCF A f mf ay (ZChain.supf (pzc (osuc b) (ob<x lim a))) (osuc b)) | |
849 (ZChain.supf (pzc (osuc b) (ob<x lim a)) b ) | |
850 zc25 = ZChain.csupf (pzc (osuc b) (ob<x lim a)) b | |
851 | |
852 ... | tri≈ ¬a b ¬c = ? | |
853 ... | tri> ¬a ¬b c = ? | |
854 zc21 : ZChain.supf uzc s o< ZChain.supf uzc b | |
855 zc21 = subst (λ k → k o< _) zc22 ps<pb | |
856 zc20 : FClosure A f (ZChain.supf uzc s ) z1 | |
857 zc20 = subst (λ k → FClosure A f k z1) zc22 fc | |
858 ... | tri≈ ¬a b ¬c = ⊥-elim (¬a b<x) | |
859 ... | tri> ¬a ¬b c = ⊥-elim (¬a b<x) | |
860 | |
861 csupf : (z : Ordinal) → odef (UnionCF A f mf ay psupf x) (psupf z) | |
862 csupf z with trio< z x | inspect psupf z | |
863 ... | tri< z<x ¬b ¬c | record { eq = eq1 } = zc11 where | |
864 ozc = pzc (osuc z) (ob<x lim z<x) | |
865 zc12 : odef A (ZChain.supf ozc z) ∧ UChain A f mf ay (ZChain.supf ozc) (osuc z) (ZChain.supf ozc z) | |
866 zc12 = ZChain.csupf ozc z | |
867 zc11 : odef A (ZChain.supf ozc z) ∧ UChain A f mf ay psupf x (ZChain.supf ozc z) | |
868 zc11 = ⟪ az , ch-is-sup z cp1 (subst (λ k → FClosure A f k _) (sym eq1) (init az refl) ) ⟫ where | |
869 az : odef A ( ZChain.supf ozc z ) | |
870 az = proj1 zc12 | |
871 zc20 : {z1 : Ordinal} → FClosure A f y z1 → (z1 ≡ psupf z) ∨ (z1 << psupf z) | |
872 zc20 {z1} fc with ZChain.fcy<sup ozc <-osuc fc | |
873 ... | case1 eq = case1 (trans eq (sym eq1) ) | |
874 ... | case2 lt = case2 (subst ( λ k → z1 << k ) (sym eq1) lt) | |
875 cp1 : ChainP A f mf ay psupf z (ZChain.supf ozc z) | |
876 cp1 = record { fcy<sup = zc20 ; order = order z<x } | |
877 --- u = supf u = supf z | |
878 ... | tri≈ ¬a b ¬c | record { eq = eq1 } = ⟪ sa , ch-is-sup {!!} {!!} {!!} ⟫ where | |
879 sa = SUP.A∋maximal usup | |
880 ... | tri> ¬a ¬b c | record { eq = eq1 } = {!!} | |
881 | 799 |
882 | 800 |
883 fcy<sup : {u w : Ordinal} → u o< x → FClosure A f y w → (w ≡ psupf u) ∨ (w << psupf u) | 801 fcy<sup : {u w : Ordinal} → u o< x → FClosure A f y w → (w ≡ psupf u) ∨ (w << psupf u) |
884 fcy<sup {u} {w} u<x fc with trio< u x | 802 fcy<sup {u} {w} u<x fc with trio< u x |
885 ... | tri< a ¬b ¬c = ZChain.fcy<sup uzc <-osuc fc where | 803 ... | tri< a ¬b ¬c = ZChain.fcy<sup uzc <-osuc fc where |
917 ... | ⟪ ab0 , ch-is-sup u is-sup fc ⟫ = ⟪ ab , | 835 ... | ⟪ ab0 , ch-is-sup u is-sup fc ⟫ = ⟪ ab , |
918 subst (λ k → UChain A f mf ay supf x k ) | 836 subst (λ k → UChain A f mf ay supf x k ) |
919 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u (ChainP-next A f mf ay _ is-sup) (fsuc _ fc)) ⟫ | 837 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u (ChainP-next A f mf ay _ is-sup) (fsuc _ fc)) ⟫ |
920 | 838 |
921 no-extension : ZChain A f mf ay x | 839 no-extension : ZChain A f mf ay x |
922 no-extension = record { initial = pinit ; chain∋init = pcy ; supf = psupf ; sup=u = {!!} ; order = order ; fcy<sup = fcy<sup | 840 no-extension = record { initial = pinit ; chain∋init = pcy ; supf = psupf ; sup=u = {!!} |
923 ; supf-mono = {!!} ; chain⊆A = pchain⊆A ; f-next = pnext ; f-total = ptotal } | 841 ; supf-mono = {!!} ; chain⊆A = pchain⊆A ; f-next = pnext ; f-total = ptotal } |
924 zc5 : ZChain A f mf ay x | 842 zc5 : ZChain A f mf ay x |
925 zc5 with ODC.∋-p O A (* x) | 843 zc5 with ODC.∋-p O A (* x) |
926 ... | no noax = no-extension -- ¬ A ∋ p, just skip | 844 ... | no noax = no-extension -- ¬ A ∋ p, just skip |
927 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain ax f ) | 845 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain ax f ) |