changeset 54:33fb8228ace9

fix selection axiom
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 27 May 2019 21:58:17 +0900
parents d13a10a1723e
children 9c0a5e28a572
files ordinal-definable.agda zf.agda
diffstat 2 files changed, 58 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/ordinal-definable.agda	Mon May 27 16:14:35 2019 +0900
+++ b/ordinal-definable.agda	Mon May 27 21:58:17 2019 +0900
@@ -186,11 +186,11 @@
 o<> ox oy (case2 x<y) (case2 y<x) with d<→lv  x<y
 ... | refl = trio<> x<y y<x
 
-o<¬≡ : {n : Level } ( ox oy : Ordinal {n}) → ox ≡ oy  → ox o<  oy  → ⊥
+o<¬≡ : {n : Level } ( ox oy : Ordinal {n}) → ox ≡ oy  → ox o< oy  → ⊥
 o<¬≡ ox ox refl (case1 lt) =  =→¬< lt
 o<¬≡ ox ox refl (case2 (s< lt)) = trio<≡ refl lt
 
-o<→o> : {n : Level} →  { x y : OD {n} } →  (x == y ) → (od→ord x ) o< ( od→ord y) → ⊥
+o<→o> : {n : Level} →  { x y : OD {n} } →  (x == y) → (od→ord x ) o< ( od→ord y) → ⊥
 o<→o> {n} {x} {y} record { eq→ = xy ; eq← = yx } (case1 lt) with
      yx (def-subst {n} {ord→od (od→ord y)} {od→ord (ord→od (od→ord x))} (o<→c< (case1 lt )) oiso diso )
 ... | oyx with o<¬≡ (od→ord x) (od→ord x) refl (c<→o< oyx )
@@ -215,6 +215,12 @@
 tri-c< {n} x y | tri≈ ¬a b ¬c = tri≈ (o≡→¬c< b) (ord→== b) (o≡→¬c< (sym b))
 tri-c< {n} x y | tri> ¬a ¬b c = tri>  ( o<→¬c> c) (λ eq → o<→¬== c (eq-sym eq ) ) (def-subst (o<→c< c) oiso diso)
 
+c<> : {n : Level } { x y : OD {suc n}} → x c<  y  → y c< x  →  ⊥
+c<> {n} {x} {y} x<y y<x with tri-c< x y
+c<> {n} {x} {y} x<y y<x | tri< a ¬b ¬c = ¬c y<x
+c<> {n} {x} {y} x<y y<x | tri≈ ¬a b ¬c = o<→o> b ( c<→o< x<y )
+c<> {n} {x} {y} x<y y<x | tri> ¬a ¬b c = ¬a x<y
+
 ∅2 : {n : Level} →  { x : OD {n} } → o∅ {n} o<  od→ord x → ¬ ( x  == od∅ {n} )
 ∅2 {n} {x} lt record { eq→ = eq→ ; eq← = eq← } with ominimal (od→ord x ) lt
 ... | min with eq→ ( def-subst (o<→c< (Minimumo.min<x min)) oiso refl )
@@ -241,9 +247,9 @@
    lemma : ¬ od→ord x ≡ o∅
    lemma eq = not ( ∅7  eq )
 
-OD→ZF : {n : Level} → ZF {suc n} {n}
+OD→ZF : {n : Level} → ZF {suc (suc n)} {suc n}
 OD→ZF {n}  = record { 
-    ZFSet = OD {n}
+    ZFSet = OD {suc n}
     ; _∋_ = _∋_ 
     ; _≈_ = _==_ 
     ; ∅  = od∅
@@ -255,20 +261,20 @@
     ; infinite = record { def = λ x → x ≡ record { lv = Suc Zero ; ord = ℵ Zero  }  }
     ; isZF = isZF 
  } where
-    Replace : OD {n} → (OD {n} → OD {n} ) → OD {n}
+    Replace : OD {suc n} → (OD {suc n} → OD {suc n} ) → OD {suc n}
     Replace X ψ = sup-od ψ
-    Select : OD {n} → (OD {n} → Set n ) → OD {n}
-    Select X ψ = record { def = λ x →  def X  x → ψ ( ord→od x ) } 
-    _,_ : OD {n} → OD {n} → OD {n}
+    Select : OD {suc n} → (OD {suc n} → Set (suc n) ) → OD {suc n}
+    Select X ψ = record { def = λ x →  ( def X  x ∧  ψ ( ord→od x )) } 
+    _,_ : OD {suc n} → OD {suc n} → OD {suc n}
     x , y = record { def = λ z → ( (z ≡ od→ord x ) ∨ ( z ≡ od→ord y )) }
