Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate cardinal.agda @ 269:30e419a2be24
disjunction and conjunction
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 06 Oct 2019 16:42:42 +0900 |
parents | 63df67b6281c |
children | 985a1af11bce |
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 |
254 | 23 open _==_ |
44
fcac01485f32
od→lv : {n : Level} → OD {n} → Nat
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
43
diff
changeset
|
24 |
230 | 25 -- we have to work on Ordinal to keep OD Level n |
26 -- since we use p∨¬p which works only on Level n | |
250 | 27 |
28 | |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
29 ∋-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
|
30 ∋-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
|
31 ∋-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
|
32 ∋-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
|
33 |
233 | 34 _⊗_ : (A B : OD) → OD |
239 | 35 A ⊗ B = record { def = λ x → def ZFProduct x ∧ ( { x : Ordinal } → (p : def ZFProduct x ) → checkAB p ) } where |
36 checkAB : { p : Ordinal } → def ZFProduct p → Set n | |
37 checkAB (pair x y) = def A x ∧ def B y | |
233 | 38 |
242 | 39 func→od0 : (f : Ordinal → Ordinal ) → OD |
40 func→od0 f = record { def = λ x → def ZFProduct x ∧ ( { x : Ordinal } → (p : def ZFProduct x ) → checkfunc p ) } where | |
41 checkfunc : { p : Ordinal } → def ZFProduct p → Set n | |
42 checkfunc (pair x y) = f x ≡ y | |
43 | |
233 | 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 : (f : Ordinal → Ordinal ) → ( dom : OD ) → OD |
52 func→od f dom = Replace dom ( λ x → < x , ord→od (f (od→ord x)) > ) | |
53 | |
242 | 54 record Func←cd { dom cod : OD } {f : Ordinal } : Set n where |
236 | 55 field |
56 func-1 : Ordinal → Ordinal | |
242 | 57 func→od∈Func-1 : Func dom cod ∋ func→od func-1 dom |
236 | 58 |
242 | 59 od→func : { dom cod : OD } → {f : Ordinal } → def (Func dom cod ) f → Func←cd {dom} {cod} {f} |
240 | 60 od→func {dom} {cod} {f} lt = record { func-1 = λ x → sup-o ( λ y → lemma x y ) ; func→od∈Func-1 = record { proj1 = {!!} ; proj2 = {!!} } } where |
236 | 61 lemma : Ordinal → Ordinal → Ordinal |
62 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) | |
63 lemma x y | p | no n = o∅ | |
240 | 64 lemma x y | p | yes f∋y = lemma2 (proj1 (double-neg-eilm ( p {ord→od y} f∋y ))) where -- p : {y : OD} → f ∋ y → ¬ ¬ (dom ⊗ cod ∋ y) |
65 lemma2 : {p : Ordinal} → ord-pair p → Ordinal | |
66 lemma2 (pair x1 y1) with decp ( x1 ≡ x) | |
67 lemma2 (pair x1 y1) | yes p = y1 | |
68 lemma2 (pair x1 y1) | no ¬p = o∅ | |
242 | 69 fod : OD |
70 fod = Replace dom ( λ x → < x , ord→od (sup-o ( λ y → lemma (od→ord x) y )) > ) | |
240 | 71 |
72 | |
73 open Func←cd | |
236 | 74 |
227 | 75 -- contra position of sup-o< |
76 -- | |
77 | |
235 | 78 -- postulate |
79 -- -- contra-position of mimimulity of supermum required in Cardinal | |
80 -- sup-x : ( Ordinal → Ordinal ) → Ordinal | |
81 -- sup-lb : { ψ : Ordinal → Ordinal } → {z : Ordinal } → z o< sup-o ψ → z o< osuc (ψ (sup-x ψ)) | |
227 | 82 |
219 | 83 ------------ |
84 -- | |
85 -- Onto map | |
86 -- def X x -> xmap | |
87 -- X ---------------------------> Y | |
88 -- ymap <- def Y y | |
89 -- | |
224 | 90 record Onto (X Y : OD ) : Set n where |
219 | 91 field |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
92 xmap : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
93 ymap : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
94 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
|
95 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
|
96 onto-iso : {y : Ordinal } → (lty : def Y y ) → |
240 | 97 func-1 ( od→func {X} {Y} {xmap} xfunc ) ( func-1 (od→func yfunc) y ) ≡ y |
230 | 98 |
99 open Onto | |
100 | |
101 onto-restrict : {X Y Z : OD} → Onto X Y → ({x : OD} → _⊆_ Z Y {x}) → Onto X Z | |
102 onto-restrict {X} {Y} {Z} onto Z⊆Y = record { | |
103 xmap = xmap1 | |
104 ; ymap = zmap | |
105 ; xfunc = xfunc1 | |
106 ; yfunc = zfunc | |
107 ; onto-iso = onto-iso1 | |
108 } where | |
109 xmap1 : Ordinal | |
110 xmap1 = od→ord (Select (ord→od (xmap onto)) {!!} ) | |
111 zmap : Ordinal | |
112 zmap = {!!} | |
113 xfunc1 : def (Func X Z) xmap1 | |
114 xfunc1 = {!!} | |
115 zfunc : def (Func Z X) zmap | |
116 zfunc = {!!} | |
240 | 117 onto-iso1 : {z : Ordinal } → (ltz : def Z z ) → func-1 (od→func xfunc1 ) (func-1 (od→func zfunc ) z ) ≡ z |
230 | 118 onto-iso1 = {!!} |
119 | |
51 | 120 |
224 | 121 record Cardinal (X : OD ) : Set n where |
219 | 122 field |
224 | 123 cardinal : Ordinal |
230 | 124 conto : Onto X (Ord cardinal) |
125 cmax : ( y : Ordinal ) → cardinal o< y → ¬ Onto X (Ord y) | |
151 | 126 |
224 | 127 cardinal : (X : OD ) → Cardinal X |
128 cardinal X = record { | |
219 | 129 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
|
130 ; conto = onto |
219 | 131 ; cmax = cmax |
132 } where | |
230 | 133 cardinal-p : (x : Ordinal ) → ( Ordinal ∧ Dec (Onto X (Ord x) ) ) |
134 cardinal-p x with p∨¬p ( Onto X (Ord x) ) | |
135 cardinal-p x | case1 True = record { proj1 = x ; proj2 = yes True } | |
219 | 136 cardinal-p x | case2 False = record { proj1 = o∅ ; proj2 = no False } |
229 | 137 S = sup-o (λ x → proj1 (cardinal-p x)) |
230 | 138 lemma1 : (x : Ordinal) → ((y : Ordinal) → y o< x → Lift (suc n) (y o< (osuc S) → Onto X (Ord y))) → |
139 Lift (suc n) (x o< (osuc S) → Onto X (Ord x) ) | |
229 | 140 lemma1 x prev with trio< x (osuc S) |
141 lemma1 x prev | tri< a ¬b ¬c with osuc-≡< a | |
230 | 142 lemma1 x prev | tri< a ¬b ¬c | case1 x=S = lift ( λ lt → {!!} ) |
143 lemma1 x prev | tri< a ¬b ¬c | case2 x<S = lift ( λ lt → lemma2 ) where | |
144 lemma2 : Onto X (Ord x) | |
145 lemma2 with prev {!!} {!!} | |
146 ... | lift t = t {!!} | |
229 | 147 lemma1 x prev | tri≈ ¬a b ¬c = lift ( λ lt → ⊥-elim ( o<¬≡ b lt )) |
148 lemma1 x prev | tri> ¬a ¬b c = lift ( λ lt → ⊥-elim ( o<> c lt )) | |
230 | 149 onto : Onto X (Ord S) |
150 onto with TransFinite {λ x → Lift (suc n) ( x o< osuc S → Onto X (Ord x) ) } lemma1 S | |
151 ... | lift t = t <-osuc | |
152 cmax : (y : Ordinal) → S o< y → ¬ Onto X (Ord y) | |
229 | 153 cmax y lt ontoy = o<> lt (o<-subst {_} {_} {y} {S} |
224 | 154 (sup-o< {λ x → proj1 ( cardinal-p x)}{y} ) lemma refl ) where |
219 | 155 lemma : proj1 (cardinal-p y) ≡ y |
230 | 156 lemma with p∨¬p ( Onto X (Ord y) ) |
219 | 157 lemma | case1 x = refl |
158 lemma | case2 not = ⊥-elim ( not ontoy ) | |
217 | 159 |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
160 |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
161 ----- |
219 | 162 -- All cardinal is ℵ0, since we are working on Countable Ordinal, |
163 -- Power ω is larger than ℵ0, so it has no cardinal. | |
218 | 164 |
165 | |
166 |