annotate cardinal.agda @ 224:afc864169325

recover ε-induction
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 10 Aug 2019 12:31:25 +0900
parents 43021d2b8756
children 5f48299929ac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 15
diff changeset
1 open import Level
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
2 open import Ordinals
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
3 module cardinal {n : Level } (O : Ordinals {n}) where
3
e7990ff544bf reocrd ZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
14
e11e95d5ddee separete constructible set
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 11
diff changeset
5 open import zf
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
6 open import logic
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
7 import OD
23
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 22
diff changeset
8 open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ )
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
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
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
11 open import Data.Empty
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
12 open import Relation.Nullary
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
13 open import Relation.Binary
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
14 open import Relation.Binary.Core
d9b704508281 isEquiv and isZF
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 4
diff changeset
15
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
16 open inOrdinal O
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
17 open OD O
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
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
ac214eab1c3c inifinite done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 119
diff changeset
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
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
24 ------------
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
25 --
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
26 -- Onto map
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
27 -- def X x -> xmap
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
28 -- X ---------------------------> Y
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
29 -- ymap <- def Y y
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
30 --
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
31 record Onto (X Y : OD ) : Set n where
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
32 field
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
33 xmap : (x : Ordinal ) → def X x → Ordinal
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
34 ymap : (y : Ordinal ) → def Y y → Ordinal
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
35 ymap-on-X : {y : Ordinal } → (lty : def Y y ) → def X (ymap y lty)
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
36 onto-iso : {y : Ordinal } → (lty : def Y y ) → xmap ( ymap y lty ) (ymap-on-X lty ) ≡ y
51
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 50
diff changeset
37
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
38 record Cardinal (X : OD ) : Set n where
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
39 field
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
40 cardinal : Ordinal
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
41 conto : Onto (Ord cardinal) X
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
42 cmax : ( y : Ordinal ) → cardinal o< y → ¬ Onto (Ord y) X
151
b5a337fb7a6d recovering...
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
43
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
44 cardinal : (X : OD ) → Cardinal X
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
45 cardinal X = record {
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
46 cardinal = sup-o ( λ x → proj1 ( cardinal-p x) )
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
47 ; conto = onto
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
48 ; cmax = cmax
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
49 } where
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
50 cardinal-p : (x : Ordinal ) → ( Ordinal ∧ Dec (Onto (Ord x) X) )
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
51 cardinal-p x with p∨¬p ( Onto (Ord x) X )
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
52 cardinal-p x | case1 True = record { proj1 = x ; proj2 = yes True }
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
53 cardinal-p x | case2 False = record { proj1 = o∅ ; proj2 = no False }
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
54 onto-set : OD
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
55 onto-set = record { def = λ x → {!!} } -- Onto (Ord (sup-o (λ x → proj1 (cardinal-p x)))) X }
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
56 onto : Onto (Ord (sup-o (λ x → proj1 (cardinal-p x)))) X
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
57 onto = record {
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
58 xmap = xmap
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
59 ; ymap = ymap
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
60 ; ymap-on-X = ymap-on-X
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
61 ; onto-iso = onto-iso
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
62 } where
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
63 --
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
64 -- Ord cardinal itself has no onto map, but if we have x o< cardinal, there is one
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
65 -- od→ord X o< cardinal, so if we have def Y y or def X y, there is an Onto (Ord y) X
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
66 Y = (Ord (sup-o (λ x → proj1 (cardinal-p x))))
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
67 lemma1 : (y : Ordinal ) → def Y y → Onto (Ord y) X
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
68 lemma1 y y<Y with sup-o< {λ x → proj1 ( cardinal-p x)} {y}
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
69 ... | t = {!!}
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
70 lemma2 : def Y (od→ord X)
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
71 lemma2 = {!!}
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
72 xmap : (x : Ordinal ) → def Y x → Ordinal
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
73 xmap = {!!}
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
74 ymap : (y : Ordinal ) → def X y → Ordinal
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
75 ymap = {!!}
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
76 ymap-on-X : {y : Ordinal } → (lty : def X y ) → def Y (ymap y lty)
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
77 ymap-on-X = {!!}
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
78 onto-iso : {y : Ordinal } → (lty : def X y ) → xmap (ymap y lty) (ymap-on-X lty ) ≡ y
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
79 onto-iso = {!!}
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
80 cmax : (y : Ordinal) → sup-o (λ x → proj1 (cardinal-p x)) o< y → ¬ Onto (Ord y) X
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
81 cmax y lt ontoy = o<> lt (o<-subst {_} {_} {y} {sup-o (λ x → proj1 (cardinal-p x))}
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
82 (sup-o< {λ x → proj1 ( cardinal-p x)}{y} ) lemma refl ) where
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
83 lemma : proj1 (cardinal-p y) ≡ y
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
84 lemma with p∨¬p ( Onto (Ord y) X )
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
85 lemma | case1 x = refl
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
86 lemma | case2 not = ⊥-elim ( not ontoy )
217
d5668179ee69 cardinal continue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 216
diff changeset
87
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
88 func : (f : Ordinal → Ordinal ) → OD
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
89 func f = record { def = λ y → (x : Ordinal ) → y ≡ f x }
217
d5668179ee69 cardinal continue
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 216
diff changeset
90
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
91 Func : OD
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
92 Func = record { def = λ x → (f : Ordinal → Ordinal ) → x ≡ od→ord (func f) }
218
eee983e4b402 try func
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 217
diff changeset
93
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
94 odmap : { x : OD } → Func ∋ x → Ordinal → OD
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
95 odmap {f} lt x = record { def = λ y → def f y }
218
eee983e4b402 try func
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 217
diff changeset
96
224
afc864169325 recover ε-induction
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 219
diff changeset
97 lemma1 : { x : OD } → Func ∋ x → {!!} -- ¬ ( (f : Ordinal → Ordinal ) → ¬ ( x ≡ od→ord (func f) ))
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
98 lemma1 = {!!}
218
eee983e4b402 try func
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 217
diff changeset
99
219
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
100
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
101 -----
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
102 -- All cardinal is ℵ0, since we are working on Countable Ordinal,
43021d2b8756 separate cardinal
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 218
diff changeset
103 -- Power ω is larger than ℵ0, so it has no cardinal.
218
eee983e4b402 try func
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 217
diff changeset
104
eee983e4b402 try func
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 217
diff changeset
105
eee983e4b402 try func
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 217
diff changeset
106