changeset 600:71a1ed72cd21

not yet ...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 14 Jun 2022 06:17:24 +0900
parents d041941a8866
children 8b2a4af84e25
files src/zorn.agda
diffstat 1 files changed, 32 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/src/zorn.agda	Tue Jun 14 02:10:15 2022 +0900
+++ b/src/zorn.agda	Tue Jun 14 06:17:24 2022 +0900
@@ -89,19 +89,16 @@
 ≤-monotonic-f : (A : HOD) → ( Ordinal → Ordinal ) → Set (Level.suc n)
 ≤-monotonic-f A f = (x : Ordinal ) → odef A x → ( * x ≤ * (f x) ) ∧  odef A (f x )
 
--- immieate-f : (A : HOD) → ( f : Ordinal → Ordinal )  → Set n
--- immieate-f A f = { x y : Ordinal } → odef A x → odef A y → ¬ ( ( * x < * y ) ∧ ( * y < * (f x )) )
-
 data FClosure (A : HOD) (f : Ordinal → Ordinal ) (s : Ordinal) : Ordinal → Set n where
-   init : {x : Ordinal} → odef A s → x ≡ s  → FClosure A f s x
+   init : odef A s → FClosure A f s s
    fsuc : (x : Ordinal) ( p :  FClosure A f s x ) → FClosure A f s (f x)
 
 A∋fc : {A : HOD} (s : Ordinal) {y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) → (fcy : FClosure A f s y ) → odef A y
-A∋fc {A} s f mf (init as refl ) = as
+A∋fc {A} s f mf (init as) = as
 A∋fc {A} s f mf (fsuc y fcy) = proj2 (mf y ( A∋fc {A} s  f mf fcy ) )
 
 s≤fc : {A : HOD} (s : Ordinal ) {y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) → (fcy : FClosure A f s y ) → * s ≤ * y
-s≤fc {A} s {.s} f mf (init x refl ) = case1 refl
+s≤fc {A} s {.s} f mf (init x) = case1 refl
 s≤fc {A} s {.(f x)} f mf (fsuc x fcy) with proj1 (mf x (A∋fc s f mf fcy ) )
 ... | case1 x=fx = subst (λ k → * s ≤ * k ) (*≡*→≡ x=fx) ( s≤fc {A} s f mf fcy )
 ... | case2 x<fx with s≤fc {A} s f mf fcy 
@@ -109,7 +106,7 @@
 ... | case2 s<x = case2 ( IsStrictPartialOrder.trans PO s<x x<fx )
 
 fcn : {A : HOD} (s : Ordinal) { x : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f) → FClosure A f s x → ℕ
-fcn s mf (init as refl ) = zero
+fcn s mf (init as) = zero
 fcn {A} s {x} {f} mf (fsuc y p) with proj1 (mf y (A∋fc s f mf p))
 ... | case1 eq = fcn s mf p
 ... | case2 y<fy = suc (fcn s mf p )
@@ -118,11 +115,11 @@
      → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx  ≡ fcn s mf cy → * x ≡ * y
 fcn-inject {A} s {x} {y} {f} mf cx cy eq = fc00 (fcn s mf cx) (fcn s mf cy) eq cx cy refl refl where
      fc00 :  (i j : ℕ ) → i ≡ j  →  {x y : Ordinal } → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → i ≡ fcn s mf cx  → j ≡ fcn s mf cy → * x ≡ * y
-     fc00 zero zero refl (init _ refl ) (init x₁ refl ) i=x i=y = refl
-     fc00 zero zero refl (init as refl ) (fsuc y cy) i=x i=y with proj1 (mf y (A∋fc s f mf cy ) )
-     ... | case1 y=fy = subst (λ k → * s ≡ k ) y=fy ( fc00 zero zero refl (init as refl ) cy i=x i=y )
-     fc00 zero zero refl (fsuc x cx) (init as refl ) i=x i=y with proj1 (mf x (A∋fc s f mf cx ) )
-     ... | case1 x=fx = subst (λ k → k ≡ * s ) x=fx ( fc00 zero zero refl cx (init as refl ) i=x i=y )
+     fc00 zero zero refl (init _) (init x₁) i=x i=y = refl
+     fc00 zero zero refl (init as) (fsuc y cy) i=x i=y with proj1 (mf y (A∋fc s f mf cy ) )
+     ... | case1 y=fy = subst (λ k → * s ≡ k ) y=fy ( fc00 zero zero refl (init as) cy i=x i=y )
+     fc00 zero zero refl (fsuc x cx) (init as) i=x i=y with proj1 (mf x (A∋fc s f mf cx ) )
+     ... | case1 x=fx = subst (λ k → k ≡ * s ) x=fx ( fc00 zero zero refl cx (init as) i=x i=y )
      fc00 zero zero refl (fsuc x cx) (fsuc y cy) i=x i=y with proj1 (mf x (A∋fc s f mf cx ) ) | proj1 (mf y (A∋fc s f mf cy ) )
      ... | case1 x=fx  | case1 y=fy = subst₂ (λ j k → j ≡ k ) x=fx y=fy ( fc00 zero zero refl cx cy  i=x i=y )
      fc00 (suc i) (suc j) i=j {.(f x)} {.(f y)} (fsuc x cx) (fsuc y cy) i=x j=y with proj1 (mf x (A∋fc s f mf cx ) ) | proj1 (mf y (A∋fc s f mf cy ) )
