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 


31 
val case_ss = ZF_ss addsimps [Inl_iff, Inl_Inr_iff, Inr_iff, Inr_Inl_iff,


32 
case_Inl, case_Inr, InlI, InrI];


33 


34 


35 
(** Congruence laws for successor, cardinal addition and multiplication **)


36 


37 
val bij_inverse_ss =


38 
case_ss addsimps [bij_is_fun RS apply_type,


39 
bij_converse_bij RS bij_is_fun RS apply_type,


40 
left_inverse_bij, right_inverse_bij];


41 


42 

484

43 
(*Congruence law for cons under equipollence*)

437

44 
goalw CardinalArith.thy [eqpoll_def]

484

45 
"!!A B. [ A eqpoll B; a ~: A; b ~: B ] ==> cons(a,A) eqpoll cons(b,B)";

437

46 
by (safe_tac ZF_cs);


47 
by (rtac exI 1);

484

48 
by (res_inst_tac [("c", "%z.if(z=a,b,f`z)"),


49 
("d", "%z.if(z=b,a,converse(f)`z)")] lam_bijective 1);

437

50 
by (ALLGOALS

484

51 
(asm_simp_tac (bij_inverse_ss addsimps [consI2]


52 
setloop (etac consE ORELSE'


53 
split_tac [expand_if]))));


54 
by (fast_tac (ZF_cs addIs [bij_is_fun RS apply_type]) 1);


55 
by (fast_tac (ZF_cs addIs [bij_converse_bij RS bij_is_fun RS apply_type]) 1);


56 
val cons_eqpoll_cong = result();


57 


58 
(*Congruence law for succ under equipollence*)


59 
goalw CardinalArith.thy [succ_def]


60 
"!!A B. A eqpoll B ==> succ(A) eqpoll succ(B)";


61 
by (REPEAT (ares_tac [cons_eqpoll_cong, mem_not_refl] 1));

437

62 
val succ_eqpoll_cong = result();


63 

484

64 
(*Each element of Fin(A) is equivalent to a natural number*)


65 
goal CardinalArith.thy


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


67 
by (eresolve_tac [Fin_induct] 1);


68 
by (fast_tac (ZF_cs addIs [eqpoll_refl, nat_0I]) 1);


69 
by (fast_tac (ZF_cs addSIs [cons_eqpoll_cong,


70 
rewrite_rule [succ_def] nat_succI]


71 
addSEs [mem_irrefl]) 1);


72 
val Fin_eqpoll = result();


73 

437

74 
(*Congruence law for + under equipollence*)


75 
goalw CardinalArith.thy [eqpoll_def]


76 
"!!A B C D. [ A eqpoll C; B eqpoll D ] ==> A+B eqpoll C+D";


77 
by (safe_tac ZF_cs);


78 
by (rtac exI 1);


79 
by (res_inst_tac [("c", "case(%x. Inl(f`x), %y. Inr(fa`y))"),


80 
("d", "case(%x. Inl(converse(f)`x), %y. Inr(converse(fa)`y))")]


81 
lam_bijective 1);


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


83 
by (ALLGOALS (asm_simp_tac bij_inverse_ss));


84 
val sum_eqpoll_cong = result();


85 


86 
(*Congruence law for * under equipollence*)


87 
goalw CardinalArith.thy [eqpoll_def]


88 
"!!A B C D. [ A eqpoll C; B eqpoll D ] ==> A*B eqpoll C*D";


89 
by (safe_tac ZF_cs);


90 
by (rtac exI 1);


91 
by (res_inst_tac [("c", "split(%x y. <f`x, fa`y>)"),


92 
("d", "split(%x y. <converse(f)`x, converse(fa)`y>)")]


93 
lam_bijective 1);


94 
by (safe_tac ZF_cs);


95 
by (ALLGOALS (asm_simp_tac bij_inverse_ss));


96 
val prod_eqpoll_cong = result();


97 


98 


99 
(*** Cardinal addition ***)


100 


101 
(** Cardinal addition is commutative **)


102 


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


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


105 
by (rtac exI 1);


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


107 
lam_bijective 1);


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