-    Union : OD {n} → OD {n}
-    Union x = record { def = λ y → {z : Ordinal {n}} → def x z  → def (ord→od z) y  }
-    Power : OD {n} → OD {n}
-    Power x = record { def = λ y → (z : Ordinal {n} ) → ( def x y ∧ def (ord→od z) y )  }
-    ZFSet = OD {n}
-    _∈_ : ( A B : ZFSet  ) → Set n
+    Union : OD {suc n} → OD {suc n}
+    Union x = record { def = λ y → {z : Ordinal {suc n}} → def x z  → def (ord→od z) y  }
+    Power : OD {suc n} → OD {suc n}
+    Power x = record { def = λ y → (z : Ordinal {suc n} ) → ( def x y ∧ def (ord→od z) y )  }
+    ZFSet = OD {suc n}
+    _∈_ : ( A B : ZFSet  ) → Set (suc n)
     A ∈ B = B ∋ A
-    _⊆_ : ( A B : ZFSet  ) → ∀{ x : ZFSet } →  Set n
+    _⊆_ : ( A B : ZFSet  ) → ∀{ x : ZFSet } →  Set (suc n)
     _⊆_ A B {x} = A ∋ x →  B ∋ x
     _∩_ : ( A B : ZFSet  ) → ZFSet
     A ∩ B = Select (A , B) (  λ x → ( A ∋ x ) ∧ (B ∋ x) )
@@ -277,7 +283,7 @@
     infixr  200 _∈_
     infixr  230 _∩_ _∪_
     infixr  220 _⊆_
-    isZF : IsZF (OD {n})  _∋_  _==_ od∅ _,_ Union Power Select Replace (record { def = λ x → x ≡ record { lv = Suc Zero ; ord = ℵ Zero }  })
+    isZF : IsZF (OD {suc n})  _∋_  _==_ od∅ _,_ Union Power Select Replace (record { def = λ x → x ≡ record { lv = Suc Zero ; ord = ℵ Zero }  })
     isZF = record {
            isEquivalence  = record { refl = eq-refl ; sym = eq-sym; trans = eq-trans }
        ;   pair  = pair
@@ -296,35 +302,54 @@
      } where
          open _∧_ 
          open Minimumo
-         pair : (A B : OD {n} ) → ((A , B) ∋ A) ∧  ((A , B) ∋ B)
+         pair : (A B : OD {suc n} ) → ((A , B) ∋ A) ∧  ((A , B) ∋ B)
          proj1 (pair A B ) =  case1 refl 
          proj2 (pair A B ) =  case2 refl 
-         empty : (x : OD {n} ) → ¬  (od∅ ∋ x)
+         empty : (x : OD {suc n} ) → ¬  (od∅ ∋ x)
          empty x ()
-         union→ : (X x y : OD {n} ) → (X ∋ x) →  (x ∋ y) →  (Union X ∋ y)
+         union→ : (X x y : OD {suc n} ) → (X ∋ x) →  (x ∋ y) →  (Union X ∋ y)
          union→ X x y X∋x x∋y = {!!}  where
-            lemma : {z : Ordinal {n} } → def X z → z ≡ od→ord y
+            lemma : {z : Ordinal {suc n} } → def X z → z ≡ od→ord y
             lemma {z} X∋z = {!!}
-         selection : {ψ : OD → Set n} (X y : OD) → Select X ψ ∋ y → ψ y
-         selection = {!!}
-         minord : (x : OD {n} ) → ¬ (x == od∅ )→ Minimumo (od→ord x)
+         ψiso :  {ψ : OD {suc n} → Set (suc n)} {x y : OD {suc n}} → ψ x → x ≡ y   → ψ y
+         ψiso {ψ} t refl = t
+         selection : {ψ : OD → Set (suc n)} {X y : OD} → ((X ∋ y) ∧ ψ y) ⇔ (Select X ψ ∋ y)
+         selection {ψ} {X} {y} = record {
+              proj1 = λ cond → record { proj1 = proj1 cond ; proj2 = ψiso {ψ} (proj2 cond) (sym oiso)  }
+            ; proj2 = λ select → record { proj1 = proj1 select  ; proj2 =  ψiso {ψ} (proj2 select) oiso  }
+           }
+         minord : (x : OD {suc n} ) → ¬ (x == od∅ )→ Minimumo (od→ord x)
          minord x not = ominimal (od→ord x) (∅9 x not)
-         minimul : (x : OD {n} ) → ¬ (x == od∅ )→ OD {n} 
+         minimul : (x : OD {suc n} ) → ¬ (x == od∅ )→ OD {suc n} 
          minimul x  not = ord→od ( mino (minord x not))
-         minimul<x : (x : OD {n} ) →  (not :  ¬ x == od∅ ) → x ∋ minimul x not
+         minimul<x : (x : OD {suc n} ) →  (not :  ¬ x == od∅ ) → x ∋ minimul x not
          minimul<x x not = lemma0 (min<x (minord x not)) where
             lemma0 : mino (minord x not)  o< (od→ord x) → def x (od→ord (ord→od (mino (minord x not))))
