| author | paulson | 
| Tue, 22 Sep 1998 15:24:39 +0200 | |
| changeset 5533 | bce36a019b03 | 
| parent 5529 | 4a54acae6a15 | 
| child 6068 | 2d8f3e1f1151 | 
| permissions | -rw-r--r-- | 
| 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: 
800diff
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: 
800diff
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: 
800diff
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 | ||
| 16 | (*** Cardinal addition ***) | |
| 17 | ||
| 18 | (** Cardinal addition is commutative **) | |
| 19 | ||
| 5067 | 20 | Goalw [eqpoll_def] "A+B eqpoll B+A"; | 
| 437 | 21 | by (rtac exI 1); | 
| 22 | by (res_inst_tac [("c", "case(Inr, Inl)"), ("d", "case(Inr, Inl)")] 
 | |
| 23 | lam_bijective 1); | |
| 5488 | 24 | by Auto_tac; | 
| 760 | 25 | qed "sum_commute_eqpoll"; | 
| 437 | 26 | |
| 5067 | 27 | Goalw [cadd_def] "i |+| j = j |+| i"; | 
| 437 | 28 | by (rtac (sum_commute_eqpoll RS cardinal_cong) 1); | 
| 760 | 29 | qed "cadd_commute"; | 
| 437 | 30 | |
| 31 | (** Cardinal addition is associative **) | |
| 32 | ||
| 5067 | 33 | Goalw [eqpoll_def] "(A+B)+C eqpoll A+(B+C)"; | 
| 437 | 34 | by (rtac exI 1); | 
| 1461 | 35 | by (rtac sum_assoc_bij 1); | 
| 760 | 36 | qed "sum_assoc_eqpoll"; | 
| 437 | 37 | |
| 38 | (*Unconditional version requires AC*) | |
| 5067 | 39 | Goalw [cadd_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 40 | "[| well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) |] ==> \ | 
| 437 | 41 | \ (i |+| j) |+| k = i |+| (j |+| k)"; | 
| 42 | by (rtac cardinal_cong 1); | |
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 43 | by (rtac ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS sum_eqpoll_cong RS | 
| 1461 | 44 | eqpoll_trans) 1); | 
| 437 | 45 | 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: 
800diff
changeset | 46 | by (rtac ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong RS | 
| 1461 | 47 | eqpoll_sym) 2); | 
| 484 | 48 | by (REPEAT (ares_tac [well_ord_radd] 1)); | 
| 760 | 49 | qed "well_ord_cadd_assoc"; | 
| 437 | 50 | |
| 51 | (** 0 is the identity for addition **) | |
| 52 | ||
| 5067 | 53 | Goalw [eqpoll_def] "0+A eqpoll A"; | 
| 437 | 54 | by (rtac exI 1); | 
| 846 | 55 | by (rtac bij_0_sum 1); | 
| 760 | 56 | qed "sum_0_eqpoll"; | 
| 437 | 57 | |
| 5137 | 58 | Goalw [cadd_def] "Card(K) ==> 0 |+| K = K"; | 
| 4091 | 59 | by (asm_simp_tac (simpset() addsimps [sum_0_eqpoll RS cardinal_cong, | 
| 4312 | 60 | Card_cardinal_eq]) 1); | 
| 760 | 61 | qed "cadd_0"; | 
| 437 | 62 | |
| 767 | 63 | (** Addition by another cardinal **) | 
| 64 | ||
| 5067 | 65 | Goalw [lepoll_def, inj_def] "A lepoll A+B"; | 
| 767 | 66 | by (res_inst_tac [("x", "lam x:A. Inl(x)")] exI 1);
 | 
