comparison src/zorn.agda @ 865:b095c84310df

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 10 Sep 2022 18:20:24 +0900
parents 06f692bf7a97
children 8a49ab1dcbd0
comparison
equal deleted inserted replaced
864:06f692bf7a97 865:b095c84310df
349 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy ) 349 ... | tri≈ ¬a refl ¬c = ⊥-elim ( o<¬≡ (cong supf refl) sx<sy )
350 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) ) 350 ... | tri> ¬a ¬b y<x with osuc-≡< (supf-mono (o<→≤ y<x) )
351 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy ) 351 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sx<sy )
352 ... | case2 lt = ⊥-elim ( o<> sx<sy lt ) 352 ... | case2 lt = ⊥-elim ( o<> sx<sy lt )
353 353
354 record Zsupf ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f)
355 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where
356 field
357 s : Ordinal
358 s=z : odef A z → s ≡ z
359 as : odef A s
360 sup : SUP A (UnionCF A f mf ay (λ _ → s) z)
361
354 record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) 362 record ZChain ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f)
355 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where 363 {y : Ordinal} (ay : odef A y) ( z : Ordinal ) : Set (Level.suc n) where
356 field 364 field
357 supf : Ordinal → Ordinal 365 supf : Ordinal → Ordinal
358 chain : HOD 366 chain : HOD
359 chain = UnionCF A f mf ay supf z 367 chain = UnionCF A f mf ay supf z
360 chain⊆A : chain ⊆' A 368 chain⊆A : chain ⊆' A
361 chain⊆A = λ lt → proj1 lt 369 chain⊆A = λ lt → proj1 lt
362 field 370 field
363 supf-max : {x : Ordinal } → z o≤ x → supf z ≡ supf x
364 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x) 371 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x)
365 sup=u : {b : Ordinal} → (ab : odef A b) → b o≤ z 372 sup=u : {b : Ordinal} → (ab : odef A b) → b o≤ z
366 → IsSup A (UnionCF A f mf ay supf b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf b) b f) → supf b ≡ b 373 → IsSup A (UnionCF A f mf ay supf b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf b) b f) → supf b ≡ b
367 supf-is-sup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ & (SUP.sup (sup x≤z) ) 374 supf-is-sup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ & (SUP.sup (sup x≤z) )
368 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y 375 supf-mono : {x y : Ordinal } → x o≤ y → supf x o≤ supf y
376 supf-max : {x : Ordinal } → z o< x → supf (osuc z) ≡ supf x
369 csupf : {b : Ordinal } → b o≤ z → odef (UnionCF A f mf ay supf (supf b)) (supf b) 377 csupf : {b : Ordinal } → b o≤ z → odef (UnionCF A f mf ay supf (supf b)) (supf b)
370 378
371 chain∋init : odef chain y 379 chain∋init : odef chain y
372 chain∋init = ⟪ ay , ch-init (init ay refl) ⟫ 380 chain∋init = ⟪ ay , ch-init (init ay refl) ⟫
373 f-next : {a : Ordinal} → odef chain a → odef chain (f a) 381 f-next : {a : Ordinal} → odef chain a → odef chain (f a)
739 747
740 supfx : {z : Ordinal } → x o≤ z → supf0 px ≡ supf0 z 748 supfx : {z : Ordinal } → x o≤ z → supf0 px ≡ supf0 z
741 supfx {z} x≤z with trio< z px 749 supfx {z} x≤z with trio< z px
742 ... | tri< a ¬b ¬c = ⊥-elim ( o≤> x≤z (subst (λ k → z o< k ) (Oprev.oprev=x op) (ordtrans a <-osuc ))) 750 ... | tri< a ¬b ¬c = ⊥-elim ( o≤> x≤z (subst (λ k → z o< k ) (Oprev.oprev=x op) (ordtrans a <-osuc )))
743 ... | tri≈ ¬a b ¬c = ⊥-elim ( o≤> x≤z (subst (λ k → k o< x ) (sym b) (pxo<x op))) 751 ... | tri≈ ¬a b ¬c = ⊥-elim ( o≤> x≤z (subst (λ k → k o< x ) (sym b) (pxo<x op)))
744 ... | tri> ¬a ¬b c = ZChain.supf-max zc (o<→≤ c) 752 ... | tri> ¬a ¬b c = ? -- ZChain.supf-max zc (o<→≤ c)
745 753
746 supf∈A : {b : Ordinal} → b o≤ x → odef A (supf0 b) 754 supf∈A : {b : Ordinal} → b o≤ x → odef A (supf0 b)
747 supf∈A {b} b≤z with trio< b px 755 supf∈A {b} b≤z with trio< b px
748 ... | tri< a ¬b ¬c = proj1 ( ZChain.csupf zc (o<→≤ a )) 756 ... | tri< a ¬b ¬c = proj1 ( ZChain.csupf zc (o<→≤ a ))
749 ... | tri≈ ¬a b ¬c = proj1 ( ZChain.csupf zc (o≤-refl0 b )) 757 ... | tri≈ ¬a b ¬c = proj1 ( ZChain.csupf zc (o≤-refl0 b ))
750 ... | tri> ¬a ¬b c = subst (λ k → odef A k ) (ZChain.supf-max zc (o<→≤ c)) (proj1 ( ZChain.csupf zc o≤-refl)) 758 ... | tri> ¬a ¬b c = ? -- subst (λ k → odef A k ) (ZChain.supf-max zc (o<→≤ c)) ? -- (proj1 ( ZChain.csupf zc o≤-refl))
751 759
752 supf-mono : {a b : Ordinal } → a o≤ b → supf0 a o≤ supf0 b 760 supf-mono : {a b : Ordinal } → a o≤ b → supf0 a o≤ supf0 b
753 supf-mono = ZChain.supf-mono zc 761 supf-mono = ZChain.supf-mono zc
754 762
755 supf-max : {z : Ordinal} → x o≤ z → supf0 x ≡ supf0 z 763 supf-max : {z : Ordinal} → x o≤ z → supf0 x ≡ supf0 z
756 supf-max {z} z≤x = trans ( sym zc02) zc01 where 764 supf-max {z} z≤x = trans ( sym zc02) zc01 where
757 zc02 : supf0 px ≡ supf0 x 765 zc02 : supf0 px ≡ supf0 x
758 zc02 = ZChain.supf-max zc (o<→≤ (pxo<x op)) 766 zc02 = ? -- ZChain.supf-max zc (o<→≤ (pxo<x op))
759 zc01 : supf0 px ≡ supf0 z 767 zc01 : supf0 px ≡ supf0 z
760 zc01 = ZChain.supf-max zc (OrdTrans (o<→≤ (pxo<x op)) z≤x) 768 zc01 = ? -- ZChain.supf-max zc (OrdTrans (o<→≤ (pxo<x op)) z≤x)
761 zc04 : {b : Ordinal} → b o≤ x → (b o≤ px ) ∨ (b ≡ x ) 769 zc04 : {b : Ordinal} → b o≤ x → (b o≤ px ) ∨ (b ≡ x )
762 zc04 {b} b≤x with trio< b px 770 zc04 {b} b≤x with trio< b px
763 ... | tri< a ¬b ¬c = case1 (o<→≤ a) 771 ... | tri< a ¬b ¬c = case1 (o<→≤ a)
764 ... | tri≈ ¬a b ¬c = case1 (o≤-refl0 b) 772 ... | tri≈ ¬a b ¬c = case1 (o≤-refl0 b)
765 ... | tri> ¬a ¬b px<b with osuc-≡< b≤x 773 ... | tri> ¬a ¬b px<b with osuc-≡< b≤x
772 -- UninCF supf0 x supf0 px is included 780 -- UninCF supf0 x supf0 px is included
773 -- supf0 px ≡ px 781 -- supf0 px ≡ px
774 -- supf0 px ≡ supf0 x 782 -- supf0 px ≡ supf0 x
775 783
776 no-extension : ( (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ HasPrev A pchain x f) → ZChain A f mf ay x 784 no-extension : ( (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ HasPrev A pchain x f) → ZChain A f mf ay x
777 no-extension P = record { supf = supf0 ; sup = λ lt → STMP.tsup (sup lt ) ; supf-mono = supf-mono ; supf-max = supf-max 785 no-extension P = record { supf = supf0 ; sup = λ lt → STMP.tsup (sup lt ) ; supf-mono = supf-mono ; supf-max = ?
778 ; sup=u = sup=u ; supf-is-sup = λ lt → STMP.tsup=sup (sup lt) ; csupf = csupf } where 786 ; sup=u = sup=u ; supf-is-sup = λ lt → STMP.tsup=sup (sup lt) ; csupf = csupf } where
779 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z 787 zc10 : {z : Ordinal} → OD.def (od pchain) z → OD.def (od pchain1) z
780 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ 788 zc10 {z} ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫
781 zc10 {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 (ordtrans u1<x (pxo<x op)) u1-is-sup fc ⟫ 789 zc10 {z} ⟪ az , ch-is-sup u1 u1<x u1-is-sup fc ⟫ = ⟪ az , ch-is-sup u1 (ordtrans u1<x (pxo<x op)) u1-is-sup fc ⟫
782 zc11 : (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ (HasPrev A pchain x f ) 790 zc11 : (¬ xSUP (UnionCF A f mf ay supf0 px) x ) ∨ (HasPrev A pchain x f )
840 tsup=sup : supf0 z ≡ & (SUP.sup tsup ) 848 tsup=sup : supf0 z ≡ & (SUP.sup tsup )
841 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x 849 sup : {z : Ordinal} → (z≤x : z o≤ x ) → STMP z≤x
842 sup {z} z≤x with trio< z px 850 sup {z} z≤x with trio< z px
843 ... | tri< a ¬b ¬c = record { tsup = ZChain.sup zc (o<→≤ a) ; tsup=sup = ZChain.supf-is-sup zc (o<→≤ a) } 851 ... | tri< a ¬b ¬c = record { tsup = ZChain.sup zc (o<→≤ a) ; tsup=sup = ZChain.supf-is-sup zc (o<→≤ a) }
844 ... | tri≈ ¬a b ¬c = record { tsup = ZChain.sup zc (o≤-refl0 b) ; tsup=sup = ZChain.supf-is-sup zc (o≤-refl0 b) } 852 ... | tri≈ ¬a b ¬c = record { tsup = ZChain.sup zc (o≤-refl0 b) ; tsup=sup = ZChain.supf-is-sup zc (o≤-refl0 b) }
845 ... | tri> ¬a ¬b px<z = record { tsup = record { sup = SUP.sup zc32 ; as = SUP.as zc32 ; x<sup = zc34 } ; tsup=sup = zc33 } where 853 ... | tri> ¬a ¬b px<z = zc35 where
846 zc32 = ZChain.sup zc o≤-refl
847 zc30 : z ≡ x 854 zc30 : z ≡ x
848 zc30 with osuc-≡< z≤x 855 zc30 with osuc-≡< z≤x
849 ... | case1 eq = eq 856 ... | case1 eq = eq
850 ... | case2 z<x = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ ) 857 ... | case2 z<x = ⊥-elim (¬p<x<op ⟪ px<z , subst (λ k → z o< k ) (sym (Oprev.oprev=x op)) z<x ⟫ )
851 zc34 : {w : HOD} → UnionCF A f mf ay supf0 z ∋ w → (w ≡ SUP.sup zc32) ∨ (w < SUP.sup zc32) 858 zc32 = ZChain.sup zc o≤-refl
852 zc34 {w} lt with zc11 P (subst (λ k → odef (UnionCF A f mf ay supf0 k) (& w)) zc30 lt) 859 zc34 : ¬ (supf0 px ≡ px) → {w : HOD} → UnionCF A f mf ay supf0 z ∋ w → (w ≡ SUP.sup zc32) ∨ (w < SUP.sup zc32)
860 zc34 ne {w} lt with zc11 P (subst (λ k → odef (UnionCF A f mf ay supf0 k) (& w)) zc30 lt)
853 ... | case1 lt = SUP.x<sup zc32 lt 861 ... | case1 lt = SUP.x<sup zc32 lt
854 ... | case2 P = ? 862 ... | case2 ⟪ spx=px , fc ⟫ = ⊥-elim ( ne spx=px )
855 -- FClosure A f px z
856 -- where
857 -- zc35 : odef (UnionCF A f mf ay supf0 x) (& w)
858 -- zc35 =
859 zc33 : supf0 z ≡ & (SUP.sup zc32) 863 zc33 : supf0 z ≡ & (SUP.sup zc32)
860 zc33 = trans (sym (supfx (o≤-refl0 (sym zc30)))) ( ZChain.supf-is-sup zc o≤-refl ) 864 zc33 = trans (sym (supfx (o≤-refl0 (sym zc30)))) ( ZChain.supf-is-sup zc o≤-refl )
865 zc36 : ¬ (supf0 px ≡ px) → STMP z≤x
866 zc36 ne = record { tsup = record { sup = SUP.sup zc32 ; as = SUP.as zc32 ; x<sup = zc34 ne } ; tsup=sup = zc33 }
867 zc35 : STMP z≤x
868 zc35 with trio< (supf0 px) px
869 ... | tri< a ¬b ¬c = zc36 ¬b
870 ... | tri> ¬a ¬b c = zc36 ¬b
871 ... | tri≈ ¬a b ¬c = record { tsup = zc37 ; tsup=sup = ? } where
872 zc37 : SUP A (UnionCF A f mf ay supf0 z)
873 zc37 = record { sup = ? ; as = ? ; x<sup = ? }
861 sup=u : {b : Ordinal} (ab : odef A b) → 874 sup=u : {b : Ordinal} (ab : odef A b) →
862 b o≤ x → IsSup A (UnionCF A f mf ay supf0 b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf0 b) b f ) → supf0 b ≡ b 875 b o≤ x → IsSup A (UnionCF A f mf ay supf0 b) ab ∧ (¬ HasPrev A (UnionCF A f mf ay supf0 b) b f ) → supf0 b ≡ b
863 sup=u {b} ab b≤x is-sup with trio< b px 876 sup=u {b} ab b≤x is-sup with trio< b px
864 ... | tri< a ¬b ¬c = ZChain.sup=u zc ab (o<→≤ a) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫ 877 ... | tri< a ¬b ¬c = ZChain.sup=u zc ab (o<→≤ a) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫
865 ... | tri≈ ¬a b ¬c = ZChain.sup=u zc ab (o≤-refl0 b) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫ 878 ... | tri≈ ¬a b ¬c = ZChain.sup=u zc ab (o≤-refl0 b) ⟪ record { x<sup = λ lt → IsSup.x<sup (proj1 is-sup) lt } , proj2 is-sup ⟫
878 zc31 (case2 hasPrev ) with zc30 891 zc31 (case2 hasPrev ) with zc30
879 ... | refl = ⊥-elim ( proj2 is-sup record { ax = HasPrev.ax hasPrev ; y = HasPrev.y hasPrev 892 ... | refl = ⊥-elim ( proj2 is-sup record { ax = HasPrev.ax hasPrev ; y = HasPrev.y hasPrev
880 ; ay = zc10 (HasPrev.ay hasPrev) ; x=fy = HasPrev.x=fy hasPrev } ) 893 ; ay = zc10 (HasPrev.ay hasPrev) ; x=fy = HasPrev.x=fy hasPrev } )
881 csupf : {b : Ordinal} → b o≤ x → odef (UnionCF A f mf ay supf0 (supf0 b)) (supf0 b) 894 csupf : {b : Ordinal} → b o≤ x → odef (UnionCF A f mf ay supf0 (supf0 b)) (supf0 b)
882 csupf {b} b≤x with zc04 b≤x 895 csupf {b} b≤x with zc04 b≤x
883 ... | case2 b=x = subst (λ k → odef (UnionCF A f mf ay supf0 k) k) (ZChain.supf-max zc zc05 ) ( ZChain.csupf zc o≤-refl ) where 896 ... | case2 b=x = subst (λ k → odef (UnionCF A f mf ay supf0 k) k) ? ( ZChain.csupf zc o≤-refl ) where
884 zc05 : px o≤ b 897 zc05 : px o≤ b
885 zc05 = subst (λ k → px o≤ k) (sym b=x) (o<→≤ (pxo<x op) ) 898 zc05 = subst (λ k → px o≤ k) (sym b=x) (o<→≤ (pxo<x op) )
886 ... | case1 b≤px = ZChain.csupf zc b≤px 899 ... | case1 b≤px = ZChain.csupf zc b≤px
887 900
888 zc4 : ZChain A f mf ay x 901 zc4 : ZChain A f mf ay x