Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate cardinal.agda @ 233:af60c40298a4
function continue
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 12 Aug 2019 13:28:59 +0900 |
parents | 1b1620e2053c |
children | e06b76e5b682 |
rev | line source |
---|---|
16 | 1 open import Level |
224 | 2 open import Ordinals |
3 module cardinal {n : Level } (O : Ordinals {n}) where | |
3 | 4 |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
5 open import zf |
219 | 6 open import logic |
224 | 7 import OD |
23 | 8 open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ ) |
224 | 9 open import Relation.Binary.PropositionalEquality |
14
e11e95d5ddee
separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
11
diff
changeset
|
10 open import Data.Nat.Properties |
6 | 11 open import Data.Empty |
12 open import Relation.Nullary | |
13 open import Relation.Binary | |
14 open import Relation.Binary.Core | |
15 | |
224 | 16 open inOrdinal O |
17 open OD O | |
219 | 18 open OD.OD |
29
fce60b99dc55
posturate OD is isomorphic to Ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
19 |
120 | 20 open _∧_ |
213
22d435172d1a
separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
210
diff
changeset
|
21 open _∨_ |
22d435172d1a
separate logic and nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
210
diff
changeset
|
22 open Bool |
44
fcac01485f32
od→lv : {n : Level} → OD {n} → Nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
43
diff
changeset
|
23 |
230 | 24 -- we have to work on Ordinal to keep OD Level n |
25 -- since we use p∨¬p which works only on Level n | |
225 | 26 |
233 | 27 <_,_> : (x y : OD) → OD |
28 < x , y > = (x , x ) , (x , y ) | |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
29 |
233 | 30 record SetProduct ( A B : OD ) (x : Ordinal ) : Set n where |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
31 field |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
32 π1 : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
33 π2 : Ordinal |
233 | 34 A∋π1 : def A π1 |
35 B∋π2 : def B π2 | |
36 -- opair : x ≡ od→ord (Ord ( omax (omax π1 π1) (omax π1 π2) )) -- < π1 , π2 > | |
37 | |
38 open SetProduct | |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
39 |
233 | 40 _⊗_ : (A B : OD) → OD |
41 A ⊗ B = record { def = λ x → SetProduct A B x } | |
42 -- A ⊗ B = record { def = λ x → (y z : Ordinal) → def A y ∧ def B z ∧ ( x ≡ od→ord (< ord→od y , ord→od z >) ) } | |
43 | |
44 -- Power (Power ( A ∪ B )) ∋ ( A ⊗ B ) | |
225 | 45 |
233 | 46 Func : ( A B : OD ) → OD |
47 Func A B = record { def = λ x → def (Power (A ⊗ B)) x } | |
48 | |
49 -- power→ : ( A t : OD) → Power A ∋ t → {x : OD} → t ∋ x → ¬ ¬ (A ∋ x) | |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
50 |
233 | 51 func←od : { dom cod : OD } → {f : OD } → Func dom cod ∋ f → (Ordinal → Ordinal ) |
52 func←od {dom} {cod} {f} lt x = sup-o ( λ y → lemma y ) where | |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
53 lemma : Ordinal → Ordinal |
233 | 54 lemma y with IsZF.power→ isZF (dom ⊗ cod) f lt |
55 lemma y | p with double-neg-eilm ( p {ord→od y} {!!} ) -- p : {x : OD} → f ∋ x → ¬ ¬ (dom ⊗ cod ∋ x) | |
56 ... | t = π2 t | |
57 | |
58 func→od : (f : Ordinal → Ordinal ) → ( dom : OD ) → OD | |
59 func→od f dom = Replace dom ( λ x → < x , ord→od (f (od→ord x)) > ) | |
60 | |
225 | 61 |
227 | 62 -- contra position of sup-o< |
63 -- | |
64 | |
228 | 65 postulate |
66 -- contra-position of mimimulity of supermum required in Cardinal | |
67 sup-x : ( Ordinal → Ordinal ) → Ordinal | |
68 sup-lb : { ψ : Ordinal → Ordinal } → {z : Ordinal } → z o< sup-o ψ → z o< osuc (ψ (sup-x ψ)) | |
227 | 69 |
219 | 70 ------------ |
71 -- | |
72 -- Onto map | |
73 -- def X x -> xmap | |
74 -- X ---------------------------> Y | |
75 -- ymap <- def Y y | |
76 -- | |
224 | 77 record Onto (X Y : OD ) : Set n where |
219 | 78 field |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
79 xmap : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
80 ymap : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
81 xfunc : def (Func X Y) xmap |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
82 yfunc : def (Func Y X) ymap |
233 | 83 onto-iso : {y : Ordinal } → (lty : def Y y ) → func←od {!!} ( func←od {!!} y ) ≡ y |
230 | 84 |
85 open Onto | |
86 | |
87 onto-restrict : {X Y Z : OD} → Onto X Y → ({x : OD} → _⊆_ Z Y {x}) → Onto X Z | |
88 onto-restrict {X} {Y} {Z} onto Z⊆Y = record { | |
89 xmap = xmap1 | |
90 ; ymap = zmap | |
91 ; xfunc = xfunc1 | |
92 ; yfunc = zfunc | |
93 ; onto-iso = onto-iso1 | |
94 } where | |
95 xmap1 : Ordinal | |
96 xmap1 = od→ord (Select (ord→od (xmap onto)) {!!} ) | |
97 zmap : Ordinal | |
98 zmap = {!!} | |
99 xfunc1 : def (Func X Z) xmap1 | |
100 xfunc1 = {!!} | |
101 zfunc : def (Func Z X) zmap | |
102 zfunc = {!!} | |
233 | 103 onto-iso1 : {z : Ordinal } → (ltz : def Z z ) → func←od {!!} ( func←od zfunc z ) ≡ z |
230 | 104 onto-iso1 = {!!} |
105 | |
51 | 106 |
224 | 107 record Cardinal (X : OD ) : Set n where |
219 | 108 field |
224 | 109 cardinal : Ordinal |
230 | 110 conto : Onto X (Ord cardinal) |
111 cmax : ( y : Ordinal ) → cardinal o< y → ¬ Onto X (Ord y) | |
151 | 112 |
224 | 113 cardinal : (X : OD ) → Cardinal X |
114 cardinal X = record { | |
219 | 115 cardinal = sup-o ( λ x → proj1 ( cardinal-p x) ) |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
116 ; conto = onto |
219 | 117 ; cmax = cmax |
118 } where | |
230 | 119 cardinal-p : (x : Ordinal ) → ( Ordinal ∧ Dec (Onto X (Ord x) ) ) |
120 cardinal-p x with p∨¬p ( Onto X (Ord x) ) | |
121 cardinal-p x | case1 True = record { proj1 = x ; proj2 = yes True } | |
219 | 122 cardinal-p x | case2 False = record { proj1 = o∅ ; proj2 = no False } |
229 | 123 S = sup-o (λ x → proj1 (cardinal-p x)) |
230 | 124 lemma1 : (x : Ordinal) → ((y : Ordinal) → y o< x → Lift (suc n) (y o< (osuc S) → Onto X (Ord y))) → |
125 Lift (suc n) (x o< (osuc S) → Onto X (Ord x) ) | |
229 | 126 lemma1 x prev with trio< x (osuc S) |
127 lemma1 x prev | tri< a ¬b ¬c with osuc-≡< a | |
230 | 128 lemma1 x prev | tri< a ¬b ¬c | case1 x=S = lift ( λ lt → {!!} ) |
129 lemma1 x prev | tri< a ¬b ¬c | case2 x<S = lift ( λ lt → lemma2 ) where | |
130 lemma2 : Onto X (Ord x) | |
131 lemma2 with prev {!!} {!!} | |
132 ... | lift t = t {!!} | |
229 | 133 lemma1 x prev | tri≈ ¬a b ¬c = lift ( λ lt → ⊥-elim ( o<¬≡ b lt )) |
134 lemma1 x prev | tri> ¬a ¬b c = lift ( λ lt → ⊥-elim ( o<> c lt )) | |
230 | 135 onto : Onto X (Ord S) |
136 onto with TransFinite {λ x → Lift (suc n) ( x o< osuc S → Onto X (Ord x) ) } lemma1 S | |
137 ... | lift t = t <-osuc | |
138 cmax : (y : Ordinal) → S o< y → ¬ Onto X (Ord y) | |
229 | 139 cmax y lt ontoy = o<> lt (o<-subst {_} {_} {y} {S} |
224 | 140 (sup-o< {λ x → proj1 ( cardinal-p x)}{y} ) lemma refl ) where |
219 | 141 lemma : proj1 (cardinal-p y) ≡ y |
230 | 142 lemma with p∨¬p ( Onto X (Ord y) ) |
219 | 143 lemma | case1 x = refl |
144 lemma | case2 not = ⊥-elim ( not ontoy ) | |
217 | 145 |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
146 |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
147 ----- |
219 | 148 -- All cardinal is ℵ0, since we are working on Countable Ordinal, |
149 -- Power ω is larger than ℵ0, so it has no cardinal. | |
218 | 150 |
151 | |
152 |