changeset 492:e28b1da1b58d

Partial Order
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 09 Apr 2022 07:03:07 +0900
parents 646831f6b06d
children 71436ccbc804
files src/zorn.agda
diffstat 1 files changed, 93 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/src/zorn.agda	Fri Apr 08 22:19:05 2022 +0900
+++ b/src/zorn.agda	Sat Apr 09 07:03:07 2022 +0900
@@ -47,171 +47,181 @@
 
 open Element
 
-IsPartialOrderSet : ( A : HOD ) →  (_<_ : (x y : HOD) → Set n )  → Set (suc n)
-IsPartialOrderSet A _<_ = IsPartialOrder _<A_ _≡A_ where
-   _<A_ : (x y : Element A ) → Set n
-   x <A y = elm x < elm y
+IsPartialOrderSet : ( A : HOD ) →  (_≤_ : (x y : HOD) → Set n )  → Set (suc n)
+IsPartialOrderSet A _≤_ = IsPartialOrder _≤A_ _≡A_ where
+   _≤A_ : (x y : Element A ) → Set n
+   x ≤A y = elm x ≤ elm y
    _≡A_ : (x y : Element A ) → Set (suc n)
    x ≡A y = elm x ≡ elm y
 
-IsTotalOrderSet : ( A : HOD ) →  (_<_ : (x y : HOD) → Set n )  → Set (suc n)
-IsTotalOrderSet A _<_ = IsTotalOrder _<A_ _≡A_ where
-   _<A_ : (x y : Element A ) → Set n
-   x <A y = elm x < elm y
+open _==_
+open _⊆_
+
+⊆-IsPartialOrderSet : { A B  : HOD } → B ⊆ A →  {_≤_ : (x y : HOD) → Set n }  → IsPartialOrderSet A _≤_ → IsPartialOrderSet B _≤_
+⊆-IsPartialOrderSet {A} {B} B⊆A {_≤_} PA = record {
+       isPreorder =  record { isEquivalence = record { refl = ? ; sym = {!!} ; trans = {!!} } ; reflexive = {!!} ; trans = {!!} }
+     ; antisym = {!!}
+   }
+
+IsTotalOrderSet : ( A : HOD ) →  (_≤_ : (x y : HOD) → Set n )  → Set (suc n)
+IsTotalOrderSet A _≤_ = IsTotalOrder _≤A_ _≡A_ where
+   _≤A_ : (x y : Element A ) → Set n
+   x ≤A y = elm x ≤ elm y
    _≡A_ : (x y : Element A ) → Set (suc n)
    x ≡A y = elm x ≡ elm y
 
 me : { A a : HOD } → A ∋ a → Element A
 me {A} {a} lt = record { elm = a ; is-elm = lt }
 
-record SUP ( A B : HOD ) (_<_ : (x y : HOD) → Set n ) : Set (suc n) where
+record SUP ( A B : HOD ) (_≤_ : (x y : HOD) → Set n ) : Set (suc n) where
    field
       sup : HOD
       A∋maximal : A ∋ sup
-      x≤sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x < sup )   -- B is Total, use positive
+      x≤sup : {x : HOD} → B ∋ x → (x ≡ sup ) ∨ (x ≤ sup )   -- B is Total, use positive
 
-record Maximal ( A : HOD ) (_<_ : (x y : HOD) → Set n ) : Set (suc n) where
+record Maximal ( A : HOD ) (_≤_ : (x y : HOD) → Set n ) : Set (suc n) where
    field
       maximal : HOD
       A∋maximal : A ∋ maximal
-      ¬maximal<x : {x : HOD} → A ∋ x  → ¬ maximal < x       -- A is Partial, use negative
+      ¬maximal≤x : {x : HOD} → A ∋ x  → ¬ maximal ≤ x       -- A is Partial, use negative
 
-open _==_
-open _⊆_
 
-record ZChain ( A : HOD ) (y : Ordinal)  (_<_ : (x y : HOD) → Set n ) : Set (suc n) where
+record ZChain ( A : HOD ) (y : Ordinal)  (_≤_ : (x y : HOD) → Set n ) : Set (suc n) where
    field
       fb : (x : Ordinal ) → HOD