109 
by (ALLGOALS (asm_simp_tac case_ss));


110 
val sum_commute_eqpoll = result();


111 


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


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


114 
val cadd_commute = result();


115 


116 
(** Cardinal addition is associative **)


117 


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


119 
by (rtac exI 1);


120 
by (res_inst_tac [("c", "case(case(Inl, %y.Inr(Inl(y))), %y. Inr(Inr(y)))"),


121 
("d", "case(%x.Inl(Inl(x)), case(%x.Inl(Inr(x)), Inr))")]


122 
lam_bijective 1);


123 
by (ALLGOALS (asm_simp_tac (case_ss setloop etac sumE)));


124 
val sum_assoc_eqpoll = result();


125 


126 
(*Unconditional version requires AC*)


127 
goalw CardinalArith.thy [cadd_def]

484

128 
"!!i j k. [ well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) ] ==> \

437

129 
\ (i + j) + k = i + (j + k)";


130 
by (rtac cardinal_cong 1);


131 
br ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS sum_eqpoll_cong RS


132 
eqpoll_trans) 1;


133 
by (rtac (sum_assoc_eqpoll RS eqpoll_trans) 2);


134 
br ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong RS


135 
eqpoll_sym) 2;

484

136 
by (REPEAT (ares_tac [well_ord_radd] 1));


137 
val well_ord_cadd_assoc = result();

437

138 


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


140 


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


142 
by (rtac exI 1);


143 
by (res_inst_tac [("c", "case(%x.x, %y.y)"), ("d", "Inr")]


144 
lam_bijective 1);


145 
by (ALLGOALS (asm_simp_tac (case_ss setloop eresolve_tac [sumE,emptyE])));


146 
val sum_0_eqpoll = result();


147 

484

148 
goalw CardinalArith.thy [cadd_def] "!!K. Card(K) ==> 0 + K = K";

437

149 
by (asm_simp_tac (ZF_ss addsimps [sum_0_eqpoll RS cardinal_cong,


150 
Card_cardinal_eq]) 1);


151 
val cadd_0 = result();


152 


153 
(** Addition of finite cardinals is "ordinary" addition **)


154 


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


156 
by (rtac exI 1);


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


158 
("d", "%z.if(z=A+B,Inl(A),z)")]


159 
lam_bijective 1);


160 
by (ALLGOALS


161 
(asm_simp_tac (case_ss addsimps [succI2, mem_imp_not_eq]


162 
setloop eresolve_tac [sumE,succE])));


163 
val sum_succ_eqpoll = result();


164 


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


166 
(*Unconditional version requires AC*)


167 
goalw CardinalArith.thy [cadd_def]


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


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


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


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


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


173 
val cadd_succ_lemma = result();


174 


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


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


177 
by (cut_facts_tac [nnat] 1);


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


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


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


181 
nat_into_Card RS Card_cardinal_eq]) 1);


182 
val nat_cadd_eq_add = result();


183 


184 


185 
(*** Cardinal multiplication ***)


186 


187 
(** Cardinal multiplication is commutative **)


188 


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


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


191 
by (rtac exI 1);


192 
by (res_inst_tac [("c", "split(%x y.<y,x>)"), ("d", "split(%x y.<y,x>)")]


193 
lam_bijective 1);


194 
by (safe_tac ZF_cs);


195 
by (ALLGOALS (asm_simp_tac ZF_ss));


196 
val prod_commute_eqpoll = result();


197 


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


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


200 
val cmult_commute = result();


201 


202 
(** Cardinal multiplication is associative **)


203 


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


205 
by (rtac exI 1);


206 
by (res_inst_tac [("c", "split(%w z. split(%x y. <x,<y,z>>, w))"),


207 
("d", "split(%x. split(%y z. <<x,y>, z>))")]


208 
lam_bijective 1);


209 
by (safe_tac ZF_cs);


210 
by (ALLGOALS (asm_simp_tac ZF_ss));


211 
val prod_assoc_eqpoll = result();


212 


213 
(*Unconditional version requires AC*)


214 
goalw CardinalArith.thy [cmult_def]

484

215 
"!!i j k. [ well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) ] ==> \

