author  paulson 
Tue, 13 Mar 2012 12:04:07 +0000  
changeset 46901  1382bba4b7a5 
parent 46841  49b91b716cbe 
child 46907  eea3eb057fea 
permissions  rwrr 
1478  1 
(* Title: ZF/CardinalArith.thy 
2 
Author: Lawrence C Paulson, Cambridge University Computer Laboratory 

437  3 
Copyright 1994 University of Cambridge 
13328  4 
*) 
13216  5 

13328  6 
header{*Cardinal Arithmetic Without the Axiom of Choice*} 
437  7 

16417  8 
theory CardinalArith imports Cardinal OrderArith ArithSimp Finite begin 
467  9 

24893  10 
definition 
11 
InfCard :: "i=>o" where 

46820  12 
"InfCard(i) == Card(i) & nat \<le> i" 
437  13 

24893  14 
definition 
15 
cmult :: "[i,i]=>i" (infixl "*" 70) where 

12667  16 
"i * j == i*j" 
46820  17 

24893  18 
definition 
19 
cadd :: "[i,i]=>i" (infixl "+" 65) where 

12667  20 
"i + j == i+j" 
437  21 

24893  22 
definition 
23 
csquare_rel :: "i=>i" where 

46820  24 
"csquare_rel(K) == 
25 
rvimage(K*K, 

26 
lam <x,y>:K*K. <x \<union> y, x, y>, 

32960
69916a850301
eliminated hard tabulators, guessing at each author's individual tabwidth;
wenzelm
parents:
27517
diff
changeset

27 
rmult(K,Memrel(K), K*K, rmult(K,Memrel(K), K,Memrel(K))))" 
437  28 

24893  29 
definition 
30 
jump_cardinal :: "i=>i" where 

14883  31 
{*This def is more complex than Kunen's but it more easily proved to 
32 
be a cardinal*} 

46820  33 
"jump_cardinal(K) == 
13615
449a70d88b38
Numerous cosmetic changes, prompted by the new simplifier
paulson
parents:
13356
diff
changeset

34 
\<Union>X\<in>Pow(K). {z. r: Pow(K*K), well_ord(X,r) & z = ordertype(X,r)}" 
46820  35 

24893  36 
definition 
37 
csucc :: "i=>i" where 

14883  38 
{*needed because @{term "jump_cardinal(K)"} might not be the successor 
39 
of @{term K}*} 

12667  40 
"csucc(K) == LEAST L. Card(L) & K<L" 
484  41 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

42 
notation (xsymbols) 
24893  43 
cadd (infixl "\<oplus>" 65) and 
44 
cmult (infixl "\<otimes>" 70) 

45 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

46 
notation (HTML) 
24893  47 
cadd (infixl "\<oplus>" 65) and 
48 
cmult (infixl "\<otimes>" 70) 

12667  49 

50 

46841
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

51 
lemma Card_Union [simp,intro,TC]: 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

52 
assumes A: "\<And>x. x\<in>A \<Longrightarrow> Card(x)" shows "Card(\<Union>(A))" 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

53 
proof (rule CardI) 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

54 
show "Ord(\<Union>A)" using A 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

55 
by (simp add: Card_is_Ord) 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

56 
next 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

57 
fix j 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

58 
assume j: "j < \<Union>A" 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

59 
hence "\<exists>c\<in>A. j < c & Card(c)" using A 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

60 
by (auto simp add: lt_def intro: Card_is_Ord) 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

61 
then obtain c where c: "c\<in>A" "j < c" "Card(c)" 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

62 
by blast 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

63 
hence jls: "j \<prec> c" 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

64 
by (simp add: lt_Card_imp_lesspoll) 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

65 
{ assume eqp: "j \<approx> \<Union>A" 
46901  66 
have "c \<lesssim> \<Union>A" using c 
46841
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

67 
by (blast intro: subset_imp_lepoll) 
46901  68 
also have "... \<approx> j" by (rule eqpoll_sym [OF eqp]) 
69 
also have "... \<prec> c" by (rule jls) 

70 
finally have "c \<prec> c" . 

46841
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

71 
hence False 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

72 
by auto 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

73 
} thus "\<not> j \<approx> \<Union>A" by blast 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

74 
qed 
12667  75 

46820  76 
lemma Card_UN: "(!!x. x:A ==> Card(K(x))) ==> Card(\<Union>x\<in>A. K(x))" 
46841
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

77 
by blast 
12667  78 

79 
lemma Card_OUN [simp,intro,TC]: 

13615
449a70d88b38
Numerous cosmetic changes, prompted by the new simplifier
paulson
parents:
13356
diff
changeset

80 
"(!!x. x:A ==> Card(K(x))) ==> Card(\<Union>x<A. K(x))" 
46841
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

81 
by (auto simp add: OUnion_def Card_0) 
12776  82 

83 
lemma in_Card_imp_lesspoll: "[ Card(K); b \<in> K ] ==> b \<prec> K" 

84 
apply (unfold lesspoll_def) 

85 
apply (simp add: Card_iff_initial) 

86 
apply (fast intro!: le_imp_lepoll ltI leI) 

87 
done 

88 

13216  89 

13356  90 
subsection{*Cardinal addition*} 
13216  91 

13328  92 
text{*Note: Could omit proving the algebraic laws for cardinal addition and 
93 
multiplication. On finite cardinals these operations coincide with 

94 
addition and multiplication of natural numbers; on infinite cardinals they 

95 
coincide with union (maximum). Either way we get most laws for free.*} 

96 

14883  97 
subsubsection{*Cardinal addition is commutative*} 
13216  98 

99 
lemma sum_commute_eqpoll: "A+B \<approx> B+A" 

46841
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

100 
proof (unfold eqpoll_def, rule exI) 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

101 
show "(\<lambda>z\<in>A+B. case(Inr,Inl,z)) \<in> bij(A+B, B+A)" 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

102 
by (auto intro: lam_bijective [where d = "case(Inr,Inl)"]) 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

103 
qed 
13216  104 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

105 
lemma cadd_commute: "i \<oplus> j = j \<oplus> i" 
13216  106 
apply (unfold cadd_def) 
107 
apply (rule sum_commute_eqpoll [THEN cardinal_cong]) 

108 
done 

109 

14883  110 
subsubsection{*Cardinal addition is associative*} 
13216  111 

112 
lemma sum_assoc_eqpoll: "(A+B)+C \<approx> A+(B+C)" 

113 
apply (unfold eqpoll_def) 

114 
apply (rule exI) 

115 
apply (rule sum_assoc_bij) 

116 
done 

117 

46901  118 
text{*Unconditional version requires AC*} 
46820  119 
lemma well_ord_cadd_assoc: 
46901  120 
assumes i: "well_ord(i,ri)" and j: "well_ord(j,rj)" and k: "well_ord(k,rk)" 
121 
shows "(i \<oplus> j) \<oplus> k = i \<oplus> (j \<oplus> k)" 

122 
proof (unfold cadd_def, rule cardinal_cong) 

123 
have "i + j + k \<approx> (i + j) + k" 

124 
by (blast intro: sum_eqpoll_cong well_ord_cardinal_eqpoll eqpoll_refl well_ord_radd i j) 

