author  paulson 
Fri, 16 Feb 1996 18:00:47 +0100  
changeset 1512  ce37c64244c0 
parent 1461  6bcb44e4d6e5 
child 1609  5324067d993f 
permissions  rwrr 
1461  1 
(* Title: ZF/CardinalArith.ML 
437  2 
ID: $Id$ 
1461  3 
Author: Lawrence C Paulson, Cambridge University Computer Laboratory 
437  4 
Copyright 1994 University of Cambridge 
5 

6 
Cardinal arithmetic  WITHOUT the Axiom of Choice 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

7 

846  8 
Note: Could omit proving the algebraic laws for cardinal addition and 
823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

9 
multiplication. On finite cardinals these operations coincide with 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

10 
addition and multiplication of natural numbers; on infinite cardinals they 
846  11 
coincide with union (maximum). Either way we get most laws for free. 
437  12 
*) 
13 

14 
open CardinalArith; 

15 

484  16 
(*** Elementary properties ***) 
467  17 

437  18 
(*Use AC to discharge first premise*) 
19 
goal CardinalArith.thy 

20 
"!!A B. [ well_ord(B,r); A lepoll B ] ==> A le B"; 

21 
by (res_inst_tac [("i","A"),("j","B")] Ord_linear_le 1); 

22 
by (REPEAT_FIRST (ares_tac [Ord_cardinal, le_eqI])); 

23 
by (rtac (eqpollI RS cardinal_cong) 1 THEN assume_tac 1); 

24 
by (rtac lepoll_trans 1); 

25 
by (rtac (well_ord_cardinal_eqpoll RS eqpoll_sym RS eqpoll_imp_lepoll) 1); 

26 
by (assume_tac 1); 

27 
by (etac (le_imp_subset RS subset_imp_lepoll RS lepoll_trans) 1); 

28 
by (rtac eqpoll_imp_lepoll 1); 

29 
by (rewtac lepoll_def); 

30 
by (etac exE 1); 

31 
by (rtac well_ord_cardinal_eqpoll 1); 

32 
by (etac well_ord_rvimage 1); 

33 
by (assume_tac 1); 

767  34 
qed "well_ord_lepoll_imp_Card_le"; 
437  35 

484  36 
(*Each element of Fin(A) is equivalent to a natural number*) 
37 
goal CardinalArith.thy 

38 
"!!X A. X: Fin(A) ==> EX n:nat. X eqpoll n"; 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

39 
by (etac Fin_induct 1); 
484  40 
by (fast_tac (ZF_cs addIs [eqpoll_refl, nat_0I]) 1); 
41 
by (fast_tac (ZF_cs addSIs [cons_eqpoll_cong, 

1461  42 
rewrite_rule [succ_def] nat_succI] 
484  43 
addSEs [mem_irrefl]) 1); 
760  44 
qed "Fin_eqpoll"; 
484  45 

437  46 
(*** Cardinal addition ***) 
47 

48 
(** Cardinal addition is commutative **) 

49 

50 
goalw CardinalArith.thy [eqpoll_def] "A+B eqpoll B+A"; 

51 
by (rtac exI 1); 

52 
by (res_inst_tac [("c", "case(Inr, Inl)"), ("d", "case(Inr, Inl)")] 

53 
lam_bijective 1); 

54 
by (safe_tac (ZF_cs addSEs [sumE])); 

55 
by (ALLGOALS (asm_simp_tac case_ss)); 

760  56 
qed "sum_commute_eqpoll"; 
437  57 

58 
goalw CardinalArith.thy [cadd_def] "i + j = j + i"; 

59 
by (rtac (sum_commute_eqpoll RS cardinal_cong) 1); 

760  60 
qed "cadd_commute"; 
437  61 

62 
(** Cardinal addition is associative **) 

63 

64 
goalw CardinalArith.thy [eqpoll_def] "(A+B)+C eqpoll A+(B+C)"; 

65 
by (rtac exI 1); 

1461  66 
by (rtac sum_assoc_bij 1); 
760  67 
qed "sum_assoc_eqpoll"; 
437  68 

69 
(*Unconditional version requires AC*) 

70 
goalw CardinalArith.thy [cadd_def] 

1461  71 
"!!i j k. [ well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) ] ==> \ 
437  72 
\ (i + j) + k = i + (j + k)"; 
73 
by (rtac cardinal_cong 1); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

74 
by (rtac ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS sum_eqpoll_cong RS 
1461  75 
eqpoll_trans) 1); 
437  76 
by (rtac (sum_assoc_eqpoll RS eqpoll_trans) 2); 
823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

77 
by (rtac ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong RS 
1461  78 
eqpoll_sym) 2); 
484  79 
by (REPEAT (ares_tac [well_ord_radd] 1)); 
760  80 
qed "well_ord_cadd_assoc"; 
437  81 

82 
(** 0 is the identity for addition **) 

83 

84 
goalw CardinalArith.thy [eqpoll_def] "0+A eqpoll A"; 

85 
by (rtac exI 1); 

846  86 
by (rtac bij_0_sum 1); 
760  87 
qed "sum_0_eqpoll"; 
437  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, 
1461  91 
Card_cardinal_eq]) 1); 
760  92 
qed "cadd_0"; 
437  93 

767  94 
(** Addition by another cardinal **) 
95 

96 
goalw CardinalArith.thy [lepoll_def, inj_def] "A lepoll A+B"; 

97 
by (res_inst_tac [("x", "lam x:A. Inl(x)")] exI 1); 

98 
by (asm_simp_tac (sum_ss addsimps [lam_type]) 1); 

782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

99 
qed "sum_lepoll_self"; 
767  100 

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

102 
goalw CardinalArith.thy [cadd_def] 

103 
"!!K. [ Card(K); Ord(L) ] ==> K le (K + L)"; 

104 
by (rtac ([Card_cardinal_le, well_ord_lepoll_imp_Card_le] MRS le_trans) 1); 

105 
by (rtac sum_lepoll_self 3); 

106 
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel, Card_is_Ord] 1)); 

782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