-            lemma0 m<x = def-subst {n} {ord→od (od→ord x)} {od→ord (ord→od (mino (minord x not)))} (o<→c< m<x) oiso refl
+            lemma0 m<x = def-subst {suc n} {ord→od (od→ord x)} {od→ord (ord→od (mino (minord x not)))} (o<→c< m<x) oiso refl
          regularity :  (x : OD) (not : ¬ (x == od∅)) →
             (x ∋ minimul x not) ∧ (Select (minimul x not) (λ x₁ → (minimul x not ∋ x₁) ∧ (x ∋ x₁)) == od∅)
          proj1 ( regularity x non ) =  minimul<x x non 
          proj2 ( regularity x non ) = reg1 where
-            reg2 : {y : Ordinal} → ( def (minimul x non) y )
-               → ( def (minimul x non) y → (minimul x non ∋ ord→od y) ∧ (x ∋ ord→od y) ) → ⊥ 
-            reg2 = {!!}
-            reg0 : {y : Ordinal {n}} → Minimumo (od→ord x) → def (Select (minimul x non) (λ z → (minimul x non ∋ z) ∧ (x ∋ z))) y → def od∅ y
-            reg0 {y} m t with {!!} y (mino (minord x non))
-            ... | lt = {!!}
+            reg2 : {y : Ordinal} → ( def (minimul x non) y ∧ (minimul x non ∋ ord→od y) ∧ (x ∋ ord→od y) ) → ⊥ 
+            reg2 {y} t with proj1 t | proj1 (proj2 t) | proj2 (proj2 t)
+            ... | p1 | p2 | p3 = ?
+            reg0 : {y : Ordinal {suc n}} → Minimumo (od→ord x) → def (Select (minimul x non) (λ z → (minimul x non ∋ z) ∧ (x ∋ z))) y → def od∅ y
+            reg0 {y} m t with trio< y (mino (minord x non)) 
+            reg0 {y} m t | tri< a ¬b ¬c with reg2 {y} ( record {
+                    proj1 = (def-subst {suc n} {minimul x  non} (o<→c< a) refl diso ) 
+                  ; proj2 = record { proj1 = {!!}
+                  ; proj2 = {!!}
+                 }} )
+            ... | ()
+            reg0 {y} m t | tri≈ ¬a refl ¬c = lemma y ( mino (minord x non) ) {!!} where
+               lemma : ( ox oy : Ordinal {suc n} ) → ord→od ox c< ord→od oy  → Lift (suc n) ⊥
+               lemma ox oy lt =  lift ( o≡→¬c< {suc n} refl lt )
+               -- o≡→¬c< {suc n} refl ( c<→o< {suc n} {ord→od y} {ord→od (od→ord (minimul x non))} (proj1 t) )
+            reg0 {y} m t | tri> ¬a ¬b c = lemma y ( mino (minord x non) ) {!!} {!!} where
+               lemma : ( ox oy : Ordinal {suc n} ) → ox o< oy   → ord→od oy c< ord→od ox  → Lift (suc n) ⊥
+               lemma ox oy (case1 x) yc<x = {!!}
+               lemma ox oy (case2 lt) yc<x with d<→lv lt
+               ... | refl = lift ( o<→¬c> {suc n}  (case2 {!!}) yc<x  )
             reg1 :  Select (minimul x non) (λ x₁ → (minimul x non ∋ x₁) ∧ (x ∋ x₁)) == od∅
             reg1 = record { eq→ =  reg0 (minord x non) ; eq← = λ () }
 
--- a/zf.agda	Mon May 27 16:14:35 2019 +0900
+++ b/zf.agda	Mon May 27 21:58:17 2019 +0900
@@ -76,7 +76,7 @@
      -- infinity : ∃ A ( ∅ ∈ A ∧ ∀ x ∈ A ( x ∪ { x } ∈ A ) )
      infinity∅ :  ∅ ∈ infinite
      infinity :  ∀( X x : ZFSet  ) → x ∈ infinite →  ( x ∪ Select X (  λ y → x ≈ y )) ∈ infinite 
-     selection : { ψ : ZFSet → Set m } → ∀ ( X y : ZFSet  ) →  ( y  ∈  Select X ψ )  → ψ y
+     selection : { ψ : ZFSet → Set m } → ∀ { X y : ZFSet  } →  ( ( y ∈ X ) ∧ ψ y ) ⇔ (y ∈  Select X ψ ) 
      -- replacement : ∀ x ∀ y ∀ z ( ( ψ ( x , y ) ∧ ψ ( x , z ) ) → y = z ) → ∀ X ∃ A ∀ y ( y ∈ A ↔ ∃ x ∈ X ψ ( x , y ) )
      replacement : {ψ : ZFSet → ZFSet} → ∀ ( X x : ZFSet  ) →  ( ψ x ∈  Replace X ψ )