changeset 570:c642cbafc07a

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 02 May 2022 12:43:42 +0900
parents 33b1ade17f83
children 2ade91846f57
files src/zorn.agda
diffstat 1 files changed, 48 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/src/zorn.agda	Mon May 02 00:44:43 2022 +0900
+++ b/src/zorn.agda	Mon May 02 12:43:42 2022 +0900
@@ -54,6 +54,15 @@
 -- Partial Order on HOD ( possibly limited in A )
 --
 
+_<<_ : (x y : Ordinal ) → Set n
+x << y = * x < * y
+
+POO : IsStrictPartialOrder _≡_ _<<_ 
+POO = record { isEquivalence = record { refl = refl ; sym = sym ; trans = trans } 
+   ; trans = IsStrictPartialOrder.trans PO 
+   ; irrefl = λ x=y x<y → IsStrictPartialOrder.irrefl PO (cong (*) x=y) x<y
+   ; <-resp-≈ =  record { fst = λ {x} {y} {y1} y=y1 xy1 → subst (λ k → x << k ) y=y1 xy1 ; snd = λ {x} {x1} {y} x=x1 x1y → subst (λ k → k << x ) x=x1 x1y } } 
+ 
 _≤_ : (x y : HOD) → Set (Level.suc n)
 x ≤ y = ( x ≡ y ) ∨ ( x < y )
 
@@ -222,14 +231,11 @@
       ay : odef B y
       x=fy :  x ≡ f y 
 
-record IsSup (A B : HOD) (T : IsTotalOrderSet B) ( B⊆A :  B ⊆' A )
-    {x : Ordinal } (xa : odef A x)  (sup : (C : HOD ) → ( C ⊆' A) → IsTotalOrderSet C → Ordinal) ( f : Ordinal → Ordinal )  : Set n where
+record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x)     : Set n where
    field
       chain : Ordinal
       chain⊆B : (* chain) ⊆' B
-      x=sup :  x ≡ sup  (* chain) ( λ lt → B⊆A (chain⊆B lt ) ) 
-                   ( ⊆-IsTotalOrderSet {B} {* chain} record { incl = chain⊆B } T ) 
-      -- ¬prev : ¬ HasPrev A (* chain) xa f
+      x<sup : {y : Ordinal} → odef (* chain) y → (y ≡ x ) ∨ (y << x )
 
 record ZChain ( A : HOD )  {x : Ordinal} (ax : odef A x) ( f : Ordinal → Ordinal ) (mf : ≤-monotonic-f A f )
                  (sup : (C : HOD ) → ( C ⊆' A) → IsTotalOrderSet C → Ordinal) ( z : Ordinal ) : Set (Level.suc n) where
@@ -242,7 +248,7 @@
       f-next : {a : Ordinal } → odef chain a → odef chain (f a)
       f-immediate : { x y : Ordinal } → odef chain x → odef chain y → ¬ ( ( * x < * y ) ∧ ( * y < * (f x )) )
       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 f-total chain⊆A ab sup f       --  ((sup  chain  chain⊆A  f-total) ≡ b )
+          → HasPrev A chain ab f ∨  IsSup A chain ab        --  ((sup  chain  chain⊆A  f-total) ≡ b )
           → * a < * b  → odef chain b
 
 record Maximal ( A : HOD )  : Set (Level.suc n) where
@@ -333,7 +339,7 @@
            chain = ZChain.chain zc
            sp1 = sp0 f mf zc
            z10 :  {a b : Ordinal } → (ca : odef chain a ) → b o< osuc (& A) → (ab : odef A b ) 
-              →  HasPrev A chain ab f ∨  IsSup A chain (ZChain.f-total zc) (ZChain.chain⊆A zc) {b} ab supO f -- (supO  chain  (ZChain.chain⊆A zc) (ZChain.f-total zc) ≡ b )
+              →  HasPrev A chain ab f ∨  IsSup A chain {b} ab -- (supO  chain  (ZChain.chain⊆A zc) (ZChain.f-total zc) ≡ b )
               → * a < * b  → odef chain b
            z10 = ZChain.is-max zc
            z11 : & (SUP.sup sp1) o< & A
@@ -342,11 +348,18 @@
            z12 with o≡? (& s) (& (SUP.sup sp1))
            ... | yes eq = subst (λ k → odef chain k) eq ( ZChain.chain∋x zc )
            ... | no ne = z10 {& s} {& (SUP.sup sp1)} ( ZChain.chain∋x zc ) (ordtrans z11 <-osuc ) (SUP.A∋maximal sp1)
-                (case2 record { chain = & chain ; chain⊆B = λ z → subst (λ  k → odef k _ ) *iso z ;  x=sup = cong (&) (sup== (sym *iso)) }  ) z13 where
+                (case2 z19 ) z13 where
                z13 :  * (& s) < * (& (SUP.sup sp1))
                z13 with SUP.x<sup sp1 ( ZChain.chain∋x zc )
                ... | case1 eq = ⊥-elim ( ne (cong (&) eq) )
                ... | case2 lt = subst₂ (λ j k → j < k ) (sym *iso) (sym *iso) lt
+               z19 : IsSup A chain {& (SUP.sup sp1)} (SUP.A∋maximal sp1)
+               z19 = record { chain = & chain ; chain⊆B = λ z → subst (λ  k → odef k _ ) *iso z ;  x<sup = z20 }  where
+                   z20 :  {y : Ordinal} → odef (* (& chain)) y → (y ≡ & (SUP.sup sp1)) ∨ (y << & (SUP.sup sp1))
+                   z20 {y} zy with SUP.x<sup sp1 (subst₂ (λ j k → odef j k ) *iso (sym &iso) zy)
+                   ... | case1 y=p = case1 (subst (λ k → k ≡ _ ) &iso ( cong (&) y=p ))
+                   ... | case2 y<p = case2 (subst (λ k → * y < k ) (sym *iso) y<p )
+                   -- λ {y} zy → subst (λ k → (y ≡ & k ) ∨ (y << & k)) ?  (SUP.x<sup sp1 ? ) }
            z14 :  f (& (SUP.sup (sp0 f mf zc))) ≡ & (SUP.sup (sp0 f mf zc))
            z14 with ZChain.f-total zc  (subst (λ k → odef chain k) (sym &iso)  (ZChain.f-next zc z12 )) z12 
            ... | tri< a ¬b ¬c = ⊥-elim z16 where
@@ -399,7 +412,7 @@
                      ; 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 }  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) (ZChain.f-total zc0) (ZChain.chain⊆A zc0) ab supO f  →
+                    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 ) )
@@ -408,7 +421,7 @@
           ... | 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
                 zc17 :  {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) (ZChain.f-total zc0) (ZChain.chain⊆A zc0) ab supO f →