107 
qed "cadd_le_self"; 
767  108 

109 
(** Monotonicity of addition **) 

110 

111 
goalw CardinalArith.thy [lepoll_def] 

112 
"!!A B C D. [ A lepoll C; B lepoll D ] ==> A + B lepoll C + D"; 

113 
by (REPEAT (etac exE 1)); 

114 
by (res_inst_tac [("x", "lam z:A+B. case(%w. Inl(f`w), %y. Inr(fa`y), z)")] 

115 
exI 1); 

116 
by (res_inst_tac 

117 
[("d", "case(%w. Inl(converse(f)`w), %y. Inr(converse(fa)`y))")] 

118 
lam_injective 1); 

846  119 
by (typechk_tac ([inj_is_fun, case_type, InlI, InrI] @ ZF_typechecks)); 
823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

120 
by (etac sumE 1); 
767  121 
by (ALLGOALS (asm_simp_tac (sum_ss addsimps [left_inverse]))); 
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

122 
qed "sum_lepoll_mono"; 
767  123 

124 
goalw CardinalArith.thy [cadd_def] 

125 
"!!K. [ K' le K; L' le L ] ==> (K' + L') le (K + L)"; 

126 
by (safe_tac (ZF_cs addSDs [le_subset_iff RS iffD1])); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

127 
by (rtac well_ord_lepoll_imp_Card_le 1); 
767  128 
by (REPEAT (ares_tac [sum_lepoll_mono, subset_imp_lepoll] 2)); 
129 
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel] 1)); 

782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

130 
qed "cadd_le_mono"; 
767  131 

437  132 
(** Addition of finite cardinals is "ordinary" addition **) 
133 

134 
goalw CardinalArith.thy [eqpoll_def] "succ(A)+B eqpoll succ(A+B)"; 

135 
by (rtac exI 1); 

136 
by (res_inst_tac [("c", "%z.if(z=Inl(A),A+B,z)"), 

1461  137 
("d", "%z.if(z=A+B,Inl(A),z)")] 
437  138 
lam_bijective 1); 
139 
by (ALLGOALS 

140 
(asm_simp_tac (case_ss addsimps [succI2, mem_imp_not_eq] 

1461  141 
setloop eresolve_tac [sumE,succE]))); 
760  142 
qed "sum_succ_eqpoll"; 
437  143 

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

145 
(*Unconditional version requires AC*) 

146 
goalw CardinalArith.thy [cadd_def] 

147 
"!!m n. [ Ord(m); Ord(n) ] ==> succ(m) + n = succ(m + n)"; 

148 
by (rtac (sum_succ_eqpoll RS cardinal_cong RS trans) 1); 

149 
by (rtac (succ_eqpoll_cong RS cardinal_cong) 1); 

150 
by (rtac (well_ord_cardinal_eqpoll RS eqpoll_sym) 1); 

151 
by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel] 1)); 

760  152 
qed "cadd_succ_lemma"; 
437  153 

154 
val [mnat,nnat] = goal CardinalArith.thy 

155 
"[ m: nat; n: nat ] ==> m + n = m#+n"; 

156 
by (cut_facts_tac [nnat] 1); 

157 
by (nat_ind_tac "m" [mnat] 1); 

158 
by (asm_simp_tac (arith_ss addsimps [nat_into_Card RS cadd_0]) 1); 

159 
by (asm_simp_tac (arith_ss addsimps [nat_into_Ord, cadd_succ_lemma, 

1461  160 
nat_into_Card RS Card_cardinal_eq]) 1); 
760  161 
qed "nat_cadd_eq_add"; 
437  162 

163 

164 
(*** Cardinal multiplication ***) 

165 

166 
(** Cardinal multiplication is commutative **) 

167 

168 
(*Easier to prove the two directions separately*) 

169 
goalw CardinalArith.thy [eqpoll_def] "A*B eqpoll B*A"; 

170 
by (rtac exI 1); 

1090
8ab69b3e396b
Changed some definitions and proofs to use patternmatching.
lcp
parents:
1075
diff
changeset

171 
by (res_inst_tac [("c", "%<x,y>.<y,x>"), ("d", "%<x,y>.<y,x>")] 
437  172 
lam_bijective 1); 
173 
by (safe_tac ZF_cs); 

174 
by (ALLGOALS (asm_simp_tac ZF_ss)); 

760  175 
qed "prod_commute_eqpoll"; 
437  176 

177 
goalw CardinalArith.thy [cmult_def] "i * j = j * i"; 

178 
by (rtac (prod_commute_eqpoll RS cardinal_cong) 1); 

760  179 
qed "cmult_commute"; 
437  180 

181 
(** Cardinal multiplication is associative **) 

182 

183 
goalw CardinalArith.thy [eqpoll_def] "(A*B)*C eqpoll A*(B*C)"; 

184 
by (rtac exI 1); 

1461  185 
by (rtac prod_assoc_bij 1); 
760  186 
qed "prod_assoc_eqpoll"; 
437  187 

188 
(*Unconditional version requires AC*) 

189 
goalw CardinalArith.thy [cmult_def] 

1461  190 
"!!i j k. [ well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) ] ==> \ 
437  191 
\ (i * j) * k = i * (j * k)"; 
192 
by (rtac cardinal_cong 1); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

193 
by (rtac ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS prod_eqpoll_cong RS 
1461  194 
eqpoll_trans) 1); 
437  195 
by (rtac (prod_assoc_eqpoll RS eqpoll_trans) 2); 
823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

196 
by (rtac ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS prod_eqpoll_cong RS 
1461  197 
eqpoll_sym) 2); 
484  198 
by (REPEAT (ares_tac [well_ord_rmult] 1)); 
760  199 
qed "well_ord_cmult_assoc"; 
437  200 

201 
(** Cardinal multiplication distributes over addition **) 

202 

203 
goalw CardinalArith.thy [eqpoll_def] "(A+B)*C eqpoll (A*C)+(B*C)"; 

204 
by (rtac exI 1); 

