author | wenzelm |
Fri, 16 Jul 1999 22:25:07 +0200 | |
changeset 7025 | afbd8241797b |
parent 6153 | bff90585cce5 |
child 8123 | a71686059be0 |
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 |
(* ********************************************************************** *) |
|
1461 | 9 |
(* Lemmas involving ordinals and cardinalities used in the proofs *) |
10 |
(* concerning AC16 and DC *) |
|
1196 | 11 |
(* ********************************************************************** *) |
12 |
||
1616
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
13 |
(* j=|A| *) |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
14 |
goal Cardinal.thy |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
15 |
"!!A. [| A lepoll i; Ord(i) |] ==> EX j. j le i & A eqpoll j"; |
4091 | 16 |
by (fast_tac (claset() addIs [lepoll_cardinal_le, well_ord_Memrel, |
2469 | 17 |
well_ord_cardinal_eqpoll RS eqpoll_sym] |
18 |
addDs [lepoll_well_ord]) 1); |
|
1616
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
19 |
qed "lepoll_imp_ex_le_eqpoll"; |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
20 |
|
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
21 |
(* j=|A| *) |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
22 |
goalw Cardinal.thy [lesspoll_def] |
6d7278c3f686
Moved some proofs to Cardinal.ML; simplified others
paulson
parents:
1461
diff
changeset
|
23 |
"!!A a. [| A lesspoll i; Ord(i) |] ==> EX j. j<i & A eqpoll j"; |
4091 | 24 |
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
|
25 |
qed "lesspoll_imp_ex_lt_eqpoll"; |
1196 | 26 |
|
5137 | 27 |
Goalw [InfCard_def] "[| ~Finite(i); Ord(i) |] ==> InfCard(|i|)"; |
1207 | 28 |
by (rtac conjI 1); |
29 |
by (rtac Card_cardinal 1); |
|
1196 | 30 |
by (resolve_tac [Card_nat RS (Card_def RS def_imp_iff RS iffD1 RS ssubst)] 1); |
31 |
by (resolve_tac [nat_le_infinite_Ord RS le_imp_lepoll |
|
1461 | 32 |
RSN (2, well_ord_Memrel RS well_ord_lepoll_imp_Card_le)] 1 |
1196 | 33 |
THEN REPEAT (assume_tac 1)); |
3731 | 34 |
qed "Inf_Ord_imp_InfCard_cardinal"; |
1196 | 35 |
|
5137 | 36 |
Goal "[| A eqpoll i; B eqpoll i; ~Finite(i); Ord(i) |] \ |
1461 | 37 |
\ ==> A Un B eqpoll i"; |
1207 | 38 |
by (rtac eqpollI 1); |
1196 | 39 |
by (eresolve_tac [subset_imp_lepoll RSN (2, eqpoll_sym RS eqpoll_imp_lepoll |
1461 | 40 |
RS lepoll_trans)] 2); |
2469 | 41 |
by (Fast_tac 2); |
1196 | 42 |
by (resolve_tac [Un_lepoll_sum RS lepoll_trans] 1); |
43 |
by (resolve_tac [lepoll_imp_sum_lepoll_prod RS lepoll_trans] 1); |
|
44 |
by (eresolve_tac [eqpoll_sym RSN (2, eqpoll_trans) RS eqpoll_imp_lepoll] 1 |
|
1461 | 45 |
THEN (assume_tac 1)); |
1196 | 46 |
by (resolve_tac [nat_le_infinite_Ord RS le_imp_lepoll RS |
1461 | 47 |
(Ord_nat RS (nat_2I RS OrdmemD) RS subset_imp_lepoll RS lepoll_trans) |
48 |
RS (eqpoll_sym RS eqpoll_imp_lepoll RSN (2, lepoll_trans))] 1 |
|
1196 | 49 |
THEN (REPEAT (assume_tac 1))); |
50 |
by (eresolve_tac [prod_eqpoll_cong RS eqpoll_imp_lepoll RS lepoll_trans] 1 |
|
51 |
THEN (assume_tac 1)); |
|
52 |
by (resolve_tac [Inf_Ord_imp_InfCard_cardinal RSN (2, well_ord_Memrel RS |
|
1461 | 53 |
well_ord_InfCard_square_eq) RS eqpoll_imp_lepoll] 1 |
1196 | 54 |
THEN REPEAT (assume_tac 1)); |
3731 | 55 |
qed "Un_eqpoll_Inf_Ord"; |
1196 | 56 |
|
57 |
||
5315 | 58 |
Goal "?f : bij({{y,z}. y:x}, x)"; |
5284
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
paulson
parents:
5241
diff
changeset
|
59 |
by (rtac RepFun_bijective 1); |
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
paulson
parents:
5241
diff
changeset
|
60 |
by (simp_tac (simpset() addsimps [doubleton_eq_iff]) 1); |
c77e9dd9bafc
Tidying of AC, especially of AC16_WO4 using a locale
paulson
parents:
5241
diff
changeset
|
61 |
by (Blast_tac 1); |
3731 | 62 |
qed "paired_bij"; |
1196 | 63 |
|
5068 | 64 |
Goalw [eqpoll_def] "{{y,z}. y:x} eqpoll x"; |
4091 | 65 |
by (fast_tac (claset() addSIs [paired_bij]) 1); |
3731 | 66 |
qed "paired_eqpoll"; |
1196 | 67 |
|
5137 | 68 |
Goal "EX B. B eqpoll A & B Int C = 0"; |
4091 | 69 |
by (fast_tac (claset() addSIs [paired_eqpoll, equals0I] addEs [mem_asym]) 1); |
3731 | 70 |
qed "ex_eqpoll_disjoint"; |
1196 | 71 |
|
5137 | 72 |
Goal "[| A lepoll i; B lepoll i; ~Finite(i); Ord(i) |] \ |
1461 | 73 |
\ ==> A Un B lepoll i"; |
1196 | 74 |
by (res_inst_tac [("A1","i"), ("C1","i")] (ex_eqpoll_disjoint RS exE) 1); |
1207 | 75 |
by (etac conjE 1); |
1196 | 76 |
by (dresolve_tac [eqpoll_sym RS eqpoll_imp_lepoll RSN (2, lepoll_trans)] 1); |
77 |
by (assume_tac 1); |
|
78 |
by (resolve_tac [Un_lepoll_Un RS lepoll_trans] 1 THEN (REPEAT (assume_tac 1))); |
|
79 |
by (eresolve_tac [eqpoll_refl RSN (2, Un_eqpoll_Inf_Ord) RS |
|
1461 | 80 |
eqpoll_imp_lepoll] 1 |
81 |
THEN (REPEAT (assume_tac 1))); |
|
3731 | 82 |
qed "Un_lepoll_Inf_Ord"; |
1196 | 83 |
|
5137 | 84 |
Goal "[| P(i); i:j; Ord(j) |] ==> (LEAST i. P(i)) : j"; |
1196 | 85 |
by (eresolve_tac [Least_le RS leE] 1); |
1207 | 86 |
by (etac Ord_in_Ord 1 THEN (assume_tac 1)); |
87 |
by (etac ltE 1); |
|
4091 | 88 |
by (fast_tac (claset() addDs [OrdmemD]) 1); |
1207 | 89 |
by (etac subst_elem 1 THEN (assume_tac 1)); |
3731 | 90 |
qed "Least_in_Ord"; |
1196 | 91 |
|
5137 | 92 |
Goal "[| well_ord(x,r); y<=x; y lepoll succ(n); n:nat |] \ |
1461 | 93 |
\ ==> y-{THE b. first(b,y,r)} lepoll n"; |
1196 | 94 |
by (res_inst_tac [("Q","y=0")] (excluded_middle RS disjE) 1); |
4091 | 95 |
by (fast_tac (claset() addSIs [Diff_sing_lepoll, the_first_in]) 1); |
1196 | 96 |
by (res_inst_tac [("b","y-{THE b. first(b, y, r)}")] subst 1); |
1207 | 97 |
by (rtac empty_lepollI 2); |
2496 | 98 |
by (Fast_tac 1); |
3731 | 99 |
qed "Diff_first_lepoll"; |
1196 | 100 |
|
5068 | 101 |
Goal "(UN x:X. P(x)) <= (UN x:X. P(x)-Q(x)) Un (UN x:X. Q(x))"; |
2469 | 102 |
by (Fast_tac 1); |
3731 | 103 |
qed "UN_subset_split"; |
1196 | 104 |
|
5137 | 105 |
Goalw [lepoll_def] "Ord(a) ==> (UN x:a. {P(x)}) lepoll a"; |
1196 | 106 |
by (res_inst_tac [("x","lam z:(UN x:a. {P(x)}). (LEAST i. P(i)=z)")] exI 1); |
107 |
by (res_inst_tac [("d","%z. P(z)")] lam_injective 1); |
|
4091 | 108 |
by (fast_tac (claset() addSIs [Least_in_Ord]) 1); |
109 |
by (fast_tac (claset() addIs [LeastI] addSEs [Ord_in_Ord]) 1); |
|
3731 | 110 |
qed "UN_sing_lepoll"; |
1196 | 111 |
|
5137 | 112 |
Goal "[| well_ord(T, R); ~Finite(a); Ord(a); n:nat |] ==> \ |
1461 | 113 |
\ ALL f. (ALL b:a. f`b lepoll n & f`b <= T) --> (UN b:a. f`b) lepoll a"; |
6070 | 114 |
by (induct_tac "n" 1); |
1207 | 115 |
by (rtac allI 1); |
116 |
by (rtac impI 1); |
|
1196 | 117 |
by (res_inst_tac [("b","UN b:a. f`b")] subst 1); |
1207 | 118 |
by (rtac empty_lepollI 2); |
1196 | 119 |
by (resolve_tac [equals0I RS sym] 1); |
120 |
by (REPEAT (eresolve_tac [UN_E, allE] 1)); |
|
4091 | 121 |
by (fast_tac (claset() addDs [lepoll_0_is_0 RS subst]) 1); |
1207 | 122 |
by (rtac allI 1); |
123 |
by (rtac impI 1); |
|
1196 | 124 |
by (eres_inst_tac [("x","lam x:a. f`x - {THE b. first(b,f`x,R)}")] allE 1); |
1207 | 125 |
by (etac impE 1); |
2469 | 126 |
by (Asm_full_simp_tac 1); |
4091 | 127 |
by (fast_tac (claset() addSIs [Diff_first_lepoll]) 1); |
2469 | 128 |
by (Asm_full_simp_tac 1); |
1196 | 129 |
by (resolve_tac [UN_subset_split RS subset_imp_lepoll RS lepoll_trans] 1); |
1207 | 130 |
by (rtac Un_lepoll_Inf_Ord 1 THEN (REPEAT_FIRST assume_tac)); |
131 |
by (etac UN_sing_lepoll 1); |
|
3731 | 132 |
qed "UN_fun_lepoll_lemma"; |
1196 | 133 |
|
5137 | 134 |
Goal "[| ALL b:a. f`b lepoll n & f`b <= T; well_ord(T, R); \ |
1461 | 135 |
\ ~Finite(a); Ord(a); n:nat |] ==> (UN b:a. f`b) lepoll a"; |
1196 | 136 |
by (eresolve_tac [UN_fun_lepoll_lemma RS allE] 1 THEN (REPEAT (assume_tac 1))); |
2469 | 137 |
by (Fast_tac 1); |
3731 | 138 |
qed "UN_fun_lepoll"; |
1196 | 139 |
|
5137 | 140 |
Goal "[| ALL b:a. F(b) lepoll n & F(b) <= T; well_ord(T, R); \ |
1461 | 141 |
\ ~Finite(a); Ord(a); n:nat |] ==> (UN b:a. F(b)) lepoll a"; |
1207 | 142 |
by (rtac impE 1 THEN (assume_tac 3)); |
1196 | 143 |
by (res_inst_tac [("f","lam b:a. F(b)")] (UN_fun_lepoll) 2 |
1461 | 144 |
THEN (TRYALL assume_tac)); |
6153 | 145 |
by Auto_tac; |
3731 | 146 |
qed "UN_lepoll"; |
1196 | 147 |
|
5137 | 148 |
Goal "Ord(a) ==> (UN b:a. F(b)) = (UN b:a. F(b) - (UN c:b. F(c)))"; |
1207 | 149 |
by (rtac equalityI 1); |
2469 | 150 |
by (Fast_tac 2); |
1207 | 151 |
by (rtac subsetI 1); |
152 |
by (etac UN_E 1); |
|
153 |
by (rtac UN_I 1); |
|
1196 | 154 |
by (res_inst_tac [("P","%z. x:F(z)")] Least_in_Ord 1 THEN (REPEAT (assume_tac 1))); |
1207 | 155 |
by (rtac DiffI 1); |
1196 | 156 |
by (resolve_tac [Ord_in_Ord RSN (2, LeastI)] 1 THEN (REPEAT (assume_tac 1))); |
1207 | 157 |
by (rtac notI 1); |
158 |
by (etac UN_E 1); |
|
1196 | 159 |
by (eres_inst_tac [("P","%z. x:F(z)"),("i","c")] less_LeastE 1); |
160 |
by (eresolve_tac [Ord_Least RSN (2, ltI)] 1); |
|
3731 | 161 |
qed "UN_eq_UN_Diffs"; |
1196 | 162 |
|
5068 | 163 |
Goalw [lepoll_def, eqpoll_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
164 |
"a lepoll X ==> EX Y. Y<=X & a eqpoll Y"; |
1207 | 165 |
by (etac exE 1); |
1196 | 166 |
by (forward_tac [subset_refl RSN (2, restrict_bij)] 1); |
167 |
by (res_inst_tac [("x","f``a")] exI 1); |
|
4091 | 168 |
by (fast_tac (claset() addSEs [inj_is_fun RS fun_is_rel RS image_subset]) 1); |
3731 | 169 |
qed "lepoll_imp_eqpoll_subset"; |
1196 | 170 |
|
171 |
(* ********************************************************************** *) |
|
1461 | 172 |
(* Diff_lesspoll_eqpoll_Card *) |
1196 | 173 |
(* ********************************************************************** *) |
174 |
||
5137 | 175 |
Goal "[| A eqpoll a; ~Finite(a); Card(a); B lesspoll a; \ |
1461 | 176 |
\ A-B lesspoll a |] ==> P"; |
1196 | 177 |
by (REPEAT (eresolve_tac [lesspoll_imp_ex_lt_eqpoll RS exE, |
1461 | 178 |
Card_is_Ord, conjE] 1)); |
1196 | 179 |
by (forw_inst_tac [("j","xa")] (lt_Ord RS (lt_Ord RSN (2, Un_upper1_le))) 1 |
1461 | 180 |
THEN (assume_tac 1)); |
1196 | 181 |
by (forw_inst_tac [("j","xa")] (lt_Ord RS (lt_Ord RSN (2, Un_upper2_le))) 1 |
1461 | 182 |
THEN (assume_tac 1)); |
1207 | 183 |
by (dtac Un_least_lt 1 THEN (assume_tac 1)); |
1196 | 184 |
by (dresolve_tac [le_imp_lepoll RSN |
1461 | 185 |
(2, eqpoll_imp_lepoll RS lepoll_trans)] 1 |
186 |
THEN (assume_tac 1)); |
|
1196 | 187 |
by (dresolve_tac [le_imp_lepoll RSN |
1461 | 188 |
(2, eqpoll_imp_lepoll RS lepoll_trans)] 1 |
189 |
THEN (assume_tac 1)); |
|
1196 | 190 |
by (res_inst_tac [("Q","Finite(x Un xa)")] (excluded_middle RS disjE) 1); |
191 |
by (dresolve_tac [[lepoll_Finite, lepoll_Finite] MRS Finite_Un] 2 |
|
1461 | 192 |
THEN (REPEAT (assume_tac 2))); |
1196 | 193 |
by (dresolve_tac [subset_Un_Diff RS subset_imp_lepoll RS lepoll_Finite] 2); |
4091 | 194 |
by (fast_tac (claset() |
1461 | 195 |
addDs [eqpoll_sym RS eqpoll_imp_lepoll RS lepoll_Finite]) 2); |
1196 | 196 |
by (dresolve_tac [ Un_lepoll_Inf_Ord] 1 |
1461 | 197 |
THEN (REPEAT (assume_tac 1))); |
4091 | 198 |
by (fast_tac (claset() addSEs [ltE, Ord_in_Ord]) 1); |
1196 | 199 |
by (dresolve_tac [subset_Un_Diff RS subset_imp_lepoll RS lepoll_trans RSN |
1461 | 200 |
(3, lt_Card_imp_lesspoll RS lepoll_lesspoll_lesspoll)] 1 |
201 |
THEN (TRYALL assume_tac)); |
|
4091 | 202 |
by (fast_tac (claset() addSDs [lesspoll_def RS def_imp_iff RS iffD1]) 1); |
3731 | 203 |
qed "Diff_lesspoll_eqpoll_Card_lemma"; |
1196 | 204 |
|
5137 | 205 |
Goal "[| A eqpoll a; ~Finite(a); Card(a); B lesspoll a |] \ |
1461 | 206 |
\ ==> A - B eqpoll a"; |
2469 | 207 |
by (rtac swap 1 THEN (Fast_tac 1)); |
1207 | 208 |
by (rtac Diff_lesspoll_eqpoll_Card_lemma 1 THEN (REPEAT (assume_tac 1))); |
4091 | 209 |
by (fast_tac (claset() addSIs [lesspoll_def RS def_imp_iff RS iffD2, |
1461 | 210 |
subset_imp_lepoll RS (eqpoll_imp_lepoll RSN (2, lepoll_trans))]) 1); |
3731 | 211 |
qed "Diff_lesspoll_eqpoll_Card"; |
1196 | 212 |