-      A∋fb : (ox : Ordinal ) → ox o< y → A ∋ fb ox 
-      total : {ox oz : Ordinal } → (x<y : ox o< y ) → (z<y : oz o< y ) → ( ox ≡ oz ) ∨ ( fb ox < fb oz ) ∨ ( fb oz < fb ox  )
-      monotonic : {ox oz : Ordinal } → (x<y : ox o< y ) → (z<y : oz o< y ) → ox o< oz → fb ox < fb oz 
+      A∋fb : (ox : Ordinal ) → ox o≤ y → A ∋ fb ox 
+      total : {ox oz : Ordinal } → (x≤y : ox o≤ y ) → (z≤y : oz o≤ y ) → ( ox ≡ oz ) ∨ ( fb ox ≤ fb oz ) ∨ ( fb oz ≤ fb ox  )
+      monotonic : {ox oz : Ordinal } → (x≤y : ox o≤ y ) → (z≤y : oz o≤ y ) → ox o≤ oz → fb ox ≤ fb oz 
 
-Zorn-lemma : { A : HOD } → { _<_ : (x y : HOD) → Set n }
+Zorn-lemma : { A : HOD } → { _≤_ : (x y : HOD) → Set n }
     → o∅ o< & A 
-    → IsPartialOrderSet A _<_
-    → ( ( B : HOD) → (B⊆A : B ⊆ A) → IsTotalOrderSet B _<_ → SUP A B  _<_  ) -- SUP condition
-    → Maximal A _<_ 
-Zorn-lemma {A} {_<_} 0<A PO supP = zorn00 where
+    → IsPartialOrderSet A _≤_
+    → ( ( B : HOD) → (B⊆A : B ⊆ A) → IsTotalOrderSet B _≤_ → SUP A B  _≤_  ) -- SUP condition
+    → Maximal A _≤_ 
+Zorn-lemma {A} {_≤_} 0<A PO supP = zorn00 where
      someA : HOD
      someA = ODC.minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) 
      isSomeA : A ∋ someA
      isSomeA =  ODC.x∋minimal O A (λ eq → ¬x<0 ( subst (λ k → o∅ o< k ) (=od∅→≡o∅ eq) 0<A )) 
      HasMaximal : HOD
-     HasMaximal = record { od = record { def = λ y → odef A y ∧ ((m : Ordinal) →  odef A m → ¬ (* y < * m))} ; odmax = & A ; <odmax = z08 } where
-         z08 : {y : Ordinal} → (odef A y ∧ ((m : Ordinal) →  odef A m → ¬ (* y < * m)))  → y o< & A
+     HasMaximal = record { od = record { def = λ y → odef A y ∧ ((m : Ordinal) →  odef A m → ¬ (* y ≤ * m))} ; odmax = & A ; ≤odmax = z08 } where
+         z08 : {y : Ordinal} → (odef A y ∧ ((m : Ordinal) →  odef A m → ¬ (* y ≤ * m)))  → y o< & A
          z08 {y} P = subst (λ k → k o< & A) &iso (c<→o< {* y} (subst (λ k → odef A k) (sym &iso) (proj1 P)))
-     no-maximal : HasMaximal =h= od∅ → (y : Ordinal) →  (odef A y ∧ ((m : Ordinal) →  odef A m → ¬ (* y < * m))) →  ⊥
+     no-maximal : HasMaximal =h= od∅ → (y : Ordinal) →  (odef A y ∧ ((m : Ordinal) →  odef A m → ¬ (* y ≤ * m))) →  ⊥
      no-maximal nomx y P = ¬x<0 (eq→ nomx {y} ⟪ proj1 P , (λ m am → (proj2 P) m am ) ⟫ ) 
      Gtx : { x : HOD} → A ∋ x → HOD
-     Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x < (* y)) } ; odmax = & A ; <odmax = z09 }  where
-         z09 : {y : Ordinal} → (odef A y ∧ (x < (* y)))  → y o< & A
+     Gtx {x} ax = record { od = record { def = λ y → odef A y ∧ (x ≤ (* y)) } ; odmax = & A ; ≤odmax = z09 }  where
+         z09 : {y : Ordinal} → (odef A y ∧ (x ≤ (* y)))  → y o< & A
          z09 {y} P = subst (λ k → k o< & A) &iso (c<→o< {* y} (subst (λ k → odef A k) (sym &iso) (proj1 P)))