1461  205 
by (rtac sum_prod_distrib_bij 1); 
760  206 
qed "sum_prod_distrib_eqpoll"; 
437  207 

846  208 
goalw CardinalArith.thy [cadd_def, cmult_def] 
1461  209 
"!!i j k. [ well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) ] ==> \ 
846  210 
\ (i + j) * k = (i * k) + (j * k)"; 
211 
by (rtac cardinal_cong 1); 

212 
by (rtac ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS prod_eqpoll_cong RS 

1461  213 
eqpoll_trans) 1); 
846  214 
by (rtac (sum_prod_distrib_eqpoll RS eqpoll_trans) 2); 
215 
by (rtac ([well_ord_cardinal_eqpoll, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong RS 

1461  216 
eqpoll_sym) 2); 
846  217 
by (REPEAT (ares_tac [well_ord_rmult, well_ord_radd] 1)); 
218 
qed "well_ord_cadd_cmult_distrib"; 

219 

437  220 
(** Multiplication by 0 yields 0 **) 
221 

222 
goalw CardinalArith.thy [eqpoll_def] "0*A eqpoll 0"; 

223 
by (rtac exI 1); 

224 
by (rtac lam_bijective 1); 

225 
by (safe_tac ZF_cs); 

760  226 
qed "prod_0_eqpoll"; 
437  227 

228 
goalw CardinalArith.thy [cmult_def] "0 * i = 0"; 

229 
by (asm_simp_tac (ZF_ss addsimps [prod_0_eqpoll RS cardinal_cong, 

1461  230 
Card_0 RS Card_cardinal_eq]) 1); 
760  231 
qed "cmult_0"; 
437  232 

233 
(** 1 is the identity for multiplication **) 

234 

235 
goalw CardinalArith.thy [eqpoll_def] "{x}*A eqpoll A"; 

236 
by (rtac exI 1); 

846  237 
by (resolve_tac [singleton_prod_bij RS bij_converse_bij] 1); 
760  238 
qed "prod_singleton_eqpoll"; 
437  239 

484  240 
goalw CardinalArith.thy [cmult_def, succ_def] "!!K. Card(K) ==> 1 * K = K"; 
437  241 
by (asm_simp_tac (ZF_ss addsimps [prod_singleton_eqpoll RS cardinal_cong, 
1461  242 
Card_cardinal_eq]) 1); 
760  243 
qed "cmult_1"; 
437  244 

767  245 
(*** Some inequalities for multiplication ***) 
246 

247 
goalw CardinalArith.thy [lepoll_def, inj_def] "A lepoll A*A"; 

248 
by (res_inst_tac [("x", "lam x:A. <x,x>")] exI 1); 

249 
by (simp_tac (ZF_ss addsimps [lam_type]) 1); 

250 
qed "prod_square_lepoll"; 

251 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

252 
(*Could probably weaken the premise to well_ord(K,r), or remove using AC*) 
767  253 
goalw CardinalArith.thy [cmult_def] "!!K. Card(K) ==> K le K * K"; 
254 
by (rtac le_trans 1); 

255 
by (rtac well_ord_lepoll_imp_Card_le 2); 

256 
by (rtac prod_square_lepoll 3); 

257 
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel, Card_is_Ord] 2)); 

258 
by (asm_simp_tac (ZF_ss addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1); 

259 
qed "cmult_square_le"; 

260 

261 
(** Multiplication by a nonzero cardinal **) 

262 

263 
goalw CardinalArith.thy [lepoll_def, inj_def] "!!b. b: B ==> A lepoll A*B"; 

264 
by (res_inst_tac [("x", "lam x:A. <x,b>")] exI 1); 

265 
by (asm_simp_tac (ZF_ss addsimps [lam_type]) 1); 

782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

266 
qed "prod_lepoll_self"; 
767  267 

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

269 
goalw CardinalArith.thy [cmult_def] 

270 
"!!K. [ Card(K); Ord(L); 0<L ] ==> K le (K * L)"; 

271 
by (rtac ([Card_cardinal_le, well_ord_lepoll_imp_Card_le] MRS le_trans) 1); 

272 
by (rtac prod_lepoll_self 3); 

273 
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel, Card_is_Ord, ltD] 1)); 

782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

274 
qed "cmult_le_self"; 
767  275 

276 
(** Monotonicity of multiplication **) 

277 

278 
goalw CardinalArith.thy [lepoll_def] 

279 
"!!A B C D. [ A lepoll C; B lepoll D ] ==> A * B lepoll C * D"; 

280 
by (REPEAT (etac exE 1)); 

1090
8ab69b3e396b
Changed some definitions and proofs to use patternmatching.
lcp
parents:
1075
diff
changeset

281 
by (res_inst_tac [("x", "lam <w,y>:A*B. <f`w, fa`y>")] exI 1); 
8ab69b3e396b
Changed some definitions and proofs to use patternmatching.
lcp
parents:
1075
diff
changeset

282 
by (res_inst_tac [("d", "%<w,y>.<converse(f)`w, converse(fa)`y>")] 
1461  283 
lam_injective 1); 
767  284 
by (typechk_tac (inj_is_fun::ZF_typechecks)); 
823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

285 
by (etac SigmaE 1); 
767  286 
by (asm_simp_tac (ZF_ss addsimps [left_inverse]) 1); 
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

287 
qed "prod_lepoll_mono"; 
767  288 

289 
goalw CardinalArith.thy [cmult_def] 

290 
"!!K. [ K' le K; L' le L ] ==> (K' * L') le (K * L)"; 

291 
by (safe_tac (ZF_cs addSDs [le_subset_iff RS iffD1])); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

292 
by (rtac well_ord_lepoll_imp_Card_le 1); 
767  293 
by (REPEAT (ares_tac [prod_lepoll_mono, subset_imp_lepoll] 2)); 
294 
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1)); 

782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

295 
qed "cmult_le_mono"; 
767  296 

297 
(*** Multiplication of finite cardinals is "ordinary" multiplication ***) 

437  298 

299 
goalw CardinalArith.thy [eqpoll_def] "succ(A)*B eqpoll B + A*B"; 