437

216 
\ (i * j) * k = i * (j * k)";


217 
by (rtac cardinal_cong 1);


218 
br ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS prod_eqpoll_cong RS


219 
eqpoll_trans) 1;


220 
by (rtac (prod_assoc_eqpoll RS eqpoll_trans) 2);


221 
br ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS prod_eqpoll_cong RS


222 
eqpoll_sym) 2;

484

223 
by (REPEAT (ares_tac [well_ord_rmult] 1));


224 
val well_ord_cmult_assoc = result();

437

225 


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


227 


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


229 
by (rtac exI 1);


230 
by (res_inst_tac


231 
[("c", "split(%x z. case(%y.Inl(<y,z>), %y.Inr(<y,z>), x))"),


232 
("d", "case(split(%x y.<Inl(x),y>), split(%x y.<Inr(x),y>))")]


233 
lam_bijective 1);


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


235 
by (ALLGOALS (asm_simp_tac case_ss));


236 
val sum_prod_distrib_eqpoll = result();


237 


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


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


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


241 
val prod_square_lepoll = result();


242 

484

243 
goalw CardinalArith.thy [cmult_def] "!!K. Card(K) ==> K le K * K";

437

244 
by (rtac le_trans 1);


245 
by (rtac well_ord_lepoll_imp_le 2);


246 
by (rtac prod_square_lepoll 3);


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


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


249 
val cmult_square_le = result();


250 


251 
(** Multiplication by 0 yields 0 **)


252 


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


254 
by (rtac exI 1);


255 
by (rtac lam_bijective 1);


256 
by (safe_tac ZF_cs);


257 
val prod_0_eqpoll = result();


258 


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


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


261 
Card_0 RS Card_cardinal_eq]) 1);


262 
val cmult_0 = result();


263 


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


265 


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


267 
by (rtac exI 1);


268 
by (res_inst_tac [("c", "snd"), ("d", "%z.<x,z>")] lam_bijective 1);


269 
by (safe_tac ZF_cs);


270 
by (ALLGOALS (asm_simp_tac ZF_ss));


271 
val prod_singleton_eqpoll = result();


272 

484

273 
goalw CardinalArith.thy [cmult_def, succ_def] "!!K. Card(K) ==> 1 * K = K";

437

274 
by (asm_simp_tac (ZF_ss addsimps [prod_singleton_eqpoll RS cardinal_cong,


275 
Card_cardinal_eq]) 1);


276 
val cmult_1 = result();


277 


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


279 


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


281 
by (rtac exI 1);


282 
by (res_inst_tac [("c", "split(%x y. if(x=A, Inl(y), Inr(<x,y>)))"),


283 
("d", "case(%y. <A,y>, %z.z)")]


284 
lam_bijective 1);


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


286 
by (ALLGOALS


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


288 
val prod_succ_eqpoll = result();


289 


290 


291 
(*Unconditional version requires AC*)


292 
goalw CardinalArith.thy [cmult_def, cadd_def]


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


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


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


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


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


298 
val cmult_succ_lemma = result();


299 


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


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


302 
by (cut_facts_tac [nnat] 1);


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


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


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


306 
nat_cadd_eq_add]) 1);


307 
val nat_cmult_eq_mult = result();


308 


309 


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


311 

516

312 
goalw CardinalArith.thy [lepoll_def]


313 
"!!i. nat <= A ==> succ(A) lepoll A";


314 
by (res_inst_tac [("x",


315 
"lam z:succ(A). if(z=A, 0, if(z:nat, succ(z), z))")] exI 1);


316 
by (res_inst_tac [("d", "%y. if(y:nat, nat_case(A,%z.z,y), y)")]


317 
lam_injective 1);


318 
by (fast_tac (ZF_cs addSIs [if_type, nat_0I, nat_succI]) 1);


319 
by (asm_simp_tac


320 
(ZF_ss addsimps [nat_case_0, nat_case_succ, nat_0I, nat_succI]


321 
setloop split_tac [expand_if]) 1);


322 
val nat_succ_lepoll = result();


323 

437

324 
goalw CardinalArith.thy [lepoll_def, inj_def]