@@ -143,6 +140,7 @@
                fc05 = fc00 i j (cong pred i=j) cx cy1 (cong pred i=x) (cong pred j=y1)
      ... | case2 x₁ | case2 x₂ = subst₂ (λ j k → * (f j) ≡ * (f k) ) &iso &iso (cong (λ k → * (f (& k))) (fc00 i j (cong pred i=j) cx cy (cong pred i=x) (cong pred j=y)))
 
+
 fcn-< : {A : HOD} (s : Ordinal ) { x y : Ordinal} {f : Ordinal → Ordinal} → (mf : ≤-monotonic-f A f)
     → (cx : FClosure A f s x ) (cy : FClosure A f s y ) → fcn s mf cx Data.Nat.< fcn s mf cy  → * x < * y
 fcn-< {A} s {x} {y} {f} mf cx cy x<y = fc01 (fcn s mf cy) cx cy refl x<y where
@@ -171,6 +169,7 @@
       fc12 : * y < * x
       fc12 = fcn-< {A} s {y} {x} {f} mf cy cx c
 
+
 fcn-imm : {A : HOD} (s : Ordinal) { x y : Ordinal } (f : Ordinal → Ordinal) (mf : ≤-monotonic-f A f) 
     → (cx : FClosure A f s x) → (cy : FClosure A f s y ) → ¬ ( ( * x < * y ) ∧ ( * y < * (f x )) ) 
 fcn-imm {A} s {x} {y} f mf cx cy ⟪ x<y , y<fx ⟫ = fc21 where
@@ -193,7 +192,7 @@
            cxx :  FClosure A f s (f x)
            cxx = fsuc x cx 
            fc16 : (x : Ordinal ) → (cx : FClosure A f s x) → (fcn s mf cx  ≡ fcn s mf (fsuc x cx)) ∨ ( suc (fcn s mf cx ) ≡ fcn s mf (fsuc x cx))
-           fc16 x (init as refl ) with proj1 (mf s as )
+           fc16 x (init as) with proj1 (mf s as )
            ... | case1 _ = case1 refl
            ... | case2 _ = case2 refl
            fc16 .(f x) (fsuc x cx ) with proj1 (mf (f x) (A∋fc s f mf (fsuc x cx)) )
@@ -208,7 +207,6 @@
       ... | case1 y=x = <-irr (case1 ( fcn-inject s mf cy cx  y=x ))  x<y
       ... | case2 y<x = <-irr (case2 x<y) (fcn-< s mf cy cx y<x ) 
 
-
 -- open import Relation.Binary.Properties.Poset as Poset
 
 IsTotalOrderSet : ( A : HOD ) → Set (Level.suc n)
@@ -235,19 +233,22 @@
    field
       x<sup : {y : Ordinal} → odef B y → (y ≡ x ) ∨ (y << x )
 
-y1 : (A : HOD) → (y : Ordinal) → odef A y   → * (& (* y , * y)) ⊆' A
-y1 A y ay {x} lt with subst (λ k → odef k x) *iso lt
-... | case1 eq = subst (λ k → odef A k ) (sym (trans eq &iso)) ay
-... | case2 eq = subst (λ k → odef A k ) (sym (trans eq &iso)) ay
-
 record FChain ( A : HOD ) ( f : Ordinal → Ordinal ) (p c : Ordinal)   ( x : Ordinal ) : Set n where
    field
       fc∨sup :  FClosure A f p x
       chain∋p : odef (* c) p 
 
+record FSup ( A : HOD ) ( f : Ordinal → Ordinal ) (p c : Ordinal)   ( x : Ordinal ) : Set n where
+   field
+      sup :  (z : Ordinal) → FClosure A f p z → * z < * x 
+      min :  ( x1 : Ordinal) → ((z : Ordinal) → FClosure A f p z → * z < * x1 ) → ( x ≡ x1 ) ∨ ( * x < * x1  )
+      chain∋x : odef (* c) x 
+      chain∋p : odef (* c) p 
+
 data Fc∨sup (A : HOD) {y : Ordinal} (ay : odef A y)  ( f : Ordinal → Ordinal ) (c : Ordinal) : (x : Ordinal) → Set n where
       Finit :  {z : Ordinal} → z ≡ y  → Fc∨sup A ay f c z