| 4091 | 67 | by (asm_simp_tac (simpset() addsimps [lam_type]) 1); | 
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 68 | qed "sum_lepoll_self"; | 
| 767 | 69 | |
| 70 | (*Could probably weaken the premises to well_ord(K,r), or removing using AC*) | |
| 5067 | 71 | Goalw [cadd_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 72 | "[| Card(K); Ord(L) |] ==> K le (K |+| L)"; | 
| 767 | 73 | by (rtac ([Card_cardinal_le, well_ord_lepoll_imp_Card_le] MRS le_trans) 1); | 
| 74 | by (rtac sum_lepoll_self 3); | |
| 75 | 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: 
767diff
changeset | 76 | qed "cadd_le_self"; | 
| 767 | 77 | |
| 78 | (** Monotonicity of addition **) | |
| 79 | ||
| 5067 | 80 | Goalw [lepoll_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 81 | "[| A lepoll C; B lepoll D |] ==> A + B lepoll C + D"; | 
| 767 | 82 | by (REPEAT (etac exE 1)); | 
| 83 | by (res_inst_tac [("x", "lam z:A+B. case(%w. Inl(f`w), %y. Inr(fa`y), z)")] 
 | |
| 84 | exI 1); | |
| 85 | by (res_inst_tac | |
| 86 |       [("d", "case(%w. Inl(converse(f)`w), %y. Inr(converse(fa)`y))")] 
 | |
| 87 | lam_injective 1); | |
| 846 | 88 | 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: 
800diff
changeset | 89 | by (etac sumE 1); | 
| 4091 | 90 | by (ALLGOALS (asm_simp_tac (simpset() addsimps [left_inverse]))); | 
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 91 | qed "sum_lepoll_mono"; | 
| 767 | 92 | |
| 5067 | 93 | Goalw [cadd_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 94 | "[| K' le K; L' le L |] ==> (K' |+| L') le (K |+| L)"; | 
| 4091 | 95 | by (safe_tac (claset() addSDs [le_subset_iff RS iffD1])); | 
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 96 | by (rtac well_ord_lepoll_imp_Card_le 1); | 
| 767 | 97 | by (REPEAT (ares_tac [sum_lepoll_mono, subset_imp_lepoll] 2)); | 
| 98 | by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel] 1)); | |
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 99 | qed "cadd_le_mono"; | 
| 767 | 100 | |
| 437 | 101 | (** Addition of finite cardinals is "ordinary" addition **) | 
| 102 | ||
| 5067 | 103 | Goalw [eqpoll_def] "succ(A)+B eqpoll succ(A+B)"; | 
| 437 | 104 | by (rtac exI 1); | 
| 3840 | 105 | by (res_inst_tac [("c", "%z. if(z=Inl(A),A+B,z)"), 
 | 
| 106 |                   ("d", "%z. if(z=A+B,Inl(A),z)")] 
 | |
| 437 | 107 | lam_bijective 1); | 
| 108 | by (ALLGOALS | |
| 4091 | 109 | (asm_simp_tac (simpset() addsimps [succI2, mem_imp_not_eq] | 
| 4312 | 110 | setloop eresolve_tac [sumE,succE]))); | 
| 760 | 111 | qed "sum_succ_eqpoll"; | 
| 437 | 112 | |
| 113 | (*Pulling the succ(...) outside the |...| requires m, n: nat *) | |
| 114 | (*Unconditional version requires AC*) | |
| 5067 | 115 | Goalw [cadd_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 116 | "[| Ord(m); Ord(n) |] ==> succ(m) |+| n = |succ(m |+| n)|"; | 
| 437 | 117 | by (rtac (sum_succ_eqpoll RS cardinal_cong RS trans) 1); | 
| 118 | by (rtac (succ_eqpoll_cong RS cardinal_cong) 1); | |
| 119 | by (rtac (well_ord_cardinal_eqpoll RS eqpoll_sym) 1); | |
| 120 | by (REPEAT (ares_tac [well_ord_radd, well_ord_Memrel] 1)); | |
| 760 | 121 | qed "cadd_succ_lemma"; | 
| 437 | 122 | |
| 123 | val [mnat,nnat] = goal CardinalArith.thy | |
| 124 | "[| m: nat; n: nat |] ==> m |+| n = m#+n"; | |
| 125 | by (cut_facts_tac [nnat] 1); | |
| 126 | by (nat_ind_tac "m" [mnat] 1); | |
| 4091 | 127 | by (asm_simp_tac (simpset() addsimps [nat_into_Card RS cadd_0]) 1); | 
| 128 | by (asm_simp_tac (simpset() addsimps [nat_into_Ord, cadd_succ_lemma, | |
| 4312 | 129 | nat_into_Card RS Card_cardinal_eq]) 1); | 
| 760 | 130 | qed "nat_cadd_eq_add"; | 
| 437 | 131 | |
| 132 | ||
| 133 | (*** Cardinal multiplication ***) | |
| 134 | ||
| 135 | (** Cardinal multiplication is commutative **) | |
| 136 | ||
| 137 | (*Easier to prove the two directions separately*) | |
| 5067 | 138 | Goalw [eqpoll_def] "A*B eqpoll B*A"; | 
| 437 | 139 | by (rtac exI 1); | 
| 1090 
8ab69b3e396b
Changed some definitions and proofs to use pattern-matching.
 lcp parents: 
1075diff
changeset | 140 | by (res_inst_tac [("c", "%<x,y>.<y,x>"), ("d", "%<x,y>.<y,x>")] 
 | 
| 437 | 141 | lam_bijective 1); | 
| 4152 | 142 | by Safe_tac; | 
| 2469 | 143 | by (ALLGOALS (Asm_simp_tac)); | 
| 760 | 144 | qed "prod_commute_eqpoll"; | 
| 437 | 145 | |
| 5067 | 146 | Goalw [cmult_def] "i |*| j = j |*| i"; | 
| 437 | 147 | by (rtac (prod_commute_eqpoll RS cardinal_cong) 1); | 
| 760 | 148 | qed "cmult_commute"; | 
| 437 | 149 | |
| 150 | (** Cardinal multiplication is associative **) | |
| 151 | ||
| 5067 | 152 | Goalw [eqpoll_def] "(A*B)*C eqpoll A*(B*C)"; | 
| 437 | 153 | by (rtac exI 1); | 
| 1461 | 154 | by (rtac prod_assoc_bij 1); | 
| 760 | 155 | qed "prod_assoc_eqpoll"; | 
| 437 | 156 | |
| 157 | (*Unconditional version requires AC*) | |
| 5067 | 158 | Goalw [cmult_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 159 | "[| well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) |] ==> \ | 
| 437 | 160 | \ (i |*| j) |*| k = i |*| (j |*| k)"; | 
| 161 | by (rtac cardinal_cong 1); | |
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 162 | by (rtac ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS prod_eqpoll_cong RS | 
| 1461 | 163 | eqpoll_trans) 1); | 
| 437 | 164 | 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: 
800diff
changeset | 165 | by (rtac ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS prod_eqpoll_cong RS | 
| 1461 | 166 | eqpoll_sym) 2); | 
| 484 | 167 | by (REPEAT (ares_tac [well_ord_rmult] 1)); | 
| 760 | 168 | qed "well_ord_cmult_assoc"; | 
| 437 | 169 | |
| 170 | (** Cardinal multiplication distributes over addition **) | |
| 171 | ||
| 5067 | 172 | Goalw [eqpoll_def] "(A+B)*C eqpoll (A*C)+(B*C)"; | 
| 437 | 173 | by (rtac exI 1); | 
| 1461 | 174 | by (rtac sum_prod_distrib_bij 1); | 
| 760 | 175 | qed "sum_prod_distrib_eqpoll"; | 
| 437 | 176 | |
| 5067 | 177 | Goalw [cadd_def, cmult_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 178 | "[| well_ord(i,ri); well_ord(j,rj); well_ord(k,rk) |] ==> \ | 
| 846 | 179 | \ (i |+| j) |*| k = (i |*| k) |+| (j |*| k)"; | 
| 180 | by (rtac cardinal_cong 1); | |
| 181 | by (rtac ([well_ord_cardinal_eqpoll, eqpoll_refl] MRS prod_eqpoll_cong RS | |
| 1461 | 182 | eqpoll_trans) 1); | 
| 846 | 183 | by (rtac (sum_prod_distrib_eqpoll RS eqpoll_trans) 2); | 
| 4312 | 184 | by (rtac ([well_ord_cardinal_eqpoll, well_ord_cardinal_eqpoll] MRS | 
| 185 | sum_eqpoll_cong RS eqpoll_sym) 2); | |
| 846 | 186 | by (REPEAT (ares_tac [well_ord_rmult, well_ord_radd] 1)); | 
| 187 | qed "well_ord_cadd_cmult_distrib"; | |
| 188 | ||
| 437 | 189 | (** Multiplication by 0 yields 0 **) | 
| 190 | ||
| 5067 | 191 | Goalw [eqpoll_def] "0*A eqpoll 0"; | 
| 437 | 192 | by (rtac exI 1); | 
| 193 | by (rtac lam_bijective 1); | |
| 4152 | 194 | by Safe_tac; | 
| 760 | 195 | qed "prod_0_eqpoll"; | 
| 437 | 196 | |
| 5067 | 197 | Goalw [cmult_def] "0 |*| i = 0"; | 
| 4091 | 198 | by (asm_simp_tac (simpset() addsimps [prod_0_eqpoll RS cardinal_cong, | 
| 4312 | 199 | Card_0 RS Card_cardinal_eq]) 1); | 
| 760 | 200 | qed "cmult_0"; | 
| 437 | 201 | |
| 202 | (** 1 is the identity for multiplication **) | |
| 203 | ||
| 5067 | 204 | Goalw [eqpoll_def] "{x}*A eqpoll A";
 | 
| 437 | 205 | by (rtac exI 1); | 
| 846 | 206 | by (resolve_tac [singleton_prod_bij RS bij_converse_bij] 1); | 
| 760 | 207 | qed "prod_singleton_eqpoll"; | 
| 437 | 208 | |
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 209 | Goalw [cmult_def, succ_def] "Card(K) ==> 1 |*| K = K"; | 
| 4091 | 210 | by (asm_simp_tac (simpset() addsimps [prod_singleton_eqpoll RS cardinal_cong, | 
| 4312 | 211 | Card_cardinal_eq]) 1); | 
| 760 | 212 | qed "cmult_1"; | 
| 437 | 213 | |
| 767 | 214 | (*** Some inequalities for multiplication ***) | 
| 215 | ||
| 5067 | 216 | Goalw [lepoll_def, inj_def] "A lepoll A*A"; | 
| 767 | 217 | by (res_inst_tac [("x", "lam x:A. <x,x>")] exI 1);
 | 
| 4091 | 218 | by (simp_tac (simpset() addsimps [lam_type]) 1); | 
| 767 | 219 | qed "prod_square_lepoll"; | 
| 220 | ||
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 221 | (*Could probably weaken the premise to well_ord(K,r), or remove using AC*) | 
| 5137 | 222 | Goalw [cmult_def] "Card(K) ==> K le K |*| K"; | 
| 767 | 223 | by (rtac le_trans 1); | 
| 224 | by (rtac well_ord_lepoll_imp_Card_le 2); | |
| 225 | by (rtac prod_square_lepoll 3); | |
| 226 | by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel, Card_is_Ord] 2)); | |
| 4312 | 227 | by (asm_simp_tac (simpset() | 
| 228 | addsimps [le_refl, Card_is_Ord, Card_cardinal_eq]) 1); | |
| 767 | 229 | qed "cmult_square_le"; | 
| 230 | ||
| 231 | (** Multiplication by a non-zero cardinal **) | |
| 232 | ||
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 233 | Goalw [lepoll_def, inj_def] "b: B ==> A lepoll A*B"; | 
| 767 | 234 | by (res_inst_tac [("x", "lam x:A. <x,b>")] exI 1);
 | 
