changeset 571:2ade91846f57

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 02 May 2022 19:51:51 +0900
parents c642cbafc07a
children 427e36467a18
files src/zorn.agda
diffstat 1 files changed, 39 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/src/zorn.agda	Mon May 02 12:43:42 2022 +0900
+++ b/src/zorn.agda	Mon May 02 19:51:51 2022 +0900
@@ -54,7 +54,7 @@
 -- Partial Order on HOD ( possibly limited in A )
 --
 
-_<<_ : (x y : Ordinal ) → Set n
+_<<_ : (x y : Ordinal ) → Set n    -- Set n order
 x << y = * x < * y
 
 POO : IsStrictPartialOrder _≡_ _<<_ 
@@ -233,9 +233,7 @@
 
 record IsSup (A B : HOD) {x : Ordinal } (xa : odef A x)     : Set n where
    field
-      chain : Ordinal
-      chain⊆B : (* chain) ⊆' B
-      x<sup : {y : Ordinal} → odef (* chain) y → (y ≡ x ) ∨ (y << x )
+      x<sup : {y : Ordinal} → odef B 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
@@ -277,8 +275,8 @@
         --- irrelevance of ⊆' and compare
         sup== : {C C1 : HOD } → C ≡ C1 → {c  : C ⊆' A } {c1 : C1 ⊆' A } → {t  : IsTotalOrderSet C } {t1 : IsTotalOrderSet C1 }
          → SUP.sup ( supP  C c t )  ≡  SUP.sup ( supP  C1 c1 t1 )
-     z01 : {a b : HOD} → A ∋ a → A ∋ b  → (a ≡ b ) ∨ (a < b ) → b < a → ⊥
-     z01 {a} {b} A∋a A∋b = <-irr
+     <-irr0 : {a b : HOD} → A ∋ a → A ∋ b  → (a ≡ b ) ∨ (a < b ) → b < a → ⊥
+     <-irr0 {a} {b} A∋a A∋b = <-irr
      z07 :   {y : Ordinal} → {P : Set n} → odef A y ∧ P → y o< & A
      z07 {y} p = subst (λ k → k o< & A) &iso ( c<→o< (subst (λ k → odef A k ) (sym &iso ) (proj1 p )))
      s : HOD
@@ -333,9 +331,9 @@
      ---
      --- the maximum chain  has fix point of any ≤-monotonic function
      ---
-     z03 :  ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A (subst (λ k → odef A k ) &iso as ) f mf supO (& A) )
+     fixpoint :  ( f : Ordinal → Ordinal ) → (mf : ≤-monotonic-f A f ) (zc : ZChain A (subst (λ k → odef A k ) &iso as ) f mf supO (& A) )
             → f (& (SUP.sup (sp0 f mf zc ))) ≡ & (SUP.sup (sp0 f mf zc ))
-     z03 f mf zc = z14 where
+     fixpoint f mf zc = z14 where
            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 ) 
@@ -354,9 +352,9 @@
                ... | 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)
+               z19 = record {   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 (λ k → odef chain k ) (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 ? ) }
@@ -378,14 +376,14 @@
 
      -- ZChain contradicts ¬ Maximal
      --
-     -- ZChain forces fix point on any ≤-monotonic function (z03)
+     -- ZChain forces fix point on any ≤-monotonic function (fixpoint)
      -- ¬ Maximal create cf which is a <-monotonic function by axiom of choice. This contradicts fix point of ZChain
      --
      z04 :  (nmx : ¬ Maximal A ) → (zc : ZChain A (subst (λ k → odef A k ) &iso as ) (cf nmx) (cf-is-≤-monotonic nmx) supO (& A)) → ⊥