125 
also have "... \<approx> i + (j + k)" 

126 
by (rule sum_assoc_eqpoll) 

127 
also have "... \<approx> i + j + k" 

128 
by (blast intro: sum_eqpoll_cong well_ord_cardinal_eqpoll eqpoll_refl well_ord_radd j k eqpoll_sym) 

129 
finally show "i + j + k \<approx> i + j + k" . 

130 
qed 

131 

13216  132 

14883  133 
subsubsection{*0 is the identity for addition*} 
13216  134 

135 
lemma sum_0_eqpoll: "0+A \<approx> A" 

136 
apply (unfold eqpoll_def) 

137 
apply (rule exI) 

138 
apply (rule bij_0_sum) 

139 
done 

140 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

141 
lemma cadd_0 [simp]: "Card(K) ==> 0 \<oplus> K = K" 
13216  142 
apply (unfold cadd_def) 
143 
apply (simp add: sum_0_eqpoll [THEN cardinal_cong] Card_cardinal_eq) 

144 
done 

145 

14883  146 
subsubsection{*Addition by another cardinal*} 
13216  147 

148 
lemma sum_lepoll_self: "A \<lesssim> A+B" 

46841
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

149 
proof (unfold lepoll_def, rule exI) 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

150 
show "(\<lambda>x\<in>A. Inl (x)) \<in> inj(A, A + B)" 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

151 
by (simp add: inj_def) 
49b91b716cbe
Structured and calculationbased proofs (with new trans rules!)
paulson
parents:
46821
diff
changeset

152 
qed 
13216  153 

154 
(*Could probably weaken the premises to well_ord(K,r), or removing using AC*) 

155 

46820  156 
lemma cadd_le_self: 
46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

157 
"[ Card(K); Ord(L) ] ==> K \<le> (K \<oplus> L)" 
13216  158 
apply (unfold cadd_def) 
13221  159 
apply (rule le_trans [OF Card_cardinal_le well_ord_lepoll_imp_Card_le], 
160 
assumption) 

13216  161 
apply (rule_tac [2] sum_lepoll_self) 
162 
apply (blast intro: well_ord_radd well_ord_Memrel Card_is_Ord) 

163 
done 

164 

14883  165 
subsubsection{*Monotonicity of addition*} 
13216  166 

46820  167 
lemma sum_lepoll_mono: 
13221  168 
"[ A \<lesssim> C; B \<lesssim> D ] ==> A + B \<lesssim> C + D" 
13216  169 
apply (unfold lepoll_def) 
13221  170 
apply (elim exE) 
46820  171 
apply (rule_tac x = "\<lambda>z\<in>A+B. case (%w. Inl(f`w), %y. Inr(fa`y), z)" in exI) 
13221  172 
apply (rule_tac d = "case (%w. Inl(converse(f) `w), %y. Inr(converse(fa) ` y))" 
13216  173 
in lam_injective) 
13221  174 
apply (typecheck add: inj_is_fun, auto) 
13216  175 
done 
176 

177 
lemma cadd_le_mono: 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

178 
"[ K' \<le> K; L' \<le> L ] ==> (K' \<oplus> L') \<le> (K \<oplus> L)" 
13216  179 
apply (unfold cadd_def) 
180 
apply (safe dest!: le_subset_iff [THEN iffD1]) 

181 
apply (rule well_ord_lepoll_imp_Card_le) 

182 
apply (blast intro: well_ord_radd well_ord_Memrel) 

183 
apply (blast intro: sum_lepoll_mono subset_imp_lepoll) 

184 
done 

185 

14883  186 
subsubsection{*Addition of finite cardinals is "ordinary" addition*} 
13216  187 

188 
lemma sum_succ_eqpoll: "succ(A)+B \<approx> succ(A+B)" 

189 
apply (unfold eqpoll_def) 

190 
apply (rule exI) 

46820  191 
apply (rule_tac c = "%z. if z=Inl (A) then A+B else z" 
13216  192 
and d = "%z. if z=A+B then Inl (A) else z" in lam_bijective) 
13221  193 
apply simp_all 
13216  194 
apply (blast dest: sym [THEN eq_imp_not_mem] elim: mem_irrefl)+ 
195 
done 

196 

197 
(*Pulling the succ(...) outside the ... requires m, n: nat *) 

198 
(*Unconditional version requires AC*) 

199 
lemma cadd_succ_lemma: 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

200 
"[ Ord(m); Ord(n) ] ==> succ(m) \<oplus> n = succ(m \<oplus> n)" 
13216  201 
apply (unfold cadd_def) 
202 
apply (rule sum_succ_eqpoll [THEN cardinal_cong, THEN trans]) 

203 
apply (rule succ_eqpoll_cong [THEN cardinal_cong]) 

204 
apply (rule well_ord_cardinal_eqpoll [THEN eqpoll_sym]) 

205 
apply (blast intro: well_ord_radd well_ord_Memrel) 

206 
done 

207 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

208 
lemma nat_cadd_eq_add: "[ m: nat; n: nat ] ==> m \<oplus> n = m#+n" 
13244  209 
apply (induct_tac m) 
13216  210 
apply (simp add: nat_into_Card [THEN cadd_0]) 
211 
apply (simp add: cadd_succ_lemma nat_into_Card [THEN Card_cardinal_eq]) 

212 
done 

213 

214 

13356  215 
subsection{*Cardinal multiplication*} 
13216  216 

14883  217 
subsubsection{*Cardinal multiplication is commutative*} 
13216  218 

219 
lemma prod_commute_eqpoll: "A*B \<approx> B*A" 

220 
apply (unfold eqpoll_def) 

221 
apply (rule exI) 

46820  222 
apply (rule_tac c = "%<x,y>.<y,x>" and d = "%<x,y>.<y,x>" in lam_bijective, 
223 
auto) 

13216  224 
done 
225 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

226 
lemma cmult_commute: "i \<otimes> j = j \<otimes> i" 
13216  227 
apply (unfold cmult_def) 
228 
apply (rule prod_commute_eqpoll [THEN cardinal_cong]) 

229 
done 

230 

14883  231 
subsubsection{*Cardinal multiplication is associative*} 
13216  232 

233 
lemma prod_assoc_eqpoll: "(A*B)*C \<approx> A*(B*C)" 

234 
apply (unfold eqpoll_def) 

235 
apply (rule exI) 

236 
apply (rule prod_assoc_bij) 

237 
done 

238 

46901  239 
text{*Unconditional version requires AC*} 
13216  240 
lemma well_ord_cmult_assoc: 
46901  241 
assumes i: "well_ord(i,ri)" and j: "well_ord(j,rj)" and k: "well_ord(k,rk)" 
242 
shows "(i \<otimes> j) \<otimes> k = i \<otimes> (j \<otimes> k)" 

243 
proof (unfold cmult_def, rule cardinal_cong) 

244 
have "i * j * k \<approx> (i * j) * k" 

245 
by (blast intro: prod_eqpoll_cong well_ord_cardinal_eqpoll eqpoll_refl well_ord_rmult i j) 

246 
also have "... \<approx> i * (j * k)" 

247 
by (rule prod_assoc_eqpoll) 

248 
also have "... \<approx> i * j * k" 

