comparison src/zorn.agda @ 797:3a8493e6cd67

supf contraint
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 06 Aug 2022 15:06:58 +0900
parents 171123c92007
children 9cf74877efab
comparison
equal deleted inserted replaced
796:171123c92007 797:3a8493e6cd67
224 f-total : IsTotalOrderSet chain 224 f-total : IsTotalOrderSet chain
225 225
226 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x) 226 sup : {x : Ordinal } → x o≤ z → SUP A (UnionCF A f mf ay supf x)
227 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 227 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
228 supf-is-sup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ & (SUP.sup (sup x≤z) ) 228 supf-is-sup : {x : Ordinal } → (x≤z : x o≤ z) → supf x ≡ & (SUP.sup (sup x≤z) )
229 csupf : {b : Ordinal } → b o< z → odef (UnionCF A f mf ay supf b) (supf b) 229 csupf : {b : Ordinal } → b o≤ z → odef (UnionCF A f mf ay supf b) (supf b)
230 supf-mono : {x y : Ordinal } → x o< y → supf x o≤ supf y 230 supf≤x :{x : Ordinal } → z o≤ x → supf z ≡ supf x
231 supf-mono : {x y : Ordinal } → x o< y → supf x o≤ supf y
232 supf-mono {x} {y} x<y = ? where
233 -- z o≤ x → supf x ≡ supf y ≡ supf z
234 -- x o< z → z o< y → supf x ≡ supf y ≡ supf z
235 sf<sy : supf x o≤ supf y
236 sf<sy with trio< x z
237 ... | tri> ¬a ¬b c = o≤-refl0 (( trans (sym (supf≤x (o<→≤ c))) (supf≤x (ordtrans (ordtrans c x<y ) <-osuc ) ) ))
238 ... | tri≈ ¬a b ¬c = o≤-refl0 (trans (sym (supf≤x (o≤-refl0 (sym b)))) (supf≤x (subst (λ k → k o< osuc y) b (o<→≤ x<y))))
239 ... | tri< x<z ¬b ¬c with trio< y z
240 ... | tri> ¬a ¬b c = ?
241 ... | tri≈ ¬a b ¬c = ?
242 ... | tri< y<z ¬b ¬c with csupf (o<→≤ x<z) | csupf (o<→≤ y<z)
243 ... | ⟪ ax , ch-init fcx ⟫ | ⟪ ay , ch-init fcy ⟫ = ?
244 ... | ⟪ ax , ch-is-sup ux ux≤z is-sup-x fcx ⟫ | ⟪ ay , ch-init fcy ⟫ = ?
245 ... | ⟪ ax , ch-init fcx ⟫ | ⟪ ay , ch-is-sup uy uy≤z is-sup-y fcy ⟫ = ?
246 ... | ⟪ ax , ch-is-sup ux ux≤z is-sup-x fcx ⟫ | ⟪ ay , ch-is-sup uy uy≤z is-sup-y fcy ⟫ = ?
247 -- ... | tri< a ¬b ¬c = csupf (o<→≤ a)
248 -- ... | tri≈ ¬a b ¬c = csupf (o≤-refl0 b)
249 -- ... | tri> ¬a ¬b c = subst (λ k → odef (UnionCF A f mf ay supf x) k ) ? (csupf ? )
250 -- csy : odef (UnionCF A f mf ay supf y) (supf y)
251 -- csy = csupf ?
252
231 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 253 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
232 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) 254 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)
233 , ch-init (subst (λ k → FClosure A f y k) (sym &iso) fc ) ⟫ 255 , ch-init (subst (λ k → FClosure A f y k) (sym &iso) fc ) ⟫
234 ... | case1 eq = case1 (subst (λ k → k ≡ supf u ) &iso (trans (cong (&) eq) (sym (supf-is-sup (o<→≤ u<z) ) ) )) 256 ... | case1 eq = case1 (subst (λ k → k ≡ supf u ) &iso (trans (cong (&) eq) (sym (supf-is-sup (o<→≤ u<z) ) ) ))
235 ... | case2 lt = case2 (subst (λ k → * w < k ) (subst (λ k → k ≡ _ ) *iso (cong (*) (sym (supf-is-sup (o<→≤ u<z) ))) ) lt ) 257 ... | case2 lt = case2 (subst (λ k → * w < k ) (subst (λ k → k ≡ _ ) *iso (cong (*) (sym (supf-is-sup (o<→≤ u<z) ))) ) lt )
236 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) 258 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)
237 order {b} {s} {z1} b<z sf<sb fc = zc04 where 259 order {b} {s} {z1} b<z sf<sb fc = zc04 where
238 zc01 : {z1 : Ordinal } → FClosure A f (supf s) z1 → UnionCF A f mf ay supf b ∋ * z1 260 zc01 : {z1 : Ordinal } → FClosure A f (supf s) z1 → UnionCF A f mf ay supf b ∋ * z1
239 zc01 (init x refl ) = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc03 where 261 zc01 (init x refl ) = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc03 where
240 s<b : s o< b 262 s<b : s o< b
241 s<b with trio< s b 263 s<b with trio< s b
242 ... | tri< a ¬b ¬c = a 264 ... | tri< a ¬b ¬c = a
243 ... | tri≈ ¬a b ¬c = ⊥-elim ( o<¬≡ (cong supf b) sf<sb ) 265 ... | tri≈ ¬a b ¬c = ⊥-elim ( o<¬≡ (cong supf b) sf<sb )
244 ... | tri> ¬a ¬b c with osuc-≡< ( supf-mono c ) 266 ... | tri> ¬a ¬b c with osuc-≡< ( supf-mono c )
245 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sf<sb ) 267 ... | case1 eq = ⊥-elim ( o<¬≡ (sym eq) sf<sb )
246 ... | case2 lt = ⊥-elim ( o<> lt sf<sb ) 268 ... | case2 lt = ⊥-elim ( o<> lt sf<sb )
247 s<z : s o< z 269 s<z : s o< z
248 s<z = ordtrans s<b b<z 270 s<z = ordtrans s<b b<z
249 zc03 : odef (UnionCF A f mf ay supf b) (supf s) 271 zc03 : odef (UnionCF A f mf ay supf b) (supf s)
250 zc03 with csupf s<z 272 zc03 with csupf (o<→≤ s<z )
251 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫ 273 ... | ⟪ as , ch-init fc ⟫ = ⟪ as , ch-init fc ⟫
252 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ as , ch-is-sup u (ordtrans u≤x (osucc s<b)) is-sup fc ⟫ 274 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ as , ch-is-sup u (ordtrans u≤x (osucc s<b)) is-sup fc ⟫
253 zc01 (fsuc x fc) = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc04 where 275 zc01 (fsuc x fc) = subst (λ k → odef (UnionCF A f mf ay supf b) k ) (sym &iso) zc04 where
254 zc04 : odef (UnionCF A f mf ay supf b) (f x) 276 zc04 : odef (UnionCF A f mf ay supf b) (f x)
255 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (zc01 fc ) 277 zc04 with subst (λ k → odef (UnionCF A f mf ay supf b) k ) &iso (zc01 fc )
256 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫ 278 ... | ⟪ as , ch-init fc ⟫ = ⟪ proj2 (mf _ as) , ch-init (fsuc _ fc) ⟫
257 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫ 279 ... | ⟪ as , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf _ as) , ch-is-sup u u≤x is-sup (fsuc _ fc) ⟫
258 zc00 : ( * z1 ≡ SUP.sup (sup (o<→≤ b<z) )) ∨ ( * z1 < SUP.sup ( sup (o<→≤ b<z) ) ) 280 zc00 : ( * z1 ≡ SUP.sup (sup (o<→≤ b<z) )) ∨ ( * z1 < SUP.sup ( sup (o<→≤ b<z) ) )
259 zc00 = SUP.x<sup (sup (o<→≤ b<z)) (zc01 fc ) 281 zc00 = SUP.x<sup (sup (o<→≤ b<z)) (zc01 fc )
260 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b) 282 zc04 : (z1 ≡ supf b) ∨ (z1 << supf b)
261 zc04 with zc00 283 zc04 with zc00
262 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso (sym (supf-is-sup (o<→≤ b<z) ) ) (cong (&) eq) ) 284 ... | case1 eq = case1 (subst₂ (λ j k → j ≡ k ) &iso (sym (supf-is-sup (o<→≤ b<z) ) ) (cong (&) eq) )
263 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) refl (subst₂ (λ j k → j ≡ k ) *iso refl (cong (*) (sym (supf-is-sup (o<→≤ b<z) ) ))) lt ) 285 ... | case2 lt = case2 (subst₂ (λ j k → j < k ) refl (subst₂ (λ j k → j ≡ k ) *iso refl (cong (*) (sym (supf-is-sup (o<→≤ b<z) ) ))) lt )
264 286
265 287
266 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f) 288 record ZChain1 ( A : HOD ) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f)
267 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where 289 {y : Ordinal} (ay : odef A y) (zc : ZChain A f mf ay (& A)) ( z : Ordinal ) : Set (Level.suc n) where
268 field 290 field
633 uz01 = chain-total A f mf ay (ZChain.supf zc) ( (proj2 ca)) ( (proj2 cb)) 655 uz01 = chain-total A f mf ay (ZChain.supf zc) ( (proj2 ca)) ( (proj2 cb))
634 pchain⊆A : {y : Ordinal} → odef pchain y → odef A y 656 pchain⊆A : {y : Ordinal} → odef pchain y → odef A y
635 pchain⊆A {y} ny = proj1 ny 657 pchain⊆A {y} ny = proj1 ny
636 pnext : {a : Ordinal} → odef pchain a → odef pchain (f a) 658 pnext : {a : Ordinal} → odef pchain a → odef pchain (f a)
637 pnext {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫ 659 pnext {a} ⟪ aa , ch-init fc ⟫ = ⟪ proj2 (mf a aa) , ch-init (fsuc _ fc) ⟫
638 pnext {a} ⟪ aa , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf a aa) , ch-is-sup u {!!} is-sup (fsuc _ fc ) ⟫ 660 pnext {a} ⟪ aa , ch-is-sup u u≤x is-sup fc ⟫ = ⟪ proj2 (mf a aa) , ch-is-sup u u≤x is-sup (fsuc _ fc ) ⟫
639 pinit : {y₁ : Ordinal} → odef pchain y₁ → * y ≤ * y₁ 661 pinit : {y₁ : Ordinal} → odef pchain y₁ → * y ≤ * y₁
640 pinit {a} ⟪ aa , ua ⟫ with ua 662 pinit {a} ⟪ aa , ua ⟫ with ua
641 ... | ch-init fc = s≤fc y f mf fc 663 ... | ch-init fc = s≤fc y f mf fc
642 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where 664 ... | ch-is-sup u u≤x is-sup fc = ≤-ftrans (<=to≤ zc7) (s≤fc _ f mf fc) where
643 zc7 : y <= (ZChain.supf zc) u 665 zc7 : y <= (ZChain.supf zc) u
794 subst (λ k → UChain A f mf ay supf x k ) 816 subst (λ k → UChain A f mf ay supf x k )
795 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x is-sup (fsuc _ fc)) ⟫ 817 (sym (HasPrev.x=fy has-prev)) ( ch-is-sup u u≤x is-sup (fsuc _ fc)) ⟫
796 818
797 no-extension : ¬ spu ≡ x → ZChain A f mf ay x 819 no-extension : ¬ spu ≡ x → ZChain A f mf ay x
798 no-extension ¬sp=x = record { initial = pinit ; chain∋init = pcy ; supf = supf1 ; sup=u = {!!} 820 no-extension ¬sp=x = record { initial = pinit ; chain∋init = pcy ; supf = supf1 ; sup=u = {!!}
799 ; sup = {!!} ; supf-is-sup = {!!} 821 ; sup = sup ; supf-is-sup = sis
800 ; csupf = {!!} ; chain⊆A = pchain⊆A ; f-next = pnext ; f-total = ptotal ; supf-mono = {!!} } where 822 ; csupf = csupf ; chain⊆A = pchain⊆A ; f-next = pnext ; f-total = ptotal ; supf-mono = {!!} } where
801 supfu : {u : Ordinal } → ( a : u o< x ) → (z : Ordinal) → Ordinal 823 supfu : {u : Ordinal } → ( a : u o< x ) → (z : Ordinal) → Ordinal
802 supfu {u} a z = ZChain.supf (pzc (osuc u) (ob<x lim a)) z 824 supfu {u} a z = ZChain.supf (pzc (osuc u) (ob<x lim a)) z
803 UnionCF⊆ : {u : Ordinal} → (a : u o< x ) → UnionCF A f mf ay supf1 x ⊆' UnionCF A f mf ay (supfu a) x 825 UnionCF⊆ : {u : Ordinal} → (a : u o< x ) → UnionCF A f mf ay supf1 x ⊆' UnionCF A f mf ay (supfu a) x
804 UnionCF⊆ = {!!} 826 UnionCF⊆ = {!!}
827 sup : {z : Ordinal} → z o≤ x → SUP A (UnionCF A f mf ay supf1 z)
828 sup {z} z≤x with trio< z x
829 ... | tri< a ¬b ¬c = SUP⊆ {!!} (ZChain.sup (pzc z a) o≤-refl )
830 ... | tri≈ ¬a b ¬c = SUP⊆ {!!} usup
831 ... | tri> ¬a ¬b c = SUP⊆ {!!} usup
832 sis : {z : Ordinal} (x≤z : z o≤ x) → supf1 z ≡ & (SUP.sup (sup x≤z))
833 sis {z} z≤x with trio< z x
834 ... | tri< a ¬b ¬c = ? where
835 zc8 = ZChain.supf-is-sup (pzc z a) o≤-refl
836 ... | tri≈ ¬a b ¬c = refl
837 ... | tri> ¬a ¬b c with osuc-≡< z≤x
838 ... | case1 eq = ⊥-elim ( ¬b eq )
839 ... | case2 lt = ⊥-elim ( ¬a lt )
840 sup=u : {b : Ordinal} (ab : odef A b) → b o< x → IsSup A (UnionCF A f mf ay supf1 (osuc b)) ab → supf1 b ≡ b
841 sup=u {b} ab b<x is-sup with trio< b x
842 ... | tri< a ¬b ¬c = ZChain.sup=u (pzc (osuc b) (ob<x lim a)) ab <-osuc record { x<sup = ? }
843 ... | tri≈ ¬a b ¬c = ?
844 ... | tri> ¬a ¬b c = ?
845 csupf : {z : Ordinal} → z o≤ x → odef (UnionCF A f mf ay supf1 z) (supf1 z)
846 csupf {z} z<x with trio< z x
847 ... | tri< a ¬b ¬c = zc9 where
848 zc9 : odef (UnionCF A f mf ay supf1 z) (ZChain.supf (pzc (osuc z) (ob<x lim a)) z)
849 zc9 = ?
850 zc8 : odef (UnionCF A f mf ay (supfu a) z) (ZChain.supf (pzc (osuc z) (ob<x lim a)) z)
851 zc8 = ZChain.csupf (pzc (osuc z) (ob<x lim a)) (o<→≤ <-osuc )
852 ... | tri≈ ¬a b ¬c = ? -- ⊥-elim (¬a z<x)
853 ... | tri> ¬a ¬b c = ? -- ⊥-elim (¬a z<x)
854 supf-mono : {a b : Ordinal} → a o< b → supf1 a o≤ supf1 b
855 supf-mono {a0} {b0} a<b = zc10 where
856 -- x o≤ a → supf1 a ≡ supf1 b ≡ spu
857 -- x o≤ b → supf1 b ≡ spu
858 -- a o< x → b o≤ x → supf1 (supf1 a) ≡ supf1 a
859 -- supf1 (supf1 b) ≡ supf1 b
860 usa : odef (UnionCF A f mf ay (supfu ?) (osuc a0)) (supf1 a0)
861 usa = ?
862 usb : odef (UnionCF A f mf ay (supfu ?) (osuc b0)) (supf1 b0)
863 usb = ?
864 zc10 : supf1 a0 o≤ supf1 b0
865 zc10 with trio< a0 x | trio< b0 x
866 ... | tri< a ¬b ¬c | tri< a' ¬b' ¬c' = ? where
867 zc11 = ZChain.supf-mono (pzc (osuc a0) (ob<x lim a)) a<b
868 zc12 = ZChain.supf-mono (pzc (osuc b0) (ob<x lim a')) a<b
869 ... | tri< a ¬b ¬c | tri≈ ¬a b ¬c' = ?
870 ... | tri< a ¬b ¬c | tri> ¬a ¬b' c = ?
871 ... | tri≈ ¬a b ¬c | tri< a ¬b ¬c' = ?
872 ... | tri≈ ¬a b ¬c | tri≈ ¬a' b' ¬c' = ?
873 ... | tri≈ ¬a b ¬c | tri> ¬a' ¬b c = ?
874 ... | tri> ¬a ¬b c | _ = ?
875
805 zc5 : ZChain A f mf ay x 876 zc5 : ZChain A f mf ay x
806 zc5 with ODC.∋-p O A (* x) 877 zc5 with ODC.∋-p O A (* x)
807 ... | no noax = no-extension {!!} -- ¬ A ∋ p, just skip 878 ... | no noax = no-extension {!!} -- ¬ A ∋ p, just skip
808 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain ax f ) 879 ... | yes ax with ODC.p∨¬p O ( HasPrev A pchain ax f )
809 -- we have to check adding x preserve is-max ZChain A y f mf x 880 -- we have to check adding x preserve is-max ZChain A y f mf x