-     z04 nmx zc = z01  {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso)
-           (proj1 (is-cf nmx (SUP.A∋maximal  sp1))))
-           (subst (λ k → odef A (& k)) (sym *iso) (SUP.A∋maximal sp1) ) (case1 ( cong (*)( z03 (cf nmx) (cf-is-≤-monotonic nmx ) zc )))
-           (proj1 (cf-is-<-monotonic nmx c (SUP.A∋maximal sp1))) where
+     z04 nmx zc = <-irr0  {* (cf nmx c)} {* c} (subst (λ k → odef A k ) (sym &iso) (proj1 (is-cf nmx (SUP.A∋maximal  sp1))))
+                                               (subst (λ k → odef A (& k)) (sym *iso) (SUP.A∋maximal sp1) )
+           (case1 ( cong (*)( fixpoint (cf nmx) (cf-is-≤-monotonic nmx ) zc ))) -- x ≡ f x ̄
+           (proj1 (cf-is-<-monotonic nmx c (SUP.A∋maximal sp1))) where          -- x < f x
           sp1 = sp0 (cf nmx) (cf-is-≤-monotonic nmx) zc
           c = & (SUP.sup sp1)
 
@@ -430,14 +428,15 @@
                 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) 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 = 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
+          ... | 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 } where 
                 sup0 : SUP A (ZChain.chain zc0) 
-                sup0 = record { sup = * x ; A∋maximal = ax ; x<sup = {!!}  } 
+                sup0 = record { sup = * x ; A∋maximal = ax ; x<sup = x21 } where
+                        x21 :  {y : HOD} → ZChain.chain zc0 ∋ y → (y ≡ * x) ∨ (y < * x)
+                        x21 {y} zy with IsSup.x<sup is-sup zy 
+                        ... | case1 y=x = case1 ( subst₂ (λ j k → j ≡ * k  ) *iso &iso ( cong (*) y=x)  )
+                        ... | case2 y<x = case2 (subst₂ (λ j k → j < * k ) *iso &iso y<x  )
                 sp : HOD
                 sp = SUP.sup sup0 
                 x=sup : x ≡ & sp 
@@ -507,24 +506,27 @@
                 ... | case2 sp<a | case1 b=sp = <-irr (case2 (subst ( λ  k → k < * a ) (trans *iso (sym b=sp)) sp<a  )) (proj1 p )
                 ... | 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 ab   
+                s-ismax : {a b : Ordinal} → odef schain a → b o< osuc x → (ab : odef A b)
+                    → HasPrev A schain ab f ∨ IsSup A schain ab   
                     → * a < * b → odef schain b
-                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
+                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) ))
+                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 } = 
                            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<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
+                s-ismax {a} {b} (case1 za) b<ox ab (case2 p) a<b | case2 b<x = case1 (ZChain.is-max zc0 za (zc0-b<x b b<x) ab (case2 z22) a<b ) where -- previous sup
+                     z22 : IsSup A (ZChain.chain zc0)   ab 
+                     z22 = record { x<sup = λ {y} zy → IsSup.x<sup p (case1 zy ) }
+                s-ismax {a} {b} (case2 sa) b<ox ab (case1 p)  a<b | case2 b<x with HasPrev.ay p
+                ... | case1 zy = case1 (subst (λ k → odef chain k ) (sym (HasPrev.x=fy p)) (ZChain.f-next zc0 zy ))               -- in previous closure of f
+                ... | case2 sy = case2 (subst (λ k → FClosure A f (& (* x)) k ) (sym (HasPrev.x=fy p)) (fsuc (HasPrev.y p) sy ))  -- in current  closure of f
+                s-ismax {a} {b} (case2 sa) b<ox ab (case2 p)  a<b | case2 b<x = {!!} where -- closure of f cannot be a sup
+                     z24 : IsSup A schain ab → IsSup A (ZChain.chain zc0) ab 
+                     z24 p = record { x<sup = λ {y} zy → IsSup.x<sup p (case1 zy ) }
+                     z23 : FClosure A f (& (* x)) a → ¬ ( IsSup A schain ab )
                      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
@@ -535,8 +537,8 @@
                 ... | 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 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)  } ) 
+                ... | case2 b=sup = ⊥-elim ( ¬x=sup record { 
+                      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