249 
by (blast intro: prod_eqpoll_cong well_ord_cardinal_eqpoll eqpoll_refl well_ord_rmult j k eqpoll_sym) 

250 
finally show "i * j * k \<approx> i * j * k" . 

251 
qed 

13216  252 

14883  253 
subsubsection{*Cardinal multiplication distributes over addition*} 
13216  254 

255 
lemma sum_prod_distrib_eqpoll: "(A+B)*C \<approx> (A*C)+(B*C)" 

256 
apply (unfold eqpoll_def) 

257 
apply (rule exI) 

258 
apply (rule sum_prod_distrib_bij) 

259 
done 

260 

261 
lemma well_ord_cadd_cmult_distrib: 

46901  262 
assumes i: "well_ord(i,ri)" and j: "well_ord(j,rj)" and k: "well_ord(k,rk)" 
263 
shows "(i \<oplus> j) \<otimes> k = (i \<otimes> k) \<oplus> (j \<otimes> k)" 

264 
proof (unfold cadd_def cmult_def, rule cardinal_cong) 

265 
have "i + j * k \<approx> (i + j) * k" 

266 
by (blast intro: prod_eqpoll_cong well_ord_cardinal_eqpoll eqpoll_refl well_ord_radd i j) 

267 
also have "... \<approx> i * k + j * k" 

268 
by (rule sum_prod_distrib_eqpoll) 

269 
also have "... \<approx> i * k + j * k" 

270 
by (blast intro: sum_eqpoll_cong well_ord_cardinal_eqpoll well_ord_rmult i j k eqpoll_sym) 

271 
finally show "i + j * k \<approx> i * k + j * k" . 

272 
qed 

13216  273 

14883  274 
subsubsection{*Multiplication by 0 yields 0*} 
13216  275 

276 
lemma prod_0_eqpoll: "0*A \<approx> 0" 

277 
apply (unfold eqpoll_def) 

278 
apply (rule exI) 

13221  279 
apply (rule lam_bijective, safe) 
13216  280 
done 
281 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

282 
lemma cmult_0 [simp]: "0 \<otimes> i = 0" 
13221  283 
by (simp add: cmult_def prod_0_eqpoll [THEN cardinal_cong]) 
13216  284 

14883  285 
subsubsection{*1 is the identity for multiplication*} 
13216  286 

287 
lemma prod_singleton_eqpoll: "{x}*A \<approx> A" 

288 
apply (unfold eqpoll_def) 

289 
apply (rule exI) 

290 
apply (rule singleton_prod_bij [THEN bij_converse_bij]) 

291 
done 

292 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

293 
lemma cmult_1 [simp]: "Card(K) ==> 1 \<otimes> K = K" 
13216  294 
apply (unfold cmult_def succ_def) 
295 
apply (simp add: prod_singleton_eqpoll [THEN cardinal_cong] Card_cardinal_eq) 

296 
done 

297 

13356  298 
subsection{*Some inequalities for multiplication*} 
13216  299 

300 
lemma prod_square_lepoll: "A \<lesssim> A*A" 

301 
apply (unfold lepoll_def inj_def) 

46820  302 
apply (rule_tac x = "\<lambda>x\<in>A. <x,x>" in exI, simp) 
13216  303 
done 
304 

305 
(*Could probably weaken the premise to well_ord(K,r), or remove using AC*) 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

306 
lemma cmult_square_le: "Card(K) ==> K \<le> K \<otimes> K" 
13216  307 
apply (unfold cmult_def) 
308 
apply (rule le_trans) 

309 
apply (rule_tac [2] well_ord_lepoll_imp_Card_le) 

310 
apply (rule_tac [3] prod_square_lepoll) 

13221  311 
apply (simp add: le_refl Card_is_Ord Card_cardinal_eq) 
312 
apply (blast intro: well_ord_rmult well_ord_Memrel Card_is_Ord) 

13216  313 
done 
314 

14883  315 
subsubsection{*Multiplication by a nonzero cardinal*} 
13216  316 

317 
lemma prod_lepoll_self: "b: B ==> A \<lesssim> A*B" 

318 
apply (unfold lepoll_def inj_def) 

46820  319 
apply (rule_tac x = "\<lambda>x\<in>A. <x,b>" in exI, simp) 
13216  320 
done 
321 

322 
(*Could probably weaken the premises to well_ord(K,r), or removing using AC*) 

323 
lemma cmult_le_self: 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

324 
"[ Card(K); Ord(L); 0<L ] ==> K \<le> (K \<otimes> L)" 
13216  325 
apply (unfold cmult_def) 
326 
apply (rule le_trans [OF Card_cardinal_le well_ord_lepoll_imp_Card_le]) 

13221  327 
apply assumption 
13216  328 
apply (blast intro: well_ord_rmult well_ord_Memrel Card_is_Ord) 
329 
apply (blast intro: prod_lepoll_self ltD) 

330 
done 

331 

14883  332 
subsubsection{*Monotonicity of multiplication*} 
13216  333 

334 
lemma prod_lepoll_mono: 

335 
"[ A \<lesssim> C; B \<lesssim> D ] ==> A * B \<lesssim> C * D" 

336 
apply (unfold lepoll_def) 

13221  337 
apply (elim exE) 
13216  338 
apply (rule_tac x = "lam <w,y>:A*B. <f`w, fa`y>" in exI) 
46820  339 
apply (rule_tac d = "%<w,y>. <converse (f) `w, converse (fa) `y>" 
13216  340 
in lam_injective) 
13221  341 
apply (typecheck add: inj_is_fun, auto) 
13216  342 
done 
343 

344 
lemma cmult_le_mono: 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

345 
"[ K' \<le> K; L' \<le> L ] ==> (K' \<otimes> L') \<le> (K \<otimes> L)" 
13216  346 
apply (unfold cmult_def) 
347 
apply (safe dest!: le_subset_iff [THEN iffD1]) 

348 
apply (rule well_ord_lepoll_imp_Card_le) 

349 
apply (blast intro: well_ord_rmult well_ord_Memrel) 

350 
apply (blast intro: prod_lepoll_mono subset_imp_lepoll) 

351 
done 

352 

13356  353 
subsection{*Multiplication of finite cardinals is "ordinary" multiplication*} 
13216  354 

355 
lemma prod_succ_eqpoll: "succ(A)*B \<approx> B + A*B" 

356 
apply (unfold eqpoll_def) 

13221  357 
apply (rule exI) 
13216  358 
apply (rule_tac c = "%<x,y>. if x=A then Inl (y) else Inr (<x,y>)" 
359 
and d = "case (%y. <A,y>, %z. z)" in lam_bijective) 

360 
apply safe 

361 
apply (simp_all add: succI2 if_type mem_imp_not_eq) 

362 
done 

363 

364 
(*Unconditional version requires AC*) 

365 
lemma cmult_succ_lemma: 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

366 
"[ Ord(m); Ord(n) ] ==> succ(m) \<otimes> n = n \<oplus> (m \<otimes> n)" 
13216  367 
apply (unfold cmult_def cadd_def) 
368 
apply (rule prod_succ_eqpoll [THEN cardinal_cong, THEN trans]) 

