Mercurial > hg > Members > kono > Proof > ZF-in-agda
annotate cardinal.agda @ 234:e06b76e5b682
ac from LEM in abstract ordinal
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 13 Aug 2019 22:21:10 +0900 |
parents | af60c40298a4 |
children | 846e0926bb89 |
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 |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
40 ∋-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
|
41 ∋-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
|
42 ∋-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
|
43 ∋-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
|
44 |
233 | 45 _⊗_ : (A B : OD) → OD |
46 A ⊗ B = record { def = λ x → SetProduct A B x } | |
47 -- A ⊗ B = record { def = λ x → (y z : Ordinal) → def A y ∧ def B z ∧ ( x ≡ od→ord (< ord→od y , ord→od z >) ) } | |
48 | |
49 -- Power (Power ( A ∪ B )) ∋ ( A ⊗ B ) | |
225 | 50 |
233 | 51 Func : ( A B : OD ) → OD |
52 Func A B = record { def = λ x → def (Power (A ⊗ B)) x } | |
53 | |
54 -- 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
|
55 |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
56 func←od : { dom cod : OD } → {f : Ordinal } → def (Func dom cod ) f → (Ordinal → Ordinal ) |
233 | 57 func←od {dom} {cod} {f} lt x = sup-o ( λ y → lemma y ) where |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
58 lemma1 = subst (λ k → def (Power (dom ⊗ cod)) k ) (sym {!!}) lt |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
59 lemma : Ordinal → Ordinal |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
60 lemma y with IsZF.power→ isZF (dom ⊗ cod) (ord→od f) (subst (λ k → def (Power (dom ⊗ cod)) k ) {!!} lt ) | ∋-p (ord→od f) (ord→od y) |
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
61 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
|
62 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
|
63 ... | 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
|
64 ... | yes _ = π2 t |
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
65 ... | no _ = o∅ |
233 | 66 |
67 func→od : (f : Ordinal → Ordinal ) → ( dom : OD ) → OD | |
68 func→od f dom = Replace dom ( λ x → < x , ord→od (f (od→ord x)) > ) | |
69 | |
225 | 70 |
227 | 71 -- contra position of sup-o< |
72 -- | |
73 | |
228 | 74 postulate |
75 -- contra-position of mimimulity of supermum required in Cardinal | |
76 sup-x : ( Ordinal → Ordinal ) → Ordinal | |
77 sup-lb : { ψ : Ordinal → Ordinal } → {z : Ordinal } → z o< sup-o ψ → z o< osuc (ψ (sup-x ψ)) | |
227 | 78 |
219 | 79 ------------ |
80 -- | |
81 -- Onto map | |
82 -- def X x -> xmap | |
83 -- X ---------------------------> Y | |
84 -- ymap <- def Y y | |
85 -- | |
224 | 86 record Onto (X Y : OD ) : Set n where |
219 | 87 field |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
88 xmap : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
89 ymap : Ordinal |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
90 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
|
91 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
|
92 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
|
93 func←od {X} {Y} {xmap} xfunc ( func←od yfunc y ) ≡ y |
230 | 94 |
95 open Onto | |
96 | |
97 onto-restrict : {X Y Z : OD} → Onto X Y → ({x : OD} → _⊆_ Z Y {x}) → Onto X Z | |
98 onto-restrict {X} {Y} {Z} onto Z⊆Y = record { | |
99 xmap = xmap1 | |
100 ; ymap = zmap | |
101 ; xfunc = xfunc1 | |
102 ; yfunc = zfunc | |
103 ; onto-iso = onto-iso1 | |
104 } where | |
105 xmap1 : Ordinal | |
106 xmap1 = od→ord (Select (ord→od (xmap onto)) {!!} ) | |
107 zmap : Ordinal | |
108 zmap = {!!} | |
109 xfunc1 : def (Func X Z) xmap1 | |
110 xfunc1 = {!!} | |
111 zfunc : def (Func Z X) zmap | |
112 zfunc = {!!} | |
234
e06b76e5b682
ac from LEM in abstract ordinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
233
diff
changeset
|
113 onto-iso1 : {z : Ordinal } → (ltz : def Z z ) → func←od xfunc1 ( func←od zfunc z ) ≡ z |
230 | 114 onto-iso1 = {!!} |
115 | |
51 | 116 |
224 | 117 record Cardinal (X : OD ) : Set n where |
219 | 118 field |
224 | 119 cardinal : Ordinal |
230 | 120 conto : Onto X (Ord cardinal) |
121 cmax : ( y : Ordinal ) → cardinal o< y → ¬ Onto X (Ord y) | |
151 | 122 |
224 | 123 cardinal : (X : OD ) → Cardinal X |
124 cardinal X = record { | |
219 | 125 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
|
126 ; conto = onto |
219 | 127 ; cmax = cmax |
128 } where | |
230 | 129 cardinal-p : (x : Ordinal ) → ( Ordinal ∧ Dec (Onto X (Ord x) ) ) |
130 cardinal-p x with p∨¬p ( Onto X (Ord x) ) | |
131 cardinal-p x | case1 True = record { proj1 = x ; proj2 = yes True } | |
219 | 132 cardinal-p x | case2 False = record { proj1 = o∅ ; proj2 = no False } |
229 | 133 S = sup-o (λ x → proj1 (cardinal-p x)) |
230 | 134 lemma1 : (x : Ordinal) → ((y : Ordinal) → y o< x → Lift (suc n) (y o< (osuc S) → Onto X (Ord y))) → |
135 Lift (suc n) (x o< (osuc S) → Onto X (Ord x) ) | |
229 | 136 lemma1 x prev with trio< x (osuc S) |
137 lemma1 x prev | tri< a ¬b ¬c with osuc-≡< a | |
230 | 138 lemma1 x prev | tri< a ¬b ¬c | case1 x=S = lift ( λ lt → {!!} ) |
139 lemma1 x prev | tri< a ¬b ¬c | case2 x<S = lift ( λ lt → lemma2 ) where | |
140 lemma2 : Onto X (Ord x) | |
141 lemma2 with prev {!!} {!!} | |
142 ... | lift t = t {!!} | |
229 | 143 lemma1 x prev | tri≈ ¬a b ¬c = lift ( λ lt → ⊥-elim ( o<¬≡ b lt )) |
144 lemma1 x prev | tri> ¬a ¬b c = lift ( λ lt → ⊥-elim ( o<> c lt )) | |
230 | 145 onto : Onto X (Ord S) |
146 onto with TransFinite {λ x → Lift (suc n) ( x o< osuc S → Onto X (Ord x) ) } lemma1 S | |
147 ... | lift t = t <-osuc | |
148 cmax : (y : Ordinal) → S o< y → ¬ Onto X (Ord y) | |
229 | 149 cmax y lt ontoy = o<> lt (o<-subst {_} {_} {y} {S} |
224 | 150 (sup-o< {λ x → proj1 ( cardinal-p x)}{y} ) lemma refl ) where |
219 | 151 lemma : proj1 (cardinal-p y) ≡ y |
230 | 152 lemma with p∨¬p ( Onto X (Ord y) ) |
219 | 153 lemma | case1 x = refl |
154 lemma | case2 not = ⊥-elim ( not ontoy ) | |
217 | 155 |
226
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
156 |
176ff97547b4
set theortic function definition using sup
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
225
diff
changeset
|
157 ----- |
219 | 158 -- All cardinal is ℵ0, since we are working on Countable Ordinal, |
159 -- Power ω is larger than ℵ0, so it has no cardinal. | |
218 | 160 |
161 | |
162 |