1175
|
1 {-# OPTIONS --allow-unsolved-metas #-}
|
|
2
|
431
|
3 open import Level
|
|
4 open import Ordinals
|
|
5 module cardinal {n : Level } (O : Ordinals {n}) where
|
|
6
|
|
7 open import zf
|
|
8 open import logic
|
1095
|
9 -- import OD
|
|
10 import OD hiding ( _⊆_ )
|
|
11
|
431
|
12 import ODC
|
1095
|
13 open import Data.Nat renaming ( zero to Zero ; suc to Suc ; ℕ to Nat ; _⊔_ to _n⊔_ )
|
431
|
14 open import Relation.Binary.PropositionalEquality
|
1095
|
15 open import Data.Nat.Properties
|
431
|
16 open import Data.Empty
|
|
17 open import Relation.Nullary
|
|
18 open import Relation.Binary
|
|
19 open import Relation.Binary.Core
|
|
20
|
|
21 open inOrdinal O
|
|
22 open OD O
|
|
23 open OD.OD
|
|
24 open ODAxiom odAxiom
|
1218
|
25 open import ZProduct O
|
431
|
26
|
|
27 import OrdUtil
|
|
28 import ODUtil
|
|
29 open Ordinals.Ordinals O
|
|
30 open Ordinals.IsOrdinals isOrdinal
|
|
31 open Ordinals.IsNext isNext
|
|
32 open OrdUtil O
|
|
33 open ODUtil O
|
|
34
|
1095
|
35 _⊆_ : ( A B : HOD ) → Set n
|
|
36 _⊆_ A B = {x : Ordinal } → odef A x → odef B x
|
|
37
|
431
|
38
|
|
39 open _∧_
|
|
40 open _∨_
|
|
41 open Bool
|
|
42 open _==_
|
|
43
|
|
44 open HOD
|
|
45
|
|
46 -- _⊗_ : (A B : HOD) → HOD
|
|
47 -- A ⊗ B = Union ( Replace B (λ b → Replace A (λ a → < a , b > ) ))
|
|
48
|
1174
|
49 record Func (A B : HOD) : Set n where
|
|
50 field
|
|
51 func : Ordinal → Ordinal
|
|
52 is-func : {x : Ordinal } → odef A x → odef B (func x)
|
|
53
|
|
54 data FuncHOD (A B : HOD) : (x : Ordinal) → Set n where
|
|
55 felm : (F : Func A B) → FuncHOD A B (& ( Replace A ( λ x → < x , (* (Func.func F (& x))) > )))
|
|
56
|
|
57 FuncHOD→F : {A B : HOD} {x : Ordinal} → FuncHOD A B x → Func A B
|
|
58 FuncHOD→F {A} {B} (felm F) = F
|
431
|
59
|
1174
|
60 FuncHOD=R : {A B : HOD} {x : Ordinal} → (fc : FuncHOD A B x) → (* x) ≡ Replace A ( λ x → < x , (* (Func.func (FuncHOD→F fc) (& x))) > )
|
|
61 FuncHOD=R {A} {B} (felm F) = *iso
|
|
62
|
1175
|
63 --
|
|
64 -- Set of All function from A to B
|
|
65 --
|
1174
|
66 Funcs : (A B : HOD) → HOD
|
|
67 Funcs A B = record { od = record { def = λ x → FuncHOD A B x } ; odmax = osuc (& (A ⊗ B))
|
|
68 ; <odmax = λ {y} px → subst ( λ k → k o≤ (& (A ⊗ B)) ) &iso (⊆→o≤ (lemma1 px)) } where
|
|
69 lemma1 : {y : Ordinal } → FuncHOD A B y → {x : Ordinal} → odef (* y) x → odef (A ⊗ B) x
|
|
70 lemma1 {y} (felm F) {x} yx with subst (λ k → odef k x) *iso yx
|
|
71 ... | record { z = z ; az = az ; x=ψz = x=ψz } = subst (λ k → odef (A ⊗ B) k ) (sym x=ψz) (
|
|
72 product→ (subst (λ k → odef A k) (sym &iso) az) (subst (λ k → odef B k)
|
|
73 (trans (cong (Func.func F) (sym &iso)) (sym &iso)) (Func.is-func F az) ))
|
431
|
74
|
|
75 record Injection (A B : Ordinal ) : Set n where
|
|
76 field
|
|
77 i→ : (x : Ordinal ) → odef (* A) x → Ordinal
|
|
78 iB : (x : Ordinal ) → ( lt : odef (* A) x ) → odef (* B) ( i→ x lt )
|
1095
|
79 iiso : (x y : Ordinal ) → ( ltx : odef (* A) x ) ( lty : odef (* A) y ) → i→ x ltx ≡ i→ y lty → x ≡ y
|
431
|
80
|
1124
|
81 record OrdBijection (A B : Ordinal ) : Set n where
|
431
|
82 field
|
|
83 fun← : (x : Ordinal ) → odef (* A) x → Ordinal
|
|
84 fun→ : (x : Ordinal ) → odef (* B) x → Ordinal
|
|
85 funB : (x : Ordinal ) → ( lt : odef (* A) x ) → odef (* B) ( fun← x lt )
|
|
86 funA : (x : Ordinal ) → ( lt : odef (* B) x ) → odef (* A) ( fun→ x lt )
|
|
87 fiso← : (x : Ordinal ) → ( lt : odef (* B) x ) → fun← ( fun→ x lt ) ( funA x lt ) ≡ x
|
|
88 fiso→ : (x : Ordinal ) → ( lt : odef (* A) x ) → fun→ ( fun← x lt ) ( funB x lt ) ≡ x
|
1095
|
89
|
1124
|
90 ordbij-refl : { a b : Ordinal } → a ≡ b → OrdBijection a b
|
|
91 ordbij-refl {a} refl = record {
|
|
92 fun← = λ x _ → x
|
|
93 ; fun→ = λ x _ → x
|
|
94 ; funB = λ x lt → lt
|
|
95 ; funA = λ x lt → lt
|
|
96 ; fiso← = λ x lt → refl
|
|
97 ; fiso→ = λ x lt → refl
|
|
98 }
|
|
99
|
1095
|
100 open Injection
|
1124
|
101 open OrdBijection
|
1095
|
102
|
|
103 record IsImage (a b : Ordinal) (iab : Injection a b ) (x : Ordinal ) : Set n where
|
|
104 field
|
|
105 ax : odef (* a) x
|
|
106 bx : odef (* b) (i→ iab _ ax)
|
|
107
|
|
108 Image : { a b : Ordinal } → Injection a b → HOD
|
|
109 Image {a} {b} iab = record { od = record { def = λ x → IsImage a b iab x } ; odmax = a ; <odmax = λ lt → ? }
|
|
110
|
|
111 image=a : ?
|
|
112 image=a = ?
|
431
|
113
|
|
114 _=c=_ : ( A B : HOD ) → Set n
|
1124
|
115 A =c= B = OrdBijection ( & A ) ( & B )
|
431
|
116
|
1095
|
117 c=→≡ : {A B : HOD} → A =c= B → (A ≡ ?) ∧ (B ≡ ?)
|
|
118 c=→≡ = ?
|
|
119
|
|
120 ≡→c= : {A B : HOD} → A ≡ B → A =c= B
|
|
121 ≡→c= = ?
|
|
122
|
1124
|
123 open import BAlgebra O
|
|
124
|
|
125 _-_ : (a b : Ordinal ) → Ordinal
|
|
126 a - b = & ( (* a) \ (* b) )
|
|
127
|
|
128 -→< : (a b : Ordinal ) → (a - b) o≤ a
|
|
129 -→< a b = ?
|
|
130
|
|
131 Bernstein1 : {a b : Ordinal } → a o< b → Injection a b ∧ Injection b a → Injection (b - a) b ∧ Injection b (b - a)
|
|
132 Bernstein1 = ?
|
|
133
|
|
134 Bernstein : {a b : Ordinal } → Injection a b → Injection b a → OrdBijection a b
|
|
135 Bernstein {a} {b} iab iba = be00 where
|
1095
|
136 a⊆b : * a ⊆ * b
|
1124
|
137 a⊆b {x} ax = subst (λ k → odef (* b) k) be01 ( iB iab _ ax ) where
|
|
138 be01 : i→ iab x ax ≡ x
|
|
139 be01 = ?
|
|
140 be02 : x ≡ i→ iba x ?
|
|
141 be02 = iiso iab ? ? ax ( iB iba _ ? ) ?
|
1095
|
142 b⊆a : * b ⊆ * a
|
|
143 b⊆a bx = ?
|
1124
|
144 be05 : {a b : Ordinal } → a o< b → Injection a b → Injection b a → ⊥
|
|
145 be05 {a} {b} a<b iab iba = TransFinite0 {λ x → (b : Ordinal) → x o< b → Injection x b → Injection b x → ⊥ }
|
|
146 ind a b a<b iab iba where
|
|
147 ind :(x : Ordinal) →
|
|
148 ((y : Ordinal) → y o< x → (b : Ordinal) → y o< b → Injection y b → Injection b y → ⊥ ) →
|
|
149 (b : Ordinal) → x o< b → Injection x b → Injection b x → ⊥
|
|
150 ind x prev b x<b ixb ibx = ?
|
|
151 be00 : OrdBijection a b
|
|
152 be00 with trio< a b
|
|
153 ... | tri< a ¬b ¬c = ⊥-elim ( be05 a iab iba )
|
|
154 ... | tri≈ ¬a b ¬c = ordbij-refl b
|
|
155 ... | tri> ¬a ¬b c = ⊥-elim ( be05 c iba iab )
|
1095
|
156
|
431
|
157 _c<_ : ( A B : HOD ) → Set n
|
|
158 A c< B = ¬ ( Injection (& A) (& B) )
|
|
159
|
|
160 Card : OD
|
1124
|
161 Card = record { def = λ x → (a : Ordinal) → a o< x → ¬ OrdBijection a x }
|
431
|
162
|
|
163 record Cardinal (a : Ordinal ) : Set (suc n) where
|
|
164 field
|
|
165 card : Ordinal
|
1124
|
166 ciso : OrdBijection a card
|
|
167 cmax : (x : Ordinal) → card o< x → ¬ OrdBijection a x
|
431
|
168
|
1095
|
169 Cardinal∈ : { s : HOD } → { t : Ordinal } → Ord t ∋ s → s c< Ord t
|
431
|
170 Cardinal∈ = {!!}
|
|
171
|
|
172 Cardinal⊆ : { s t : HOD } → s ⊆ t → ( s c< t ) ∨ ( s =c= t )
|
|
173 Cardinal⊆ = {!!}
|
|
174
|
|
175 Cantor1 : { u : HOD } → u c< Power u
|
|
176 Cantor1 = {!!}
|
|
177
|
|
178 Cantor2 : { u : HOD } → ¬ ( u =c= Power u )
|
|
179 Cantor2 = {!!}
|
1095
|
180
|
|
181
|
|
182
|
|
183
|