325 
"!!i. nat <= A ==> succ(A) lepoll A";


326 
by (res_inst_tac [("x",


327 
"lam z:succ(A). if(z=A, 0, if(z:nat, succ(z), z))")] exI 1);


328 
by (rtac (lam_type RS CollectI) 1);

516

329 
by (fast_tac (ZF_cs addSIs [if_type, nat_0I, nat_succI]) 1);

437

330 
by (REPEAT (rtac ballI 1));


331 
by (asm_simp_tac


332 
(ZF_ss addsimps [succ_inject_iff, succ_not_0, succ_not_0 RS not_sym]


333 
setloop split_tac [expand_if]) 1);


334 
by (safe_tac (ZF_cs addSIs [nat_0I, nat_succI]));


335 
val nat_succ_lepoll = result();


336 


337 
goal CardinalArith.thy "!!i. nat <= A ==> succ(A) eqpoll A";


338 
by (etac (nat_succ_lepoll RS eqpollI) 1);


339 
by (rtac (subset_succI RS subset_imp_lepoll) 1);


340 
val nat_succ_eqpoll = result();


341 

488

342 
goalw CardinalArith.thy [InfCard_def] "InfCard(nat)";


343 
by (fast_tac (ZF_cs addIs [Card_nat, le_refl, Card_is_Ord]) 1);


344 
val InfCard_nat = result();


345 

484

346 
goalw CardinalArith.thy [InfCard_def] "!!K. InfCard(K) ==> Card(K)";

437

347 
by (etac conjunct1 1);


348 
val InfCard_is_Card = result();


349 


350 
(*Kunen's Lemma 10.11*)

484

351 
goalw CardinalArith.thy [InfCard_def] "!!K. InfCard(K) ==> Limit(K)";

437

352 
by (etac conjE 1);


353 
by (rtac (ltI RS non_succ_LimitI) 1);


354 
by (etac ([asm_rl, nat_0I] MRS (le_imp_subset RS subsetD)) 1);


355 
by (etac Card_is_Ord 1);


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


357 
by (forward_tac [Card_is_Ord RS Ord_succD] 1);


358 
by (rewtac Card_def);


359 
by (res_inst_tac [("i", "succ(y)")] lt_irrefl 1);


360 
by (dtac (le_imp_subset RS nat_succ_eqpoll RS cardinal_cong) 1);


361 
(*Tricky combination of substitutions; backtracking needed*)


362 
by (etac ssubst 1 THEN etac ssubst 1 THEN rtac Ord_cardinal_le 1);


363 
by (assume_tac 1);


364 
val InfCard_is_Limit = result();


365 


366 


367 


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


369 


370 
(*A general fact about ordermap*)


371 
goalw Cardinal.thy [eqpoll_def]


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


373 
by (rtac exI 1);


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

467

375 
by (etac (ordermap_bij RS bij_is_inj RS restrict_bij RS bij_converse_bij) 1);

437

376 
by (rtac pred_subset 1);


377 
val ordermap_eqpoll_pred = result();


378 


379 
(** Establishing the wellordering **)


380 


381 
goalw CardinalArith.thy [inj_def]

484

382 
"!!K. Ord(K) ==> \


383 
\ (lam z:K*K. split(%x y. <x Un y, <x, y>>, z)) : inj(K*K, K*K*K)";

437

384 
by (safe_tac ZF_cs);


385 
by (fast_tac (ZF_cs addIs [lam_type, Un_least_lt RS ltD, ltI]


386 
addSEs [split_type]) 1);


387 
by (asm_full_simp_tac ZF_ss 1);


388 
val csquare_lam_inj = result();


389 


390 
goalw CardinalArith.thy [csquare_rel_def]

484

391 
"!!K. Ord(K) ==> well_ord(K*K, csquare_rel(K))";

437

392 
by (rtac (csquare_lam_inj RS well_ord_rvimage) 1);


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


394 
val well_ord_csquare = result();


395 


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


397 


398 
goalw CardinalArith.thy [csquare_rel_def]

484

399 
"!!K. [ x<K; y<K; z<K ] ==> \


400 
\ <<x,y>, <z,z>> : csquare_rel(K) > x le z & y le z";

437

401 
by (REPEAT (etac ltE 1));


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


403 
Un_absorb, Un_least_mem_iff, ltD]) 1);


