author | paulson |
Mon, 29 Sep 1997 11:48:48 +0200 | |
changeset 3731 | 71366483323b |
parent 2873 | 5f0599e15448 |
child 3840 | e0baea4d485a |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: ZF/AC/Cardinal_aux.ML |
1196 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Krzysztof Grabczewski |
1196 | 4 |
|
5 |
Auxiliary lemmas concerning cardinalities |
|
6 |
*) |
|
7 |
||
8 |
open Cardinal_aux; |
|
9 |
||
10 |
(* ********************************************************************** *) |
|
1461 | 11 |
(* Lemmas involving ordinals and cardinalities used in the proofs *) |
12 |
(* concerning AC16 and DC *) |
|
1196 | 13 |
(* ********************************************************************** *) |
14 |
||
1616
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
15 |
(* j=|A| *) |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
16 |
goal Cardinal.thy |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
17 |
"!!A. [| A lepoll i; Ord(i) |] ==> EX j. j le i & A eqpoll j"; |
2469 | 18 |
by (fast_tac (!claset addIs [lepoll_cardinal_le, well_ord_Memrel, |
19 |
well_ord_cardinal_eqpoll RS eqpoll_sym] |
|
20 |
addDs [lepoll_well_ord]) 1); |
|
1616
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
21 |
qed "lepoll_imp_ex_le_eqpoll"; |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
22 |
|
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
23 |
(* j=|A| *) |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
24 |
goalw Cardinal.thy [lesspoll_def] |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
25 |
"!!A a. [| A lesspoll i; Ord(i) |] ==> EX j. j<i & A eqpoll j"; |
2469 | 26 |
by (fast_tac (!claset addSDs [lepoll_imp_ex_le_eqpoll] addSEs [leE]) 1); |
1616
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
27 |
qed "lesspoll_imp_ex_lt_eqpoll"; |
1196 | 28 |
|
29 |
goalw thy [InfCard_def] "!!i. [| ~Finite(i); Ord(i) |] ==> InfCard(|i|)"; |
|
1207 | 30 |
by (rtac conjI 1); |
31 |
by (rtac Card_cardinal 1); |
|
1196 | 32 |
by (resolve_tac [Card_nat RS (Card_def RS def_imp_iff RS iffD1 RS ssubst)] 1); |
33 |
by (resolve_tac [nat_le_infinite_Ord RS le_imp_lepoll |
|
1461 | 34 |
RSN (2, well_ord_Memrel RS well_ord_lepoll_imp_Card_le)] 1 |
1196 | 35 |
THEN REPEAT (assume_tac 1)); |
3731 | 36 |
qed "Inf_Ord_imp_InfCard_cardinal"; |
1196 | 37 |
|
38 |
val sum_lepoll_prod = [sum_eq_2_times RS equalityD1 RS subset_imp_lepoll, |
|
1461 | 39 |
asm_rl, lepoll_refl] MRS (prod_lepoll_mono RSN (2, lepoll_trans)) |
40 |
|> standard; |
|
1196 | 41 |
|
42 |
goal thy "!!A. [| A lepoll B; 2 lepoll A |] ==> A+B lepoll A*B"; |
|
43 |
by (REPEAT (ares_tac [[sum_lepoll_mono, sum_lepoll_prod] |
|
1461 | 44 |
MRS lepoll_trans, lepoll_refl] 1)); |
3731 | 45 |
qed "lepoll_imp_sum_lepoll_prod"; |
1196 | 46 |
|
47 |
goal thy "!!A. [| A eqpoll i; B eqpoll i; ~Finite(i); Ord(i) |] \ |
|
1461 | 48 |
\ ==> A Un B eqpoll i"; |
1207 | 49 |
by (rtac eqpollI 1); |
1196 | 50 |
by (eresolve_tac [subset_imp_lepoll RSN (2, eqpoll_sym RS eqpoll_imp_lepoll |
1461 | 51 |
RS lepoll_trans)] 2); |
2469 | 52 |
by (Fast_tac 2); |
1196 | 53 |
by (resolve_tac [Un_lepoll_sum RS lepoll_trans] 1); |
54 |
by (resolve_tac [lepoll_imp_sum_lepoll_prod RS lepoll_trans] 1); |
|
55 |
by (eresolve_tac [eqpoll_sym RSN (2, eqpoll_trans) RS eqpoll_imp_lepoll] 1 |
|
1461 | 56 |
THEN (assume_tac 1)); |
1196 | 57 |
by (resolve_tac [nat_le_infinite_Ord RS le_imp_lepoll RS |
1461 | 58 |
(Ord_nat RS (nat_2I RS OrdmemD) RS subset_imp_lepoll RS lepoll_trans) |
59 |
RS (eqpoll_sym RS eqpoll_imp_lepoll RSN (2, lepoll_trans))] 1 |
|
1196 | 60 |
THEN (REPEAT (assume_tac 1))); |
61 |
by (eresolve_tac [prod_eqpoll_cong RS eqpoll_imp_lepoll RS lepoll_trans] 1 |
|
62 |
THEN (assume_tac 1)); |
|
63 |
by (resolve_tac [Inf_Ord_imp_InfCard_cardinal RSN (2, well_ord_Memrel RS |
|
1461 | 64 |
well_ord_InfCard_square_eq) RS eqpoll_imp_lepoll] 1 |
1196 | 65 |
THEN REPEAT (assume_tac 1)); |
3731 | 66 |
qed "Un_eqpoll_Inf_Ord"; |
1196 | 67 |
|
2469 | 68 |
val ss = (!simpset) addsimps [inj_is_fun RS apply_type, left_inverse] |
1710 | 69 |
setloop (split_tac [expand_if] ORELSE' etac UnE); |
1196 | 70 |
|
2873 | 71 |
goal ZF.thy "{x, y} - {y} = {x} - {y}"; |
2493 | 72 |
by (Fast_tac 1); |
3731 | 73 |
qed "double_Diff_sing"; |
1196 | 74 |
|
2873 | 75 |
goal ZF.thy "if({y,z}-{z}=0, z, THE w. {y,z}-{z}={w}) = y"; |
1196 | 76 |
by (split_tac [expand_if] 1); |
2469 | 77 |
by (asm_full_simp_tac (!simpset addsimps [double_Diff_sing, Diff_eq_0_iff]) 1); |
2496 | 78 |
by (fast_tac (!claset addSIs [the_equality] addEs [equalityE]) 1); |
3731 | 79 |
qed "paired_bij_lemma"; |
1196 | 80 |
|
81 |
goal thy "(lam y:{{y,z}. y:x}. if(y-{z}=0, z, THE w. y-{z}={w})) \ |
|
1461 | 82 |
\ : bij({{y,z}. y:x}, x)"; |
1196 | 83 |
by (res_inst_tac [("d","%a. {a,z}")] lam_bijective 1); |
2469 | 84 |
by (TRYALL (fast_tac (!claset addSEs [RepFunE] addSIs [RepFunI] |
85 |
addss (!simpset addsimps [paired_bij_lemma])))); |
|
3731 | 86 |
qed "paired_bij"; |
1196 | 87 |
|
88 |
goalw thy [eqpoll_def] "{{y,z}. y:x} eqpoll x"; |
|
2469 | 89 |
by (fast_tac (!claset addSIs [paired_bij]) 1); |
3731 | 90 |
qed "paired_eqpoll"; |
1196 | 91 |
|
92 |
goal thy "!!A. EX B. B eqpoll A & B Int C = 0"; |
|
2469 | 93 |
by (fast_tac (!claset addSIs [paired_eqpoll, equals0I] addEs [mem_asym]) 1); |
3731 | 94 |
qed "ex_eqpoll_disjoint"; |
1196 | 95 |
|
96 |
goal thy "!!A. [| A lepoll i; B lepoll i; ~Finite(i); Ord(i) |] \ |
|
1461 | 97 |
\ ==> A Un B lepoll i"; |
1196 | 98 |
by (res_inst_tac [("A1","i"), ("C1","i")] (ex_eqpoll_disjoint RS exE) 1); |
1207 | 99 |
by (etac conjE 1); |
1196 | 100 |
by (dresolve_tac [eqpoll_sym RS eqpoll_imp_lepoll RSN (2, lepoll_trans)] 1); |
101 |
by (assume_tac 1); |
|
102 |
by (resolve_tac [Un_lepoll_Un RS lepoll_trans] 1 THEN (REPEAT (assume_tac 1))); |
|
103 |
by (eresolve_tac [eqpoll_refl RSN (2, Un_eqpoll_Inf_Ord) RS |
|
1461 | 104 |
eqpoll_imp_lepoll] 1 |
105 |
THEN (REPEAT (assume_tac 1))); |
|
3731 | 106 |
qed "Un_lepoll_Inf_Ord"; |
1196 | 107 |
|
108 |
goal thy "!!P. [| P(i); i:j; Ord(j) |] ==> (LEAST i. P(i)) : j"; |
|
109 |
by (eresolve_tac [Least_le RS leE] 1); |
|
1207 | 110 |
by (etac Ord_in_Ord 1 THEN (assume_tac 1)); |
111 |
by (etac ltE 1); |
|
2469 | 112 |
by (fast_tac (!claset addDs [OrdmemD]) 1); |
1207 | 113 |
by (etac subst_elem 1 THEN (assume_tac 1)); |
3731 | 114 |
qed "Least_in_Ord"; |
1196 | 115 |
|
116 |
goal thy "!!x. [| well_ord(x,r); y<=x; y lepoll succ(n); n:nat |] \ |
|
1461 | 117 |
\ ==> y-{THE b. first(b,y,r)} lepoll n"; |
1196 | 118 |
by (res_inst_tac [("Q","y=0")] (excluded_middle RS disjE) 1); |
2469 | 119 |
by (fast_tac (!claset addSIs [Diff_sing_lepoll, the_first_in]) 1); |
1196 | 120 |
by (res_inst_tac [("b","y-{THE b. first(b, y, r)}")] subst 1); |
1207 | 121 |
by (rtac empty_lepollI 2); |
2496 | 122 |
by (Fast_tac 1); |
3731 | 123 |
qed "Diff_first_lepoll"; |
1196 | 124 |
|
125 |
goal thy "(UN x:X. P(x)) <= (UN x:X. P(x)-Q(x)) Un (UN x:X. Q(x))"; |
|
2469 | 126 |
by (Fast_tac 1); |
3731 | 127 |
qed "UN_subset_split"; |
1196 | 128 |
|
129 |
goalw thy [lepoll_def] "!!a. Ord(a) ==> (UN x:a. {P(x)}) lepoll a"; |
|
130 |
by (res_inst_tac [("x","lam z:(UN x:a. {P(x)}). (LEAST i. P(i)=z)")] exI 1); |
|
131 |
by (res_inst_tac [("d","%z. P(z)")] lam_injective 1); |
|
2469 | 132 |
by (fast_tac (!claset addSIs [Least_in_Ord]) 1); |
133 |
by (fast_tac (!claset addIs [LeastI] addSEs [Ord_in_Ord]) 1); |
|
3731 | 134 |
qed "UN_sing_lepoll"; |
1196 | 135 |
|
136 |
goal thy "!!a T. [| well_ord(T, R); ~Finite(a); Ord(a); n:nat |] ==> \ |
|
1461 | 137 |
\ ALL f. (ALL b:a. f`b lepoll n & f`b <= T) --> (UN b:a. f`b) lepoll a"; |
1207 | 138 |
by (etac nat_induct 1); |
139 |
by (rtac allI 1); |
|
140 |
by (rtac impI 1); |
|
1196 | 141 |
by (res_inst_tac [("b","UN b:a. f`b")] subst 1); |
1207 | 142 |
by (rtac empty_lepollI 2); |
1196 | 143 |
by (resolve_tac [equals0I RS sym] 1); |
144 |
by (REPEAT (eresolve_tac [UN_E, allE] 1)); |
|
2469 | 145 |
by (fast_tac (!claset addDs [lepoll_0_is_0 RS subst]) 1); |
1207 | 146 |
by (rtac allI 1); |
147 |
by (rtac impI 1); |
|
1196 | 148 |
by (eres_inst_tac [("x","lam x:a. f`x - {THE b. first(b,f`x,R)}")] allE 1); |
1207 | 149 |
by (etac impE 1); |
2469 | 150 |
by (Asm_full_simp_tac 1); |
151 |
by (fast_tac (!claset addSIs [Diff_first_lepoll]) 1); |
|
152 |
by (Asm_full_simp_tac 1); |
|
1196 | 153 |
by (resolve_tac [UN_subset_split RS subset_imp_lepoll RS lepoll_trans] 1); |
1207 | 154 |
by (rtac Un_lepoll_Inf_Ord 1 THEN (REPEAT_FIRST assume_tac)); |
155 |
by (etac UN_sing_lepoll 1); |
|
3731 | 156 |
qed "UN_fun_lepoll_lemma"; |
1196 | 157 |
|
158 |
goal thy "!!a f. [| ALL b:a. f`b lepoll n & f`b <= T; well_ord(T, R); \ |
|
1461 | 159 |
\ ~Finite(a); Ord(a); n:nat |] ==> (UN b:a. f`b) lepoll a"; |
1196 | 160 |
by (eresolve_tac [UN_fun_lepoll_lemma RS allE] 1 THEN (REPEAT (assume_tac 1))); |
2469 | 161 |
by (Fast_tac 1); |
3731 | 162 |
qed "UN_fun_lepoll"; |
1196 | 163 |
|
164 |
goal thy "!!a f. [| ALL b:a. F(b) lepoll n & F(b) <= T; well_ord(T, R); \ |
|
1461 | 165 |
\ ~Finite(a); Ord(a); n:nat |] ==> (UN b:a. F(b)) lepoll a"; |
1207 | 166 |
by (rtac impE 1 THEN (assume_tac 3)); |
1196 | 167 |
by (res_inst_tac [("f","lam b:a. F(b)")] (UN_fun_lepoll) 2 |
1461 | 168 |
THEN (TRYALL assume_tac)); |
2469 | 169 |
by (Simp_tac 2); |
170 |
by (Asm_full_simp_tac 1); |
|
3731 | 171 |
qed "UN_lepoll"; |
1196 | 172 |
|
173 |
goal thy "!!a. Ord(a) ==> (UN b:a. F(b)) = (UN b:a. F(b) - (UN c:b. F(c)))"; |
|
1207 | 174 |
by (rtac equalityI 1); |
2469 | 175 |
by (Fast_tac 2); |
1207 | 176 |
by (rtac subsetI 1); |
177 |
by (etac UN_E 1); |
|
178 |
by (rtac UN_I 1); |
|
1196 | 179 |
by (res_inst_tac [("P","%z. x:F(z)")] Least_in_Ord 1 THEN (REPEAT (assume_tac 1))); |
1207 | 180 |
by (rtac DiffI 1); |
1196 | 181 |
by (resolve_tac [Ord_in_Ord RSN (2, LeastI)] 1 THEN (REPEAT (assume_tac 1))); |
1207 | 182 |
by (rtac notI 1); |
183 |
by (etac UN_E 1); |
|
1196 | 184 |
by (eres_inst_tac [("P","%z. x:F(z)"),("i","c")] less_LeastE 1); |
185 |
by (eresolve_tac [Ord_Least RSN (2, ltI)] 1); |
|
3731 | 186 |
qed "UN_eq_UN_Diffs"; |
1196 | 187 |
|
188 |
goalw thy [eqpoll_def] "!!A B. A Int B = 0 ==> A Un B eqpoll A + B"; |
|
189 |
by (res_inst_tac [("x","lam a:A Un B. if(a:A,Inl(a),Inr(a))")] exI 1); |
|
190 |
by (res_inst_tac [("d","%z. case(%x.x, %x.x, z)")] lam_bijective 1); |
|
2469 | 191 |
by (fast_tac (!claset addSIs [if_type, InlI, InrI]) 1); |
1207 | 192 |
by (TRYALL (etac sumE )); |
1196 | 193 |
by (TRYALL (split_tac [expand_if])); |
2469 | 194 |
by (TRYALL Asm_simp_tac); |
195 |
by (fast_tac (!claset addDs [equals0D]) 1); |
|
3731 | 196 |
qed "disj_Un_eqpoll_sum"; |
1196 | 197 |
|
198 |
goalw thy [lepoll_def, eqpoll_def] |
|
1461 | 199 |
"!!X a. a lepoll X ==> EX Y. Y<=X & a eqpoll Y"; |
1207 | 200 |
by (etac exE 1); |
1196 | 201 |
by (forward_tac [subset_refl RSN (2, restrict_bij)] 1); |
202 |
by (res_inst_tac [("x","f``a")] exI 1); |
|
2469 | 203 |
by (fast_tac (!claset addSEs [inj_is_fun RS fun_is_rel RS image_subset]) 1); |
3731 | 204 |
qed "lepoll_imp_eqpoll_subset"; |
1196 | 205 |
|
206 |
(* ********************************************************************** *) |
|
1461 | 207 |
(* Diff_lesspoll_eqpoll_Card *) |
1196 | 208 |
(* ********************************************************************** *) |
209 |
||
210 |
goal thy "!!A B. [| A eqpoll a; ~Finite(a); Card(a); B lesspoll a; \ |
|
1461 | 211 |
\ A-B lesspoll a |] ==> P"; |
1196 | 212 |
by (REPEAT (eresolve_tac [lesspoll_imp_ex_lt_eqpoll RS exE, |
1461 | 213 |
Card_is_Ord, conjE] 1)); |
1196 | 214 |
by (forw_inst_tac [("j","xa")] (lt_Ord RS (lt_Ord RSN (2, Un_upper1_le))) 1 |
1461 | 215 |
THEN (assume_tac 1)); |
1196 | 216 |
by (forw_inst_tac [("j","xa")] (lt_Ord RS (lt_Ord RSN (2, Un_upper2_le))) 1 |
1461 | 217 |
THEN (assume_tac 1)); |
1207 | 218 |
by (dtac Un_least_lt 1 THEN (assume_tac 1)); |
1196 | 219 |
by (dresolve_tac [le_imp_lepoll RSN |
1461 | 220 |
(2, eqpoll_imp_lepoll RS lepoll_trans)] 1 |
221 |
THEN (assume_tac 1)); |
|
1196 | 222 |
by (dresolve_tac [le_imp_lepoll RSN |
1461 | 223 |
(2, eqpoll_imp_lepoll RS lepoll_trans)] 1 |
224 |
THEN (assume_tac 1)); |
|
1196 | 225 |
by (res_inst_tac [("Q","Finite(x Un xa)")] (excluded_middle RS disjE) 1); |
226 |
by (dresolve_tac [[lepoll_Finite, lepoll_Finite] MRS Finite_Un] 2 |
|
1461 | 227 |
THEN (REPEAT (assume_tac 2))); |
1196 | 228 |
by (dresolve_tac [subset_Un_Diff RS subset_imp_lepoll RS lepoll_Finite] 2); |
2469 | 229 |
by (fast_tac (!claset |
1461 | 230 |
addDs [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_Finite]) 2); |
1196 | 231 |
by (dresolve_tac [ Un_lepoll_Inf_Ord] 1 |
1461 | 232 |
THEN (REPEAT (assume_tac 1))); |
2469 | 233 |
by (fast_tac (!claset addSEs [ltE, Ord_in_Ord]) 1); |
1196 | 234 |
by (dresolve_tac [subset_Un_Diff RS subset_imp_lepoll RS lepoll_trans RSN |
1461 | 235 |
(3, lt_Card_imp_lesspoll RS lepoll_lesspoll_lesspoll)] 1 |
236 |
THEN (TRYALL assume_tac)); |
|
2469 | 237 |
by (fast_tac (!claset addSDs [lesspoll_def RS def_imp_iff RS iffD1]) 1); |
3731 | 238 |
qed "Diff_lesspoll_eqpoll_Card_lemma"; |
1196 | 239 |
|
240 |
goal thy "!!A. [| A eqpoll a; ~Finite(a); Card(a); B lesspoll a |] \ |
|
1461 | 241 |
\ ==> A - B eqpoll a"; |
2469 | 242 |
by (rtac swap 1 THEN (Fast_tac 1)); |
1207 | 243 |
by (rtac Diff_lesspoll_eqpoll_Card_lemma 1 THEN (REPEAT (assume_tac 1))); |
2469 | 244 |
by (fast_tac (!claset addSIs [lesspoll_def RS def_imp_iff RS iffD2, |
1461 | 245 |
subset_imp_lepoll RS (eqpoll_imp_lepoll RSN (2, lepoll_trans))]) 1); |
3731 | 246 |
qed "Diff_lesspoll_eqpoll_Card"; |
1196 | 247 |