-     z01 : {a b : HOD} → A ∋ a → A ∋ b  → (a ≡ b ) ∨ (a < b ) → b < a → ⊥
-     z01 {a} {b} A∋a A∋b (case1 a=b) b<a = {!!} -- proj1 (proj2 (PO (me A∋b) (me A∋a)) (sym a=b)) b<a
-     z01 {a} {b} A∋a A∋b (case2 a<b) b<a = {!!} -- proj1 (proj1 (PO (me A∋b) (me A∋a)) b<a) a<b
+     z01 : {a b : HOD} → A ∋ a → A ∋ b  → (a ≡ b ) ∨ (a ≤ b ) → b ≤ a → ⊥
+     z01 {a} {b} A∋a A∋b (case1 a=b) b≤a = {!!} -- proj1 (proj2 (PO (me A∋b) (me A∋a)) (sym a=b)) b≤a
+     z01 {a} {b} A∋a A∋b (case2 a≤b) b≤a = {!!} -- proj1 (proj1 (PO (me A∋b) (me A∋a)) b≤a) a≤b
      -- ZChain is not compatible with the SUP condition
      record BX (x y : Ordinal) (fb : ( x : Ordinal ) → HOD ) : Set n where
         field
             bx : Ordinal
-            bx<y : bx o< y
+            bx≤y : bx o≤ y
             is-fb : x ≡ & (fb bx )
-     bx<A : (z : ZChain A (& A) _<_ ) → {x : Ordinal } → (bx : BX x (& A) ( ZChain.fb z ))  → BX.bx bx o< & A
-     bx<A z {x} bx = BX.bx<y bx
-     B :  (z : ZChain A (& A) _<_ ) → HOD
-     B z = record { od = record { def = λ x → BX x (& A) ( ZChain.fb z )  } ; odmax = & A ; <odmax = {!!} }
-     z11 :  (z : ZChain A (& A) _<_ ) → (x : Element (B z)) → elm x ≡  ZChain.fb z ?
+     bx≤A : (z : ZChain A (& A) _≤_ ) → {x : Ordinal } → (bx : BX x (& A) ( ZChain.fb z ))  → BX.bx bx o≤ & A
+     bx≤A z {x} bx = BX.bx≤y bx
+     B :  (z : ZChain A (& A) _≤_ ) → HOD
+     B z = record { od = record { def = λ x → BX x (& A) ( ZChain.fb z )  } ; odmax = & A ; ≤odmax = {!!} }
+     z11 :  (z : ZChain A (& A) _≤_ ) → (x : Element (B z)) → elm x ≡  ZChain.fb z (BX.bx (is-elm x)) 
      z11 z x = subst₂ (λ j k → j ≡ k ) *iso *iso ( cong (*) (BX.is-fb (is-elm x)) )
-     obx : (z : ZChain A (& A) _<_ ) → {x : HOD} → B z ∋ x → Ordinal
+     obx : (z : ZChain A (& A) _≤_ ) → {x : HOD} → B z ∋ x → Ordinal
      obx z {x} bx = BX.bx bx
-     obx=fb : (z : ZChain A (& A) _<_ ) → {x : HOD} → (bx : B z ∋ x ) → x ≡ ZChain.fb z {!!}
+     obx=fb : (z : ZChain A (& A) _≤_ ) → {x : HOD} → (bx : B z ∋ x ) → x ≡ ZChain.fb z (BX.bx bx) 
      obx=fb z {x} bx = subst₂ (λ j k → j ≡ k ) *iso *iso (cong (*) (BX.is-fb bx)) 
-     B⊆A : (z : ZChain A (& A) _<_ ) → B z ⊆ A
-     B⊆A z = record { incl = λ {x} bx → subst (λ k → odef A k ) (sym (BX.is-fb bx)) (ZChain.A∋fb z (BX.bx bx) (BX.bx<y bx) ) }
-     PO-B : (z : ZChain A (& A) _<_ ) → IsPartialOrderSet (B z) _<_
-     PO-B z = ? -- a b = {!!} -- PO record { elm = elm a ; is-elm = incl ( B⊆A z) (is-elm a) }  record { elm = elm b ; is-elm = incl ( B⊆A z) (is-elm b) }  
-     bx-monotonic : (z : ZChain A (& A) _<_ ) → {x y : Element (B z)} → obx z (is-elm x) o< obx z (is-elm y) → elm x < elm y 
-     bx-monotonic z {x} {y} a = subst₂ (λ j k → j < k ) (sym (z11 z x)) (sym (z11 z y)) (ZChain.monotonic z (bx<A z (is-elm x)) (bx<A z (is-elm y)) a ) 
+     B⊆A : (z : ZChain A (& A) _≤_ ) → B z ⊆ A
+     B⊆A z = record { incl = λ {x} bx → subst (λ k → odef A k ) (sym (BX.is-fb bx)) (ZChain.A∋fb z (BX.bx bx) (BX.bx≤y bx) ) }
+     PO-B : (z : ZChain A (& A) _≤_ ) → IsPartialOrderSet (B z) _≤_
+     PO-B z = subst₂ (λ j k → IsPartialOrder j k ) {!!} {!!} {!!} where
+           _≤B_ = {!!}
+           _≡B_ = {!!}
+        -- a b = {!!} -- PO record { elm = elm a ; is-elm = incl ( B⊆A z) (is-elm a) }  record { elm = elm b ; is-elm = incl ( B⊆A z) (is-elm b) }  
+     bx-monotonic : (z : ZChain A (& A) _≤_ ) → {x y : Element (B z)} → obx z (is-elm x) o≤ obx z (is-elm y) → elm x ≤ elm y 
+     bx-monotonic z {x} {y} a = subst₂ (λ j k → j ≤ k ) (sym (z11 z x)) (sym (z11 z y)) (ZChain.monotonic z (bx≤A z (is-elm x)) (bx≤A z (is-elm y)) a ) 
      open import Relation.Binary.HeterogeneousEquality as HE using (_≅_ ) 
