Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate cardinal.agda @ 237:521290e85527
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 19 Aug 2019 00:37:35 +0900 |
parents | 650bdad56729 |
children | a8c6239176db |
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 |
237 | 30 Ord< : {x y : Ordinal } → x o< y → od→ord (Ord x) o< od→ord (Ord y) -- x o< y = Ord y ∋ x → ox o< od→ord (Ord y) |
31 Ord< {x} {y} lt with trio< (od→ord (Ord x)) (od→ord (Ord y)) | |
32 Ord< {x} {y} lt | tri< a ¬b ¬c = a | |
33 Ord< {x} {y} lt | tri≈ ¬a b ¬c = ⊥-elim ( o<¬≡ refl (def-subst {Ord y} {x} {Ord x} {x} lt -- Ord x ∋ x | |
34 (subst₂ (λ j k → j ≡ k) oiso oiso (cong (λ k → ord→od k )(sym b)) )refl )) -- Ord x ≡ Ord y | |
35 Ord< {x} {y} lt | tri> ¬a ¬b c = ? where | |
36 lemma : ¬ ( Ord x ∋ ord→od x ) | |
37 lemma lt = ⊥-elim ( o<¬≡ refl ( def-subst {_} {_} {Ord x} {x} lt refl diso )) | |
38 lemma1 : od→ord (Ord y) o< od→ord (Ord x) → x o< od→ord (Ord x ) | |
39 lemma1 lt1 = ordtrans ( o<-subst (c<→o< lt ) diso refl ) {!!} | |
40 | |
41 --- Ord (osuc ox) ∋ x | |
42 --- ox o< od→ord (Ord (osuc ox)) | |
43 --- osuc ox ≡ od→ord (Ord (osuc ox)) | |
44 | |
45 opair : {x y : OD} → ( < x , y > ∋ x ) ∧ ( < x , y > ∋ y ) | |
46 opair {x} {y} = record { proj1 = lemma ; proj2 = {!!} } where | |
47 ox = (od→ord x) | |
48 oy = (od→ord y) | |
49 -- < x , y > ∋ x -- od→ord (Ord (omax ox ox )) | |
50 lemma : ox o< (omax (od→ord (x , x)) (od→ord (x , y))) | |
51 lemma with trio< ox oy | |
52 lemma | tri< a ¬b ¬c with omax< ox oy a | omxx ox | |
53 ... | eq | eq1 = {!!} | |
54 lemma | tri≈ ¬a b ¬c = {!!} | |
55 lemma | tri> ¬a ¬b c = {!!} | |
56 | |
236 | 57 record SetProduct ( A B : OD ) : Set n where |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
58 field |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
59 π1 : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
60 π2 : Ordinal |
233 | 61 A∋π1 : def A π1 |
62 B∋π2 : def B π2 | |
63 -- opair : x ≡ od→ord (Ord ( omax (omax π1 π1) (omax π1 π2) )) -- < π1 , π2 > | |
64 | |
65 open SetProduct | |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
66 |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
67 ∋-p : (A x : OD ) → Dec ( A ∋ x ) |
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
68 ∋-p A x with p∨¬p ( A ∋ x ) |
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
69 ∋-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
|
70 ∋-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
|
71 |
233 | 72 _⊗_ : (A B : OD) → OD |
236 | 73 A ⊗ B = record { def = λ x → SetProduct A B } |
233 | 74 -- A ⊗ B = record { def = λ x → (y z : Ordinal) → def A y ∧ def B z ∧ ( x ≡ od→ord (< ord→od y , ord→od z >) ) } |
75 | |
76 -- Power (Power ( A ∪ B )) ∋ ( A ⊗ B ) | |
225 | 77 |
233 | 78 Func : ( A B : OD ) → OD |
79 Func A B = record { def = λ x → def (Power (A ⊗ B)) x } | |
80 | |
81 -- 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
|
82 |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
83 func←od : { dom cod : OD } → {f : Ordinal } → def (Func dom cod ) f → (Ordinal → Ordinal ) |
233 | 84 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
|
85 lemma : Ordinal → Ordinal |
235 | 86 lemma 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) |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
87 lemma y | p | no n = o∅ |
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
88 lemma y | p | yes f∋y with double-neg-eilm ( p {ord→od y} f∋y ) -- p : {x : OD} → f ∋ x → ¬ ¬ (dom ⊗ cod ∋ x) |
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
89 ... | t with decp ( x ≡ π1 t ) |
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
90 ... | yes _ = π2 t |
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
91 ... | no _ = o∅ |
233 | 92 |
236 | 93 |
233 | 94 func→od : (f : Ordinal → Ordinal ) → ( dom : OD ) → OD |
95 func→od f dom = Replace dom ( λ x → < x , ord→od (f (od→ord x)) > ) | |
96 | |
236 | 97 record Func←cd { dom cod : OD } {f : Ordinal } (f<F : def (Func dom cod ) f) : Set n where |
98 field | |
99 func-1 : Ordinal → Ordinal | |
100 func→od∈Func-1 : (Func dom (Ord (sup-o (λ x → func-1 x)) )) ∋ func→od func-1 dom | |
101 | |
102 func←od1 : { dom cod : OD } → {f : Ordinal } → (f<F : def (Func dom cod ) f ) → Func←cd {dom} {cod} {f} f<F | |
103 func←od1 {dom} {cod} {f} lt = record { func-1 = λ x → sup-o ( λ y → lemma x y ) ; func→od∈Func-1 = {!!} } where | |
104 lemma : Ordinal → Ordinal → Ordinal | |
105 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) | |
106 lemma x y | p | no n = o∅ | |
107 lemma x y | p | yes f∋y with double-neg-eilm ( p {ord→od y} f∋y ) -- p : {x : OD} → f ∋ x → ¬ ¬ (dom ⊗ cod ∋ x) | |
108 ... | t with decp ( x ≡ π1 t ) | |
109 ... | yes _ = π2 t | |
110 ... | no _ = o∅ | |
111 | |
112 func→od∈Func : (f : Ordinal → Ordinal ) ( dom : OD ) → (Func dom (Ord (sup-o (λ x → f x)) )) ∋ func→od f dom | |
113 func→od∈Func f dom = record { proj1 = {!!} ; proj2 = {!!} } | |
225 | 114 |
227 | 115 -- contra position of sup-o< |
116 -- | |
117 | |
235 | 118 -- postulate |
119 -- -- contra-position of mimimulity of supermum required in Cardinal | |
120 -- sup-x : ( Ordinal → Ordinal ) → Ordinal | |
121 -- sup-lb : { ψ : Ordinal → Ordinal } → {z : Ordinal } → z o< sup-o ψ → z o< osuc (ψ (sup-x ψ)) | |
227 | 122 |
219 | 123 ------------ |
124 -- | |
125 -- Onto map | |
126 -- def X x -> xmap | |
127 -- X ---------------------------> Y | |
128 -- ymap <- def Y y | |
129 -- | |
224 | 130 record Onto (X Y : OD ) : Set n where |
219 | 131 field |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
132 xmap : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
133 ymap : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
134 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
|
135 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
|
136 onto-iso : {y : Ordinal } → (lty : def Y y ) → |
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
137 func←od {X} {Y} {xmap} xfunc ( func←od yfunc y ) ≡ y |
230 | 138 |
139 open Onto | |
140 | |
141 onto-restrict : {X Y Z : OD} → Onto X Y → ({x : OD} → _⊆_ Z Y {x}) → Onto X Z | |
142 onto-restrict {X} {Y} {Z} onto Z⊆Y = record { | |
143 xmap = xmap1 | |
144 ; ymap = zmap | |
145 ; xfunc = xfunc1 | |
146 ; yfunc = zfunc | |
147 ; onto-iso = onto-iso1 | |
148 } where | |
149 xmap1 : Ordinal | |
150 xmap1 = od→ord (Select (ord→od (xmap onto)) {!!} ) | |
151 zmap : Ordinal | |
152 zmap = {!!} | |
153 xfunc1 : def (Func X Z) xmap1 | |
154 xfunc1 = {!!} | |
155 zfunc : def (Func Z X) zmap | |
156 zfunc = {!!} | |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
157 onto-iso1 : {z : Ordinal } → (ltz : def Z z ) → func←od xfunc1 ( func←od zfunc z ) ≡ z |
230 | 158 onto-iso1 = {!!} |
159 | |
51 | 160 |
224 | 161 record Cardinal (X : OD ) : Set n where |
219 | 162 field |
224 | 163 cardinal : Ordinal |
230 | 164 conto : Onto X (Ord cardinal) |
165 cmax : ( y : Ordinal ) → cardinal o< y → ¬ Onto X (Ord y) | |
151 | 166 |
224 | 167 cardinal : (X : OD ) → Cardinal X |
168 cardinal X = record { | |
219 | 169 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
|
170 ; conto = onto |
219 | 171 ; cmax = cmax |
172 } where | |
230 | 173 cardinal-p : (x : Ordinal ) → ( Ordinal ∧ Dec (Onto X (Ord x) ) ) |
174 cardinal-p x with p∨¬p ( Onto X (Ord x) ) | |
175 cardinal-p x | case1 True = record { proj1 = x ; proj2 = yes True } | |
219 | 176 cardinal-p x | case2 False = record { proj1 = o∅ ; proj2 = no False } |
229 | 177 S = sup-o (λ x → proj1 (cardinal-p x)) |
230 | 178 lemma1 : (x : Ordinal) → ((y : Ordinal) → y o< x → Lift (suc n) (y o< (osuc S) → Onto X (Ord y))) → |
179 Lift (suc n) (x o< (osuc S) → Onto X (Ord x) ) | |
229 | 180 lemma1 x prev with trio< x (osuc S) |
181 lemma1 x prev | tri< a ¬b ¬c with osuc-≡< a | |
230 | 182 lemma1 x prev | tri< a ¬b ¬c | case1 x=S = lift ( λ lt → {!!} ) |
183 lemma1 x prev | tri< a ¬b ¬c | case2 x<S = lift ( λ lt → lemma2 ) where | |
184 lemma2 : Onto X (Ord x) | |
185 lemma2 with prev {!!} {!!} | |
186 ... | lift t = t {!!} | |
229 | 187 lemma1 x prev | tri≈ ¬a b ¬c = lift ( λ lt → ⊥-elim ( o<¬≡ b lt )) |
188 lemma1 x prev | tri> ¬a ¬b c = lift ( λ lt → ⊥-elim ( o<> c lt )) | |
230 | 189 onto : Onto X (Ord S) |
190 onto with TransFinite {λ x → Lift (suc n) ( x o< osuc S → Onto X (Ord x) ) } lemma1 S | |
191 ... | lift t = t <-osuc | |
192 cmax : (y : Ordinal) → S o< y → ¬ Onto X (Ord y) | |
229 | 193 cmax y lt ontoy = o<> lt (o<-subst {_} {_} {y} {S} |
224 | 194 (sup-o< {λ x → proj1 ( cardinal-p x)}{y} ) lemma refl ) where |
219 | 195 lemma : proj1 (cardinal-p y) ≡ y |
230 | 196 lemma with p∨¬p ( Onto X (Ord y) ) |
219 | 197 lemma | case1 x = refl |
198 lemma | case2 not = ⊥-elim ( not ontoy ) | |
217 | 199 |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
200 |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
201 ----- |
219 | 202 -- All cardinal is ℵ0, since we are working on Countable Ordinal, |
203 -- Power ω is larger than ℵ0, so it has no cardinal. | |
218 | 204 |
205 | |
206 |