369 
apply (rule cardinal_cong [symmetric]) 

370 
apply (rule sum_eqpoll_cong [OF eqpoll_refl well_ord_cardinal_eqpoll]) 

371 
apply (blast intro: well_ord_rmult well_ord_Memrel) 

372 
done 

373 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

374 
lemma nat_cmult_eq_mult: "[ m: nat; n: nat ] ==> m \<otimes> n = m#*n" 
13244  375 
apply (induct_tac m) 
13221  376 
apply (simp_all add: cmult_succ_lemma nat_cadd_eq_add) 
13216  377 
done 
378 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

379 
lemma cmult_2: "Card(n) ==> 2 \<otimes> n = n \<oplus> n" 
13221  380 
by (simp add: cmult_succ_lemma Card_is_Ord cadd_commute [of _ 0]) 
13216  381 

46901  382 
lemma sum_lepoll_prod: 
383 
assumes C: "2 \<lesssim> C" shows "B+B \<lesssim> C*B" 

384 
proof  

385 
have "B+B \<lesssim> 2*B" 

386 
by (simp add: sum_eq_2_times) 

387 
also have "... \<lesssim> C*B" 

388 
by (blast intro: prod_lepoll_mono lepoll_refl C) 

389 
finally show "B+B \<lesssim> C*B" . 

390 
qed 

13216  391 

392 
lemma lepoll_imp_sum_lepoll_prod: "[ A \<lesssim> B; 2 \<lesssim> A ] ==> A+B \<lesssim> A*B" 

13221  393 
by (blast intro: sum_lepoll_mono sum_lepoll_prod lepoll_trans lepoll_refl) 
13216  394 

395 

13356  396 
subsection{*Infinite Cardinals are Limit Ordinals*} 
13216  397 

398 
(*This proof is modelled upon one assuming nat<=A, with injection 

46820  399 
\<lambda>z\<in>cons(u,A). if z=u then 0 else if z \<in> nat then succ(z) else z 
13216  400 
and inverse %y. if y:nat then nat_case(u, %z. z, y) else y. \ 
401 
If f: inj(nat,A) then range(f) behaves like the natural numbers.*) 

402 
lemma nat_cons_lepoll: "nat \<lesssim> A ==> cons(u,A) \<lesssim> A" 

403 
apply (unfold lepoll_def) 

404 
apply (erule exE) 

