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