| 4091 | 235 | by (asm_simp_tac (simpset() addsimps [lam_type]) 1); | 
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 236 | qed "prod_lepoll_self"; | 
| 767 | 237 | |
| 238 | (*Could probably weaken the premises to well_ord(K,r), or removing using AC*) | |
| 5067 | 239 | Goalw [cmult_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 240 | "[| Card(K); Ord(L); 0<L |] ==> K le (K |*| L)"; | 
| 767 | 241 | by (rtac ([Card_cardinal_le, well_ord_lepoll_imp_Card_le] MRS le_trans) 1); | 
| 242 | by (rtac prod_lepoll_self 3); | |
| 243 | 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: 
767diff
changeset | 244 | qed "cmult_le_self"; | 
| 767 | 245 | |
| 246 | (** Monotonicity of multiplication **) | |
| 247 | ||
| 5067 | 248 | Goalw [lepoll_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 249 | "[| A lepoll C; B lepoll D |] ==> A * B lepoll C * D"; | 
| 767 | 250 | by (REPEAT (etac exE 1)); | 
| 1090 
8ab69b3e396b
Changed some definitions and proofs to use pattern-matching.
 lcp parents: 
1075diff
changeset | 251 | by (res_inst_tac [("x", "lam <w,y>:A*B. <f`w, fa`y>")] exI 1);
 | 
| 
8ab69b3e396b
Changed some definitions and proofs to use pattern-matching.
 lcp parents: 
1075diff
changeset | 252 | by (res_inst_tac [("d", "%<w,y>.<converse(f)`w, converse(fa)`y>")] 
 | 
| 1461 | 253 | lam_injective 1); | 
| 767 | 254 | 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: 
800diff
changeset | 255 | by (etac SigmaE 1); | 
| 4091 | 256 | by (asm_simp_tac (simpset() addsimps [left_inverse]) 1); | 
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 257 | qed "prod_lepoll_mono"; | 
| 767 | 258 | |
| 5067 | 259 | Goalw [cmult_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 260 | "[| K' le K; L' le L |] ==> (K' |*| L') le (K |*| L)"; | 
| 4091 | 261 | by (safe_tac (claset() addSDs [le_subset_iff RS iffD1])); | 
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 262 | by (rtac well_ord_lepoll_imp_Card_le 1); | 
| 767 | 263 | by (REPEAT (ares_tac [prod_lepoll_mono, subset_imp_lepoll] 2)); | 
| 264 | by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1)); | |
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 265 | qed "cmult_le_mono"; | 
| 767 | 266 | |
| 267 | (*** Multiplication of finite cardinals is "ordinary" multiplication ***) | |
| 437 | 268 | |
| 5067 | 269 | Goalw [eqpoll_def] "succ(A)*B eqpoll B + A*B"; | 
| 437 | 270 | by (rtac exI 1); | 
| 1090 
8ab69b3e396b
Changed some definitions and proofs to use pattern-matching.
 lcp parents: 
1075diff
changeset | 271 | by (res_inst_tac [("c", "%<x,y>. if(x=A, Inl(y), Inr(<x,y>))"), 
 | 
| 3840 | 272 |                   ("d", "case(%y. <A,y>, %z. z)")] 
 | 
| 437 | 273 | lam_bijective 1); | 
| 5488 | 274 | by Safe_tac; | 
| 437 | 275 | by (ALLGOALS | 
| 4091 | 276 | (asm_simp_tac (simpset() addsimps [succI2, if_type, mem_imp_not_eq]))); | 
| 760 | 277 | qed "prod_succ_eqpoll"; | 
| 437 | 278 | |
| 279 | (*Unconditional version requires AC*) | |
| 5067 | 280 | Goalw [cmult_def, cadd_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 281 | "[| Ord(m); Ord(n) |] ==> succ(m) |*| n = n |+| (m |*| n)"; | 
| 437 | 282 | by (rtac (prod_succ_eqpoll RS cardinal_cong RS trans) 1); | 
| 283 | by (rtac (cardinal_cong RS sym) 1); | |
| 284 | by (rtac ([eqpoll_refl, well_ord_cardinal_eqpoll] MRS sum_eqpoll_cong) 1); | |
| 285 | by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1)); | |
| 760 | 286 | qed "cmult_succ_lemma"; | 
| 437 | 287 | |
| 288 | val [mnat,nnat] = goal CardinalArith.thy | |
| 289 | "[| m: nat; n: nat |] ==> m |*| n = m#*n"; | |
| 290 | by (cut_facts_tac [nnat] 1); | |
| 291 | by (nat_ind_tac "m" [mnat] 1); | |
| 4091 | 292 | by (asm_simp_tac (simpset() addsimps [cmult_0]) 1); | 
| 293 | by (asm_simp_tac (simpset() addsimps [nat_into_Ord, cmult_succ_lemma, | |
| 4312 | 294 | nat_cadd_eq_add]) 1); | 
| 760 | 295 | qed "nat_cmult_eq_mult"; | 
| 437 | 296 | |
| 5137 | 297 | Goal "Card(n) ==> 2 |*| n = n |+| n"; | 
| 767 | 298 | by (asm_simp_tac | 
| 4091 | 299 | (simpset() addsimps [Ord_0, Ord_succ, cmult_0, cmult_succ_lemma, | 
| 4312 | 300 | Card_is_Ord, cadd_0, | 
| 301 | 			 read_instantiate [("j","0")] cadd_commute]) 1);
 | |
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 302 | qed "cmult_2"; | 
| 767 | 303 | |
| 437 | 304 | |
| 5284 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 305 | val sum_lepoll_prod = [sum_eq_2_times RS equalityD1 RS subset_imp_lepoll, | 
| 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 306 | asm_rl, lepoll_refl] MRS (prod_lepoll_mono RSN (2, lepoll_trans)) | 
| 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 307 | |> standard; | 
| 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 308 | |
| 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 309 | Goal "[| A lepoll B; 2 lepoll A |] ==> A+B lepoll A*B"; | 
| 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 310 | by (REPEAT (ares_tac [[sum_lepoll_mono, sum_lepoll_prod] | 
| 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 311 | MRS lepoll_trans, lepoll_refl] 1)); | 
| 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 312 | qed "lepoll_imp_sum_lepoll_prod"; | 
| 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 313 | |
| 
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
 paulson parents: 
5147diff
changeset | 314 | |
| 437 | 315 | (*** Infinite Cardinals are Limit Ordinals ***) | 
| 316 | ||
| 571 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
 lcp parents: 