-     z12 : (z : ZChain A (& A) _<_ ) → {a b : HOD } → (x : BX (& a) (& A) (ZChain.fb z))  (y : BX (& b) (& A) (ZChain.fb z))
-          → obx z x ≡ obx z y → bx<A z x ≅ bx<A z y
+     z12 : (z : ZChain A (& A) _≤_ ) → {a b : HOD } → (x : BX (& a) (& A) (ZChain.fb z))  (y : BX (& b) (& A) (ZChain.fb z))
+          → obx z x ≡ obx z y → bx≤A z x ≅ bx≤A z y
      z12 z {a} {b} x y eq = {!!}
-     bx-inject :  (z : ZChain A (& A) _<_ ) → {x y : Element (B z)} → BX.bx (is-elm x) ≡ BX.bx (is-elm y) → elm x ≡ elm y
+     bx-inject :  (z : ZChain A (& A) _≤_ ) → {x y : Element (B z)} → BX.bx (is-elm x) ≡ BX.bx (is-elm y) → elm x ≡ elm y
      bx-inject z {x} {y} eq = begin
             elm x ≡⟨  {!!}   ⟩
             {!!} ≡⟨ cong (λ k → {!!} ) {!!}  ⟩
             {!!} ≡⟨ {!!}   ⟩
             elm y ∎ where open ≡-Reasoning
-     B-is-total :  (z : ZChain A (& A) _<_ ) → IsTotalOrderSet (B z) _<_ 
-     B-is-total = ?
-     B-Tri : (z : ZChain A (& A) _<_ ) → Trichotomous (λ (x : Element A) y → elm x ≡ elm y ) (λ x y → elm x < elm y )
-     B-Tri z x y with trio< (obx z ?) (obx z ?)
-     ... | tri< a ¬b ¬c = ? where -- tri< z10 (λ eq → proj1 (proj2 (PO-B z x y) eq ) z10) (λ ¬c → proj1 (proj1 (PO-B z y x) ¬c ) z10) where
-          z10 : elm x < elm y
-          z10 = ? -- bx-monotonic z {x} {y} a
-     ... | tri≈ ¬a b ¬c = ? -- tri≈ {!!} (bx-inject z {x} {y} b) {!!}
-     ... | tri> ¬a ¬b c = ? -- tri> (λ ¬a → proj1 (proj1 (PO-B z x y) ¬a ) (bx-monotonic z {y} {x} c) ) (λ eq → proj2 (proj2 (PO-B z x y) eq ) (bx-monotonic z {y} {x} c)) (bx-monotonic z {y} {x} c)
-     ZChain→¬SUP :  (z : ZChain A (& A) _<_ ) →  ¬ (SUP A (B z) _<_ )
+     B-is-total :  (z : ZChain A (& A) _≤_ ) → IsTotalOrderSet (B z) _≤_ 
+     B-is-total = {!!}
+     B-Tri : (z : ZChain A (& A) _≤_ ) → Trichotomous (λ (x : Element A) y → elm x ≡ elm y ) (λ x y → elm x ≤ elm y )
+     B-Tri z x y with trio< (obx z {!!}) (obx z {!!})
+     ... | tri< a ¬b ¬c = {!!} where -- tri≤ z10 (λ eq → proj1 (proj2 (PO-B z x y) eq ) z10) (λ ¬c → proj1 (proj1 (PO-B z y x) ¬c ) z10) where
+          z10 : elm x ≤ elm y
+          z10 = {!!} -- bx-monotonic z {x} {y} a
+     ... | tri≈ ¬a b ¬c = {!!} -- tri≈ {!!} (bx-inject z {x} {y} b) {!!}
+     ... | tri> ¬a ¬b c = {!!} -- tri> (λ ¬a → proj1 (proj1 (PO-B z x y) ¬a ) (bx-monotonic z {y} {x} c) ) (λ eq → proj2 (proj2 (PO-B z x y) eq ) (bx-monotonic z {y} {x} c)) (bx-monotonic z {y} {x} c)
+     ZChain→¬SUP :  (z : ZChain A (& A) _≤_ ) →  ¬ (SUP A (B z) _≤_ )
      ZChain→¬SUP z sp = ⊥-elim {!!} where
          z03 : & (SUP.sup sp) o< osuc (& A)
          z03 = ordtrans (c<→o< (SUP.A∋maximal sp)) <-osuc
