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