comparison src/zorn.agda @ 1012:6f6daf464616

maxα
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 23 Nov 2022 09:55:38 +0900
parents 66154af40f89
children 2362c2d89d36
comparison
equal deleted inserted replaced
1011:66154af40f89 1012:6f6daf464616
1083 fcpu : {u z : Ordinal } → FClosure A f (supf0 u) z → u o≤ px → FClosure A f (supf1 u) z 1083 fcpu : {u z : Ordinal } → FClosure A f (supf0 u) z → u o≤ px → FClosure A f (supf1 u) z
1084 fcpu {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sym (sf1=sf0 u≤px)) fc 1084 fcpu {u} {z} fc u≤px = subst (λ k → FClosure A f k z ) (sym (sf1=sf0 u≤px)) fc
1085 1085
1086 -- this is a kind of maximality, so we cannot prove this without <-monotonicity 1086 -- this is a kind of maximality, so we cannot prove this without <-monotonicity
1087 -- 1087 --
1088 -- supf0 a ≡ px we cannot use previous cfcs, it is in the chain because
1089 -- supf0 a ≡ supf0 (supf0 a) ≡ supf0 px o< x
1090 --
1091 cfcs : (mf< : <-monotonic-f A f) {a b w : Ordinal } 1088 cfcs : (mf< : <-monotonic-f A f) {a b w : Ordinal }
1092 → a o< b → b o≤ x → supf1 a o< x → FClosure A f (supf1 a) w → odef (UnionCF A f mf ay supf1 b) w 1089 → a o< b → b o≤ x → supf1 a o< x → FClosure A f (supf1 a) w → odef (UnionCF A f mf ay supf1 b) w
1093 cfcs mf< {a} {b} {w} a<b b≤x sa<x fc with trio< a px 1090 cfcs mf< {a} {b} {w} a<b b≤x sa<x fc with zc43 (supf0 a) px
1091 ... | case2 px≤sa = z50 where
1092 a≤px : a o≤ px
1093 a≤px = subst (λ k → a o< k) (sym (Oprev.oprev=x op)) (ordtrans<-≤ a<b b≤x)
1094 -- supf0 a ≡ px we cannot use previous cfcs, it is in the chain because
1095 -- supf0 a ≡ supf0 (supf0 a) ≡ supf0 px o< x
1096 z50 : odef (UnionCF A f mf ay supf1 b) w
1097 z50 with osuc-≡< px≤sa
1098 ... | case1 px=sa = ⟪ A∋fc {A} _ f mf fc , ch-is-sup (supf0 px) ? ? (subst (λ k → FClosure A f k w) ? fc) ⟫
1099 ... | case2 px<sa = ⊥-elim ( ¬p<x<op ⟪ px<sa , subst₂ (λ j k → j o< k ) (sf1=sf0 a≤px) (sym (Oprev.oprev=x op)) sa<x ⟫ )
1100 ... | case1 sa<px with trio< a px
1094 ... | tri< a<px ¬b ¬c = z50 where 1101 ... | tri< a<px ¬b ¬c = z50 where
1095 z50 : odef (UnionCF A f mf ay supf1 b) w 1102 z50 : odef (UnionCF A f mf ay supf1 b) w
1096 z50 with osuc-≡< b≤x 1103 z50 with osuc-≡< b≤x
1097 ... | case2 lt with ZChain.cfcs zc mf< a<b (subst (λ k → b o< k) (sym (Oprev.oprev=x op)) lt) ? fc 1104 ... | case2 lt with ZChain.cfcs zc mf< a<b (subst (λ k → b o< k) (sym (Oprev.oprev=x op)) lt) sa<px fc
1098 ... | ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ 1105 ... | ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫
1099 ... | ⟪ az , ch-is-sup u u<b is-sup fc ⟫ = ⟪ az , ch-is-sup u u<b cp1 (fcpu fc u≤px ) ⟫ where -- u o< px → u o< b ? 1106 ... | ⟪ az , ch-is-sup u u<b is-sup fc ⟫ = ⟪ az , ch-is-sup u u<b cp1 (fcpu fc u≤px ) ⟫ where -- u o< px → u o< b ?
1100 u≤px : u o≤ px 1107 u≤px : u o≤ px
1101 u≤px = subst (λ k → u o< k) (sym (Oprev.oprev=x op)) (ordtrans<-≤ u<b b≤x ) 1108 u≤px = subst (λ k → u o< k) (sym (Oprev.oprev=x op)) (ordtrans<-≤ u<b b≤x )
1102 u<x : u o< x 1109 u<x : u o< x
1106 ; order = λ {s} {z} s<u fc → subst (λ k → (z ≡ k) ∨ ( z << k ) ) (sf=eq u<x) 1113 ; order = λ {s} {z} s<u fc → subst (λ k → (z ≡ k) ∨ ( z << k ) ) (sf=eq u<x)
1107 (ChainP.order is-sup (subst₂ (λ j k → j o< k ) (sym (sf=eq (ordtrans (supf-inject0 supf1-mono s<u) u<x) )) 1114 (ChainP.order is-sup (subst₂ (λ j k → j o< k ) (sym (sf=eq (ordtrans (supf-inject0 supf1-mono s<u) u<x) ))
1108 (sym (sf=eq u<x)) s<u) 1115 (sym (sf=eq u<x)) s<u)
1109 (subst (λ k → FClosure A f k z ) (sym (sf=eq (ordtrans (supf-inject0 supf1-mono s<u) u<x) )) fc )) 1116 (subst (λ k → FClosure A f k z ) (sym (sf=eq (ordtrans (supf-inject0 supf1-mono s<u) u<x) )) fc ))
1110 ; supu=u = trans (sym (sf=eq u<x)) (ChainP.supu=u is-sup) } 1117 ; supu=u = trans (sym (sf=eq u<x)) (ChainP.supu=u is-sup) }
1111 z50 | case1 eq with ZChain.cfcs zc mf< a<px o≤-refl ? fc 1118 z50 | case1 eq with ZChain.cfcs zc mf< a<px o≤-refl sa<px fc
1112 ... | ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫ 1119 ... | ⟪ az , ch-init fc ⟫ = ⟪ az , ch-init fc ⟫
1113 ... | ⟪ az , ch-is-sup u u<px is-sup fc ⟫ = ⟪ az , ch-is-sup u u<b cp1 (fcpu fc (o<→≤ u<px)) ⟫ where -- u o< px → u o< b ? 1120 ... | ⟪ az , ch-is-sup u u<px is-sup fc ⟫ = ⟪ az , ch-is-sup u u<b cp1 (fcpu fc (o<→≤ u<px)) ⟫ where -- u o< px → u o< b ?
1114 u<b : u o< b 1121 u<b : u o< b
1115 u<b = subst (λ k → u o< k ) (trans (Oprev.oprev=x op) (sym eq) ) (ordtrans u<px <-osuc ) 1122 u<b = subst (λ k → u o< k ) (trans (Oprev.oprev=x op) (sym eq) ) (ordtrans u<px <-osuc )
1116 u<x : u o< x 1123 u<x : u o< x
1140 ... | tri< sfpx<x ¬b ¬c = ⟪ z53 , ch-is-sup spx (subst (λ k → spx o< k) (sym b=x) sfpx<x) cp1 fc1 ⟫ where 1147 ... | tri< sfpx<x ¬b ¬c = ⟪ z53 , ch-is-sup spx (subst (λ k → spx o< k) (sym b=x) sfpx<x) cp1 fc1 ⟫ where
1141 spx = supf0 px 1148 spx = supf0 px
1142 spx≤px : supf0 px o≤ px 1149 spx≤px : supf0 px o≤ px
1143 spx≤px = zc-b<x _ sfpx<x 1150 spx≤px = zc-b<x _ sfpx<x
1144 z52 : supf1 (supf0 px) ≡ supf0 px 1151 z52 : supf1 (supf0 px) ≡ supf0 px
1145 z52 = trans (sf1=sf0 (zc-b<x _ sfpx<x)) ( ZChain.supf-idem zc mf< o≤-refl ? ) 1152 z52 = trans (sf1=sf0 (zc-b<x _ sfpx<x)) ( ZChain.supf-idem zc mf< o≤-refl (zc-b<x _ sfpx<x ) )
1146 fc1 : FClosure A f (supf1 spx) w 1153 fc1 : FClosure A f (supf1 spx) w
1147 fc1 = subst (λ k → FClosure A f k w ) (trans (cong supf0 a=px) (sym z52) ) fc 1154 fc1 = subst (λ k → FClosure A f k w ) (trans (cong supf0 a=px) (sym z52) ) fc
1148 order : {s z1 : Ordinal} → supf1 s o< supf1 spx → FClosure A f (supf1 s) z1 → (z1 ≡ supf1 spx) ∨ (z1 << supf1 spx) 1155 order : {s z1 : Ordinal} → supf1 s o< supf1 spx → FClosure A f (supf1 s) z1 → (z1 ≡ supf1 spx) ∨ (z1 << supf1 spx)
1149 order {s} {z1} ss<spx fcs = subst (λ k → (z1 ≡ k) ∨ (z1 << k )) 1156 order {s} {z1} ss<spx fcs = subst (λ k → (z1 ≡ k) ∨ (z1 << k ))
1150 (trans (sym (ZChain.supf-is-minsup zc spx≤px )) (sym (sf1=sf0 spx≤px) ) ) 1157 (trans (sym (ZChain.supf-is-minsup zc spx≤px )) (sym (sf1=sf0 spx≤px) ) )
1151 (MinSUP.x≤sup (ZChain.minsup zc spx≤px) (ZChain.cfcs zc mf< (supf-inject0 supf1-mono ss<spx) 1158 (MinSUP.x≤sup (ZChain.minsup zc spx≤px) (ZChain.cfcs zc mf< (supf-inject0 supf1-mono ss<spx)
1152 spx≤px ? (fcup fcs (ordtrans (supf-inject0 supf1-mono ss<spx) spx≤px ) ))) 1159 spx≤px ss<px (fcup fcs (ordtrans (supf-inject0 supf1-mono ss<spx) spx≤px ) ))) where
1160 ss<px : supf0 s o< px
1161 ss<px = osucprev ( begin
1162 osuc (supf0 s) ≡⟨ cong osuc (sym (sf1=sf0 ( begin
1163 s <⟨ supf-inject0 supf1-mono ss<spx ⟩
1164 supf0 px ≤⟨ spx≤px ⟩
1165 px ∎ ) )) ⟩
1166 osuc (supf1 s) ≤⟨ osucc ss<spx ⟩
1167 supf1 spx ≡⟨ sf1=sf0 spx≤px ⟩
1168 supf0 spx ≤⟨ ZChain.supf-mono zc spx≤px ⟩
1169 supf0 px ≤⟨ spx≤px ⟩
1170 px ∎ ) where open o≤-Reasoning O
1153 cp1 : ChainP A f mf ay supf1 spx 1171 cp1 : ChainP A f mf ay supf1 spx
1154 cp1 = record { fcy<sup = λ {z} fc → subst (λ k → (z ≡ k) ∨ (z << k )) (sym (sf1=sf0 spx≤px )) 1172 cp1 = record { fcy<sup = λ {z} fc → subst (λ k → (z ≡ k) ∨ (z << k )) (sym (sf1=sf0 spx≤px ))
1155 ( ZChain.fcy<sup zc spx≤px fc ) 1173 ( ZChain.fcy<sup zc spx≤px fc )
1156 ; order = order 1174 ; order = order
1157 ; supu=u = z52 } 1175 ; supu=u = z52 }
1316 pchainx : HOD 1334 pchainx : HOD
1317 pchainx = record { od = record { def = λ z → IChain A f supfz z } ; odmax = & A ; <odmax = zc00 } where 1335 pchainx = record { od = record { def = λ z → IChain A f supfz z } ; odmax = & A ; <odmax = zc00 } where
1318 zc00 : {z : Ordinal } → IChain A f supfz z → z o< & A 1336 zc00 : {z : Ordinal } → IChain A f supfz z → z o< & A
1319 zc00 {z} ic = z09 ( A∋fc (supfz (IChain.i<x ic)) f mf (IChain.fc ic) ) 1337 zc00 {z} ic = z09 ( A∋fc (supfz (IChain.i<x ic)) f mf (IChain.fc ic) )
1320 1338
1339 aic : {z : Ordinal } → IChain A f supfz z → odef A z
1340 aic {z} ic = ?
1341
1321 zeq : {xa xb z : Ordinal } 1342 zeq : {xa xb z : Ordinal }
1322 → (xa<x : xa o< x) → (xb<x : xb o< x) → xa o≤ xb → z o≤ xa 1343 → (xa<x : xa o< x) → (xb<x : xb o< x) → xa o≤ xb → z o≤ xa
1323 → ZChain.supf (pzc xa<x) z ≡ ZChain.supf (pzc xb<x) z 1344 → ZChain.supf (pzc xa<x) z ≡ ZChain.supf (pzc xb<x) z
1324 zeq {xa} {xb} {z} xa<x xb<x xa≤xb z≤xa = spuf-unique A f mf ay xa≤xb 1345 zeq {xa} {xb} {z} xa<x xb<x xa≤xb z≤xa = spuf-unique A f mf ay xa≤xb
1325 (pzc xa<x) (pzc xb<x) z≤xa 1346 (pzc xa<x) (pzc xb<x) z≤xa
1386 ... | tri< a ¬b ¬c = ? 1407 ... | tri< a ¬b ¬c = ?
1387 ... | tri≈ ¬a b ¬c = ? 1408 ... | tri≈ ¬a b ¬c = ?
1388 ... | tri> ¬a ¬b c = ? 1409 ... | tri> ¬a ¬b c = ?
1389 1410
1390 zc5 : ZChain A f mf ay x 1411 zc5 : ZChain A f mf ay x
1391 zc5 with zc43 x spu 1412 zc5 = ? where
1392 zc5 | (case2 sp≤x ) = ? where 1413 cfcs : (mf< : <-monotonic-f A f) {a b w : Ordinal }
1393 cfcs : (mf< : <-monotonic-f A f) {a b w : Ordinal }
1394 → a o< b → b o≤ x → supf1 a o< x → FClosure A f (supf1 a) w → odef (UnionCF A f mf ay supf1 b) w 1414 → a o< b → b o≤ x → supf1 a o< x → FClosure A f (supf1 a) w → odef (UnionCF A f mf ay supf1 b) w
1395 cfcs mf< {a} {b} {w} a<b b≤x sa<x fc = ? 1415 cfcs mf< {a} {b} {w} a<b b≤x sa<x fc with trio< a x
1396 zc5 | (case1 x<sp ) = ? where 1416 ... | tri< a<x ¬b ¬c = ? where
1397 cfcs : (mf< : <-monotonic-f A f) {a b w : Ordinal } 1417 sa = ZChain.supf (pzc (ob<x lim a<x)) a
1398 → a o< b → b o≤ x → supf1 a o< x → FClosure A f (supf1 a) w → odef (UnionCF A f mf ay supf1 b) w 1418 m = omax a sa
1399 cfcs mf< {a} {b} {w} a<b b≤x sa<x fc = ? 1419 m<x : m o< x
1420 m<x with trio< a sa | inspect (omax a) sa
1421 ... | tri< a<sa ¬b ¬c | record { eq = eq } = ob<x lim sa<x
1422 ... | tri≈ ¬a b ¬c | record { eq = eq } = subst ( λ k → k o< x ) ( begin
1423 sa ≡⟨ ? ⟩
1424 ? ≡⟨ sym eq ⟩
1425 _ ∎ ) ( ob<x lim sa<x ) where open ≡-Reasoning
1426 ... | tri> ¬a ¬b c | record { eq = eq } = ob<x lim a<x
1427 zc40 : odef (UnionCF A f mf ay supf1 b) w
1428 zc40 with ZChain.cfcs (pzc (ob<x lim sa<x)) mf< ? o≤-refl ? ?
1429 ... | t = ?
1430 ... | tri≈ ¬a b ¬c = ⊥-elim ( ¬a (ordtrans<-≤ a<b b≤x))
1431 ... | tri> ¬a ¬b c = ⊥-elim ( ¬a (ordtrans<-≤ a<b b≤x))
1400 1432
1401 --- 1433 ---
1402 --- the maximum chain has fix point of any ≤-monotonic function 1434 --- the maximum chain has fix point of any ≤-monotonic function
1403 --- 1435 ---
1404 1436