-         z02 :  (x : HOD) → B z ∋ x → SUP.sup sp < x → ⊥
-         z02 x xe s<x = z01 (incl (B⊆A z) xe) (SUP.A∋maximal sp) (SUP.x≤sup sp xe) s<x 
+         z02 :  (x : HOD) → B z ∋ x → SUP.sup sp ≤ x → ⊥
+         z02 x xe s≤x = z01 (incl (B⊆A z) xe) (SUP.A∋maximal sp) (SUP.x≤sup sp xe) s≤x 
      ind :  HasMaximal =h= od∅
-         → (x : Ordinal) → ((y : Ordinal) → y o< x →  ZChain A y _<_ )
-         →  ZChain A x _<_
+         → (x : Ordinal) → ((y : Ordinal) → y o< x →  ZChain A y _≤_ )
+         →  ZChain A x _≤_
      ind nomx x prev with Oprev-p x
      ... | yes op with ODC.∋-p O A (* x)
      ... | no ¬Ax = {!!} where
           -- we have previous ordinal and ¬ A ∋ x, use previous Zchain
           px = Oprev.oprev op
-          zc1 : ZChain A px _<_
+          zc1 : ZChain A px _≤_
           zc1 = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc) 
-          z04 :  {!!} -- (sup : HOD) (as : A ∋ sup) → & sup o< osuc x → sup < ZChain.fb zc1 as
-          z04 sup as s<x with trio< (& sup) x
+          z04 :  {!!} -- (sup : HOD) (as : A ∋ sup) → & sup o≤ osuc x → sup ≤ ZChain.fb zc1 as
+          z04 sup as s≤x with trio< (& sup) x
           ... | tri≈ ¬a b ¬c = ⊥-elim (¬Ax (subst (λ k → odef A k) (trans b (sym &iso)) as) )  
-          ... | tri< a ¬b ¬c  = {!!} -- ZChain.¬x≤sup zc1 _ as ( subst (λ k → & sup o< k ) (sym (Oprev.oprev=x op)) a )
-          ... | tri> ¬a ¬b c with  osuc-≡< s<x
+          ... | tri< a ¬b ¬c  = {!!} -- ZChain.¬x≤sup zc1 _ as ( subst (λ k → & sup o≤ k ) (sym (Oprev.oprev=x op)) a )
+          ... | tri> ¬a ¬b c with  osuc-≡< s≤x
           ... | case1 eq = ⊥-elim (¬Ax (subst (λ k → odef A k) (trans eq (sym &iso)) as) )  
           ... | case2 lt = ⊥-elim (¬a lt )
      ... | yes ax = z06 where -- we have previous ordinal and A ∋ x
           px = Oprev.oprev op
-          zc1 : ZChain A px _<_
+          zc1 : ZChain A px _≤_
           zc1 = prev px (subst (λ k → px o< k) (Oprev.oprev=x op) <-osuc) 
-          z06 : ZChain A x _<_
+          z06 : ZChain A x _≤_
           z06 with is-o∅ (& (Gtx ax))
           ... | yes nogt = ⊥-elim (no-maximal nomx x ⟪ subst (λ k → odef A k) &iso ax , x-is-maximal ⟫ ) where -- no larger element, so it is maximal