+                            HasPrev A (ZChain.chain zc0) ab f ∨ IsSup A (ZChain.chain zc0) ab →
                             * a < * b → odef (ZChain.chain zc0) b
                 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
@@ -416,12 +429,19 @@
                 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
                      ; initial = ZChain.initial zc0 ; f-immediate =  ZChain.f-immediate zc0 ; chain∋x  = ZChain.chain∋x zc0 ; is-max = zc17 }  -- no extention
-          ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain.chain zc0) (ZChain.f-total zc0) (ZChain.chain⊆A zc0) ax supO f)
-          ... | case1 x=sup = -- previous ordinal is a sup of a smaller ZChain
+          ... | case2 ¬fy<x with ODC.p∨¬p O (IsSup A (ZChain.chain zc0) ax )
+          ... | case1 is-sup = -- previous ordinal is a sup of a smaller ZChain
                  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 = {!!} } where -- x is sup
-                sup0 = supP ( ZChain.chain zc0 ) (ZChain.chain⊆A zc0 ) (ZChain.f-total zc0) 
+                     ; initial = scinit ; f-immediate =  simm ; chain∋x  = case1 (ZChain.chain∋x zc0) ; is-max = s-ismax } where -- x is sup
+                -- sup0 = supP ( ZChain.chain zc0 ) (ZChain.chain⊆A zc0 ) (ZChain.f-total zc0) 
+                -- sp = SUP.sup sup0 
+                -- x=sup : IsSup A (ZChain.chain zc0) {& (* x)} ax → x ≡ & sp -- sup is not minimum, so this may wrong
+                sup0 : SUP A (ZChain.chain zc0) 
+                sup0 = record { sup = * x ; A∋maximal = ax ; x<sup = {!!}  } 
+                sp : HOD
                 sp = SUP.sup sup0 
+                x=sup : x ≡ & sp 
+                x=sup = sym &iso 
                 chain = ZChain.chain zc0
                 sc<A : {y : Ordinal} → odef chain y ∨ FClosure A f (& sp) y → y o< & A
                 sc<A {y} (case1 zx) = subst (λ k → k o< (& A)) &iso ( c<→o< (ZChain.chain⊆A zc0 (subst (λ k → odef chain k) (sym &iso) zx )))
@@ -488,33 +508,35 @@
                 ... | case2 sp<a | case2 b<sp = <-irr (case2 (ptrans b<sp (subst (λ k → k < * a) *iso sp<a ))) (proj1 p )
                 simm {a} {b} (case2 sa) (case2 sb) p = fcn-imm {A} (& sp) {a} {b} f mf sa sb p
                 s-ismax : {a b : Ordinal} → odef schain a → b o< osuc x → (ab : odef A b) →
