changeset 575:3abf55c8e295

f-next seems bad
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 05 Jun 2022 19:50:18 +0900
parents 9084a26445a7
children 59c11152f604
files src/zorn.agda
diffstat 1 files changed, 28 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/src/zorn.agda	Sun Jun 05 12:49:48 2022 +0900
+++ b/src/zorn.agda	Sun Jun 05 19:50:18 2022 +0900
@@ -248,26 +248,7 @@
       is-max :  {a b : Ordinal } → (ca : odef chain a ) →  b o< osuc z  → (ab : odef A b) 
           → HasPrev A chain ab f ∨  IsSup A chain ab  
           → * a < * b  → odef chain b
-      fc∨sup :  {a : Ordinal } → a o< osuc z →  ( ca : odef chain a ) → HasPrev A chain ( chain⊆A ca) f  ∨ IsSup A chain  ( chain⊆A ca)
-
-data ZC (A : HOD) (f : Ordinal → Ordinal ) : Ordinal → Set n where
-   zc-init : ZC A f o∅
-   zc-fc  : {s x : Ordinal} → ZC A f s → FClosure A f s x → ZC A f x
-   zc-sup : {s x : Ordinal} → ZC A f s → * s < * x  → ZC A f x
-
-ZC→ZChain : (A : HOD) {x z : Ordinal} (ax : odef A x) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f )
-    → ZC A f z → (sup : (C : HOD ) → ( C ⊆' A) → IsTotalOrderSet C → Ordinal) → ZChain A ax f mf sup z
-ZC→ZChain A {x} {z} ax f mf zc sup = record {
-      chain = ? 
-    ; chain⊆A = ? 
-    ; chain∋x = ? 
-    ; initial = ? 
-    ; f-total = ? 
-    ; f-next = ? 
-    ; f-immediate = ? 
-    ; is-max = ? 
-    ; fc∨sup = ?
-   }
+      fc∨sup :  {a : Ordinal } → a o< osuc z →  ( ca : odef chain a ) → IsSup A chain  ( chain⊆A ca) ∨ HasPrev A chain ( chain⊆A ca) f  
 
 record Maximal ( A : HOD )  : Set (Level.suc n) where
    field
@@ -428,13 +409,20 @@
           ... | no noax =  -- ¬ A ∋ p, just skip
                  record { chain = ZChain.chain zc0 ; chain⊆A = ZChain.chain⊆A zc0 ; initial = ZChain.initial zc0 
                      ; f-total = ZChain.f-total zc0 ; f-next =  ZChain.f-next zc0
-                     ; f-immediate =  ZChain.f-immediate zc0 ; chain∋x  = ZChain.chain∋x zc0 ; is-max = zc11 ; fc∨sup = {!!} }  where -- no extention
+                     ; f-immediate =  ZChain.f-immediate zc0 ; chain∋x  = ZChain.chain∋x zc0 ; is-max = zc11 ; fc∨sup = zc12 }  where
+                     -- no extention
                 zc11 : {a b : Ordinal} → odef (ZChain.chain zc0) a → b o< osuc x → (ab : odef A b) →
                     HasPrev A (ZChain.chain zc0) ab f ∨  IsSup A (ZChain.chain zc0) ab →
                             * a < * b → odef (ZChain.chain zc0) b
                 zc11 {a} {b} za b<ox ab P a<b with osuc-≡< b<ox
                 ... | case1 eq = ⊥-elim ( noax (subst (λ k → odef A k) (trans eq (sym &iso)) ab ) )
                 ... | case2 lt = ZChain.is-max zc0 za (zc0-b<x b lt)  ab P a<b
+                zc12 : {a : Ordinal} → a o< osuc x → (ca : odef (ZChain.chain zc0) a) →
+                    IsSup A (ZChain.chain zc0) (ZChain.chain⊆A zc0 ca) ∨
+                    HasPrev A (ZChain.chain zc0) (ZChain.chain⊆A zc0 ca) f
+                zc12 {a}  b<ox ca with osuc-≡< b<ox
+                ... | case1 eq = ⊥-elim ( noax (subst (λ k → odef A k) (trans eq (sym &iso)) (ZChain.chain⊆A zc0 ca) ) )
+                ... | case2 lt = ZChain.fc∨sup zc0 (zc0-b<x a lt)  ca
           ... | yes ax with ODC.p∨¬p O ( HasPrev A (ZChain.chain zc0) ax f )   -- we have to check adding x preserve is-max ZChain A ay f mf supO x
           ... | case1 pr = zc9 where -- we have previous A ∋ z < x , f z ≡ x, so chain ∋ f z ≡ x because of f-next
                 chain = ZChain.chain zc0
@@ -444,13 +432,19 @@
                 zc17 {a} {b} za b<ox ab P a<b with osuc-≡< b<ox
                 ... | case2 lt = ZChain.is-max zc0 za (zc0-b<x b lt) ab P a<b
                 ... | case1 b=x = subst (λ k → odef chain k ) (trans (sym (HasPrev.x=fy pr )) (trans &iso (sym b=x)) ) ( ZChain.f-next zc0 (HasPrev.ay pr))
+                zc10 : {a : Ordinal} → a o< osuc x → (ca : odef (ZChain.chain zc0) a) →
+                    IsSup A (ZChain.chain zc0) (ZChain.chain⊆A zc0 ca) ∨ HasPrev A (ZChain.chain zc0) (ZChain.chain⊆A zc0 ca) f 
+                zc10 {a} a<x ca with osuc-≡< a<x
+                ... | case2 lt = ZChain.fc∨sup zc0  (zc0-b<x a lt)  ca
+                ... | case1 refl = case2 record { y = HasPrev.y pr ; ay = HasPrev.ay pr ; x=fy = trans (sym &iso) (HasPrev.x=fy pr) }
                 zc9 :  ZChain A ay f mf supO x
                 zc9 = record { chain = ZChain.chain zc0 ; chain⊆A = ZChain.chain⊆A zc0 ; f-total = ZChain.f-total zc0 ; f-next =  ZChain.f-next zc0 -- no extention
-                     ; initial = ZChain.initial zc0 ; f-immediate =  ZChain.f-immediate zc0 ; chain∋x  = ZChain.chain∋x zc0 ; is-max = zc17 ; fc∨sup = {!!}}  
+                     ; initial = ZChain.initial zc0 ; f-immediate =  ZChain.f-immediate zc0 ; chain∋x  = ZChain.chain∋x zc0 ; is-max = zc17
+                     ; fc∨sup = zc10 } 
           ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain.chain zc0) ax )
           ... | case1 is-sup = -- x is a sup of zc0 
                 record { chain = schain ; chain⊆A = s⊆A  ; f-total = scmp ; f-next = scnext 
-                     ; initial = scinit ; f-immediate =  simm ; chain∋x  = case1 (ZChain.chain∋x zc0) ; is-max = s-ismax ; fc∨sup = {!!}} where 
+                     ; initial = scinit ; f-immediate =  simm ; chain∋x  = case1 (ZChain.chain∋x zc0) ; is-max = s-ismax ; fc∨sup = zc19 } where 
                 sup0 : SUP A (ZChain.chain zc0) 
                 sup0 = record { sup = * x ; A∋maximal = ax ; x<sup = x21 } where
                         x21 :  {y : HOD} → ZChain.chain zc0 ∋ y → (y ≡ * x) ∨ (y < * x)