-              x-is-maximal :  (m : Ordinal) → odef A m → ¬ (* x < * m)
-              x-is-maximal m am  =  ¬x<m   where
-                 ¬x<m :  ¬ (* x < * m)
-                 ¬x<m x<m = ∅< {Gtx ax} {* m} ⟪ subst (λ k → odef A k) (sym &iso) am , subst (λ k → * x < k ) (cong (*) (sym &iso)) x<m ⟫  (≡o∅→=od∅ nogt) 
+              x-is-maximal :  (m : Ordinal) → odef A m → ¬ (* x ≤ * m)
+              x-is-maximal m am  =  ¬x≤m   where
+                 ¬x≤m :  ¬ (* x ≤ * m)
+                 ¬x≤m x≤m = ∅< {Gtx ax} {* m} ⟪ subst (λ k → odef A k) (sym &iso) am , subst (λ k → * x ≤ k ) (cong (*) (sym &iso)) x≤m ⟫  (≡o∅→=od∅ nogt) 
           ... | no not = {!!} where
      ind nomx x prev | no ¬ox with trio< (& A) x   --- limit ordinal case
      ... | tri< a ¬b ¬c = {!!} where
-          zc1 : ZChain A (& A) _<_
+          zc1 : ZChain A (& A) _≤_
           zc1 = prev (& A) a 
      ... | tri≈ ¬a b ¬c = {!!} where
      ... | tri> ¬a ¬b c with ODC.∋-p O A (* x)
      ... | no ¬Ax = {!!} where
      ... | yes ax with is-o∅ (& (Gtx ax))
      ... | yes nogt = ⊥-elim (no-maximal nomx x ⟪ subst (λ k → odef A k) &iso ax , x-is-maximal ⟫ ) where -- no larger element, so it is maximal
-              x-is-maximal :  (m : Ordinal) → odef A m → ¬ (* x < * m)
-              x-is-maximal m am  =  ¬x<m   where
-                 ¬x<m :  ¬ (* x < * m)
-                 ¬x<m x<m = ∅< {Gtx ax} {* m} ⟪ subst (λ k → odef A k) (sym &iso) am , subst (λ k → * x < k ) (cong (*) (sym &iso)) x<m ⟫  (≡o∅→=od∅ nogt) 
+              x-is-maximal :  (m : Ordinal) → odef A m → ¬ (* x ≤ * m)
+              x-is-maximal m am  =  ¬x≤m   where
+                 ¬x≤m :  ¬ (* x ≤ * m)
+                 ¬x≤m x≤m = ∅< {Gtx ax} {* m} ⟪ subst (λ k → odef A k) (sym &iso) am , subst (λ k → * x ≤ k ) (cong (*) (sym &iso)) x≤m ⟫  (≡o∅→=od∅ nogt) 
      ... | no not = {!!} where
-     zorn00 : Maximal A _<_
+     zorn00 : Maximal A _≤_
      zorn00 with is-o∅ ( & HasMaximal )
-     ... | no not = record { maximal = ODC.minimal O HasMaximal  (λ eq → not (=od∅→≡o∅ eq)) ; A∋maximal = zorn01 ; ¬maximal<x  = zorn02 } where
+     ... | no not = record { maximal = ODC.minimal O HasMaximal  (λ eq → not (=od∅→≡o∅ eq)) ; A∋maximal = zorn01 ; ¬maximal≤x  = zorn02 } where
          -- yes we have the maximal
          hasm :  odef HasMaximal ( & ( ODC.minimal O HasMaximal  (λ eq → not (=od∅→≡o∅ eq)) ) )
          hasm =  ODC.x∋minimal  O HasMaximal  (λ eq → not (=od∅→≡o∅ eq))
          zorn01 :  A ∋ ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq))
          zorn01 =  proj1 hasm
-         zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) < x)
-         zorn02 {x} ax m<x = ((proj2 hasm) (& x) ax) (subst₂ (λ j k → j < k) (sym *iso) (sym *iso) m<x )
+         zorn02 : {x : HOD} → A ∋ x → ¬ (ODC.minimal O HasMaximal (λ eq → not (=od∅→≡o∅ eq)) ≤ x)
+         zorn02 {x} ax m≤x = ((proj2 hasm) (& x) ax) (subst₂ (λ j k → j ≤ k) (sym *iso) (sym *iso) m≤x )
      ... | yes ¬Maximal = ⊥-elim {!!} where
          -- if we have no maximal, make ZChain, which contradict SUP condition
-         z : (x : Ordinal) → HasMaximal =h= od∅  → ZChain A x _<_ 
+         z : (x : Ordinal) → HasMaximal =h= od∅  → ZChain A x _≤_ 
          z x nomx = TransFinite (ind nomx) x
 
 _⊆'_ : ( A B : HOD ) → Set n