-                   HasPrev A schain ab f ∨ IsSup A schain scmp s⊆A ab (λ C C⊆A TC → & (SUP.sup (supP C C⊆A TC))) f 
+                   HasPrev A schain ab f ∨ IsSup A schain ab   
                     → * a < * b → odef schain b
-                s-ismax {a} {b} (case1 za) b<x ab (case1 p) a<b with osuc-≡< b<x
-                ... | case1 b=x = case2 {!!} -- (subst (λ k → FClosure A f (& sp) k ) (sym (trans b=x x=sup )) (init (SUP.A∋maximal sup0) ))
-                ... | case2 b<x = z21 p where
+                s-ismax {a} {b} (case1 za) b<ox ab P a<b with osuc-≡< b<ox | ODC.p∨¬p O (HasPrev A schain ab f)-- b is some previous
+                ... | case1 b=x | _ = case2 (subst (λ k → FClosure A f (& sp) k ) (sym (trans b=x x=sup )) (init (SUP.A∋maximal sup0) ))
+                ... | case2 b<x | case1 p = z21 p where
                      z21 : HasPrev A schain ab f → odef schain b
                      z21 record { y = y ; ay = (case1 zy) ; x=fy = x=fy } = 
                            case1 (ZChain.is-max zc0 za (zc0-b<x b b<x) ab (case1 record { y = y ; ay = zy ; x=fy = x=fy }) a<b )
                      z21 record { y = y ; ay = (case2 sy) ; x=fy = x=fy } = subst (λ k → odef schain k) (sym x=fy) (case2 (fsuc y sy) )
-                s-ismax {a} {b} (case1 za) b<x ab (case2 p) a<b with osuc-≡< b<x
-                ... | case1 b=x = case2 (subst (λ k → FClosure A f (& sp) k ) {!!} (init (SUP.A∋maximal sup0) ))
-                ... | case2 b<x = {!!} where
-                     z22 : IsSup A (ZChain.chain zc0) (ZChain.f-total zc0) (ZChain.chain⊆A zc0) ab supO f → odef schain b
-                     z22 p = {!!}
-                -- case1 (ZChain.is-max zc0 za (zc0-b<x b lt) ab {!!} a<b )
+                s-ismax {a} {b} (case1 za) b<ox ab (case1 p) a<b | case2 b<x | case2 ¬pr = ⊥-elim ( ¬pr p )
+                s-ismax {a} {b} (case1 za) b<ox ab (case2 p) a<b | case2 b<x | case2 ¬pr = case1 (ZChain.is-max zc0 za (zc0-b<x b b<x) ab (case2 z22) a<b ) where
+                     -- cahin of IsSup A schain ab may larger than chain of zc0 if it has a previous but it is not
+                     z23 : * (IsSup.chain p) ⊆' ZChain.chain zc0
+                     z23 = {!!}
+                     z22 : IsSup A (ZChain.chain zc0)   ab 
+                     z22 = record { chain = IsSup.chain p ; chain⊆B = z23 ; x<sup = {!!} }
                 s-ismax {a} {b} (case2 sa) b<x ab p a<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 }  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) (ZChain.f-total zc0) (ZChain.chain⊆A zc0) ab supO f →
+                            HasPrev A (ZChain.chain zc0) ab f ∨ IsSup A (ZChain.chain zc0)   ab →
                             * a < * b → odef (ZChain.chain zc0) b
                 z18 {a} {b} za b<x ab p a<b with osuc-≡< b<x
                 ... | case2 lt = ZChain.is-max zc0 za (zc0-b<x b lt) ab p a<b 
                 ... | case1 b=x with p
                 ... | case1 pr = ⊥-elim ( ¬fy<x record {y = HasPrev.y pr ; ay = HasPrev.ay pr ; x=fy = trans (trans &iso (sym b=x) ) (HasPrev.x=fy pr ) } )
-                ... | case2 b=sup = ⊥-elim ( ¬x=sup {!!} )
+                ... | case2 b=sup = ⊥-elim ( ¬x=sup record { chain = IsSup.chain b=sup ; chain⊆B =  IsSup.chain⊆B b=sup
+                    ;  x<sup = λ {y} zy → subst (λ k → (y ≡ k) ∨ (y << k)) (trans b=x (sym &iso)) (IsSup.x<sup b=sup zy)  } ) 
      ... | no ¬ox =  {!!}  where --- limit ordinal case
          record UZFChain (z : Ordinal) : Set n where -- Union of ZFChain from y which has maximality o< x
             field