404 
by (safe_tac (ZF_cs addSEs [mem_irrefl]


405 
addSIs [Un_upper1_le, Un_upper2_le]));


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


407 
val csquareD_lemma = result();


408 
val csquareD = csquareD_lemma RS mp > standard;


409 


410 
goalw CardinalArith.thy [pred_def]

484

411 
"!!K. z<K ==> pred(K*K, <z,z>, csquare_rel(K)) <= succ(z)*succ(z)";

437

412 
by (safe_tac (lemmas_cs addSEs [SigmaE])); (*avoids using succCI*)


413 
by (rtac (csquareD RS conjE) 1);


414 
by (rewtac lt_def);


415 
by (assume_tac 4);


416 
by (ALLGOALS (fast_tac ZF_cs));


417 
val pred_csquare_subset = result();


418 


419 
goalw CardinalArith.thy [csquare_rel_def]

484

420 
"!!K. [ x<z; y<z; z<K ] ==> \


421 
\ <<x,y>, <z,z>> : csquare_rel(K)";


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

437

423 
by (REPEAT (eresolve_tac [asm_rl, lt_trans] 2));


424 
by (REPEAT (etac ltE 1));


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


426 
Un_absorb, Un_least_mem_iff, ltD]) 1);


427 
val csquare_ltI = result();


428 


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


430 
goalw CardinalArith.thy [csquare_rel_def]

484

431 
"!!K. [ x le z; y le z; z<K ] ==> \


432 
\ <<x,y>, <z,z>> : csquare_rel(K)  x=z & y=z";


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

437

434 
by (REPEAT (eresolve_tac [asm_rl, lt_trans1] 2));


435 
by (REPEAT (etac ltE 1));


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


437 
Un_absorb, Un_least_mem_iff, ltD]) 1);


438 
by (REPEAT_FIRST (etac succE));


439 
by (ALLGOALS


440 
(asm_simp_tac (ZF_ss addsimps [subset_Un_iff RS iff_sym,


441 
subset_Un_iff2 RS iff_sym, OrdmemD])));


442 
val csquare_or_eqI = result();


443 


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


445 


446 
goal CardinalArith.thy

484

447 
"!!K. [ InfCard(K); x<K; y<K; z=succ(x Un y) ] ==> \


448 
\ ordermap(K*K, csquare_rel(K)) ` <x,y> lepoll \


449 
\ ordermap(K*K, csquare_rel(K)) ` <z,z>";


450 
by (subgoals_tac ["z<K", "well_ord(K*K, csquare_rel(K))"] 1);

437

451 
by (etac (InfCard_is_Card RS Card_is_Ord RS well_ord_csquare) 2);


452 
by (fast_tac (ZF_cs addSIs [Un_least_lt, InfCard_is_Limit, Limit_has_succ]) 2);


453 
by (rtac (OrdmemD RS subset_imp_lepoll) 1);

467

454 
by (res_inst_tac [("z1","z")] (csquare_ltI RS ordermap_mono) 1);

437

455 
by (etac well_ord_is_wf 4);


456 
by (ALLGOALS


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


458 
addSEs [ltE])));


459 
val ordermap_z_lepoll = result();


460 

484

461 
(*Kunen: "each <x,y>: K*K has no more than z*z predecessors..." (page 29) *)

437

462 
goalw CardinalArith.thy [cmult_def]

484

463 
"!!K. [ InfCard(K); x<K; y<K; z=succ(x Un y) ] ==> \


