changeset 226:176ff97547b4

set theortic function definition using sup
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 11 Aug 2019 13:05:17 +0900
parents 5f48299929ac
children a4cdfc84f65f
files OD.agda cardinal.agda
diffstat 2 files changed, 40 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/OD.agda	Sun Aug 11 08:10:13 2019 +0900
+++ b/OD.agda	Sun Aug 11 13:05:17 2019 +0900
@@ -477,3 +477,9 @@
          choice : (X : OD  ) → {A : OD } → ( X∋A : X ∋ A ) → (not : ¬ ( A == od∅ )) → A ∋ choice-func X not X∋A 
          choice X {A} X∋A not = x∋minimul A not
 
+_,_ = ZF._,_ OD→ZF
+Union = ZF.Union OD→ZF
+Power = ZF.Power OD→ZF
+Select = ZF.Select OD→ZF
+Replace = ZF.Replace OD→ZF
+isZF = ZF.isZF  OD→ZF
--- a/cardinal.agda	Sun Aug 11 08:10:13 2019 +0900
+++ b/cardinal.agda	Sun Aug 11 13:05:17 2019 +0900
@@ -22,11 +22,31 @@
 open Bool
 
 
-func : (f : Ordinal → Ordinal ) → ( dom cod : OD ) → OD 
-func f dom cod = record { def = λ z → {x y : Ordinal} → (z ≡ omax x y ) ∧  def dom x  ∧ def cod (f x ) }
+func : (f : Ordinal → Ordinal ) → ( dom : OD ) → OD 
+func f dom = Replace dom ( λ x →  x , (ord→od (f (od→ord x) )))
+
+record _⊗_  (A B : Ordinal) : Set n where
+   field
+      π1 : Ordinal
+      π2 : Ordinal
+      A∋π1 : def (ord→od A)  π1
+      B∋π2 : def (ord→od B)  π2
+
+Func :  ( A B : OD ) → OD
+Func A B = record { def = λ x → (od→ord A) ⊗ (od→ord B) }
 
--- Func :  ( dom cod : OD ) → OD
--- Func dom cod = record { def = λ x → x o< sup-o ( λ y → (f : Ordinal → Ordinal ) → y ≡ od→ord (func f dom cod) )  }
+π1 :  { A B x : OD } → Func A B ∋ x → OD
+π1 {A} {B} {x} p = ord→od (_⊗_.π1 p)
+
+π2 :  { A B x : OD } → Func A B ∋ x → OD
+π2 {A} {B} {x} p = ord→od (_⊗_.π2 p)
+
+Func→func : { dom cod : OD } → (f : OD )  → Func dom cod ∋ f → (Ordinal → Ordinal )
+Func→func {dom} {cod} f lt x = sup-o ( λ y → lemma  y ) where
+   lemma : Ordinal → Ordinal
+   lemma y with p∨¬p ( _⊗_.π1 lt ≡ x )
+   lemma y | case1 refl = _⊗_.π2 lt
+   lemma y | case2 not = o∅
 
 ------------
 --
@@ -37,10 +57,11 @@
 --
 record Onto  (X Y : OD )  : Set n where
    field
-       xmap : (x : Ordinal ) → def X x → Ordinal  
-       ymap : (y : Ordinal ) → def Y y → Ordinal  
-       ymap-on-X  : {y :  Ordinal  } → (lty : def Y y ) → def X (ymap y lty)  
-       onto-iso   : {y :  Ordinal  } → (lty : def Y y ) → xmap  ( ymap y lty ) (ymap-on-X lty ) ≡ y
+       xmap : Ordinal 
+       ymap : Ordinal 
+       xfunc : def (Func X Y) xmap 
+       yfunc : def (Func Y X) ymap 
+       onto-iso   : {y :  Ordinal  } → (lty : def Y y ) → Func→func (ord→od xmap) xfunc ( Func→func (ord→od ymap) yfunc y )  ≡ y
 
 record Cardinal  (X  : OD ) : Set n where
    field
@@ -51,19 +72,15 @@
 cardinal :  (X  : OD ) → Cardinal X
 cardinal  X = record {
        cardinal = sup-o ( λ x → proj1 ( cardinal-p x) )
-     ; conto =  x∋minimul onto-set ∃-onto-set 
+     ; conto = onto
      ; cmax = cmax
    } where
     cardinal-p : (x  : Ordinal ) →  ( Ordinal  ∧ Dec (Onto (Ord x) X) )
     cardinal-p x with p∨¬p ( Onto (Ord x) X ) 
     cardinal-p x | case1 True = record { proj1 = x ; proj2 = yes True }
     cardinal-p x | case2 False = record { proj1 = o∅ ; proj2 = no False }
-    onto-set : OD 
-    onto-set = record { def = λ x →  Onto (Ord (sup-o (λ x → proj1 (cardinal-p x)))) X }
-    ∃-onto-set : ¬ ( onto-set == od∅ )
-    ∃-onto-set record { eq→ = eq→ ; eq← = eq← } = ¬x<0 {_} ( eq→ lemma ) where
-          lemma : Onto (Ord (sup-o (λ x → proj1 (cardinal-p x)))) X 
-          lemma = {!!}
+    onto : Onto (Ord (sup-o (λ x → proj1 (cardinal-p x)))) X
+    onto = {!!}
     cmax : (y : Ordinal) → sup-o (λ x → proj1 (cardinal-p x)) o< y → ¬ Onto (Ord y) X
     cmax y lt ontoy = o<> lt (o<-subst  {_} {_} {y} {sup-o (λ x → proj1 (cardinal-p x))}
        (sup-o<  {λ x → proj1 ( cardinal-p x)}{y}  ) lemma refl ) where
@@ -72,6 +89,8 @@
           lemma | case1 x = refl
           lemma | case2 not = ⊥-elim ( not ontoy )
 
+
+-----
 --  All cardinal is ℵ0,  since we are working on Countable Ordinal, 
 --  Power ω is larger than ℵ0, so it has no cardinal.