300 
by (rtac exI 1); 

1090
8ab69b3e396b
Changed some definitions and proofs to use patternmatching.
lcp
parents:
1075
diff
changeset

301 
by (res_inst_tac [("c", "%<x,y>. if(x=A, Inl(y), Inr(<x,y>))"), 
1461  302 
("d", "case(%y. <A,y>, %z.z)")] 
437  303 
lam_bijective 1); 
304 
by (safe_tac (ZF_cs addSEs [sumE])); 

305 
by (ALLGOALS 

306 
(asm_simp_tac (case_ss addsimps [succI2, if_type, mem_imp_not_eq]))); 

760  307 
qed "prod_succ_eqpoll"; 
437  308 

309 
(*Unconditional version requires AC*) 

310 
goalw CardinalArith.thy [cmult_def, cadd_def] 

311 
"!!m n. [ Ord(m); Ord(n) ] ==> succ(m) * n = n + (m * n)"; 

312 
by (rtac (prod_succ_eqpoll RS cardinal_cong RS trans) 1); 

313 
by (rtac (cardinal_cong RS sym) 1); 

314 
by (rtac ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong) 1); 

315 
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1)); 

760  316 
qed "cmult_succ_lemma"; 
437  317 

318 
val [mnat,nnat] = goal CardinalArith.thy 

319 
"[ m: nat; n: nat ] ==> m * n = m#*n"; 

320 
by (cut_facts_tac [nnat] 1); 

321 
by (nat_ind_tac "m" [mnat] 1); 

322 
by (asm_simp_tac (arith_ss addsimps [cmult_0]) 1); 

323 
by (asm_simp_tac (arith_ss addsimps [nat_into_Ord, cmult_succ_lemma, 

1461  324 
nat_cadd_eq_add]) 1); 
760  325 
qed "nat_cmult_eq_mult"; 
437  326 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

327 
goal CardinalArith.thy "!!m n. Card(n) ==> 2 * n = n + n"; 
767  328 
by (asm_simp_tac 
329 
(ZF_ss addsimps [Ord_0, Ord_succ, cmult_0, cmult_succ_lemma, Card_is_Ord, 

1461  330 
read_instantiate [("j","0")] cadd_commute, cadd_0]) 1); 
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

331 
qed "cmult_2"; 
767  332 

437  333 

334 
(*** Infinite Cardinals are Limit Ordinals ***) 

335 

571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

336 
(*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

337 
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

338 
%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

339 
range(f) behaves like the natural numbers.*) 
516  340 
goalw CardinalArith.thy [lepoll_def] 
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

341 
"!!i. nat lepoll A ==> cons(u,A) lepoll A"; 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

342 
by (etac exE 1); 
516  343 
by (res_inst_tac [("x", 
1461  344 
"lam z:cons(u,A). if(z=u, f`0, \ 
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

345 
\ if(z: range(f), f`succ(converse(f)`z), z))")] exI 1); 
1461  346 
by (res_inst_tac [("d", "%y. if(y: range(f), \ 
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

347 
\ nat_case(u, %z.f`z, converse(f)`y), y)")] 
516  348 
lam_injective 1); 
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

349 
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

350 
addIs [inj_is_fun, inj_converse_fun]) 1); 
516  351 
by (asm_simp_tac 
571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

352 
(ZF_ss addsimps [inj_is_fun RS apply_rangeI, 
1461  353 
inj_converse_fun RS apply_rangeI, 
354 
inj_converse_fun RS apply_funtype, 

355 
left_inverse, right_inverse, nat_0I, nat_succI, 

356 
nat_case_0, nat_case_succ] 

516  357 
setloop split_tac [expand_if]) 1); 
760  358 
qed "nat_cons_lepoll"; 
516  359 

571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

360 
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

361 
by (etac (nat_cons_lepoll RS eqpollI) 1); 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

362 
by (rtac (subset_consI RS subset_imp_lepoll) 1); 
760  363 
qed "nat_cons_eqpoll"; 
437  364 

571
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

365 
(*Specialized version required below*) 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
lcp
parents:
523
diff
changeset

366 
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

367 
by (eresolve_tac [subset_imp_lepoll RS nat_cons_eqpoll] 1); 
760  368 
qed "nat_succ_eqpoll"; 
437  369 

488  370 
goalw CardinalArith.thy [InfCard_def] "InfCard(nat)"; 
371 
by (fast_tac (ZF_cs addIs [Card_nat, le_refl, Card_is_Ord]) 1); 

760  372 
qed "InfCard_nat"; 
488  373 

484  374 
goalw CardinalArith.thy [InfCard_def] "!!K. InfCard(K) ==> Card(K)"; 
437  375 
by (etac conjunct1 1); 
760  376 
qed "InfCard_is_Card"; 
437  377 

523  378 
goalw CardinalArith.thy [InfCard_def] 
379 
"!!K L. [ InfCard(K); Card(L) ] ==> InfCard(K Un L)"; 

380 
by (asm_simp_tac (ZF_ss addsimps [Card_Un, Un_upper1_le RSN (2,le_trans), 

1461  381 
Card_is_Ord]) 1); 
760  382 
qed "InfCard_Un"; 
523  383 