-      Fc  :  {p x : Ordinal} → p o< x → Fc∨sup A ay f c p  → FChain A f p c x →  Fc∨sup A ay f c x
+      Fsup  :  {p x : Ordinal} → p o< x → Fc∨sup A ay f c p → FSup   A f p c x →  Fc∨sup A ay f c x
+      Fc    :  {p x : Ordinal} → p o< x → Fc∨sup A ay f c p → FChain A f p c x →  Fc∨sup A ay f c x
 
 record ZChain ( A : HOD )  (x : Ordinal)  ( f : Ordinal → Ordinal ) ( z : Ordinal ) : Set (Level.suc n) where
    field
@@ -423,7 +424,7 @@
           ... | 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 = ZChain.fc∨sup zc0 }  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
@@ -441,11 +442,11 @@
                 ... | 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))
                 zc9 :  ZChain A y f 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 = ZChain.fc∨sup zc0 } 
           ... | 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 = s-fc∨sup} 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)
@@ -468,6 +469,9 @@
                 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 
+                s-fc∨sup : {c : Ordinal} → odef schain c → Fc∨sup A (s⊆A (case1 (ZChain.chain∋x zc0))) f (& schain) c
+                s-fc∨sup {c} (case1 cx) = {!!}
+                s-fc∨sup {c} (case2 fc) = {!!}
                 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
@@ -525,7 +529,7 @@
                     → HasPrev A schain ab f ∨ IsSup A schain ab   
                     → * a < * b → odef schain b
                 s-ismax {a} {b} sa b<ox ab p a<b with osuc-≡< b<ox -- b is x?
-                ... | case1 b=x = case2 (subst (λ k → FClosure A f (& sp) k ) (sym (trans b=x x=sup )) (init (SUP.A∋maximal sup0) refl  ))
+                ... | case1 b=x = case2 (subst (λ k → FClosure A f (& sp) k ) (sym (trans b=x x=sup )) (init (SUP.A∋maximal sup0) ))
                 s-ismax {a} {b} (case1 za) b<ox ab (case1 p) a<b | case2 b<x = z21 p where   -- has previous
                      z21 : HasPrev A schain ab f → odef schain b
                      z21 record { y = y ; ay = (case1 zy) ; x=fy = x=fy } = 
@@ -546,7 +550,7 @@
                      ... | case2 y<b  = ZChain.is-max zc0 (ZChain.chain∋x zc0 ) (zc0-b<x b b<x) ab (case2 (z24 p)) y<b
           ... | case2 ¬x=sup =  -- x is not f y' nor sup of former ZChain from y
                    record { chain = ZChain.chain zc0 ; chain⊆A = ZChain.chain⊆A zc0 ; f-total = ZChain.f-total zc0 ; f-next = ZChain.f-next zc0
-                     ; initial = ZChain.initial zc0 ; f-immediate = ZChain.f-immediate zc0 ; chain∋x  =  ZChain.chain∋x zc0 ; is-max = z18 ; fc∨sup = {!!} }  where
+                     ; initial = ZChain.initial zc0 ; f-immediate = ZChain.f-immediate zc0 ; chain∋x  =  ZChain.chain∋x zc0 ; is-max = z18 ; fc∨sup = ZChain.fc∨sup zc0 }  where
                       -- no extention
                 z18 :  {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 →
@@ -561,7 +565,7 @@
      ... | tri< a ¬b ¬c = record { chain = {!!} ; chain⊆A = {!!}  ; f-total = {!!}  ; f-next = {!!}
                      ; initial = {!!} ; f-immediate = {!!} ; chain∋x  = {!!} ; is-max = {!!} ; fc∨sup = {!!} }
      ... | tri≈ ¬a b ¬c = {!!}
-     ... | tri> ¬a ¬b y<x = {!!} where
+     ... | tri> ¬a ¬b y<x = UnionZ where
        UnionZ : ZChain A y f x
        UnionZ = record { chain = Uz ; chain⊆A = Uz⊆A  ; f-total = u-total  ; f-next = u-next
                      ; initial = u-initial ; f-immediate = {!!} ; chain∋x  = {!!} ; is-max = {!!} ; fc∨sup = {!!} }  where --- limit ordinal case
@@ -595,10 +599,11 @@
                 um01 : odef (chain zb) i
                 um01 with FC
                 ... | Finit i=y = subst (λ k → odef (chain zb) k ) (sym i=y) ( chain∋x zb )
+                ... | Fsup {p} {i} p<i pFC sup = ?
                 ... | Fc {p} {i} p<i pFC FC with (FChain.fc∨sup FC) 
                 ... | fc = um02 i fc where
                      um02 : (i2 : Ordinal) → FClosure A f p i2 → odef (chain zb) i2
-                     um02 i2 (init ap i2=p ) = subst (λ k → odef (chain zb) k ) (sym i2=p) (previ p p<i um04 ) where
+                     um02 i2 (init ap ) = previ p p<i um04  where
                         um04 : odef (chain za) p
                         um04 = subst (λ k → odef k p ) *iso ( FChain.chain∋p FC )
                      um02 i (fsuc j fc) = f-next zb ( um02 j fc )