464 
\  ordermap(K*K, csquare_rel(K)) ` <x,y>  le succ(z) * succ(z)";

437

465 
by (rtac (well_ord_rmult RS well_ord_lepoll_imp_le) 1);


466 
by (REPEAT (ares_tac [Ord_cardinal, well_ord_Memrel] 1));

484

467 
by (subgoals_tac ["z<K"] 1);

437

468 
by (fast_tac (ZF_cs addSIs [Un_least_lt, InfCard_is_Limit,


469 
Limit_has_succ]) 2);


470 
by (rtac (ordermap_z_lepoll RS lepoll_trans) 1);


471 
by (REPEAT_SOME assume_tac);


472 
by (rtac (ordermap_eqpoll_pred RS eqpoll_imp_lepoll RS lepoll_trans) 1);


473 
by (etac (InfCard_is_Card RS Card_is_Ord RS well_ord_csquare) 1);


474 
by (fast_tac (ZF_cs addIs [ltD]) 1);


475 
by (rtac (pred_csquare_subset RS subset_imp_lepoll RS lepoll_trans) 1 THEN


476 
assume_tac 1);


477 
by (REPEAT_FIRST (etac ltE));


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


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


480 
val ordermap_csquare_le = result();


481 

484

482 
(*Kunen: "... so the order type <= K" *)

437

483 
goal CardinalArith.thy

484

484 
"!!K. [ InfCard(K); ALL y:K. InfCard(y) > y * y = y ] ==> \


485 
\ ordertype(K*K, csquare_rel(K)) le K";

437

486 
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1);


487 
by (rtac all_lt_imp_le 1);


488 
by (assume_tac 1);


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


490 
by (rtac Card_lt_imp_lt 1);


491 
by (etac InfCard_is_Card 3);


492 
by (etac ltE 2 THEN assume_tac 2);


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


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


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


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


497 
by (rtac (ordermap_csquare_le RS lt_trans1) 1 THEN


498 
REPEAT (ares_tac [refl] 1 ORELSE etac ltI 1));


499 
by (res_inst_tac [("i","xb Un y"), ("j","nat")] Ord_linear2 1 THEN


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


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


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


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


504 
by (asm_full_simp_tac


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


506 
nat_into_Card RS Card_cardinal_eq, Ord_nat]) 1);


507 
(*case nat le (xb Un y), equivalently InfCard(xb Un y) *)


508 
by (asm_full_simp_tac


509 
(ZF_ss addsimps [le_imp_subset RS nat_succ_eqpoll RS cardinal_cong,


510 
le_succ_iff, InfCard_def, Card_cardinal, Un_least_lt,


511 
Ord_Un, ltI, nat_le_cardinal,


512 
Ord_cardinal_le RS lt_trans1 RS ltD]) 1);


513 
val ordertype_csquare_le = result();


514 


515 
(*This lemma can easily be generalized to premise well_ord(A*A,r) *)


516 
goalw CardinalArith.thy [cmult_def]

484

517 
"!!K. Ord(K) ==> K * K = ordertype(K*K, csquare_rel(K))";

437

518 
by (rtac cardinal_cong 1);


519 
by (rewtac eqpoll_def);


520 
by (rtac exI 1);

467

521 
by (etac (well_ord_csquare RS ordermap_bij) 1);

437

522 
val csquare_eq_ordertype = result();


523 


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

484

525 
goal CardinalArith.thy "!!K. InfCard(K) ==> K * K = K";

437

526 
by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1);


527 
by (etac rev_mp 1);

484

528 
by (trans_ind_tac "K" [] 1);

437

529 
by (rtac impI 1);


530 
by (rtac le_anti_sym 1);


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


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


533 
by (assume_tac 2);


534 
by (assume_tac 2);


535 
by (asm_simp_tac


536 
(ZF_ss addsimps [csquare_eq_ordertype, Ord_cardinal_le,


537 
well_ord_csquare RS Ord_ordertype]) 1);


538 
val InfCard_csquare_eq = result();

484

539 


540 


541 
goal CardinalArith.thy


542 
"!!A. [ well_ord(A,r); InfCard(A) ] ==> A*A eqpoll A";


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


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


545 
by (resolve_tac [well_ord_cardinal_eqE] 1);


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


547 
by (asm_simp_tac (ZF_ss addsimps [symmetric cmult_def, InfCard_csquare_eq]) 1);


548 
val well_ord_InfCard_square_eq = result();


549 


550 


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


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


553 


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


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


556 
by (safe_tac (ZF_cs addSIs [Ord_ordertype]));


557 
bw Transset_def;


558 
by (safe_tac ZF_cs);


559 
by (rtac (ordertype_subset RS exE) 1 THEN REPEAT (assume_tac 1));


560 
by (resolve_tac [UN_I] 1);


561 
by (resolve_tac [ReplaceI] 2);


562 
by (ALLGOALS (fast_tac (ZF_cs addSEs [well_ord_subset])));


563 
val Ord_jump_cardinal = result();


564 


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


566 
goalw CardinalArith.thy [jump_cardinal_def]


567 
"i : jump_cardinal(K) <> \


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


569 
by (fast_tac subset_cs 1); (*It's vital to avoid reasoning about <=*)


570 
val jump_cardinal_iff = result();


571 


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


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


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


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


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


577 
by (resolve_tac [subset_refl] 2);


578 
by (asm_simp_tac (ZF_ss addsimps [Memrel_def, subset_iff]) 1);


579 
by (asm_simp_tac (ZF_ss addsimps [ordertype_Memrel]) 1);


580 
val K_lt_jump_cardinal = result();


581 


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


583 
whose ordertype is jump_cardinal(K). *)


584 
goal CardinalArith.thy


585 
"!!K. [ well_ord(X,r); r <= K * K; X <= K; \


586 
\ f : bij(ordertype(X,r), jump_cardinal(K)) \


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


588 
by (subgoal_tac "f O ordermap(X,r): bij(X, jump_cardinal(K))" 1);


589 
by (REPEAT (ares_tac [comp_bij, ordermap_bij] 2));


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


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


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


593 
by (REPEAT (assume_tac 1));


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


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


596 
by (asm_simp_tac


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


598 
ordertype_Memrel, Ord_jump_cardinal]) 1);


599 
val Card_jump_cardinal_lemma = result();


600 


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


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


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


604 
by (rewrite_goals_tac [eqpoll_def]);


605 
by (safe_tac (ZF_cs addSDs [ltD, jump_cardinal_iff RS iffD1]));


606 
by (REPEAT (ares_tac [Card_jump_cardinal_lemma RS mem_irrefl] 1));


607 
val Card_jump_cardinal = result();


608 


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


610 


611 
goalw CardinalArith.thy [csucc_def]


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


613 
by (rtac LeastI 1);


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


615 
Ord_jump_cardinal] 1));


616 
val csucc_basic = result();


617 


618 
val Card_csucc = csucc_basic RS conjunct1 > standard;


619 


620 
val lt_csucc = csucc_basic RS conjunct2 > standard;


621 

517

622 
goal CardinalArith.thy "!!K. Ord(K) ==> 0 < csucc(K)";


623 
by (resolve_tac [[Ord_0_le, lt_csucc] MRS lt_trans1] 1);


624 
by (REPEAT (assume_tac 1));


625 
val Ord_0_lt_csucc = result();


626 

484

627 
goalw CardinalArith.thy [csucc_def]


628 
"!!K L. [ Card(L); K<L ] ==> csucc(K) le L";


629 
by (rtac Least_le 1);


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


631 
val csucc_le = result();


632 


633 
goal CardinalArith.thy


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


635 
by (resolve_tac [iffI] 1);


636 
by (resolve_tac [Card_lt_imp_lt] 2);


637 
by (eresolve_tac [lt_trans1] 2);


638 
by (REPEAT (ares_tac [lt_csucc, Card_csucc, Card_is_Ord] 2));


639 
by (resolve_tac [notI RS not_lt_imp_le] 1);


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


641 
by (assume_tac 1);


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


643 
by (REPEAT (ares_tac [Ord_cardinal] 1


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


645 
val lt_csucc_iff = result();


646 


647 
goal CardinalArith.thy


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


649 
by (asm_simp_tac


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


651 
val Card_lt_csucc_iff = result();

488

652 


653 
goalw CardinalArith.thy [InfCard_def]


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


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


656 
lt_csucc RS leI RSN (2,le_trans)]) 1);


657 
val InfCard_csucc = result();

517

658 


659 
val Limit_csucc = InfCard_csucc RS InfCard_is_Limit > standard;