437  384 
(*Kunen's Lemma 10.11*) 
484  385 
goalw CardinalArith.thy [InfCard_def] "!!K. InfCard(K) ==> Limit(K)"; 
437  386 
by (etac conjE 1); 
823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

387 
by (forward_tac [Card_is_Ord] 1); 
437  388 
by (rtac (ltI RS non_succ_LimitI) 1); 
389 
by (etac ([asm_rl, nat_0I] MRS (le_imp_subset RS subsetD)) 1); 

390 
by (safe_tac (ZF_cs addSDs [Limit_nat RS Limit_le_succD])); 

391 
by (rewtac Card_def); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

392 
by (dtac trans 1); 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

393 
by (etac (le_imp_subset RS nat_succ_eqpoll RS cardinal_cong) 1); 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

394 
by (etac (Ord_succD RS Ord_cardinal_le RS lt_trans2 RS lt_irrefl) 1); 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

395 
by (REPEAT (ares_tac [le_eqI, Ord_cardinal] 1)); 
760  396 
qed "InfCard_is_Limit"; 
437  397 

398 

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

400 

401 
(*A general fact about ordermap*) 

402 
goalw Cardinal.thy [eqpoll_def] 

403 
"!!A. [ well_ord(A,r); x:A ] ==> ordermap(A,r)`x eqpoll pred(A,x,r)"; 

404 
by (rtac exI 1); 

405 
by (asm_simp_tac (ZF_ss addsimps [ordermap_eq_image, well_ord_is_wf]) 1); 

467  406 
by (etac (ordermap_bij RS bij_is_inj RS restrict_bij RS bij_converse_bij) 1); 
437  407 
by (rtac pred_subset 1); 
760  408 
qed "ordermap_eqpoll_pred"; 
437  409 

410 
(** Establishing the wellordering **) 

411 

412 
goalw CardinalArith.thy [inj_def] 

1090
8ab69b3e396b
Changed some definitions and proofs to use patternmatching.
lcp
parents:
1075
diff
changeset

413 
"!!K. Ord(K) ==> (lam <x,y>:K*K. <x Un y, x, y>) : inj(K*K, K*K*K)"; 
989  414 
by (fast_tac (ZF_cs addss ZF_ss 
1461  415 
addIs [lam_type, Un_least_lt RS ltD, ltI]) 1); 
760  416 
qed "csquare_lam_inj"; 
437  417 

418 
goalw CardinalArith.thy [csquare_rel_def] 

484  419 
"!!K. Ord(K) ==> well_ord(K*K, csquare_rel(K))"; 
437  420 
by (rtac (csquare_lam_inj RS well_ord_rvimage) 1); 
421 
by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1)); 

760  422 
qed "well_ord_csquare"; 
437  423 

424 
(** Characterising initial segments of the wellordering **) 

425 

426 
goalw CardinalArith.thy [csquare_rel_def] 

484  427 
"!!K. [ x<K; y<K; z<K ] ==> \ 
428 
\ <<x,y>, <z,z>> : csquare_rel(K) > x le z & y le z"; 

437  429 
by (REPEAT (etac ltE 1)); 
430 
by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff, 

431 
Un_absorb, Un_least_mem_iff, ltD]) 1); 

432 
by (safe_tac (ZF_cs addSEs [mem_irrefl] 

433 
addSIs [Un_upper1_le, Un_upper2_le])); 

434 
by (ALLGOALS (asm_simp_tac (ZF_ss addsimps [lt_def, succI2, Ord_succ]))); 

800
23f55b829ccb
Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents:
782
diff
changeset

435 
val csquareD_lemma = result(); 
23f55b829ccb
Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents:
782
diff
changeset

436 

23f55b829ccb
Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents:
782
diff
changeset

437 
bind_thm ("csquareD", csquareD_lemma RS mp); 
437  438 

439 
goalw CardinalArith.thy [pred_def] 

484  440 
"!!K. z<K ==> pred(K*K, <z,z>, csquare_rel(K)) <= succ(z)*succ(z)"; 
1461  441 
by (safe_tac (lemmas_cs addSEs [SigmaE])); (*avoids using succCI*) 
437  442 
by (rtac (csquareD RS conjE) 1); 
443 
by (rewtac lt_def); 

444 
by (assume_tac 4); 

445 
by (ALLGOALS (fast_tac ZF_cs)); 

760  446 
qed "pred_csquare_subset"; 
437  447 

448 
goalw CardinalArith.thy [csquare_rel_def] 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

449 
"!!K. [ x<z; y<z; z<K ] ==> <<x,y>, <z,z>> : csquare_rel(K)"; 
484  450 
by (subgoals_tac ["x<K", "y<K"] 1); 
437  451 
by (REPEAT (eresolve_tac [asm_rl, lt_trans] 2)); 
452 
by (REPEAT (etac ltE 1)); 

453 
by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff, 

454 
Un_absorb, Un_least_mem_iff, ltD]) 1); 

760  455 
qed "csquare_ltI"; 
437  456 

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

458 
goalw CardinalArith.thy [csquare_rel_def] 

484  459 
"!!K. [ x le z; y le z; z<K ] ==> \ 
460 
\ <<x,y>, <z,z>> : csquare_rel(K)  x=z & y=z"; 

461 
by (subgoals_tac ["x<K", "y<K"] 1); 

437  462 
by (REPEAT (eresolve_tac [asm_rl, lt_trans1] 2)); 
463 
by (REPEAT (etac ltE 1)); 

464 
by (asm_simp_tac (ZF_ss addsimps [rvimage_iff, rmult_iff, Memrel_iff, 

465 
Un_absorb, Un_least_mem_iff, ltD]) 1); 

466 
by (REPEAT_FIRST (etac succE)); 

467 
by (ALLGOALS 

468 
(asm_simp_tac (ZF_ss addsimps [subset_Un_iff RS iff_sym, 

1461  469 
subset_Un_iff2 RS iff_sym, OrdmemD]))); 
760  470 
qed "csquare_or_eqI"; 
437  471 

472 
(** The cardinality of initial segments **) 

473 

474 
goal CardinalArith.thy 

846  475 
"!!K. [ Limit(K); x<K; y<K; z=succ(x Un y) ] ==> \ 
1461  476 
\ ordermap(K*K, csquare_rel(K)) ` <x,y> < \ 
484  477 
\ ordermap(K*K, csquare_rel(K)) ` <z,z>"; 
478 
by (subgoals_tac ["z<K", "well_ord(K*K, csquare_rel(K))"] 1); 

846  479 
by (etac (Limit_is_Ord RS well_ord_csquare) 2); 
480 
by (fast_tac (ZF_cs addSIs [Un_least_lt, Limit_has_succ]) 2); 

870  481 
by (rtac (csquare_ltI RS ordermap_mono RS ltI) 1); 
437  482 
by (etac well_ord_is_wf 4); 
483 
by (ALLGOALS 

484 
(fast_tac (ZF_cs addSIs [Un_upper1_le, Un_upper2_le, Ord_ordermap] 

485 
addSEs [ltE]))); 