@@ -473,6 +467,17 @@
                 s⊆A : schain ⊆' A
                 s⊆A {x} (case1 zx) = ZChain.chain⊆A zc0 zx
                 s⊆A {x} (case2 fx) = A∋fc (& sp) f mf fx 
+                zc19 :  {a : Ordinal} → a o< osuc x → (sa : odef schain a) →
+                    IsSup A schain (s⊆A sa) ∨ HasPrev A schain (s⊆A sa) f 
+                zc19 a<x (case2 (init asp)) = case1 {!!} 
+                zc19 a<x (case2 (fsuc y fc)) = case2 record { y = y ; ay = case2 fc ; x=fy = refl }
+                zc19 {a} a<x (case1 ca) with osuc-≡< a<x
+                ... | case1 refl = case1 record { x<sup = {!!} }   -- a ≡ x
+                ... | case2 lt with ZChain.fc∨sup zc0 (zc0-b<x a lt) ca
+                ... | case2 c1 = case2 record { y = HasPrev.y c1 ; ay = case1 (HasPrev.ay c1) ; x=fy = HasPrev.x=fy c1 }
+                ... | case1 c2 = case1 record { x<sup = {!!} } where  -- a < x
+                     zc190 : {y : Ordinal} → odef chain y → (y ≡ a) ∨ (y << a)
+                     zc190 = IsSup.x<sup c2
                 cmp  : {a b : HOD} (za : odef chain (& a)) (fb : FClosure A f (& sp) (& b)) → Tri (a < b) (a ≡ b) (b < a )
                 cmp {a} {b} za fb  with SUP.x<sup sup0 za | s≤fc (& sp) f mf fb  
                 ... | case1 sp=a | case1 sp=b = tri≈ (λ lt → <-irr (case1 (sym eq)) lt ) eq (λ lt → <-irr (case1 eq) lt ) where