523diff
changeset | 317 | (*This proof is modelled upon one assuming nat<=A, with injection | 
| 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
 lcp parents: 
523diff
changeset | 318 | 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: 
523diff
changeset | 319 | %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: 
523diff
changeset | 320 | range(f) behaves like the natural numbers.*) | 
| 5067 | 321 | Goalw [lepoll_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 322 | "nat lepoll A ==> cons(u,A) lepoll A"; | 
| 571 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
 lcp parents: 
523diff
changeset | 323 | by (etac exE 1); | 
| 516 | 324 | by (res_inst_tac [("x",
 | 
| 1461 | 325 | "lam z:cons(u,A). if(z=u, f`0, \ | 
| 571 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
 lcp parents: 
523diff
changeset | 326 | \ if(z: range(f), f`succ(converse(f)`z), z))")] exI 1); | 
| 1461 | 327 | by (res_inst_tac [("d", "%y. if(y: range(f),    \
 | 
| 3840 | 328 | \ nat_case(u, %z. f`z, converse(f)`y), y)")] | 
| 516 | 329 | lam_injective 1); | 
| 5137 | 330 | by (fast_tac (claset() addSIs [if_type, apply_type] | 
| 331 | addIs [inj_is_fun, inj_converse_fun]) 1); | |
| 516 | 332 | by (asm_simp_tac | 
| 4091 | 333 | (simpset() addsimps [inj_is_fun RS apply_rangeI, | 
| 4312 | 334 | inj_converse_fun RS apply_rangeI, | 
| 335 | inj_converse_fun RS apply_funtype, | |
| 336 | left_inverse, right_inverse, nat_0I, nat_succI, | |
| 5137 | 337 | nat_case_0, nat_case_succ]) 1); | 
| 760 | 338 | qed "nat_cons_lepoll"; | 
| 516 | 339 | |
| 5137 | 340 | Goal "nat lepoll A ==> cons(u,A) eqpoll A"; | 
| 571 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
 lcp parents: 
523diff
changeset | 341 | by (etac (nat_cons_lepoll RS eqpollI) 1); | 
| 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
 lcp parents: 
523diff
changeset | 342 | by (rtac (subset_consI RS subset_imp_lepoll) 1); | 
| 760 | 343 | qed "nat_cons_eqpoll"; | 
| 437 | 344 | |
| 571 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
 lcp parents: 
523diff
changeset | 345 | (*Specialized version required below*) | 
| 5137 | 346 | Goalw [succ_def] "nat <= A ==> succ(A) eqpoll A"; | 
| 571 
0b03ce5b62f7
ZF/Cardinal: some results moved here from CardinalArith
 lcp parents: 
523diff
changeset | 347 | by (eresolve_tac [subset_imp_lepoll RS nat_cons_eqpoll] 1); | 
| 760 | 348 | qed "nat_succ_eqpoll"; | 
| 437 | 349 | |
| 5067 | 350 | Goalw [InfCard_def] "InfCard(nat)"; | 
| 4091 | 351 | by (blast_tac (claset() addIs [Card_nat, le_refl, Card_is_Ord]) 1); | 
| 760 | 352 | qed "InfCard_nat"; | 
| 488 | 353 | |
| 5137 | 354 | Goalw [InfCard_def] "InfCard(K) ==> Card(K)"; | 
| 437 | 355 | by (etac conjunct1 1); | 
| 760 | 356 | qed "InfCard_is_Card"; | 
| 437 | 357 | |
| 5067 | 358 | Goalw [InfCard_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 359 | "[| InfCard(K); Card(L) |] ==> InfCard(K Un L)"; | 
| 4091 | 360 | by (asm_simp_tac (simpset() addsimps [Card_Un, Un_upper1_le RSN (2,le_trans), | 
| 4312 | 361 | Card_is_Ord]) 1); | 
| 760 | 362 | qed "InfCard_Un"; | 
| 523 | 363 | |
| 437 | 364 | (*Kunen's Lemma 10.11*) | 
| 5137 | 365 | Goalw [InfCard_def] "InfCard(K) ==> Limit(K)"; | 
| 437 | 366 | by (etac conjE 1); | 
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 367 | by (forward_tac [Card_is_Ord] 1); | 
| 437 | 368 | by (rtac (ltI RS non_succ_LimitI) 1); | 
| 369 | by (etac ([asm_rl, nat_0I] MRS (le_imp_subset RS subsetD)) 1); | |
| 4091 | 370 | by (safe_tac (claset() addSDs [Limit_nat RS Limit_le_succD])); | 
| 437 | 371 | by (rewtac Card_def); | 
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 372 | by (dtac trans 1); | 
| 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 373 | by (etac (le_imp_subset RS nat_succ_eqpoll RS cardinal_cong) 1); | 
| 3016 | 374 | by (etac (Ord_cardinal_le RS lt_trans2 RS lt_irrefl) 1); | 
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 375 | by (REPEAT (ares_tac [le_eqI, Ord_cardinal] 1)); | 
| 760 | 376 | qed "InfCard_is_Limit"; | 
| 437 | 377 | |
| 378 | ||
| 379 | (*** An infinite cardinal equals its square (Kunen, Thm 10.12, page 29) ***) | |
| 380 | ||
| 381 | (*A general fact about ordermap*) | |
| 5325 
f7a5e06adea1
Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
 paulson parents: 
5284diff
changeset | 382 | Goalw [eqpoll_def] | 
| 
f7a5e06adea1
Yet more removal of "goal" commands, especially "goal ZF.thy", so ZF.thy
 paulson parents: 
5284diff
changeset | 383 | "[| well_ord(A,r); x:A |] ==> ordermap(A,r)`x eqpoll pred(A,x,r)"; | 
| 437 | 384 | by (rtac exI 1); | 
| 4091 | 385 | by (asm_simp_tac (simpset() addsimps [ordermap_eq_image, well_ord_is_wf]) 1); | 
| 467 | 386 | by (etac (ordermap_bij RS bij_is_inj RS restrict_bij RS bij_converse_bij) 1); | 
| 437 | 387 | by (rtac pred_subset 1); | 
| 760 | 388 | qed "ordermap_eqpoll_pred"; | 
| 437 | 389 | |
| 390 | (** Establishing the well-ordering **) | |
| 391 | ||
| 5488 | 392 | Goalw [inj_def] "Ord(K) ==> (lam <x,y>:K*K. <x Un y, x, y>) : inj(K*K, K*K*K)"; | 
| 393 | by (force_tac (claset() addIs [lam_type, Un_least_lt RS ltD, ltI], | |
| 394 | simpset()) 1); | |
| 760 | 395 | qed "csquare_lam_inj"; | 
| 437 | 396 | |
| 5488 | 397 | Goalw [csquare_rel_def] "Ord(K) ==> well_ord(K*K, csquare_rel(K))"; | 
| 437 | 398 | by (rtac (csquare_lam_inj RS well_ord_rvimage) 1); | 
| 399 | by (REPEAT (ares_tac [well_ord_rmult, well_ord_Memrel] 1)); | |
| 760 | 400 | qed "well_ord_csquare"; | 
| 437 | 401 | |
| 402 | (** Characterising initial segments of the well-ordering **) | |
| 403 | ||
| 5067 | 404 | Goalw [csquare_rel_def] | 
| 5488 | 405 | "[| <<x,y>, <z,z>> : csquare_rel(K); x<K; y<K; z<K |] ==> x le z & y le z"; | 
| 406 | by (etac rev_mp 1); | |
| 437 | 407 | by (REPEAT (etac ltE 1)); | 
| 4091 | 408 | by (asm_simp_tac (simpset() addsimps [rvimage_iff, rmult_iff, Memrel_iff, | 
| 4312 | 409 | Un_absorb, Un_least_mem_iff, ltD]) 1); | 
| 4091 | 410 | by (safe_tac (claset() addSEs [mem_irrefl] | 
| 4312 | 411 | addSIs [Un_upper1_le, Un_upper2_le])); | 
| 4091 | 412 | by (ALLGOALS (asm_simp_tac (simpset() addsimps [lt_def, succI2, Ord_succ]))); | 
| 5488 | 413 | qed "csquareD"; | 
| 437 | 414 | |
| 5067 | 415 | Goalw [pred_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 416 | "z<K ==> pred(K*K, <z,z>, csquare_rel(K)) <= succ(z)*succ(z)"; | 
| 5488 | 417 | by (safe_tac (claset() delrules [SigmaI,succCI])); (*avoids using succCI,...*) | 
| 418 | by (etac (csquareD RS conjE) 1); | |
| 437 | 419 | by (rewtac lt_def); | 
| 2925 | 420 | by (ALLGOALS Blast_tac); | 
| 760 | 421 | qed "pred_csquare_subset"; | 
| 437 | 422 | |
| 5067 | 423 | Goalw [csquare_rel_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 424 | "[| x<z; y<z; z<K |] ==> <<x,y>, <z,z>> : csquare_rel(K)"; | 
| 484 | 425 | by (subgoals_tac ["x<K", "y<K"] 1); | 
| 437 | 426 | by (REPEAT (eresolve_tac [asm_rl, lt_trans] 2)); | 
| 427 | by (REPEAT (etac ltE 1)); | |
| 4091 | 428 | by (asm_simp_tac (simpset() addsimps [rvimage_iff, rmult_iff, Memrel_iff, | 
| 4312 | 429 | Un_absorb, Un_least_mem_iff, ltD]) 1); | 
| 760 | 430 | qed "csquare_ltI"; | 
| 437 | 431 | |
| 432 | (*Part of the traditional proof. UNUSED since it's harder to prove & apply *) | |
| 5067 | 433 | Goalw [csquare_rel_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 434 | "[| x le z; y le z; z<K |] ==> \ | 
| 484 | 435 | \ <<x,y>, <z,z>> : csquare_rel(K) | x=z & y=z"; | 
| 436 | by (subgoals_tac ["x<K", "y<K"] 1); | |
| 437 | 437 | by (REPEAT (eresolve_tac [asm_rl, lt_trans1] 2)); | 
| 438 | by (REPEAT (etac ltE 1)); | |
| 4091 | 439 | by (asm_simp_tac (simpset() addsimps [rvimage_iff, rmult_iff, Memrel_iff, | 
| 4312 | 440 | Un_absorb, Un_least_mem_iff, ltD]) 1); | 
| 437 | 441 | by (REPEAT_FIRST (etac succE)); | 
| 442 | by (ALLGOALS | |
| 4091 | 443 | (asm_simp_tac (simpset() addsimps [subset_Un_iff RS iff_sym, | 
| 4312 | 444 | subset_Un_iff2 RS iff_sym, OrdmemD]))); | 
| 760 | 445 | qed "csquare_or_eqI"; | 
| 437 | 446 | |
| 447 | (** The cardinality of initial segments **) | |
| 448 | ||
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 449 | Goal "[| Limit(K); x<K; y<K; z=succ(x Un y) |] ==> \ | 
| 1461 | 450 | \ ordermap(K*K, csquare_rel(K)) ` <x,y> < \ | 
| 484 | 451 | \ ordermap(K*K, csquare_rel(K)) ` <z,z>"; | 
| 452 | by (subgoals_tac ["z<K", "well_ord(K*K, csquare_rel(K))"] 1); | |
| 846 | 453 | by (etac (Limit_is_Ord RS well_ord_csquare) 2); | 
| 4091 | 454 | by (blast_tac (claset() addSIs [Un_least_lt, Limit_has_succ]) 2); | 
| 870 | 455 | by (rtac (csquare_ltI RS ordermap_mono RS ltI) 1); | 
| 437 | 456 | by (etac well_ord_is_wf 4); | 
| 457 | by (ALLGOALS | |
| 4091 | 458 | (blast_tac (claset() addSIs [Un_upper1_le, Un_upper2_le, Ord_ordermap] | 
| 4312 | 459 | addSEs [ltE]))); | 
| 870 | 460 | qed "ordermap_z_lt"; | 
| 437 | 461 | |
| 484 | 462 | (*Kunen: "each <x,y>: K*K has no more than z*z predecessors..." (page 29) *) | 
| 5067 | 463 | Goalw [cmult_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 464 | "[| Limit(K); x<K; y<K; z=succ(x Un y) |] ==> \ | 
| 484 | 465 | \ | ordermap(K*K, csquare_rel(K)) ` <x,y> | le |succ(z)| |*| |succ(z)|"; | 
| 767 | 466 | by (rtac (well_ord_rmult RS well_ord_lepoll_imp_Card_le) 1); | 
| 437 | 467 | by (REPEAT (ares_tac [Ord_cardinal, well_ord_Memrel] 1)); | 
| 484 | 468 | by (subgoals_tac ["z<K"] 1); | 
| 4091 | 469 | by (blast_tac (claset() addSIs [Un_least_lt, Limit_has_succ]) 2); | 
| 1609 | 470 | by (rtac (ordermap_z_lt RS leI RS le_imp_lepoll RS lepoll_trans) 1); | 
| 437 | 471 | by (REPEAT_SOME assume_tac); | 
| 472 | by (rtac (ordermap_eqpoll_pred RS eqpoll_imp_lepoll RS lepoll_trans) 1); | |
| 846 | 473 | by (etac (Limit_is_Ord RS well_ord_csquare) 1); | 
| 4091 | 474 | by (blast_tac (claset() addIs [ltD]) 1); | 
| 437 | 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))); | |
| 760 | 480 | qed "ordermap_csquare_le"; | 
| 437 | 481 | |
| 484 | 482 | (*Kunen: "... so the order type <= K" *) | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 483 | Goal "[| InfCard(K); ALL y:K. InfCard(y) --> y |*| y = y |] ==> \ | 
| 484 | 484 | \ ordertype(K*K, csquare_rel(K)) le K"; | 
| 437 | 485 | by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1); | 
| 486 | by (rtac all_lt_imp_le 1); | |
| 487 | by (assume_tac 1); | |
| 488 | by (etac (well_ord_csquare RS Ord_ordertype) 1); | |
| 489 | by (rtac Card_lt_imp_lt 1); | |
| 490 | by (etac InfCard_is_Card 3); | |
| 491 | by (etac ltE 2 THEN assume_tac 2); | |
| 4091 | 492 | by (asm_full_simp_tac (simpset() addsimps [ordertype_unfold]) 1); | 
| 493 | by (safe_tac (claset() addSEs [ltE])); | |
| 437 | 494 | by (subgoals_tac ["Ord(xb)", "Ord(y)"] 1); | 
| 495 | by (REPEAT (eresolve_tac [asm_rl, Ord_in_Ord] 2)); | |
| 846 | 496 | by (rtac (InfCard_is_Limit RS ordermap_csquare_le RS lt_trans1) 1 THEN | 
| 437 | 497 | REPEAT (ares_tac [refl] 1 ORELSE etac ltI 1)); | 
| 498 | by (res_inst_tac [("i","xb Un y"), ("j","nat")] Ord_linear2 1  THEN
 | |
| 499 | REPEAT (ares_tac [Ord_Un, Ord_nat] 1)); | |
| 500 | (*the finite case: xb Un y < nat *) | |
| 501 | by (res_inst_tac [("j", "nat")] lt_trans2 1);
 | |
| 4091 | 502 | by (asm_full_simp_tac (simpset() addsimps [InfCard_def]) 2); | 
| 437 | 503 | by (asm_full_simp_tac | 
| 4091 | 504 | (simpset() addsimps [lt_def, nat_cmult_eq_mult, nat_succI, mult_type, | 
| 4312 | 505 | nat_into_Card RS Card_cardinal_eq, Ord_nat]) 1); | 
| 846 | 506 | (*case nat le (xb Un y) *) | 
| 437 | 507 | by (asm_full_simp_tac | 
| 4091 | 508 | (simpset() addsimps [le_imp_subset RS nat_succ_eqpoll RS cardinal_cong, | 
| 4312 | 509 | le_succ_iff, InfCard_def, Card_cardinal, Un_least_lt, | 
| 510 | Ord_Un, ltI, nat_le_cardinal, | |
| 511 | Ord_cardinal_le RS lt_trans1 RS ltD]) 1); | |
| 760 | 512 | qed "ordertype_csquare_le"; | 
| 437 | 513 | |
| 514 | (*Main result: Kunen's Theorem 10.12*) | |
| 5137 | 515 | Goal "InfCard(K) ==> K |*| K = K"; | 
| 437 | 516 | by (forward_tac [InfCard_is_Card RS Card_is_Ord] 1); | 
| 517 | by (etac rev_mp 1); | |
| 484 | 518 | by (trans_ind_tac "K" [] 1); | 
| 437 | 519 | by (rtac impI 1); | 
| 520 | by (rtac le_anti_sym 1); | |
| 521 | by (etac (InfCard_is_Card RS cmult_square_le) 2); | |
| 522 | by (rtac (ordertype_csquare_le RSN (2, le_trans)) 1); | |
| 523 | by (assume_tac 2); | |
| 524 | by (assume_tac 2); | |
| 525 | by (asm_simp_tac | |
| 4091 | 526 | (simpset() addsimps [cmult_def, Ord_cardinal_le, | 
| 4312 | 527 | well_ord_csquare RS ordermap_bij RS | 
| 528 | bij_imp_eqpoll RS cardinal_cong, | |
| 529 | well_ord_csquare RS Ord_ordertype]) 1); | |
| 760 | 530 | qed "InfCard_csquare_eq"; | 
| 484 | 531 | |
| 767 | 532 | (*Corollary for arbitrary well-ordered sets (all sets, assuming AC)*) | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 533 | Goal "[| well_ord(A,r); InfCard(|A|) |] ==> A*A eqpoll A"; | 
| 484 | 534 | by (resolve_tac [prod_eqpoll_cong RS eqpoll_trans] 1); | 
| 535 | 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: 
800diff
changeset | 536 | by (rtac well_ord_cardinal_eqE 1); | 
| 484 | 537 | by (REPEAT (ares_tac [Ord_cardinal, well_ord_rmult, well_ord_Memrel] 1)); | 
| 4312 | 538 | by (asm_simp_tac (simpset() | 
| 539 | addsimps [symmetric cmult_def, InfCard_csquare_eq]) 1); | |
| 760 | 540 | qed "well_ord_InfCard_square_eq"; | 
| 484 | 541 | |
| 767 | 542 | (** Toward's Kunen's Corollary 10.13 (1) **) | 
| 543 | ||
| 5137 | 544 | Goal "[| 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: 
800diff
changeset | 545 | by (rtac le_anti_sym 1); | 
| 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 546 | by (etac ltE 2 THEN | 
| 767 | 547 | REPEAT (ares_tac [cmult_le_self, InfCard_is_Card] 2)); | 
| 548 | by (forward_tac [InfCard_is_Card RS Card_is_Ord RS le_refl] 1); | |
| 549 | by (resolve_tac [cmult_le_mono RS le_trans] 1 THEN REPEAT (assume_tac 1)); | |
| 4091 | 550 | by (asm_simp_tac (simpset() addsimps [InfCard_csquare_eq]) 1); | 
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 551 | qed "InfCard_le_cmult_eq"; | 
| 767 | 552 | |
| 553 | (*Corollary 10.13 (1), for cardinal multiplication*) | |
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 554 | Goal "[| InfCard(K); InfCard(L) |] ==> K |*| L = K Un L"; | 
| 767 | 555 | by (res_inst_tac [("i","K"),("j","L")] Ord_linear_le 1);
 | 
| 556 | by (typechk_tac [InfCard_is_Card, Card_is_Ord]); | |
| 557 | by (resolve_tac [cmult_commute RS ssubst] 1); | |
| 558 | by (resolve_tac [Un_commute RS ssubst] 1); | |
| 559 | by (ALLGOALS | |
| 560 | (asm_simp_tac | |
| 4091 | 561 | (simpset() addsimps [InfCard_is_Limit RS Limit_has_0, InfCard_le_cmult_eq, | 
| 4312 | 562 | subset_Un_iff2 RS iffD1, le_imp_subset]))); | 
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 563 | qed "InfCard_cmult_eq"; | 
| 767 | 564 | |
| 565 | (*This proof appear to be the simplest!*) | |
| 5137 | 566 | Goal "InfCard(K) ==> K |+| K = K"; | 
| 767 | 567 | by (asm_simp_tac | 
| 4091 | 568 | (simpset() 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: 
800diff
changeset | 569 | by (rtac InfCard_le_cmult_eq 1); | 
| 767 | 570 | by (typechk_tac [Ord_0, le_refl, leI]); | 
| 571 | by (typechk_tac [InfCard_is_Limit, Limit_has_0, Limit_has_succ]); | |
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 572 | qed "InfCard_cdouble_eq"; | 
| 767 | 573 | |
| 574 | (*Corollary 10.13 (1), for cardinal addition*) | |
| 5137 | 575 | Goal "[| 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: 
800diff
changeset | 576 | by (rtac le_anti_sym 1); | 
| 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 577 | by (etac ltE 2 THEN | 
| 767 | 578 | REPEAT (ares_tac [cadd_le_self, InfCard_is_Card] 2)); | 
| 579 | by (forward_tac [InfCard_is_Card RS Card_is_Ord RS le_refl] 1); | |
| 580 | by (resolve_tac [cadd_le_mono RS le_trans] 1 THEN REPEAT (assume_tac 1)); | |
| 4091 | 581 | by (asm_simp_tac (simpset() addsimps [InfCard_cdouble_eq]) 1); | 
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 582 | qed "InfCard_le_cadd_eq"; | 
| 767 | 583 | |
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 584 | Goal "[| InfCard(K); InfCard(L) |] ==> K |+| L = K Un L"; | 
| 767 | 585 | by (res_inst_tac [("i","K"),("j","L")] Ord_linear_le 1);
 | 
| 586 | by (typechk_tac [InfCard_is_Card, Card_is_Ord]); | |
| 587 | by (resolve_tac [cadd_commute RS ssubst] 1); | |
| 588 | by (resolve_tac [Un_commute RS ssubst] 1); | |
| 589 | by (ALLGOALS | |
| 590 | (asm_simp_tac | |
| 4091 | 591 | (simpset() addsimps [InfCard_le_cadd_eq, | 
| 4312 | 592 | subset_Un_iff2 RS iffD1, le_imp_subset]))); | 
| 782 
200a16083201
added bind_thm for theorems defined by "standard ..."
 clasohm parents: 
767diff
changeset | 593 | qed "InfCard_cadd_eq"; | 
| 767 | 594 | |
| 595 | (*The other part, Corollary 10.13 (2), refers to the cardinality of the set | |
| 596 | of all n-tuples of elements of K. A better version for the Isabelle theory | |
| 597 | might be InfCard(K) ==> |list(K)| = K. | |
| 598 | *) | |
| 484 | 599 | |
| 600 | (*** For every cardinal number there exists a greater one | |
| 601 | [Kunen's Theorem 10.16, which would be trivial using AC] ***) | |
| 602 | ||
| 5067 | 603 | Goalw [jump_cardinal_def] "Ord(jump_cardinal(K))"; | 
| 484 | 604 | by (rtac (Ord_is_Transset RSN (2,OrdI)) 1); | 
| 4091 | 605 | by (blast_tac (claset() addSIs [Ord_ordertype]) 2); | 
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 606 | by (rewtac Transset_def); | 
| 1075 
848bf2e18dff
Modified proofs for new claset primitives.  The problem is that they enforce
 lcp parents: 
989diff
changeset | 607 | by (safe_tac subset_cs); | 
| 4091 | 608 | by (asm_full_simp_tac (simpset() addsimps [ordertype_pred_unfold]) 1); | 
| 4152 | 609 | by Safe_tac; | 
| 823 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 610 | by (rtac UN_I 1); | 
| 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 611 | by (rtac ReplaceI 2); | 
| 4091 | 612 | by (ALLGOALS (blast_tac (claset() addIs [well_ord_subset] addSEs [predE]))); | 
| 760 | 613 | qed "Ord_jump_cardinal"; | 
| 484 | 614 | |
| 615 | (*Allows selective unfolding. Less work than deriving intro/elim rules*) | |
| 5067 | 616 | Goalw [jump_cardinal_def] | 
| 484 | 617 | "i : jump_cardinal(K) <-> \ | 
| 618 | \ (EX r X. r <= K*K & X <= K & well_ord(X,r) & i = ordertype(X,r))"; | |
| 1461 | 619 | by (fast_tac subset_cs 1); (*It's vital to avoid reasoning about <=*) | 
| 760 | 620 | qed "jump_cardinal_iff"; | 
| 484 | 621 | |
| 622 | (*The easy part of Theorem 10.16: jump_cardinal(K) exceeds K*) | |
| 5137 | 623 | Goal "Ord(K) ==> K < jump_cardinal(K)"; | 
| 484 | 624 | by (resolve_tac [Ord_jump_cardinal RSN (2,ltI)] 1); | 
| 625 | by (resolve_tac [jump_cardinal_iff RS iffD2] 1); | |
| 626 | 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: 
800diff
changeset | 627 | by (rtac subset_refl 2); | 
| 4091 | 628 | by (asm_simp_tac (simpset() addsimps [Memrel_def, subset_iff]) 1); | 
| 629 | by (asm_simp_tac (simpset() addsimps [ordertype_Memrel]) 1); | |
| 760 | 630 | qed "K_lt_jump_cardinal"; | 
| 484 | 631 | |
| 632 | (*The proof by contradiction: the bijection f yields a wellordering of X | |
| 633 | whose ordertype is jump_cardinal(K). *) | |
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 634 | Goal "[| well_ord(X,r); r <= K * K; X <= K; \ | 
| 1461 | 635 | \ f : bij(ordertype(X,r), jump_cardinal(K)) \ | 
| 636 | \ |] ==> jump_cardinal(K) : jump_cardinal(K)"; | |
| 484 | 637 | by (subgoal_tac "f O ordermap(X,r): bij(X, jump_cardinal(K))" 1); | 
| 638 | by (REPEAT (ares_tac [comp_bij, ordermap_bij] 2)); | |
| 639 | by (resolve_tac [jump_cardinal_iff RS iffD2] 1); | |
| 640 | by (REPEAT_FIRST (resolve_tac [exI, conjI])); | |
| 641 | by (rtac ([rvimage_type, Sigma_mono] MRS subset_trans) 1); | |
| 642 | by (REPEAT (assume_tac 1)); | |
| 643 | by (etac (bij_is_inj RS well_ord_rvimage) 1); | |
| 644 | by (rtac (Ord_jump_cardinal RS well_ord_Memrel) 1); | |
| 645 | by (asm_simp_tac | |
| 4091 | 646 | (simpset() addsimps [well_ord_Memrel RSN (2, bij_ordertype_vimage), | 
| 4312 | 647 | ordertype_Memrel, Ord_jump_cardinal]) 1); | 
| 760 | 648 | qed "Card_jump_cardinal_lemma"; | 
| 484 | 649 | |
| 650 | (*The hard part of Theorem 10.16: jump_cardinal(K) is itself a cardinal*) | |
| 5067 | 651 | Goal "Card(jump_cardinal(K))"; | 
| 484 | 652 | 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: 
800diff
changeset | 653 | by (rewtac eqpoll_def); | 
| 4091 | 654 | by (safe_tac (claset() addSDs [ltD, jump_cardinal_iff RS iffD1])); | 
| 484 | 655 | by (REPEAT (ares_tac [Card_jump_cardinal_lemma RS mem_irrefl] 1)); | 
| 760 | 656 | qed "Card_jump_cardinal"; | 
| 484 | 657 | |
| 658 | (*** Basic properties of successor cardinals ***) | |
| 659 | ||
| 5067 | 660 | Goalw [csucc_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 661 | "Ord(K) ==> Card(csucc(K)) & K < csucc(K)"; | 
| 484 | 662 | by (rtac LeastI 1); | 
| 663 | by (REPEAT (ares_tac [conjI, Card_jump_cardinal, K_lt_jump_cardinal, | |
| 1461 | 664 | Ord_jump_cardinal] 1)); | 
| 760 | 665 | qed "csucc_basic"; | 
| 484 | 666 | |
| 800 
23f55b829ccb
Limit_csucc: moved to InfDatatype and proved explicitly in
 lcp parents: 
782diff
changeset | 667 | bind_thm ("Card_csucc", csucc_basic RS conjunct1);
 | 
| 484 | 668 | |
| 800 
23f55b829ccb
Limit_csucc: moved to InfDatatype and proved explicitly in
 lcp parents: 
782diff
changeset | 669 | bind_thm ("lt_csucc", csucc_basic RS conjunct2);
 | 
| 484 | 670 | |
| 5137 | 671 | Goal "Ord(K) ==> 0 < csucc(K)"; | 
| 517 | 672 | by (resolve_tac [[Ord_0_le, lt_csucc] MRS lt_trans1] 1); | 
| 673 | by (REPEAT (assume_tac 1)); | |
| 760 | 674 | qed "Ord_0_lt_csucc"; | 
| 517 | 675 | |
| 5067 | 676 | Goalw [csucc_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 677 | "[| Card(L); K<L |] ==> csucc(K) le L"; | 
| 484 | 678 | by (rtac Least_le 1); | 
| 679 | by (REPEAT (ares_tac [conjI, Card_is_Ord] 1)); | |
| 760 | 680 | qed "csucc_le"; | 
| 484 | 681 | |
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 682 | Goal "[| 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: 
800diff
changeset | 683 | by (rtac iffI 1); | 
| 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 684 | by (rtac Card_lt_imp_lt 2); | 
| 
33dc37d46296
Changed succ(1) to 2 in cmult_2; Simplified proof of InfCard_is_Limit
 lcp parents: 
800diff
changeset | 685 | by (etac lt_trans1 2); | 
| 484 | 686 | by (REPEAT (ares_tac [lt_csucc, Card_csucc, Card_is_Ord] 2)); | 
| 687 | by (resolve_tac [notI RS not_lt_imp_le] 1); | |
| 688 | by (resolve_tac [Card_cardinal RS csucc_le RS lt_trans1 RS lt_irrefl] 1); | |
| 689 | by (assume_tac 1); | |
| 690 | by (resolve_tac [Ord_cardinal_le RS lt_trans1] 1); | |
| 691 | by (REPEAT (ares_tac [Ord_cardinal] 1 | |
| 692 | ORELSE eresolve_tac [ltE, Card_is_Ord] 1)); | |
| 760 | 693 | qed "lt_csucc_iff"; | 
| 484 | 694 | |
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 695 | Goal "!!K' K. [| Card(K'); Card(K) |] ==> K' < csucc(K) <-> K' le K"; | 
| 484 | 696 | by (asm_simp_tac | 
| 4091 | 697 | (simpset() addsimps [lt_csucc_iff, Card_cardinal_eq, Card_is_Ord]) 1); | 
| 760 | 698 | qed "Card_lt_csucc_iff"; | 
| 488 | 699 | |
| 5067 | 700 | Goalw [InfCard_def] | 
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 701 | "InfCard(K) ==> InfCard(csucc(K))"; | 
| 4091 | 702 | by (asm_simp_tac (simpset() addsimps [Card_csucc, Card_is_Ord, | 
| 4312 | 703 | lt_csucc RS leI RSN (2,le_trans)]) 1); | 
| 760 | 704 | qed "InfCard_csucc"; | 
| 517 | 705 | |
| 1609 | 706 | |
| 707 | (*** Finite sets ***) | |
| 708 | ||
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 709 | Goal "n: nat ==> ALL A. A eqpoll n --> A : Fin(A)"; | 
| 1622 | 710 | by (etac nat_induct 1); | 
| 5529 | 711 | by (simp_tac (simpset() addsimps eqpoll_0_iff::Fin.intrs) 1); | 
| 3736 
39ee3d31cfbc
Much tidying including step_tac -> clarify_tac or safe_tac; sometimes
 paulson parents: 
3016diff
changeset | 712 | by (Clarify_tac 1); | 
| 1609 | 713 | by (subgoal_tac "EX u. u:A" 1); | 
| 1622 | 714 | by (etac exE 1); | 
| 1609 | 715 | by (resolve_tac [Diff_sing_eqpoll RS revcut_rl] 1); | 
| 716 | by (assume_tac 2); | |
| 717 | by (assume_tac 1); | |
| 718 | by (res_inst_tac [("b", "A")] (cons_Diff RS subst) 1);
 | |
| 719 | by (assume_tac 1); | |
| 720 | by (resolve_tac [Fin.consI] 1); | |
| 2925 | 721 | by (Blast_tac 1); | 
| 4091 | 722 | by (blast_tac (claset() addIs [subset_consI RS Fin_mono RS subsetD]) 1); | 
| 1609 | 723 | (*Now for the lemma assumed above*) | 
| 1622 | 724 | by (rewtac eqpoll_def); | 
| 4091 | 725 | by (blast_tac (claset() addIs [bij_converse_bij RS bij_is_fun RS apply_type]) 1); | 
| 1609 | 726 | val lemma = result(); | 
| 727 | ||
| 5137 | 728 | Goalw [Finite_def] "Finite(A) ==> A : Fin(A)"; | 
| 4091 | 729 | by (blast_tac (claset() addIs [lemma RS spec RS mp]) 1); | 
| 1609 | 730 | qed "Finite_into_Fin"; | 
| 731 | ||
| 5137 | 732 | Goal "A : Fin(U) ==> Finite(A)"; | 
| 4091 | 733 | by (fast_tac (claset() addSIs [Finite_0, Finite_cons] addEs [Fin.induct]) 1); | 
| 1609 | 734 | qed "Fin_into_Finite"; | 
| 735 | ||
| 5067 | 736 | Goal "Finite(A) <-> A : Fin(A)"; | 
| 4091 | 737 | by (blast_tac (claset() addIs [Finite_into_Fin, Fin_into_Finite]) 1); | 
| 1609 | 738 | qed "Finite_Fin_iff"; | 
| 739 | ||
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 740 | Goal "[| Finite(A); Finite(B) |] ==> Finite(A Un B)"; | 
| 4091 | 741 | by (blast_tac (claset() addSIs [Fin_into_Finite, Fin_UnI] | 
| 4312 | 742 | addSDs [Finite_into_Fin] | 
| 743 | addIs [Un_upper1 RS Fin_mono RS subsetD, | |
| 744 | Un_upper2 RS Fin_mono RS subsetD]) 1); | |
| 1609 | 745 | qed "Finite_Un"; | 
| 746 | ||
| 747 | ||
| 748 | (** Removing elements from a finite set decreases its cardinality **) | |
| 749 | ||
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 750 | Goal "A: Fin(U) ==> x~:A --> ~ cons(x,A) lepoll A"; | 
| 1622 | 751 | by (etac Fin_induct 1); | 
| 4091 | 752 | by (simp_tac (simpset() addsimps [lepoll_0_iff]) 1); | 
| 1609 | 753 | by (subgoal_tac "cons(x,cons(xa,y)) = cons(xa,cons(x,y))" 1); | 
| 2469 | 754 | by (Asm_simp_tac 1); | 
| 4091 | 755 | by (blast_tac (claset() addSDs [cons_lepoll_consD]) 1); | 
| 2925 | 756 | by (Blast_tac 1); | 
| 1609 | 757 | qed "Fin_imp_not_cons_lepoll"; | 
| 758 | ||
| 5147 
825877190618
More tidying and removal of "\!\!... from Goal commands
 paulson parents: 
5137diff
changeset | 759 | Goal "[| Finite(A); a~:A |] ==> |cons(a,A)| = succ(|A|)"; | 
| 1622 | 760 | by (rewtac cardinal_def); | 
| 761 | by (rtac Least_equality 1); | |
| 1609 | 762 | by (fold_tac [cardinal_def]); | 
| 4091 | 763 | by (simp_tac (simpset() addsimps [succ_def]) 1); | 
| 764 | by (blast_tac (claset() addIs [cons_eqpoll_cong, well_ord_cardinal_eqpoll] | |
| 4312 | 765 | addSEs [mem_irrefl] | 
| 766 | addSDs [Finite_imp_well_ord]) 1); | |
| 4091 | 767 | by (blast_tac (claset() addIs [Ord_succ, Card_cardinal, Card_is_Ord]) 1); | 
| 1622 | 768 | by (rtac notI 1); | 
| 1609 | 769 | by (resolve_tac [Finite_into_Fin RS Fin_imp_not_cons_lepoll RS mp RS notE] 1); | 
| 770 | by (assume_tac 1); | |
| 771 | by (assume_tac 1); | |
| 772 | by (eresolve_tac [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_trans] 1); | |
| 773 | by (eresolve_tac [le_imp_lepoll RS lepoll_trans] 1); | |
| 4091 | 774 | by (blast_tac (claset() addIs [well_ord_cardinal_eqpoll RS eqpoll_imp_lepoll] | 
| 1609 | 775 | addSDs [Finite_imp_well_ord]) 1); | 
| 776 | qed "Finite_imp_cardinal_cons"; | |
| 777 | ||
| 778 | ||
| 5137 | 779 | Goal "[| Finite(A);  a:A |] ==> succ(|A-{a}|) = |A|";
 | 
| 1609 | 780 | by (res_inst_tac [("b", "A")] (cons_Diff RS subst) 1);
 | 
| 781 | by (assume_tac 1); | |
| 4091 | 782 | by (asm_simp_tac (simpset() addsimps [Finite_imp_cardinal_cons, | 
| 1622 | 783 | Diff_subset RS subset_Finite]) 1); | 
| 4091 | 784 | by (asm_simp_tac (simpset() addsimps [cons_Diff]) 1); | 
| 1622 | 785 | qed "Finite_imp_succ_cardinal_Diff"; | 
| 786 | ||
| 5137 | 787 | Goal "[| Finite(A);  a:A |] ==> |A-{a}| < |A|";
 | 
| 1622 | 788 | by (rtac succ_leE 1); | 
| 4091 | 789 | by (asm_simp_tac (simpset() addsimps [Finite_imp_succ_cardinal_Diff, | 
| 4312 | 790 | Ord_cardinal RS le_refl]) 1); | 
| 1609 | 791 | qed "Finite_imp_cardinal_Diff"; | 
| 792 | ||
| 793 | ||
| 4312 | 794 | (** Theorems by Krzysztof Grabczewski, proofs by lcp **) | 
| 1609 | 795 | |
| 3887 | 796 | val nat_implies_well_ord = | 
| 797 | (transfer CardinalArith.thy nat_into_Ord) RS well_ord_Memrel; | |
| 1609 | 798 | |
| 5137 | 799 | Goal "[| m:nat; n:nat |] ==> m + n eqpoll m #+ n"; | 
| 1609 | 800 | by (rtac eqpoll_trans 1); | 
| 4312 | 801 | by (resolve_tac [well_ord_radd RS well_ord_cardinal_eqpoll RS eqpoll_sym] 1); | 
| 4477 
b3e5857d8d99
New Auto_tac (by Oheimb), and new syntax (without parens), and expandshort
 paulson parents: 
4312diff
changeset | 802 | by (REPEAT (etac nat_implies_well_ord 1)); | 
| 4312 | 803 | by (asm_simp_tac (simpset() | 
| 804 | addsimps [nat_cadd_eq_add RS sym, cadd_def, eqpoll_refl]) 1); | |
| 1609 | 805 | qed "nat_sum_eqpoll_sum"; | 
| 806 |