870  486 
qed "ordermap_z_lt"; 
437  487 

484  488 
(*Kunen: "each <x,y>: K*K has no more than z*z predecessors..." (page 29) *) 
437  489 
goalw CardinalArith.thy [cmult_def] 
846  490 
"!!K. [ Limit(K); x<K; y<K; z=succ(x Un y) ] ==> \ 
484  491 
\  ordermap(K*K, csquare_rel(K)) ` <x,y>  le succ(z) * succ(z)"; 
767  492 
by (rtac (well_ord_rmult RS well_ord_lepoll_imp_Card_le) 1); 
437  493 
by (REPEAT (ares_tac [Ord_cardinal, well_ord_Memrel] 1)); 
484  494 
by (subgoals_tac ["z<K"] 1); 
846  495 
by (fast_tac (ZF_cs addSIs [Un_least_lt, Limit_has_succ]) 2); 
870  496 
by (rtac (ordermap_z_lt RS leI RS le_imp_subset RS subset_imp_lepoll RS 
1461  497 
lepoll_trans) 1); 
437  498 
by (REPEAT_SOME assume_tac); 
499 
by (rtac (ordermap_eqpoll_pred RS eqpoll_imp_lepoll RS lepoll_trans) 1); 

846  500 
by (etac (Limit_is_Ord RS well_ord_csquare) 1); 
437  501 
by (fast_tac (ZF_cs addIs [ltD]) 1); 
502 
by (rtac (pred_csquare_subset RS subset_imp_lepoll RS lepoll_trans) 1 THEN 

503 
assume_tac 1); 

504 
by (REPEAT_FIRST (etac ltE)); 

505 
by (rtac (prod_eqpoll_cong RS eqpoll_sym RS eqpoll_imp_lepoll) 1); 

506 
by (REPEAT_FIRST (etac (Ord_succ RS Ord_cardinal_eqpoll))); 

760  507 
qed "ordermap_csquare_le"; 
437  508 

484  509 
(*Kunen: "... so the order type <= K" *) 
437  510 
goal CardinalArith.thy 
484  511 
"!!K. [ InfCard(K); ALL y:K. InfCard(y) > y * y = y ] ==> \ 
512 
\ ordertype(K*K, csquare_rel(K)) le K"; 

437  513 
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1); 
514 
by (rtac all_lt_imp_le 1); 

515 
by (assume_tac 1); 

516 
by (etac (well_ord_csquare RS Ord_ordertype) 1); 

517 
by (rtac Card_lt_imp_lt 1); 

518 
by (etac InfCard_is_Card 3); 

519 
by (etac ltE 2 THEN assume_tac 2); 

520 
by (asm_full_simp_tac (ZF_ss addsimps [ordertype_unfold]) 1); 

521 
by (safe_tac (ZF_cs addSEs [ltE])); 

522 
by (subgoals_tac ["Ord(xb)", "Ord(y)"] 1); 

523 
by (REPEAT (eresolve_tac [asm_rl, Ord_in_Ord] 2)); 

846  524 
by (rtac (InfCard_is_Limit RS ordermap_csquare_le RS lt_trans1) 1 THEN 
437  525 
REPEAT (ares_tac [refl] 1 ORELSE etac ltI 1)); 
526 
by (res_inst_tac [("i","xb Un y"), ("j","nat")] Ord_linear2 1 THEN 

527 
REPEAT (ares_tac [Ord_Un, Ord_nat] 1)); 

528 
(*the finite case: xb Un y < nat *) 

529 
by (res_inst_tac [("j", "nat")] lt_trans2 1); 

530 
by (asm_full_simp_tac (FOL_ss addsimps [InfCard_def]) 2); 

531 
by (asm_full_simp_tac 

532 
(ZF_ss addsimps [lt_def, nat_cmult_eq_mult, nat_succI, mult_type, 

1461  533 
nat_into_Card RS Card_cardinal_eq, Ord_nat]) 1); 
846  534 
(*case nat le (xb Un y) *) 
437  535 
by (asm_full_simp_tac 
536 
(ZF_ss addsimps [le_imp_subset RS nat_succ_eqpoll RS cardinal_cong, 

1461  537 
le_succ_iff, InfCard_def, Card_cardinal, Un_least_lt, 
538 
Ord_Un, ltI, nat_le_cardinal, 

539 
Ord_cardinal_le RS lt_trans1 RS ltD]) 1); 

760  540 
qed "ordertype_csquare_le"; 
437  541 

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

484  543 
goal CardinalArith.thy "!!K. InfCard(K) ==> K * K = K"; 
437  544 
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1); 
545 
by (etac rev_mp 1); 

484  546 
by (trans_ind_tac "K" [] 1); 
437  547 
by (rtac impI 1); 
548 
by (rtac le_anti_sym 1); 

549 
by (etac (InfCard_is_Card RS cmult_square_le) 2); 

550 
by (rtac (ordertype_csquare_le RSN (2, le_trans)) 1); 

551 
by (assume_tac 2); 

552 
by (assume_tac 2); 

553 
by (asm_simp_tac 

846  554 
(ZF_ss addsimps [cmult_def, Ord_cardinal_le, 
1461  555 
well_ord_csquare RS ordermap_bij RS 
556 
bij_imp_eqpoll RS cardinal_cong, 

437  557 
well_ord_csquare RS Ord_ordertype]) 1); 
760  558 
qed "InfCard_csquare_eq"; 
484  559 

767  560 
(*Corollary for arbitrary wellordered sets (all sets, assuming AC)*) 
484  561 
goal CardinalArith.thy 
562 
"!!A. [ well_ord(A,r); InfCard(A) ] ==> A*A eqpoll A"; 

563 
by (resolve_tac [prod_eqpoll_cong RS eqpoll_trans] 1); 

564 
by (REPEAT (etac (well_ord_cardinal_eqpoll RS eqpoll_sym) 1)); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

565 
by (rtac well_ord_cardinal_eqE 1); 
484  566 
by (REPEAT (ares_tac [Ord_cardinal, well_ord_rmult, well_ord_Memrel] 1)); 
567 
by (asm_simp_tac (ZF_ss addsimps [symmetric cmult_def, InfCard_csquare_eq]) 1); 

760  568 
qed "well_ord_InfCard_square_eq"; 
484  569 

767  570 
(** Toward's Kunen's Corollary 10.13 (1) **) 
571 

572 
goal CardinalArith.thy "!!K. [ InfCard(K); L le K; 0<L ] ==> K * L = K"; 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

573 
by (rtac le_anti_sym 1); 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

574 
by (etac ltE 2 THEN 
767  575 
REPEAT (ares_tac [cmult_le_self, InfCard_is_Card] 2)); 
576 
by (forward_tac [InfCard_is_Card RS Card_is_Ord RS le_refl] 1); 

577 
by (resolve_tac [cmult_le_mono RS le_trans] 1 THEN REPEAT (assume_tac 1)); 

578 
by (asm_simp_tac (ZF_ss addsimps [InfCard_csquare_eq]) 1); 

782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

579 
qed "InfCard_le_cmult_eq"; 
767  580 

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

582 
goal CardinalArith.thy 

583 
"!!K. [ InfCard(K); InfCard(L) ] ==> K * L = K Un L"; 

584 
by (res_inst_tac [("i","K"),("j","L")] Ord_linear_le 1); 

585 
by (typechk_tac [InfCard_is_Card, Card_is_Ord]); 

586 
by (resolve_tac [cmult_commute RS ssubst] 1); 

587 
by (resolve_tac [Un_commute RS ssubst] 1); 

588 
by (ALLGOALS 

589 
(asm_simp_tac 

590 
(ZF_ss addsimps [InfCard_is_Limit RS Limit_has_0, InfCard_le_cmult_eq, 

1461  591 
subset_Un_iff2 RS iffD1, le_imp_subset]))); 
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

592 
qed "InfCard_cmult_eq"; 
767  593 

594 
(*This proof appear to be the simplest!*) 

595 
goal CardinalArith.thy "!!K. InfCard(K) ==> K + K = K"; 

596 
by (asm_simp_tac 

597 
(ZF_ss addsimps [cmult_2 RS sym, InfCard_is_Card, cmult_commute]) 1); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

598 
by (rtac InfCard_le_cmult_eq 1); 
767  599 
by (typechk_tac [Ord_0, le_refl, leI]); 
600 
by (typechk_tac [InfCard_is_Limit, Limit_has_0, Limit_has_succ]); 

782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

601 
qed "InfCard_cdouble_eq"; 
767  602 

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

604 
goal CardinalArith.thy "!!K. [ InfCard(K); L le K ] ==> K + L = K"; 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

605 
by (rtac le_anti_sym 1); 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

606 
by (etac ltE 2 THEN 
767  607 
REPEAT (ares_tac [cadd_le_self, InfCard_is_Card] 2)); 
608 
by (forward_tac [InfCard_is_Card RS Card_is_Ord RS le_refl] 1); 

609 
by (resolve_tac [cadd_le_mono RS le_trans] 1 THEN REPEAT (assume_tac 1)); 

610 
by (asm_simp_tac (ZF_ss addsimps [InfCard_cdouble_eq]) 1); 

782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

611 
qed "InfCard_le_cadd_eq"; 
767  612 

613 
goal CardinalArith.thy 

614 
"!!K. [ InfCard(K); InfCard(L) ] ==> K + L = K Un L"; 

615 
by (res_inst_tac [("i","K"),("j","L")] Ord_linear_le 1); 

616 
by (typechk_tac [InfCard_is_Card, Card_is_Ord]); 

617 
by (resolve_tac [cadd_commute RS ssubst] 1); 

618 
by (resolve_tac [Un_commute RS ssubst] 1); 

619 
by (ALLGOALS 

620 
(asm_simp_tac 

621 
(ZF_ss addsimps [InfCard_le_cadd_eq, 

1461  622 
subset_Un_iff2 RS iffD1, le_imp_subset]))); 
782
200a16083201
added bind_thm for theorems defined by "standard ..."
clasohm
parents:
767
diff
changeset

623 
qed "InfCard_cadd_eq"; 
767  624 

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

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

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

628 
*) 

484  629 

630 
(*** For every cardinal number there exists a greater one 

631 
[Kunen's Theorem 10.16, which would be trivial using AC] ***) 

632 

633 
goalw CardinalArith.thy [jump_cardinal_def] "Ord(jump_cardinal(K))"; 

634 
by (rtac (Ord_is_Transset RSN (2,OrdI)) 1); 

1075
848bf2e18dff
Modified proofs for new claset primitives. The problem is that they enforce
lcp
parents:
989
diff
changeset

635 
by (fast_tac (ZF_cs addSIs [Ord_ordertype]) 2); 
823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

636 
by (rewtac Transset_def); 
1075
848bf2e18dff
Modified proofs for new claset primitives. The problem is that they enforce
lcp
parents:
989
diff
changeset

637 
by (safe_tac subset_cs); 
846  638 
by (asm_full_simp_tac (ZF_ss addsimps [ordertype_pred_unfold]) 1); 
639 
by (safe_tac ZF_cs); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

640 
by (rtac UN_I 1); 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

641 
by (rtac ReplaceI 2); 
846  642 
by (ALLGOALS (fast_tac (ZF_cs addSEs [well_ord_subset, predE]))); 
760  643 
qed "Ord_jump_cardinal"; 
484  644 

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

646 
goalw CardinalArith.thy [jump_cardinal_def] 

647 
"i : jump_cardinal(K) <> \ 

648 
\ (EX r X. r <= K*K & X <= K & well_ord(X,r) & i = ordertype(X,r))"; 

1461  649 
by (fast_tac subset_cs 1); (*It's vital to avoid reasoning about <=*) 
760  650 
qed "jump_cardinal_iff"; 
484  651 

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

653 
goal CardinalArith.thy "!!K. Ord(K) ==> K < jump_cardinal(K)"; 

654 
by (resolve_tac [Ord_jump_cardinal RSN (2,ltI)] 1); 

655 
by (resolve_tac [jump_cardinal_iff RS iffD2] 1); 

656 
by (REPEAT_FIRST (ares_tac [exI, conjI, well_ord_Memrel])); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

657 
by (rtac subset_refl 2); 
484  658 
by (asm_simp_tac (ZF_ss addsimps [Memrel_def, subset_iff]) 1); 
659 
by (asm_simp_tac (ZF_ss addsimps [ordertype_Memrel]) 1); 

760  660 
qed "K_lt_jump_cardinal"; 
484  661 

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

663 
whose ordertype is jump_cardinal(K). *) 

664 
goal CardinalArith.thy 

1461  665 
"!!K. [ well_ord(X,r); r <= K * K; X <= K; \ 
666 
\ f : bij(ordertype(X,r), jump_cardinal(K)) \ 

667 
\ ] ==> jump_cardinal(K) : jump_cardinal(K)"; 

484  668 
by (subgoal_tac "f O ordermap(X,r): bij(X, jump_cardinal(K))" 1); 
669 
by (REPEAT (ares_tac [comp_bij, ordermap_bij] 2)); 

670 
by (resolve_tac [jump_cardinal_iff RS iffD2] 1); 

671 
by (REPEAT_FIRST (resolve_tac [exI, conjI])); 

672 
by (rtac ([rvimage_type, Sigma_mono] MRS subset_trans) 1); 

673 
by (REPEAT (assume_tac 1)); 

674 
by (etac (bij_is_inj RS well_ord_rvimage) 1); 

675 
by (rtac (Ord_jump_cardinal RS well_ord_Memrel) 1); 

676 
by (asm_simp_tac 

677 
(ZF_ss addsimps [well_ord_Memrel RSN (2, bij_ordertype_vimage), 

1461  678 
ordertype_Memrel, Ord_jump_cardinal]) 1); 
760  679 
qed "Card_jump_cardinal_lemma"; 
484  680 

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

682 
goal CardinalArith.thy "Card(jump_cardinal(K))"; 

683 
by (rtac (Ord_jump_cardinal RS CardI) 1); 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

684 
by (rewtac eqpoll_def); 
484  685 
by (safe_tac (ZF_cs addSDs [ltD, jump_cardinal_iff RS iffD1])); 
686 
by (REPEAT (ares_tac [Card_jump_cardinal_lemma RS mem_irrefl] 1)); 

760  687 
qed "Card_jump_cardinal"; 
484  688 

689 
(*** Basic properties of successor cardinals ***) 

690 

691 
goalw CardinalArith.thy [csucc_def] 

692 
"!!K. Ord(K) ==> Card(csucc(K)) & K < csucc(K)"; 

693 
by (rtac LeastI 1); 

694 
by (REPEAT (ares_tac [conjI, Card_jump_cardinal, K_lt_jump_cardinal, 

1461  695 
Ord_jump_cardinal] 1)); 
760  696 
qed "csucc_basic"; 
484  697 

800
23f55b829ccb
Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents:
782
diff
changeset

698 
bind_thm ("Card_csucc", csucc_basic RS conjunct1); 
484  699 

800
23f55b829ccb
Limit_csucc: moved to InfDatatype and proved explicitly in
lcp
parents:
782
diff
changeset

700 
bind_thm ("lt_csucc", csucc_basic RS conjunct2); 
484  701 

517  702 
goal CardinalArith.thy "!!K. Ord(K) ==> 0 < csucc(K)"; 
703 
by (resolve_tac [[Ord_0_le, lt_csucc] MRS lt_trans1] 1); 

704 
by (REPEAT (assume_tac 1)); 

760  705 
qed "Ord_0_lt_csucc"; 
517  706 

484  707 
goalw CardinalArith.thy [csucc_def] 
708 
"!!K L. [ Card(L); K<L ] ==> csucc(K) le L"; 

709 
by (rtac Least_le 1); 

710 
by (REPEAT (ares_tac [conjI, Card_is_Ord] 1)); 

760  711 
qed "csucc_le"; 
484  712 

713 
goal CardinalArith.thy 

714 
"!!K. [ Ord(i); Card(K) ] ==> i < csucc(K) <> i le K"; 

823
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

715 
by (rtac iffI 1); 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

716 
by (rtac Card_lt_imp_lt 2); 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
lcp
parents:
800
diff
changeset

717 
by (etac lt_trans1 2); 
484  718 
by (REPEAT (ares_tac [lt_csucc, Card_csucc, Card_is_Ord] 2)); 
719 
by (resolve_tac [notI RS not_lt_imp_le] 1); 

720 
by (resolve_tac [Card_cardinal RS csucc_le RS lt_trans1 RS lt_irrefl] 1); 

721 
by (assume_tac 1); 

722 
by (resolve_tac [Ord_cardinal_le RS lt_trans1] 1); 

723 
by (REPEAT (ares_tac [Ord_cardinal] 1 

724 
ORELSE eresolve_tac [ltE, Card_is_Ord] 1)); 

760  725 
qed "lt_csucc_iff"; 
484  726 

727 
goal CardinalArith.thy 

728 
"!!K' K. [ Card(K'); Card(K) ] ==> K' < csucc(K) <> K' le K"; 

729 
by (asm_simp_tac 

730 
(ZF_ss addsimps [lt_csucc_iff, Card_cardinal_eq, Card_is_Ord]) 1); 

760  731 
qed "Card_lt_csucc_iff"; 
488  732 

733 
goalw CardinalArith.thy [InfCard_def] 

734 
"!!K. InfCard(K) ==> InfCard(csucc(K))"; 

735 
by (asm_simp_tac (ZF_ss addsimps [Card_csucc, Card_is_Ord, 

1461  736 
lt_csucc RS leI RSN (2,le_trans)]) 1); 
760  737 
qed "InfCard_csucc"; 
517  738 