46820  405 
apply (rule_tac x = 
406 
"\<lambda>z\<in>cons (u,A). 

407 
if z=u then f`0 

408 
else if z: range (f) then f`succ (converse (f) `z) else z" 

13216  409 
in exI) 
410 
apply (rule_tac d = 

46820  411 
"%y. if y: range(f) then nat_case (u, %z. f`z, converse(f) `y) 
412 
else y" 

13216  413 
in lam_injective) 
414 
apply (fast intro!: if_type apply_type intro: inj_is_fun inj_converse_fun) 

415 
apply (simp add: inj_is_fun [THEN apply_rangeI] 

416 
inj_converse_fun [THEN apply_rangeI] 

417 
inj_converse_fun [THEN apply_funtype]) 

418 
done 

419 

420 
lemma nat_cons_eqpoll: "nat \<lesssim> A ==> cons(u,A) \<approx> A" 

421 
apply (erule nat_cons_lepoll [THEN eqpollI]) 

422 
apply (rule subset_consI [THEN subset_imp_lepoll]) 

423 
done 

424 

425 
(*Specialized version required below*) 

46820  426 
lemma nat_succ_eqpoll: "nat \<subseteq> A ==> succ(A) \<approx> A" 
13216  427 
apply (unfold succ_def) 
428 
apply (erule subset_imp_lepoll [THEN nat_cons_eqpoll]) 

429 
done 

430 

431 
lemma InfCard_nat: "InfCard(nat)" 

432 
apply (unfold InfCard_def) 

433 
apply (blast intro: Card_nat le_refl Card_is_Ord) 

434 
done 

435 

436 
lemma InfCard_is_Card: "InfCard(K) ==> Card(K)" 

437 
apply (unfold InfCard_def) 

438 
apply (erule conjunct1) 

439 
done 

440 

441 
lemma InfCard_Un: 

46820  442 
"[ InfCard(K); Card(L) ] ==> InfCard(K \<union> L)" 
13216  443 
apply (unfold InfCard_def) 
444 
apply (simp add: Card_Un Un_upper1_le [THEN [2] le_trans] Card_is_Ord) 

445 
done 

446 

447 
(*Kunen's Lemma 10.11*) 

448 
lemma InfCard_is_Limit: "InfCard(K) ==> Limit(K)" 

449 
apply (unfold InfCard_def) 

450 
apply (erule conjE) 

451 
apply (frule Card_is_Ord) 

452 
apply (rule ltI [THEN non_succ_LimitI]) 

453 
apply (erule le_imp_subset [THEN subsetD]) 

454 
apply (safe dest!: Limit_nat [THEN Limit_le_succD]) 

455 
apply (unfold Card_def) 

456 
apply (drule trans) 

457 
apply (erule le_imp_subset [THEN nat_succ_eqpoll, THEN cardinal_cong]) 

458 
apply (erule Ord_cardinal_le [THEN lt_trans2, THEN lt_irrefl]) 

13221  459 
apply (rule le_eqI, assumption) 
13216  460 
apply (rule Ord_cardinal) 
461 
done 

462 

463 

464 
(*** An infinite cardinal equals its square (Kunen, Thm 10.12, page 29) ***) 

465 

466 
(*A general fact about ordermap*) 

467 
lemma ordermap_eqpoll_pred: 

13269  468 
"[ well_ord(A,r); x:A ] ==> ordermap(A,r)`x \<approx> Order.pred(A,x,r)" 
13216  469 
apply (unfold eqpoll_def) 
470 
apply (rule exI) 

13221  471 
apply (simp add: ordermap_eq_image well_ord_is_wf) 
46820  472 
apply (erule ordermap_bij [THEN bij_is_inj, THEN restrict_bij, 
13221  473 
THEN bij_converse_bij]) 
13216  474 
apply (rule pred_subset) 
475 
done 

476 

14883  477 
subsubsection{*Establishing the wellordering*} 
13216  478 

46901  479 
lemma well_ord_csquare: 
480 
assumes K: "Ord(K)" shows "well_ord(K*K, csquare_rel(K))" 

481 
proof (unfold csquare_rel_def, rule well_ord_rvimage) 

482 
show "(\<lambda>\<langle>x,y\<rangle>\<in>K \<times> K. \<langle>x \<union> y, x, y\<rangle>) \<in> inj(K \<times> K, K \<times> K \<times> K)" using K 

483 
by (force simp add: inj_def intro: lam_type Un_least_lt [THEN ltD] ltI) 

484 
next 

485 
show "well_ord(K \<times> K \<times> K, rmult(K, Memrel(K), K \<times> K, rmult(K, Memrel(K), K, Memrel(K))))" 

486 
using K by (blast intro: well_ord_rmult well_ord_Memrel) 

487 
qed 

13216  488 

14883  489 
subsubsection{*Characterising initial segments of the wellordering*} 
13216  490 

491 
lemma csquareD: 

46820  492 
"[ <<x,y>, <z,z>> \<in> csquare_rel(K); x<K; y<K; z<K ] ==> x \<le> z & y \<le> z" 
13216  493 
apply (unfold csquare_rel_def) 
494 
apply (erule rev_mp) 

495 
apply (elim ltE) 

13221  496 
apply (simp add: rvimage_iff Un_absorb Un_least_mem_iff ltD) 
13216  497 
apply (safe elim!: mem_irrefl intro!: Un_upper1_le Un_upper2_le) 
13221  498 
apply (simp_all add: lt_def succI2) 
13216  499 
done 
500 

46820  501 
lemma pred_csquare_subset: 
502 
"z<K ==> Order.pred(K*K, <z,z>, csquare_rel(K)) \<subseteq> succ(z)*succ(z)" 

13216  503 
apply (unfold Order.pred_def) 
46901  504 
apply (safe del: SigmaI dest!: csquareD) 
46820  505 
apply (unfold lt_def, auto) 
13216  506 
done 
507 

508 
lemma csquare_ltI: 

46820  509 
"[ x<z; y<z; z<K ] ==> <<x,y>, <z,z>> \<in> csquare_rel(K)" 
13216  510 
apply (unfold csquare_rel_def) 
511 
apply (subgoal_tac "x<K & y<K") 

46820  512 
prefer 2 apply (blast intro: lt_trans) 
13216  513 
apply (elim ltE) 
13221  514 
apply (simp add: rvimage_iff Un_absorb Un_least_mem_iff ltD) 
13216  515 
done 
516 

517 
(*Part of the traditional proof. UNUSED since it's harder to prove & apply *) 

518 
lemma csquare_or_eqI: 

46820  519 
"[ x \<le> z; y \<le> z; z<K ] ==> <<x,y>, <z,z>> \<in> csquare_rel(K)  x=z & y=z" 
13216  520 
apply (unfold csquare_rel_def) 
521 
apply (subgoal_tac "x<K & y<K") 

46820  522 
prefer 2 apply (blast intro: lt_trans1) 
13216  523 
apply (elim ltE) 
13221  524 
apply (simp add: rvimage_iff Un_absorb Un_least_mem_iff ltD) 
13216  525 
apply (elim succE) 
46820  526 
apply (simp_all add: subset_Un_iff [THEN iff_sym] 
13221  527 
subset_Un_iff2 [THEN iff_sym] OrdmemD) 
13216  528 
done 
529 

14883  530 
subsubsection{*The cardinality of initial segments*} 
13216  531 

532 
lemma ordermap_z_lt: 

46820  533 
"[ Limit(K); x<K; y<K; z=succ(x \<union> y) ] ==> 
13216  534 
ordermap(K*K, csquare_rel(K)) ` <x,y> < 
535 
ordermap(K*K, csquare_rel(K)) ` <z,z>" 

536 
apply (subgoal_tac "z<K & well_ord (K*K, csquare_rel (K))") 

537 
prefer 2 apply (blast intro!: Un_least_lt Limit_has_succ 

46820  538 
Limit_is_Ord [THEN well_ord_csquare], clarify) 
13216  539 
apply (rule csquare_ltI [THEN ordermap_mono, THEN ltI]) 
540 
apply (erule_tac [4] well_ord_is_wf) 

541 
apply (blast intro!: Un_upper1_le Un_upper2_le Ord_ordermap elim!: ltE)+ 

542 
done 

543 

46901  544 
text{*Kunen: "each @{term"\<langle>x,y\<rangle> \<in> K \<times> K"} has no more than @{term"z \<times> z"} predecessors..." (page 29) *} 
13216  545 
lemma ordermap_csquare_le: 
46901  546 
assumes K: "Limit(K)" and x: "x<K" and y: " y<K" and z: "z=succ(x \<union> y)" 
547 
shows "ordermap(K \<times> K, csquare_rel(K)) ` \<langle>x,y\<rangle> \<le> succ(z) \<otimes> succ(z)" 

548 
proof (unfold cmult_def, rule well_ord_lepoll_imp_Card_le) 

549 
show "well_ord(succ(z) \<times> succ(z), 

550 
rmult(succ(z), Memrel(succ(z)), succ(z), Memrel(succ(z))))" 

551 
by (blast intro: Ord_cardinal well_ord_Memrel well_ord_rmult) 

552 
next 

553 
have zK: "z<K" using x y z K 

554 
by (blast intro: Un_least_lt Limit_has_succ) 

555 
hence oz: "Ord(z)" by (elim ltE) 

556 
have "ordermap(K \<times> K, csquare_rel(K)) ` \<langle>x,y\<rangle> \<lesssim> ordermap(K \<times> K, csquare_rel(K)) ` \<langle>z,z\<rangle>" 

557 
by (blast intro: ordermap_z_lt leI le_imp_lepoll K x y z) 

558 
also have "... \<approx> Order.pred(K \<times> K, \<langle>z,z\<rangle>, csquare_rel(K))" 

559 
proof (rule ordermap_eqpoll_pred) 

560 
show "well_ord(K \<times> K, csquare_rel(K))" using K 

561 
by (rule Limit_is_Ord [THEN well_ord_csquare]) 

562 
next 

563 
show "\<langle>z, z\<rangle> \<in> K \<times> K" using zK 

564 
by (blast intro: ltD) 

565 
qed 

566 
also have "... \<lesssim> succ(z) \<times> succ(z)" using zK 

567 
by (rule pred_csquare_subset [THEN subset_imp_lepoll]) 

568 
also have "... \<approx> succ(z) \<times> succ(z)" using oz 

569 
by (blast intro: prod_eqpoll_cong Ord_succ Ord_cardinal_eqpoll eqpoll_sym) 

570 
finally show "ordermap(K \<times> K, csquare_rel(K)) ` \<langle>x,y\<rangle> \<lesssim> succ(z) \<times> succ(z)" . 

571 
qed 

13216  572 

46901  573 
text{*Kunen: "... so the order type is @{text"\<le>"} K" *} 
13216  574 
lemma ordertype_csquare_le: 
46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

575 
"[ InfCard(K); \<forall>y\<in>K. InfCard(y) \<longrightarrow> y \<otimes> y = y ] 
46820  576 
==> ordertype(K*K, csquare_rel(K)) \<le> K" 
13216  577 
apply (frule InfCard_is_Card [THEN Card_is_Ord]) 
13221  578 
apply (rule all_lt_imp_le, assumption) 
13216  579 
apply (erule well_ord_csquare [THEN Ord_ordertype]) 
580 
apply (rule Card_lt_imp_lt) 

581 
apply (erule_tac [3] InfCard_is_Card) 

582 
apply (erule_tac [2] ltE) 

583 
apply (simp add: ordertype_unfold) 

584 
apply (safe elim!: ltE) 

585 
apply (subgoal_tac "Ord (xa) & Ord (ya)") 

13221  586 
prefer 2 apply (blast intro: Ord_in_Ord, clarify) 
46820  587 
(*??WHAT A MESS!*) 
13216  588 
apply (rule InfCard_is_Limit [THEN ordermap_csquare_le, THEN lt_trans1], 
46820  589 
(assumption  rule refl  erule ltI)+) 
590 
apply (rule_tac i = "xa \<union> ya" and j = nat in Ord_linear2, 

13216  591 
simp_all add: Ord_Un Ord_nat) 
46820  592 
prefer 2 (*case @{term"nat \<le> (xa \<union> ya)"} *) 
593 
apply (simp add: le_imp_subset [THEN nat_succ_eqpoll, THEN cardinal_cong] 

13216  594 
le_succ_iff InfCard_def Card_cardinal Un_least_lt Ord_Un 
595 
ltI nat_le_cardinal Ord_cardinal_le [THEN lt_trans1, THEN ltD]) 

46820  596 
(*the finite case: @{term"xa \<union> ya < nat"} *) 
13784  597 
apply (rule_tac j = nat in lt_trans2) 
13216  598 
apply (simp add: lt_def nat_cmult_eq_mult nat_succI mult_type 
599 
nat_into_Card [THEN Card_cardinal_eq] Ord_nat) 

600 
apply (simp add: InfCard_def) 

601 
done 

602 

603 
(*Main result: Kunen's Theorem 10.12*) 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

604 
lemma InfCard_csquare_eq: "InfCard(K) ==> K \<otimes> K = K" 
13216  605 
apply (frule InfCard_is_Card [THEN Card_is_Ord]) 
606 
apply (erule rev_mp) 

46820  607 
apply (erule_tac i=K in trans_induct) 
13216  608 
apply (rule impI) 
609 
apply (rule le_anti_sym) 

610 
apply (erule_tac [2] InfCard_is_Card [THEN cmult_square_le]) 

611 
apply (rule ordertype_csquare_le [THEN [2] le_trans]) 

46820  612 
apply (simp add: cmult_def Ord_cardinal_le 
13221  613 
well_ord_csquare [THEN Ord_ordertype] 
46820  614 
well_ord_csquare [THEN ordermap_bij, THEN bij_imp_eqpoll, 
13221  615 
THEN cardinal_cong], assumption+) 
13216  616 
done 
617 

618 
(*Corollary for arbitrary wellordered sets (all sets, assuming AC)*) 

619 
lemma well_ord_InfCard_square_eq: 

620 
"[ well_ord(A,r); InfCard(A) ] ==> A*A \<approx> A" 

621 
apply (rule prod_eqpoll_cong [THEN eqpoll_trans]) 

622 
apply (erule well_ord_cardinal_eqpoll [THEN eqpoll_sym])+ 

623 
apply (rule well_ord_cardinal_eqE) 

13221  624 
apply (blast intro: Ord_cardinal well_ord_rmult well_ord_Memrel, assumption) 
625 
apply (simp add: cmult_def [symmetric] InfCard_csquare_eq) 

13216  626 
done 
627 

13356  628 
lemma InfCard_square_eqpoll: "InfCard(K) ==> K \<times> K \<approx> K" 
46820  629 
apply (rule well_ord_InfCard_square_eq) 
630 
apply (erule InfCard_is_Card [THEN Card_is_Ord, THEN well_ord_Memrel]) 

631 
apply (simp add: InfCard_is_Card [THEN Card_cardinal_eq]) 

13356  632 
done 
633 

634 
lemma Inf_Card_is_InfCard: "[ ~Finite(i); Card(i) ] ==> InfCard(i)" 

635 
by (simp add: InfCard_def Card_is_Ord [THEN nat_le_infinite_Ord]) 

636 

14883  637 
subsubsection{*Toward's Kunen's Corollary 10.13 (1)*} 
13216  638 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

639 
lemma InfCard_le_cmult_eq: "[ InfCard(K); L \<le> K; 0<L ] ==> K \<otimes> L = K" 
13216  640 
apply (rule le_anti_sym) 
641 
prefer 2 

642 
apply (erule ltE, blast intro: cmult_le_self InfCard_is_Card) 

643 
apply (frule InfCard_is_Card [THEN Card_is_Ord, THEN le_refl]) 

644 
apply (rule cmult_le_mono [THEN le_trans], assumption+) 

645 
apply (simp add: InfCard_csquare_eq) 

646 
done 

647 

648 
(*Corollary 10.13 (1), for cardinal multiplication*) 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

649 
lemma InfCard_cmult_eq: "[ InfCard(K); InfCard(L) ] ==> K \<otimes> L = K \<union> L" 
13784  650 
apply (rule_tac i = K and j = L in Ord_linear_le) 
13216  651 
apply (typecheck add: InfCard_is_Card Card_is_Ord) 
652 
apply (rule cmult_commute [THEN ssubst]) 

653 
apply (rule Un_commute [THEN ssubst]) 

46820  654 
apply (simp_all add: InfCard_is_Limit [THEN Limit_has_0] InfCard_le_cmult_eq 
13221  655 
subset_Un_iff2 [THEN iffD1] le_imp_subset) 
13216  656 
done 
657 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

658 
lemma InfCard_cdouble_eq: "InfCard(K) ==> K \<oplus> K = K" 
13221  659 
apply (simp add: cmult_2 [symmetric] InfCard_is_Card cmult_commute) 
660 
apply (simp add: InfCard_le_cmult_eq InfCard_is_Limit Limit_has_0 Limit_has_succ) 

13216  661 
done 
662 

663 
(*Corollary 10.13 (1), for cardinal addition*) 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

664 
lemma InfCard_le_cadd_eq: "[ InfCard(K); L \<le> K ] ==> K \<oplus> L = K" 
13216  665 
apply (rule le_anti_sym) 
666 
prefer 2 

667 
apply (erule ltE, blast intro: cadd_le_self InfCard_is_Card) 

668 
apply (frule InfCard_is_Card [THEN Card_is_Ord, THEN le_refl]) 

669 
apply (rule cadd_le_mono [THEN le_trans], assumption+) 

670 
apply (simp add: InfCard_cdouble_eq) 

671 
done 

672 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

673 
lemma InfCard_cadd_eq: "[ InfCard(K); InfCard(L) ] ==> K \<oplus> L = K \<union> L" 
13784  674 
apply (rule_tac i = K and j = L in Ord_linear_le) 
13216  675 
apply (typecheck add: InfCard_is_Card Card_is_Ord) 
676 
apply (rule cadd_commute [THEN ssubst]) 

677 
apply (rule Un_commute [THEN ssubst]) 

13221  678 
apply (simp_all add: InfCard_le_cadd_eq subset_Un_iff2 [THEN iffD1] le_imp_subset) 
13216  679 
done 
680 

681 
(*The other part, Corollary 10.13 (2), refers to the cardinality of the set 

682 
of all ntuples of elements of K. A better version for the Isabelle theory 

683 
might be InfCard(K) ==> list(K) = K. 

684 
*) 

685 

27517  686 
subsection{*For Every Cardinal Number There Exists A Greater One*} 
13356  687 

688 
text{*This result is Kunen's Theorem 10.16, which would be trivial using AC*} 

13216  689 

690 
lemma Ord_jump_cardinal: "Ord(jump_cardinal(K))" 

691 
apply (unfold jump_cardinal_def) 

692 
apply (rule Ord_is_Transset [THEN [2] OrdI]) 

693 
prefer 2 apply (blast intro!: Ord_ordertype) 

694 
apply (unfold Transset_def) 

695 
apply (safe del: subsetI) 

13221  696 
apply (simp add: ordertype_pred_unfold, safe) 
13216  697 
apply (rule UN_I) 
698 
apply (rule_tac [2] ReplaceI) 

699 
prefer 4 apply (blast intro: well_ord_subset elim!: predE)+ 

700 
done 

701 

702 
(*Allows selective unfolding. Less work than deriving intro/elim rules*) 

703 
lemma jump_cardinal_iff: 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

704 
"i \<in> jump_cardinal(K) \<longleftrightarrow> 
46820  705 
(\<exists>r X. r \<subseteq> K*K & X \<subseteq> K & well_ord(X,r) & i = ordertype(X,r))" 
13216  706 
apply (unfold jump_cardinal_def) 
46820  707 
apply (blast del: subsetI) 
13216  708 
done 
709 

710 
(*The easy part of Theorem 10.16: jump_cardinal(K) exceeds K*) 

711 
lemma K_lt_jump_cardinal: "Ord(K) ==> K < jump_cardinal(K)" 

712 
apply (rule Ord_jump_cardinal [THEN [2] ltI]) 

713 
apply (rule jump_cardinal_iff [THEN iffD2]) 

714 
apply (rule_tac x="Memrel(K)" in exI) 

46820  715 
apply (rule_tac x=K in exI) 
13216  716 
apply (simp add: ordertype_Memrel well_ord_Memrel) 
717 
apply (simp add: Memrel_def subset_iff) 

718 
done 

719 

720 
(*The proof by contradiction: the bijection f yields a wellordering of X 

721 
whose ordertype is jump_cardinal(K). *) 

722 
lemma Card_jump_cardinal_lemma: 

46820  723 
"[ well_ord(X,r); r \<subseteq> K * K; X \<subseteq> K; 
724 
f \<in> bij(ordertype(X,r), jump_cardinal(K)) ] 

725 
==> jump_cardinal(K) \<in> jump_cardinal(K)" 

726 
apply (subgoal_tac "f O ordermap (X,r) \<in> bij (X, jump_cardinal (K))") 

13216  727 
prefer 2 apply (blast intro: comp_bij ordermap_bij) 
728 
apply (rule jump_cardinal_iff [THEN iffD2]) 

729 
apply (intro exI conjI) 

13221  730 
apply (rule subset_trans [OF rvimage_type Sigma_mono], assumption+) 
13216  731 
apply (erule bij_is_inj [THEN well_ord_rvimage]) 
732 
apply (rule Ord_jump_cardinal [THEN well_ord_Memrel]) 

733 
apply (simp add: well_ord_Memrel [THEN [2] bij_ordertype_vimage] 

734 
ordertype_Memrel Ord_jump_cardinal) 

735 
done 

736 

737 
(*The hard part of Theorem 10.16: jump_cardinal(K) is itself a cardinal*) 

738 
lemma Card_jump_cardinal: "Card(jump_cardinal(K))" 

739 
apply (rule Ord_jump_cardinal [THEN CardI]) 

740 
apply (unfold eqpoll_def) 

741 
apply (safe dest!: ltD jump_cardinal_iff [THEN iffD1]) 

742 
apply (blast intro: Card_jump_cardinal_lemma [THEN mem_irrefl]) 

743 
done 

744 

13356  745 
subsection{*Basic Properties of Successor Cardinals*} 
13216  746 

747 
lemma csucc_basic: "Ord(K) ==> Card(csucc(K)) & K < csucc(K)" 

748 
apply (unfold csucc_def) 

749 
apply (rule LeastI) 

750 
apply (blast intro: Card_jump_cardinal K_lt_jump_cardinal Ord_jump_cardinal)+ 

751 
done 

752 

45602  753 
lemmas Card_csucc = csucc_basic [THEN conjunct1] 
13216  754 

45602  755 
lemmas lt_csucc = csucc_basic [THEN conjunct2] 
13216  756 

757 
lemma Ord_0_lt_csucc: "Ord(K) ==> 0 < csucc(K)" 

13221  758 
by (blast intro: Ord_0_le lt_csucc lt_trans1) 
13216  759 

46820  760 
lemma csucc_le: "[ Card(L); K<L ] ==> csucc(K) \<le> L" 
13216  761 
apply (unfold csucc_def) 
762 
apply (rule Least_le) 

763 
apply (blast intro: Card_is_Ord)+ 

764 
done 

765 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

766 
lemma lt_csucc_iff: "[ Ord(i); Card(K) ] ==> i < csucc(K) \<longleftrightarrow> i \<le> K" 
13216  767 
apply (rule iffI) 
768 
apply (rule_tac [2] Card_lt_imp_lt) 

769 
apply (erule_tac [2] lt_trans1) 

770 
apply (simp_all add: lt_csucc Card_csucc Card_is_Ord) 

771 
apply (rule notI [THEN not_lt_imp_le]) 

13221  772 
apply (rule Card_cardinal [THEN csucc_le, THEN lt_trans1, THEN lt_irrefl], assumption) 
13216  773 
apply (rule Ord_cardinal_le [THEN lt_trans1]) 
46820  774 
apply (simp_all add: Ord_cardinal Card_is_Ord) 
13216  775 
done 
776 

777 
lemma Card_lt_csucc_iff: 

46821
ff6b0c1087f2
Using mathematical notation for <> and cardinal arithmetic
paulson
parents:
46820
diff
changeset

778 
"[ Card(K'); Card(K) ] ==> K' < csucc(K) \<longleftrightarrow> K' \<le> K" 
13221  779 
by (simp add: lt_csucc_iff Card_cardinal_eq Card_is_Ord) 
13216  780 

781 
lemma InfCard_csucc: "InfCard(K) ==> InfCard(csucc(K))" 

46820  782 
by (simp add: InfCard_def Card_csucc Card_is_Ord 
13216  783 
lt_csucc [THEN leI, THEN [2] le_trans]) 
784 

785 

14883  786 
subsubsection{*Removing elements from a finite set decreases its cardinality*} 
13216  787 

46820  788 
lemma Fin_imp_not_cons_lepoll: "A: Fin(U) ==> x\<notin>A \<longrightarrow> ~ cons(x,A) \<lesssim> A" 
13216  789 
apply (erule Fin_induct) 
13221  790 
apply (simp add: lepoll_0_iff) 
13216  791 
apply (subgoal_tac "cons (x,cons (xa,y)) = cons (xa,cons (x,y))") 
13221  792 
apply simp 
793 
apply (blast dest!: cons_lepoll_consD, blast) 

13216  794 
done 
795 

14883  796 
lemma Finite_imp_cardinal_cons [simp]: 
46820  797 
"[ Finite(A); a\<notin>A ] ==> cons(a,A) = succ(A)" 
13216  798 
apply (unfold cardinal_def) 
799 
apply (rule Least_equality) 

800 
apply (fold cardinal_def) 

13221  801 
apply (simp add: succ_def) 
13216  802 
apply (blast intro: cons_eqpoll_cong well_ord_cardinal_eqpoll 
803 
elim!: mem_irrefl dest!: Finite_imp_well_ord) 

804 
apply (blast intro: Card_cardinal Card_is_Ord) 

805 
apply (rule notI) 

13221  806 
apply (rule Finite_into_Fin [THEN Fin_imp_not_cons_lepoll, THEN mp, THEN notE], 
807 
assumption, assumption) 

13216  808 
apply (erule eqpoll_sym [THEN eqpoll_imp_lepoll, THEN lepoll_trans]) 
809 
apply (erule le_imp_lepoll [THEN lepoll_trans]) 

810 
apply (blast intro: well_ord_cardinal_eqpoll [THEN eqpoll_imp_lepoll] 

811 
dest!: Finite_imp_well_ord) 

812 
done 

813 

814 

13221  815 
lemma Finite_imp_succ_cardinal_Diff: 
816 
"[ Finite(A); a:A ] ==> succ(A{a}) = A" 

13784  817 
apply (rule_tac b = A in cons_Diff [THEN subst], assumption) 
13221  818 
apply (simp add: Finite_imp_cardinal_cons Diff_subset [THEN subset_Finite]) 
819 
apply (simp add: cons_Diff) 

13216  820 
done 
821 

822 
lemma Finite_imp_cardinal_Diff: "[ Finite(A); a:A ] ==> A{a} < A" 

823 
apply (rule succ_leE) 

13221  824 
apply (simp add: Finite_imp_succ_cardinal_Diff) 
13216  825 
done 
826 

46820  827 
lemma Finite_cardinal_in_nat [simp]: "Finite(A) ==> A \<in> nat" 
14883  828 
apply (erule Finite_induct) 
829 
apply (auto simp add: cardinal_0 Finite_imp_cardinal_cons) 

830 
done 

13216  831 

14883  832 
lemma card_Un_Int: 
46820  833 
"[Finite(A); Finite(B)] ==> A #+ B = A \<union> B #+ A \<inter> B" 
834 
apply (erule Finite_induct, simp) 

14883  835 
apply (simp add: Finite_Int cons_absorb Un_cons Int_cons_left) 
836 
done 

837 

46820  838 
lemma card_Un_disjoint: 
839 
"[Finite(A); Finite(B); A \<inter> B = 0] ==> A \<union> B = A #+ B" 

14883  840 
by (simp add: Finite_Un card_Un_Int) 
841 

842 
lemma card_partition [rule_format]: 

46820  843 
"Finite(C) ==> 
844 
Finite (\<Union> C) \<longrightarrow> 

845 
(\<forall>c\<in>C. c = k) \<longrightarrow> 

846 
(\<forall>c1 \<in> C. \<forall>c2 \<in> C. c1 \<noteq> c2 \<longrightarrow> c1 \<inter> c2 = 0) \<longrightarrow> 

14883  847 
k #* C = \<Union> C" 
848 
apply (erule Finite_induct, auto) 

46820  849 
apply (subgoal_tac " x \<inter> \<Union>B = 0") 
14883  850 
apply (auto simp add: card_Un_disjoint Finite_Union 
851 
subset_Finite [of _ "\<Union> (cons(x,F))"]) 

852 
done 

853 

854 

855 
subsubsection{*Theorems by Krzysztof Grabczewski, proofs by lcp*} 

13216  856 

45602  857 
lemmas nat_implies_well_ord = nat_into_Ord [THEN well_ord_Memrel] 
13216  858 

859 
lemma nat_sum_eqpoll_sum: "[ m:nat; n:nat ] ==> m + n \<approx> m #+ n" 

860 
apply (rule eqpoll_trans) 

861 
apply (rule well_ord_radd [THEN well_ord_cardinal_eqpoll, THEN eqpoll_sym]) 

862 
apply (erule nat_implies_well_ord)+ 

13221  863 
apply (simp add: nat_cadd_eq_add [symmetric] cadd_def eqpoll_refl) 
13216  864 
done 
865 

46820  866 
lemma Ord_subset_natD [rule_format]: "Ord(i) ==> i \<subseteq> nat \<longrightarrow> i \<in> nat  i=nat" 
13221  867 
apply (erule trans_induct3, auto) 
13216  868 
apply (blast dest!: nat_le_Limit [THEN le_imp_subset]) 
869 
done 

870 

46820  871 
lemma Ord_nat_subset_into_Card: "[ Ord(i); i \<subseteq> nat ] ==> Card(i)" 
13221  872 
by (blast dest: Ord_subset_natD intro: Card_nat nat_into_Card) 
13216  873 

874 
lemma Finite_Diff_sing_eq_diff_1: "[ Finite(A); x:A ] ==> A{x} = A # 1" 

875 
apply (rule succ_inject) 

876 
apply (rule_tac b = "A" in trans) 

13615
449a70d88b38
Numerous cosmetic changes, prompted by the new simplifier
paulson
parents:
13356
diff
changeset

877 
apply (simp add: Finite_imp_succ_cardinal_Diff) 
13216  878 
apply (subgoal_tac "1 \<lesssim> A") 
13221  879 
prefer 2 apply (blast intro: not_0_is_lepoll_1) 
880 
apply (frule Finite_imp_well_ord, clarify) 

13216  881 
apply (drule well_ord_lepoll_imp_Card_le) 
13615
449a70d88b38
Numerous cosmetic changes, prompted by the new simplifier
paulson
parents:
13356
diff
changeset

882 
apply (auto simp add: cardinal_1) 
13216  883 
apply (rule trans) 
13615
449a70d88b38
Numerous cosmetic changes, prompted by the new simplifier
paulson
parents:
13356
diff
changeset

884 
apply (rule_tac [2] diff_succ) 
449a70d88b38
Numerous cosmetic changes, prompted by the new simplifier
paulson
parents:
13356
diff
changeset

885 
apply (auto simp add: Finite_cardinal_in_nat) 
13216  886 
done 
887 

13221  888 
lemma cardinal_lt_imp_Diff_not_0 [rule_format]: 
46820  889 
"Finite(B) ==> \<forall>A. B<A \<longrightarrow> A  B \<noteq> 0" 
13221  890 
apply (erule Finite_induct, auto) 
891 
apply (case_tac "Finite (A)") 

892 
apply (subgoal_tac [2] "Finite (cons (x, B))") 

893 
apply (drule_tac [2] B = "cons (x, B) " in Diff_Finite) 

894 
apply (auto simp add: Finite_0 Finite_cons) 

13216  895 
apply (subgoal_tac "B<A") 
13221  896 
prefer 2 apply (blast intro: lt_trans Ord_cardinal) 
13216  897 
apply (case_tac "x:A") 
13221  898 
apply (subgoal_tac [2] "A  cons (x, B) = A  B") 
899 
apply auto 

46820  900 
apply (subgoal_tac "A \<le> cons (x, B) ") 
13221  901 
prefer 2 
46820  902 
apply (blast dest: Finite_cons [THEN Finite_imp_well_ord] 
13216  903 
intro: well_ord_lepoll_imp_Card_le subset_imp_lepoll) 
904 
apply (auto simp add: Finite_imp_cardinal_cons) 

905 
apply (auto dest!: Finite_cardinal_in_nat simp add: le_iff) 

906 
apply (blast intro: lt_trans) 

907 
done 

908 

437  909 
end 