author | wenzelm |
Wed, 12 Oct 1994 16:31:01 +0100 | |
changeset 637 | b344bf624143 |
parent 571 | 0b03ce5b62f7 |
child 760 | f0200e91b272 |
permissions | -rw-r--r-- |
437 | 1 |
(* Title: ZF/CardinalArith.ML |
2 |
ID: $Id$ |
|
3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
4 |
Copyright 1994 University of Cambridge |
|
5 |
||
6 |
Cardinal arithmetic -- WITHOUT the Axiom of Choice |
|
7 |
*) |
|
8 |
||
9 |
open CardinalArith; |
|
10 |
||
484 | 11 |
(*** Elementary properties ***) |
467 | 12 |
|
437 | 13 |
(*Use AC to discharge first premise*) |
14 |
goal CardinalArith.thy |
|
15 |
"!!A B. [| well_ord(B,r); A lepoll B |] ==> |A| le |B|"; |
|
16 |
by (res_inst_tac [("i","|A|"),("j","|B|")] Ord_linear_le 1); |
|
17 |
by (REPEAT_FIRST (ares_tac [Ord_cardinal, le_eqI])); |
|
18 |
by (rtac (eqpollI RS cardinal_cong) 1 THEN assume_tac 1); |
|
19 |
by (rtac lepoll_trans 1); |
|
20 |
by (rtac (well_ord_cardinal_eqpoll RS eqpoll_sym RS eqpoll_imp_lepoll) 1); |
|
21 |
by (assume_tac 1); |
|
22 |
by (etac (le_imp_subset RS subset_imp_lepoll RS lepoll_trans) 1); |
|
23 |
by (rtac eqpoll_imp_lepoll 1); |
|
24 |
by (rewtac lepoll_def); |
|
25 |
by (etac exE 1); |
|
26 |
by (rtac well_ord_cardinal_eqpoll 1); |
|
27 |
by (etac well_ord_rvimage 1); |
|
28 |
by (assume_tac 1); |
|
29 |
val well_ord_lepoll_imp_le = result(); |
|
30 |
||
484 | 31 |
(*Each element of Fin(A) is equivalent to a natural number*) |
32 |
goal CardinalArith.thy |
|
33 |
"!!X A. X: Fin(A) ==> EX n:nat. X eqpoll n"; |
|
34 |
by (eresolve_tac [Fin_induct] 1); |
|
35 |
by (fast_tac (ZF_cs addIs [eqpoll_refl, nat_0I]) 1); |
|
36 |
by (fast_tac (ZF_cs addSIs [cons_eqpoll_cong, |
|
37 |
rewrite_rule [succ_def] nat_succI] |
|
38 |
addSEs [mem_irrefl]) 1); |
|
39 |
val Fin_eqpoll = result(); |
|
40 |
||
437 | 41 |
(*** Cardinal addition ***) |
42 |
||
43 |
(** Cardinal addition is commutative **) |
|
44 |
||
45 |
goalw CardinalArith.thy [eqpoll_def] "A+B eqpoll B+A"; |
|
46 |
by (rtac exI 1); |
|
47 |
by (res_inst_tac [("c", "case(Inr, Inl)"), ("d", "case(Inr, Inl)")] |
|
48 |
lam_bijective 1); |
|
49 |
by (safe_tac (ZF_cs addSEs [sumE])); |
|
50 |
by (ALLGOALS (asm_simp_tac case_ss)); |
|
51 |
val sum_commute_eqpoll = result(); |
|
52 |
||
53 |
goalw CardinalArith.thy [cadd_def] "i |+| j = j |+| i"; |
|
54 |
by (rtac (sum_commute_eqpoll RS cardinal_cong) 1); |
|
55 |
val cadd_commute = result(); |
|
56 |
||
57 |
(** Cardinal addition is associative **) |
|
58 |
||
59 |
goalw CardinalArith.thy [eqpoll_def] "(A+B)+C eqpoll A+(B+C)"; |
|
60 |
by (rtac exI 1); |
|
61 |
by (res_inst_tac [("c", "case(case(Inl, %y.Inr(Inl(y))), %y. Inr(Inr(y)))"), |
|
62 |
("d", "case(%x.Inl(Inl(x)), case(%x.Inl(Inr(x)), Inr))")] |
|
63 |
lam_bijective 1); |
|
64 |
by (ALLGOALS (asm_simp_tac (case_ss setloop etac sumE))); |
|
65 |
val sum_assoc_eqpoll = result(); |
|
66 |
||
67 |
(*Unconditional version requires AC*) |
|
68 |
goalw CardinalArith.thy [cadd_def] |
|
484 | 69 |
"!!i j k. [| well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) |] ==> \ |
437 | 70 |
\ (i |+| j) |+| k = i |+| (j |+| k)"; |
71 |
by (rtac cardinal_cong 1); |
|
72 |
br ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS sum_eqpoll_cong RS |
|
73 |
eqpoll_trans) 1; |
|
74 |
by (rtac (sum_assoc_eqpoll RS eqpoll_trans) 2); |
|
75 |
br ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong RS |
|
76 |
eqpoll_sym) 2; |
|
484 | 77 |
by (REPEAT (ares_tac [well_ord_radd] 1)); |
78 |
val well_ord_cadd_assoc = result(); |
|
437 | 79 |
|
80 |
(** 0 is the identity for addition **) |
|
81 |
||
82 |
goalw CardinalArith.thy [eqpoll_def] "0+A eqpoll A"; |
|
83 |
by (rtac exI 1); |
|
84 |
by (res_inst_tac [("c", "case(%x.x, %y.y)"), ("d", "Inr")] |
|
85 |
lam_bijective 1); |
|
86 |
by (ALLGOALS (asm_simp_tac (case_ss setloop eresolve_tac [sumE,emptyE]))); |
|
87 |
val sum_0_eqpoll = result(); |
|
88 |
||
484 | 89 |
goalw CardinalArith.thy [cadd_def] "!!K. Card(K) ==> 0 |+| K = K"; |
437 | 90 |
by (asm_simp_tac (ZF_ss addsimps [sum_0_eqpoll RS cardinal_cong, |
91 |
Card_cardinal_eq]) 1); |
|
92 |
val cadd_0 = result(); |
|
93 |
||
94 |
(** Addition of finite cardinals is "ordinary" addition **) |
|
95 |
||
96 |
goalw CardinalArith.thy [eqpoll_def] "succ(A)+B eqpoll succ(A+B)"; |
|
97 |
by (rtac exI 1); |
|
98 |
by (res_inst_tac [("c", "%z.if(z=Inl(A),A+B,z)"), |
|
99 |
("d", "%z.if(z=A+B,Inl(A),z)")] |
|
100 |
lam_bijective 1); |
|
101 |
by (ALLGOALS |
|
102 |
(asm_simp_tac (case_ss addsimps [succI2, mem_imp_not_eq] |
|
103 |
setloop eresolve_tac [sumE,succE]))); |
|
104 |
val sum_succ_eqpoll = result(); |
|
105 |
||
106 |
(*Pulling the succ(...) outside the |...| requires m, n: nat *) |
|
107 |
(*Unconditional version requires AC*) |
|
108 |
goalw CardinalArith.thy [cadd_def] |
|
109 |
"!!m n. [| Ord(m); Ord(n) |] ==> succ(m) |+| n = |succ(m |+| n)|"; |
|
110 |
by (rtac (sum_succ_eqpoll RS cardinal_cong RS trans) 1); |
|
111 |
by (rtac (succ_eqpoll_cong RS cardinal_cong) 1); |
|
112 |
by (rtac (well_ord_cardinal_eqpoll RS eqpoll_sym) 1); |
|
113 |
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel] 1)); |
|
114 |
val cadd_succ_lemma = result(); |
|
115 |
||
116 |
val [mnat,nnat] = goal CardinalArith.thy |
|
117 |
"[| m: nat; n: nat |] ==> m |+| n = m#+n"; |
|
118 |
by (cut_facts_tac [nnat] 1); |
|
119 |
by (nat_ind_tac "m" [mnat] 1); |
|
120 |
by (asm_simp_tac (arith_ss addsimps [nat_into_Card RS cadd_0]) 1); |
|
121 |
by (asm_simp_tac (arith_ss addsimps [nat_into_Ord, cadd_succ_lemma, |
|
122 |
nat_into_Card RS Card_cardinal_eq]) 1); |
|
123 |
val nat_cadd_eq_add = result(); |
|
124 |
||
125 |
||
126 |
(*** Cardinal multiplication ***) |
|
127 |
||
128 |
(** Cardinal multiplication is commutative **) |
|
129 |
||
130 |
(*Easier to prove the two directions separately*) |
|
131 |
goalw CardinalArith.thy [eqpoll_def] "A*B eqpoll B*A"; |
|
132 |
by (rtac exI 1); |
|
133 |
by (res_inst_tac [("c", "split(%x y.<y,x>)"), ("d", "split(%x y.<y,x>)")] |
|
134 |
lam_bijective 1); |
|
135 |
by (safe_tac ZF_cs); |
|
136 |
by (ALLGOALS (asm_simp_tac ZF_ss)); |
|
137 |
val prod_commute_eqpoll = result(); |
|
138 |
||
139 |
goalw CardinalArith.thy [cmult_def] "i |*| j = j |*| i"; |
|
140 |
by (rtac (prod_commute_eqpoll RS cardinal_cong) 1); |
|
141 |
val cmult_commute = result(); |
|
142 |
||
143 |
(** Cardinal multiplication is associative **) |
|
144 |
||
145 |
goalw CardinalArith.thy [eqpoll_def] "(A*B)*C eqpoll A*(B*C)"; |
|
146 |
by (rtac exI 1); |
|
147 |
by (res_inst_tac [("c", "split(%w z. split(%x y. <x,<y,z>>, w))"), |
|
148 |
("d", "split(%x. split(%y z. <<x,y>, z>))")] |
|
149 |
lam_bijective 1); |
|
150 |
by (safe_tac ZF_cs); |
|
151 |
by (ALLGOALS (asm_simp_tac ZF_ss)); |
|
152 |
val prod_assoc_eqpoll = result(); |
|
153 |
||
154 |
(*Unconditional version requires AC*) |
|
155 |
goalw CardinalArith.thy [cmult_def] |
|
484 | 156 |
"!!i j k. [| well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) |] ==> \ |
437 | 157 |
\ (i |*| j) |*| k = i |*| (j |*| k)"; |
158 |
by (rtac cardinal_cong 1); |
|
159 |
br ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS prod_eqpoll_cong RS |
|
160 |
eqpoll_trans) 1; |
|
161 |
by (rtac (prod_assoc_eqpoll RS eqpoll_trans) 2); |
|
162 |
br ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS prod_eqpoll_cong RS |
|
163 |
eqpoll_sym) 2; |
|
484 | 164 |
by (REPEAT (ares_tac [well_ord_rmult] 1)); |
165 |
val well_ord_cmult_assoc = result(); |
|
437 | 166 |
|
167 |
(** Cardinal multiplication distributes over addition **) |
|
168 |
||
169 |
goalw CardinalArith.thy [eqpoll_def] "(A+B)*C eqpoll (A*C)+(B*C)"; |
|
170 |
by (rtac exI 1); |
|
171 |
by (res_inst_tac |
|
172 |
[("c", "split(%x z. case(%y.Inl(<y,z>), %y.Inr(<y,z>), x))"), |
|
173 |
("d", "case(split(%x y.<Inl(x),y>), split(%x y.<Inr(x),y>))")] |
|
174 |
lam_bijective 1); |
|
175 |
by (safe_tac (ZF_cs addSEs [sumE])); |
|
176 |
by (ALLGOALS (asm_simp_tac case_ss)); |
|
177 |
val sum_prod_distrib_eqpoll = result(); |
|
178 |
||
179 |
goalw CardinalArith.thy [lepoll_def, inj_def] "A lepoll A*A"; |
|
180 |
by (res_inst_tac [("x", "lam x:A. <x,x>")] exI 1); |
|
181 |
by (simp_tac (ZF_ss addsimps [lam_type]) 1); |
|
182 |
val prod_square_lepoll = result(); |
|
183 |
||
484 | 184 |
goalw CardinalArith.thy [cmult_def] "!!K. Card(K) ==> K le K |*| K"; |
437 | 185 |
by (rtac le_trans 1); |
186 |
by (rtac well_ord_lepoll_imp_le 2); |
|
187 |
by (rtac prod_square_lepoll 3); |
|
188 |
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel, Card_is_Ord] 2)); |
|
189 |
by (asm_simp_tac (ZF_ss addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1); |
|
190 |
val cmult_square_le = result(); |
|
191 |
||
192 |
(** Multiplication by 0 yields 0 **) |
|
193 |
||
194 |
goalw CardinalArith.thy [eqpoll_def] "0*A eqpoll 0"; |
|
195 |
by (rtac exI 1); |
|
196 |
by (rtac lam_bijective 1); |
|
197 |
by (safe_tac ZF_cs); |
|
198 |
val prod_0_eqpoll = result(); |
|
199 |
||
200 |
goalw CardinalArith.thy [cmult_def] "0 |*| i = 0"; |
|
201 |
by (asm_simp_tac (ZF_ss addsimps [prod_0_eqpoll RS cardinal_cong, |
|
202 |
Card_0 RS Card_cardinal_eq]) 1); |
|
203 |
val cmult_0 = result(); |
|
204 |
||
205 |
(** 1 is the identity for multiplication **) |
|
206 |
||
207 |
goalw CardinalArith.thy [eqpoll_def] "{x}*A eqpoll A"; |
|
208 |
by (rtac exI 1); |
|
209 |
by (res_inst_tac [("c", "snd"), ("d", "%z.<x,z>")] lam_bijective 1); |
|
210 |
by (safe_tac ZF_cs); |
|
211 |
by (ALLGOALS (asm_simp_tac ZF_ss)); |
|
212 |
val prod_singleton_eqpoll = result(); |
|
213 |
||
484 | 214 |
goalw CardinalArith.thy [cmult_def, succ_def] "!!K. Card(K) ==> 1 |*| K = K"; |
437 | 215 |
by (asm_simp_tac (ZF_ss addsimps [prod_singleton_eqpoll RS cardinal_cong, |
216 |
Card_cardinal_eq]) 1); |
|
217 |
val cmult_1 = result(); |
|
218 |
||
219 |
(** Multiplication of finite cardinals is "ordinary" multiplication **) |
|
220 |
||
221 |
goalw CardinalArith.thy [eqpoll_def] "succ(A)*B eqpoll B + A*B"; |
|
222 |
by (rtac exI 1); |
|
223 |
by (res_inst_tac [("c", "split(%x y. if(x=A, Inl(y), Inr(<x,y>)))"), |
|
224 |
("d", "case(%y. <A,y>, %z.z)")] |
|
225 |
lam_bijective 1); |
|
226 |
by (safe_tac (ZF_cs addSEs [sumE])); |
|
227 |
by (ALLGOALS |
|
228 |
(asm_simp_tac (case_ss addsimps [succI2, if_type, mem_imp_not_eq]))); |
|
229 |
val prod_succ_eqpoll = result(); |
|
230 |
||
231 |
||
232 |
(*Unconditional version requires AC*) |
|
233 |
goalw CardinalArith.thy [cmult_def, cadd_def] |
|
234 |
"!!m n. [| Ord(m); Ord(n) |] ==> succ(m) |*| n = n |+| (m |*| n)"; |
|
235 |
by (rtac (prod_succ_eqpoll RS cardinal_cong RS trans) 1); |
|
236 |
by (rtac (cardinal_cong RS sym) 1); |
|
237 |
by (rtac ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong) 1); |
|
238 |
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1)); |
|
239 |
val cmult_succ_lemma = result(); |
|
240 |
||
241 |
val [mnat,nnat] = goal CardinalArith.thy |
|
242 |
"[| m: nat; n: nat |] ==> m |*| n = m#*n"; |
|
243 |
by (cut_facts_tac [nnat] 1); |
|
244 |
by (nat_ind_tac "m" [mnat] 1); |
|
245 |
by (asm_simp_tac (arith_ss addsimps [cmult_0]) 1); |
|
246 |
by (asm_simp_tac (arith_ss addsimps [nat_into_Ord, cmult_succ_lemma, |
|
247 |
nat_cadd_eq_add]) 1); |
|
248 |
val nat_cmult_eq_mult = result(); |
|
249 |
||
250 |
||
251 |
(*** Infinite Cardinals are Limit Ordinals ***) |
|
252 |
||
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
253 |
(*This proof is modelled upon one assuming nat<=A, with injection |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
254 |
lam z:cons(u,A). if(z=u, 0, if(z : nat, succ(z), z)) and inverse |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
255 |
%y. if(y:nat, nat_case(u,%z.z,y), y). If f: inj(nat,A) then |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
256 |
range(f) behaves like the natural numbers.*) |
516 | 257 |
goalw CardinalArith.thy [lepoll_def] |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
258 |
"!!i. nat lepoll A ==> cons(u,A) lepoll A"; |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
259 |
by (etac exE 1); |
516 | 260 |
by (res_inst_tac [("x", |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
261 |
"lam z:cons(u,A). if(z=u, f`0, \ |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
262 |
\ if(z: range(f), f`succ(converse(f)`z), z))")] exI 1); |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
263 |
by (res_inst_tac [("d", "%y. if(y: range(f), \ |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
264 |
\ nat_case(u, %z.f`z, converse(f)`y), y)")] |
516 | 265 |
lam_injective 1); |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
266 |
by (fast_tac (ZF_cs addSIs [if_type, nat_0I, nat_succI, apply_type] |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
267 |
addIs [inj_is_fun, inj_converse_fun]) 1); |
516 | 268 |
by (asm_simp_tac |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
269 |
(ZF_ss addsimps [inj_is_fun RS apply_rangeI, |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
270 |
inj_converse_fun RS apply_rangeI, |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
271 |
inj_converse_fun RS apply_funtype, |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
272 |
left_inverse, right_inverse, nat_0I, nat_succI, |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
273 |
nat_case_0, nat_case_succ] |
516 | 274 |
setloop split_tac [expand_if]) 1); |
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
275 |
val nat_cons_lepoll = result(); |
516 | 276 |
|
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
277 |
goal CardinalArith.thy "!!i. nat lepoll A ==> cons(u,A) eqpoll A"; |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
278 |
by (etac (nat_cons_lepoll RS eqpollI) 1); |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
279 |
by (rtac (subset_consI RS subset_imp_lepoll) 1); |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
280 |
val nat_cons_eqpoll = result(); |
437 | 281 |
|
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
282 |
(*Specialized version required below*) |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
283 |
goalw CardinalArith.thy [succ_def] "!!i. nat <= A ==> succ(A) eqpoll A"; |
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset
|
284 |
by (eresolve_tac [subset_imp_lepoll RS nat_cons_eqpoll] 1); |
437 | 285 |
val nat_succ_eqpoll = result(); |
286 |
||
488 | 287 |
goalw CardinalArith.thy [InfCard_def] "InfCard(nat)"; |
288 |
by (fast_tac (ZF_cs addIs [Card_nat, le_refl, Card_is_Ord]) 1); |
|
289 |
val InfCard_nat = result(); |
|
290 |
||
484 | 291 |
goalw CardinalArith.thy [InfCard_def] "!!K. InfCard(K) ==> Card(K)"; |
437 | 292 |
by (etac conjunct1 1); |
293 |
val InfCard_is_Card = result(); |
|
294 |
||
523 | 295 |
goalw CardinalArith.thy [InfCard_def] |
296 |
"!!K L. [| InfCard(K); Card(L) |] ==> InfCard(K Un L)"; |
|
297 |
by (asm_simp_tac (ZF_ss addsimps [Card_Un, Un_upper1_le RSN (2,le_trans), |
|
298 |
Card_is_Ord]) 1); |
|
299 |
val InfCard_Un = result(); |
|
300 |
||
437 | 301 |
(*Kunen's Lemma 10.11*) |
484 | 302 |
goalw CardinalArith.thy [InfCard_def] "!!K. InfCard(K) ==> Limit(K)"; |
437 | 303 |
by (etac conjE 1); |
304 |
by (rtac (ltI RS non_succ_LimitI) 1); |
|
305 |
by (etac ([asm_rl, nat_0I] MRS (le_imp_subset RS subsetD)) 1); |
|
306 |
by (etac Card_is_Ord 1); |
|
307 |
by (safe_tac (ZF_cs addSDs [Limit_nat RS Limit_le_succD])); |
|
308 |
by (forward_tac [Card_is_Ord RS Ord_succD] 1); |
|
309 |
by (rewtac Card_def); |
|
310 |
by (res_inst_tac [("i", "succ(y)")] lt_irrefl 1); |
|
311 |
by (dtac (le_imp_subset RS nat_succ_eqpoll RS cardinal_cong) 1); |
|
312 |
(*Tricky combination of substitutions; backtracking needed*) |
|
313 |
by (etac ssubst 1 THEN etac ssubst 1 THEN rtac Ord_cardinal_le 1); |
|
314 |
by (assume_tac 1); |
|
315 |
val InfCard_is_Limit = result(); |
|
316 |
||
317 |
||
318 |
||
319 |
(*** An infinite cardinal equals its square (Kunen, Thm 10.12, page 29) ***) |
|
320 |
||
321 |
(*A general fact about ordermap*) |
|
322 |
goalw Cardinal.thy [eqpoll_def] |
|
323 |
"!!A. [| well_ord(A,r); x:A |] ==> ordermap(A,r)`x eqpoll pred(A,x,r)"; |
|
324 |
by (rtac exI 1); |
|
325 |
by (asm_simp_tac (ZF_ss addsimps [ordermap_eq_image, well_ord_is_wf]) 1); |
|
467 | 326 |
by (etac (ordermap_bij RS bij_is_inj RS restrict_bij RS bij_converse_bij) 1); |
437 | 327 |
by (rtac pred_subset 1); |
328 |
val ordermap_eqpoll_pred = result(); |
|
329 |
||
330 |
(** Establishing the well-ordering **) |
|
331 |
||
332 |
goalw CardinalArith.thy [inj_def] |
|
484 | 333 |
"!!K. Ord(K) ==> \ |
334 |
\ (lam z:K*K. split(%x y. <x Un y, <x, y>>, z)) : inj(K*K, K*K*K)"; |
|
437 | 335 |
by (safe_tac ZF_cs); |
336 |
by (fast_tac (ZF_cs addIs [lam_type, Un_least_lt RS ltD, ltI] |
|
337 |
addSEs [split_type]) 1); |
|
338 |
by (asm_full_simp_tac ZF_ss 1); |
|
339 |
val csquare_lam_inj = result(); |
|
340 |
||
341 |
goalw CardinalArith.thy [csquare_rel_def] |
|
484 | 342 |
"!!K. Ord(K) ==> well_ord(K*K, csquare_rel(K))"; |
437 | 343 |
by (rtac (csquare_lam_inj RS well_ord_rvimage) 1); |
344 |
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1)); |
|
345 |
val well_ord_csquare = result(); |
|
346 |
||
347 |
(** Characterising initial segments of the well-ordering **) |
|
348 |
||
349 |
goalw CardinalArith.thy [csquare_rel_def] |
|
484 | 350 |
"!!K. [| x<K; y<K; z<K |] ==> \ |
351 |
\ <<x,y>, <z,z>> : csquare_rel(K) --> x le z & y le z"; |
|
437 | 352 |
by (REPEAT (etac ltE 1)); |
353 |
by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff, |
|
354 |
Un_absorb, Un_least_mem_iff, ltD]) 1); |
|
355 |
by (safe_tac (ZF_cs addSEs [mem_irrefl] |
|
356 |
addSIs [Un_upper1_le, Un_upper2_le])); |
|
357 |
by (ALLGOALS (asm_simp_tac (ZF_ss addsimps [lt_def, succI2, Ord_succ]))); |
|
358 |
val csquareD_lemma = result(); |
|
359 |
val csquareD = csquareD_lemma RS mp |> standard; |
|
360 |
||
361 |
goalw CardinalArith.thy [pred_def] |
|
484 | 362 |
"!!K. z<K ==> pred(K*K, <z,z>, csquare_rel(K)) <= succ(z)*succ(z)"; |
437 | 363 |
by (safe_tac (lemmas_cs addSEs [SigmaE])); (*avoids using succCI*) |
364 |
by (rtac (csquareD RS conjE) 1); |
|
365 |
by (rewtac lt_def); |
|
366 |
by (assume_tac 4); |
|
367 |
by (ALLGOALS (fast_tac ZF_cs)); |
|
368 |
val pred_csquare_subset = result(); |
|
369 |
||
370 |
goalw CardinalArith.thy [csquare_rel_def] |
|
484 | 371 |
"!!K. [| x<z; y<z; z<K |] ==> \ |
372 |
\ <<x,y>, <z,z>> : csquare_rel(K)"; |
|
373 |
by (subgoals_tac ["x<K", "y<K"] 1); |
|
437 | 374 |
by (REPEAT (eresolve_tac [asm_rl, lt_trans] 2)); |
375 |
by (REPEAT (etac ltE 1)); |
|
376 |
by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff, |
|
377 |
Un_absorb, Un_least_mem_iff, ltD]) 1); |
|
378 |
val csquare_ltI = result(); |
|
379 |
||
380 |
(*Part of the traditional proof. UNUSED since it's harder to prove & apply *) |
|
381 |
goalw CardinalArith.thy [csquare_rel_def] |
|
484 | 382 |
"!!K. [| x le z; y le z; z<K |] ==> \ |
383 |
\ <<x,y>, <z,z>> : csquare_rel(K) | x=z & y=z"; |
|
384 |
by (subgoals_tac ["x<K", "y<K"] 1); |
|
437 | 385 |
by (REPEAT (eresolve_tac [asm_rl, lt_trans1] 2)); |
386 |
by (REPEAT (etac ltE 1)); |
|
387 |
by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff, |
|
388 |
Un_absorb, Un_least_mem_iff, ltD]) 1); |
|
389 |
by (REPEAT_FIRST (etac succE)); |
|
390 |
by (ALLGOALS |
|
391 |
(asm_simp_tac (ZF_ss addsimps [subset_Un_iff RS iff_sym, |
|
392 |
subset_Un_iff2 RS iff_sym, OrdmemD]))); |
|
393 |
val csquare_or_eqI = result(); |
|
394 |
||
395 |
(** The cardinality of initial segments **) |
|
396 |
||
397 |
goal CardinalArith.thy |
|
484 | 398 |
"!!K. [| InfCard(K); x<K; y<K; z=succ(x Un y) |] ==> \ |
399 |
\ ordermap(K*K, csquare_rel(K)) ` <x,y> lepoll \ |
|
400 |
\ ordermap(K*K, csquare_rel(K)) ` <z,z>"; |
|
401 |
by (subgoals_tac ["z<K", "well_ord(K*K, csquare_rel(K))"] 1); |
|
437 | 402 |
by (etac (InfCard_is_Card RS Card_is_Ord RS well_ord_csquare) 2); |
403 |
by (fast_tac (ZF_cs addSIs [Un_least_lt, InfCard_is_Limit, Limit_has_succ]) 2); |
|
404 |
by (rtac (OrdmemD RS subset_imp_lepoll) 1); |
|
467 | 405 |
by (res_inst_tac [("z1","z")] (csquare_ltI RS ordermap_mono) 1); |
437 | 406 |
by (etac well_ord_is_wf 4); |
407 |
by (ALLGOALS |
|
408 |
(fast_tac (ZF_cs addSIs [Un_upper1_le, Un_upper2_le, Ord_ordermap] |
|
409 |
addSEs [ltE]))); |
|
410 |
val ordermap_z_lepoll = result(); |
|
411 |
||
484 | 412 |
(*Kunen: "each <x,y>: K*K has no more than z*z predecessors..." (page 29) *) |
437 | 413 |
goalw CardinalArith.thy [cmult_def] |
484 | 414 |
"!!K. [| InfCard(K); x<K; y<K; z=succ(x Un y) |] ==> \ |
415 |
\ | ordermap(K*K, csquare_rel(K)) ` <x,y> | le |succ(z)| |*| |succ(z)|"; |
|
437 | 416 |
by (rtac (well_ord_rmult RS well_ord_lepoll_imp_le) 1); |
417 |
by (REPEAT (ares_tac [Ord_cardinal, well_ord_Memrel] 1)); |
|
484 | 418 |
by (subgoals_tac ["z<K"] 1); |
437 | 419 |
by (fast_tac (ZF_cs addSIs [Un_least_lt, InfCard_is_Limit, |
420 |
Limit_has_succ]) 2); |
|
421 |
by (rtac (ordermap_z_lepoll RS lepoll_trans) 1); |
|
422 |
by (REPEAT_SOME assume_tac); |
|
423 |
by (rtac (ordermap_eqpoll_pred RS eqpoll_imp_lepoll RS lepoll_trans) 1); |
|
424 |
by (etac (InfCard_is_Card RS Card_is_Ord RS well_ord_csquare) 1); |
|
425 |
by (fast_tac (ZF_cs addIs [ltD]) 1); |
|
426 |
by (rtac (pred_csquare_subset RS subset_imp_lepoll RS lepoll_trans) 1 THEN |
|
427 |
assume_tac 1); |
|
428 |
by (REPEAT_FIRST (etac ltE)); |
|
429 |
by (rtac (prod_eqpoll_cong RS eqpoll_sym RS eqpoll_imp_lepoll) 1); |
|
430 |
by (REPEAT_FIRST (etac (Ord_succ RS Ord_cardinal_eqpoll))); |
|
431 |
val ordermap_csquare_le = result(); |
|
432 |
||
484 | 433 |
(*Kunen: "... so the order type <= K" *) |
437 | 434 |
goal CardinalArith.thy |
484 | 435 |
"!!K. [| InfCard(K); ALL y:K. InfCard(y) --> y |*| y = y |] ==> \ |
436 |
\ ordertype(K*K, csquare_rel(K)) le K"; |
|
437 | 437 |
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1); |
438 |
by (rtac all_lt_imp_le 1); |
|
439 |
by (assume_tac 1); |
|
440 |
by (etac (well_ord_csquare RS Ord_ordertype) 1); |
|
441 |
by (rtac Card_lt_imp_lt 1); |
|
442 |
by (etac InfCard_is_Card 3); |
|
443 |
by (etac ltE 2 THEN assume_tac 2); |
|
444 |
by (asm_full_simp_tac (ZF_ss addsimps [ordertype_unfold]) 1); |
|
445 |
by (safe_tac (ZF_cs addSEs [ltE])); |
|
446 |
by (subgoals_tac ["Ord(xb)", "Ord(y)"] 1); |
|
447 |
by (REPEAT (eresolve_tac [asm_rl, Ord_in_Ord] 2)); |
|
448 |
by (rtac (ordermap_csquare_le RS lt_trans1) 1 THEN |
|
449 |
REPEAT (ares_tac [refl] 1 ORELSE etac ltI 1)); |
|
450 |
by (res_inst_tac [("i","xb Un y"), ("j","nat")] Ord_linear2 1 THEN |
|
451 |
REPEAT (ares_tac [Ord_Un, Ord_nat] 1)); |
|
452 |
(*the finite case: xb Un y < nat *) |
|
453 |
by (res_inst_tac [("j", "nat")] lt_trans2 1); |
|
454 |
by (asm_full_simp_tac (FOL_ss addsimps [InfCard_def]) 2); |
|
455 |
by (asm_full_simp_tac |
|
456 |
(ZF_ss addsimps [lt_def, nat_cmult_eq_mult, nat_succI, mult_type, |
|
457 |
nat_into_Card RS Card_cardinal_eq, Ord_nat]) 1); |
|
458 |
(*case nat le (xb Un y), equivalently InfCard(xb Un y) *) |
|
459 |
by (asm_full_simp_tac |
|
460 |
(ZF_ss addsimps [le_imp_subset RS nat_succ_eqpoll RS cardinal_cong, |
|
461 |
le_succ_iff, InfCard_def, Card_cardinal, Un_least_lt, |
|
462 |
Ord_Un, ltI, nat_le_cardinal, |
|
463 |
Ord_cardinal_le RS lt_trans1 RS ltD]) 1); |
|
464 |
val ordertype_csquare_le = result(); |
|
465 |
||
466 |
(*This lemma can easily be generalized to premise well_ord(A*A,r) *) |
|
467 |
goalw CardinalArith.thy [cmult_def] |
|
484 | 468 |
"!!K. Ord(K) ==> K |*| K = |ordertype(K*K, csquare_rel(K))|"; |
437 | 469 |
by (rtac cardinal_cong 1); |
470 |
by (rewtac eqpoll_def); |
|
471 |
by (rtac exI 1); |
|
467 | 472 |
by (etac (well_ord_csquare RS ordermap_bij) 1); |
437 | 473 |
val csquare_eq_ordertype = result(); |
474 |
||
475 |
(*Main result: Kunen's Theorem 10.12*) |
|
484 | 476 |
goal CardinalArith.thy "!!K. InfCard(K) ==> K |*| K = K"; |
437 | 477 |
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1); |
478 |
by (etac rev_mp 1); |
|
484 | 479 |
by (trans_ind_tac "K" [] 1); |
437 | 480 |
by (rtac impI 1); |
481 |
by (rtac le_anti_sym 1); |
|
482 |
by (etac (InfCard_is_Card RS cmult_square_le) 2); |
|
483 |
by (rtac (ordertype_csquare_le RSN (2, le_trans)) 1); |
|
484 |
by (assume_tac 2); |
|
485 |
by (assume_tac 2); |
|
486 |
by (asm_simp_tac |
|
487 |
(ZF_ss addsimps [csquare_eq_ordertype, Ord_cardinal_le, |
|
488 |
well_ord_csquare RS Ord_ordertype]) 1); |
|
489 |
val InfCard_csquare_eq = result(); |
|
484 | 490 |
|
491 |
||
492 |
goal CardinalArith.thy |
|
493 |
"!!A. [| well_ord(A,r); InfCard(|A|) |] ==> A*A eqpoll A"; |
|
494 |
by (resolve_tac [prod_eqpoll_cong RS eqpoll_trans] 1); |
|
495 |
by (REPEAT (etac (well_ord_cardinal_eqpoll RS eqpoll_sym) 1)); |
|
496 |
by (resolve_tac [well_ord_cardinal_eqE] 1); |
|
497 |
by (REPEAT (ares_tac [Ord_cardinal, well_ord_rmult, well_ord_Memrel] 1)); |
|
498 |
by (asm_simp_tac (ZF_ss addsimps [symmetric cmult_def, InfCard_csquare_eq]) 1); |
|
499 |
val well_ord_InfCard_square_eq = result(); |
|
500 |
||
501 |
||
502 |
(*** For every cardinal number there exists a greater one |
|
503 |
[Kunen's Theorem 10.16, which would be trivial using AC] ***) |
|
504 |
||
505 |
goalw CardinalArith.thy [jump_cardinal_def] "Ord(jump_cardinal(K))"; |
|
506 |
by (rtac (Ord_is_Transset RSN (2,OrdI)) 1); |
|
507 |
by (safe_tac (ZF_cs addSIs [Ord_ordertype])); |
|
508 |
bw Transset_def; |
|
509 |
by (safe_tac ZF_cs); |
|
510 |
by (rtac (ordertype_subset RS exE) 1 THEN REPEAT (assume_tac 1)); |
|
511 |
by (resolve_tac [UN_I] 1); |
|
512 |
by (resolve_tac [ReplaceI] 2); |
|
513 |
by (ALLGOALS (fast_tac (ZF_cs addSEs [well_ord_subset]))); |
|
514 |
val Ord_jump_cardinal = result(); |
|
515 |
||
516 |
(*Allows selective unfolding. Less work than deriving intro/elim rules*) |
|
517 |
goalw CardinalArith.thy [jump_cardinal_def] |
|
518 |
"i : jump_cardinal(K) <-> \ |
|
519 |
\ (EX r X. r <= K*K & X <= K & well_ord(X,r) & i = ordertype(X,r))"; |
|
520 |
by (fast_tac subset_cs 1); (*It's vital to avoid reasoning about <=*) |
|
521 |
val jump_cardinal_iff = result(); |
|
522 |
||
523 |
(*The easy part of Theorem 10.16: jump_cardinal(K) exceeds K*) |
|
524 |
goal CardinalArith.thy "!!K. Ord(K) ==> K < jump_cardinal(K)"; |
|
525 |
by (resolve_tac [Ord_jump_cardinal RSN (2,ltI)] 1); |
|
526 |
by (resolve_tac [jump_cardinal_iff RS iffD2] 1); |
|
527 |
by (REPEAT_FIRST (ares_tac [exI, conjI, well_ord_Memrel])); |
|
528 |
by (resolve_tac [subset_refl] 2); |
|
529 |
by (asm_simp_tac (ZF_ss addsimps [Memrel_def, subset_iff]) 1); |
|
530 |
by (asm_simp_tac (ZF_ss addsimps [ordertype_Memrel]) 1); |
|
531 |
val K_lt_jump_cardinal = result(); |
|
532 |
||
533 |
(*The proof by contradiction: the bijection f yields a wellordering of X |
|
534 |
whose ordertype is jump_cardinal(K). *) |
|
535 |
goal CardinalArith.thy |
|
536 |
"!!K. [| well_ord(X,r); r <= K * K; X <= K; \ |
|
537 |
\ f : bij(ordertype(X,r), jump_cardinal(K)) \ |
|
538 |
\ |] ==> jump_cardinal(K) : jump_cardinal(K)"; |
|
539 |
by (subgoal_tac "f O ordermap(X,r): bij(X, jump_cardinal(K))" 1); |
|
540 |
by (REPEAT (ares_tac [comp_bij, ordermap_bij] 2)); |
|
541 |
by (resolve_tac [jump_cardinal_iff RS iffD2] 1); |
|
542 |
by (REPEAT_FIRST (resolve_tac [exI, conjI])); |
|
543 |
by (rtac ([rvimage_type, Sigma_mono] MRS subset_trans) 1); |
|
544 |
by (REPEAT (assume_tac 1)); |
|
545 |
by (etac (bij_is_inj RS well_ord_rvimage) 1); |
|
546 |
by (rtac (Ord_jump_cardinal RS well_ord_Memrel) 1); |
|
547 |
by (asm_simp_tac |
|
548 |
(ZF_ss addsimps [well_ord_Memrel RSN (2, bij_ordertype_vimage), |
|
549 |
ordertype_Memrel, Ord_jump_cardinal]) 1); |
|
550 |
val Card_jump_cardinal_lemma = result(); |
|
551 |
||
552 |
(*The hard part of Theorem 10.16: jump_cardinal(K) is itself a cardinal*) |
|
553 |
goal CardinalArith.thy "Card(jump_cardinal(K))"; |
|
554 |
by (rtac (Ord_jump_cardinal RS CardI) 1); |
|
555 |
by (rewrite_goals_tac [eqpoll_def]); |
|
556 |
by (safe_tac (ZF_cs addSDs [ltD, jump_cardinal_iff RS iffD1])); |
|
557 |
by (REPEAT (ares_tac [Card_jump_cardinal_lemma RS mem_irrefl] 1)); |
|
558 |
val Card_jump_cardinal = result(); |
|
559 |
||
560 |
(*** Basic properties of successor cardinals ***) |
|
561 |
||
562 |
goalw CardinalArith.thy [csucc_def] |
|
563 |
"!!K. Ord(K) ==> Card(csucc(K)) & K < csucc(K)"; |
|
564 |
by (rtac LeastI 1); |
|
565 |
by (REPEAT (ares_tac [conjI, Card_jump_cardinal, K_lt_jump_cardinal, |
|
566 |
Ord_jump_cardinal] 1)); |
|
567 |
val csucc_basic = result(); |
|
568 |
||
569 |
val Card_csucc = csucc_basic RS conjunct1 |> standard; |
|
570 |
||
571 |
val lt_csucc = csucc_basic RS conjunct2 |> standard; |
|
572 |
||
517 | 573 |
goal CardinalArith.thy "!!K. Ord(K) ==> 0 < csucc(K)"; |
574 |
by (resolve_tac [[Ord_0_le, lt_csucc] MRS lt_trans1] 1); |
|
575 |
by (REPEAT (assume_tac 1)); |
|
576 |
val Ord_0_lt_csucc = result(); |
|
577 |
||
484 | 578 |
goalw CardinalArith.thy [csucc_def] |
579 |
"!!K L. [| Card(L); K<L |] ==> csucc(K) le L"; |
|
580 |
by (rtac Least_le 1); |
|
581 |
by (REPEAT (ares_tac [conjI, Card_is_Ord] 1)); |
|
582 |
val csucc_le = result(); |
|
583 |
||
584 |
goal CardinalArith.thy |
|
585 |
"!!K. [| Ord(i); Card(K) |] ==> i < csucc(K) <-> |i| le K"; |
|
586 |
by (resolve_tac [iffI] 1); |
|
587 |
by (resolve_tac [Card_lt_imp_lt] 2); |
|
588 |
by (eresolve_tac [lt_trans1] 2); |
|
589 |
by (REPEAT (ares_tac [lt_csucc, Card_csucc, Card_is_Ord] 2)); |
|
590 |
by (resolve_tac [notI RS not_lt_imp_le] 1); |
|
591 |
by (resolve_tac [Card_cardinal RS csucc_le RS lt_trans1 RS lt_irrefl] 1); |
|
592 |
by (assume_tac 1); |
|
593 |
by (resolve_tac [Ord_cardinal_le RS lt_trans1] 1); |
|
594 |
by (REPEAT (ares_tac [Ord_cardinal] 1 |
|
595 |
ORELSE eresolve_tac [ltE, Card_is_Ord] 1)); |
|
596 |
val lt_csucc_iff = result(); |
|
597 |
||
598 |
goal CardinalArith.thy |
|
599 |
"!!K' K. [| Card(K'); Card(K) |] ==> K' < csucc(K) <-> K' le K"; |
|
600 |
by (asm_simp_tac |
|
601 |
(ZF_ss addsimps [lt_csucc_iff, Card_cardinal_eq, Card_is_Ord]) 1); |
|
602 |
val Card_lt_csucc_iff = result(); |
|
488 | 603 |
|
604 |
goalw CardinalArith.thy [InfCard_def] |
|
605 |
"!!K. InfCard(K) ==> InfCard(csucc(K))"; |
|
606 |
by (asm_simp_tac (ZF_ss addsimps [Card_csucc, Card_is_Ord, |
|
607 |
lt_csucc RS leI RSN (2,le_trans)]) 1); |
|
608 |
val InfCard_csucc = result(); |
|
517 | 609 |
|
610 |
val Limit_csucc = InfCard_csucc RS InfCard_is_Limit |> standard; |