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