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