author | paulson |
Mon, 29 Sep 1997 11:48:48 +0200 | |
changeset 3731 | 71366483323b |
parent 2845 | b4f8df0efa6c |
child 4091 | 771b1f6422a8 |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: ZF/AC/WO2_AC16.ML |
1196 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Krzysztof Grabczewski |
1196 | 4 |
|
5 |
The proof of WO2 ==> AC16(k #+ m, k) |
|
6 |
||
7 |
The main part of the proof is the inductive reasoning concerning |
|
8 |
properties of constructed family T_gamma. |
|
9 |
The proof deals with three cases for ordinals: 0, succ and limit ordinal. |
|
10 |
The first instance is trivial, the third not difficult, but the second |
|
11 |
is very complicated requiring many lemmas. |
|
12 |
We also need to prove that at any stage gamma the set |
|
13 |
(s - Union(...) - k_gamma) (Rubin & Rubin page 15) |
|
14 |
contains m distinct elements (in fact is equipollent to s) |
|
15 |
*) |
|
16 |
||
17 |
(* ********************************************************************** *) |
|
1461 | 18 |
(* case of limit ordinal *) |
1196 | 19 |
(* ********************************************************************** *) |
20 |
||
21 |
goal thy "!!Z. [| ALL y<x. ALL z<a. z<y | (EX Y: F(y). f(z)<=Y) \ |
|
1461 | 22 |
\ --> (EX! Y. Y:F(y) & f(z)<=Y); \ |
23 |
\ ALL i j. i le j --> F(i) <= F(j); j le i; i<x; z<a; \ |
|
24 |
\ V: F(i); f(z)<=V; W:F(j); f(z)<=W |] \ |
|
25 |
\ ==> V = W"; |
|
1196 | 26 |
by (REPEAT (eresolve_tac [asm_rl, allE, impE] 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
27 |
by (dtac subsetD 1 THEN (assume_tac 1)); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
28 |
by (REPEAT (dtac ospec 1 THEN (assume_tac 1))); |
1196 | 29 |
by (eresolve_tac [disjI2 RSN (2, impE)] 1); |
30 |
by (fast_tac (FOL_cs addSIs [bexI]) 1); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
31 |
by (etac ex1_two_eq 1 THEN (REPEAT (ares_tac [conjI] 1))); |
1196 | 32 |
val lemma3_1 = result(); |
33 |
||
34 |
goal thy "!!Z. [| ALL y<x. ALL z<a. z<y | (EX Y: F(y). f(z)<=Y) \ |
|
1461 | 35 |
\ --> (EX! Y. Y:F(y) & f(z)<=Y); \ |
36 |
\ ALL i j. i le j --> F(i) <= F(j); i<x; j<x; z<a; \ |
|
37 |
\ V: F(i); f(z)<=V; W:F(j); f(z)<=W |] \ |
|
38 |
\ ==> V = W"; |
|
1196 | 39 |
by (res_inst_tac [("j","j")] (lt_Ord RS (lt_Ord RSN (2, Ord_linear_le))) 1 |
1461 | 40 |
THEN (REPEAT (assume_tac 1))); |
1196 | 41 |
by (eresolve_tac [lemma3_1 RS sym] 1 THEN (REPEAT (assume_tac 1))); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
42 |
by (etac lemma3_1 1 THEN (REPEAT (assume_tac 1))); |
1196 | 43 |
val lemma3 = result(); |
44 |
||
2469 | 45 |
goal thy "!!a. [| ALL y<x. F(y) <= X & \ |
1461 | 46 |
\ (ALL x<a. x < y | (EX Y:F(y). fa(x) <= Y) --> \ |
47 |
\ (EX! Y. Y : F(y) & fa(x) <= Y)); x < a |] \ |
|
48 |
\ ==> ALL y<x. ALL z<a. z < y | (EX Y:F(y). fa(z) <= Y) --> \ |
|
49 |
\ (EX! Y. Y : F(y) & fa(z) <= Y)"; |
|
1196 | 50 |
by (REPEAT (resolve_tac [oallI, impI] 1)); |
2469 | 51 |
by (dresolve_tac [ospec] 1 THEN (assume_tac 1)); |
1196 | 52 |
by (fast_tac (FOL_cs addSEs [oallE]) 1); |
53 |
val lemma4 = result(); |
|
54 |
||
2469 | 55 |
goal thy "!!a. [| ALL y<x. F(y) <= X & \ |
1461 | 56 |
\ (ALL x<a. x < y | (EX Y:F(y). fa(x) <= Y) --> \ |
57 |
\ (EX! Y. Y : F(y) & fa(x) <= Y)); \ |
|
58 |
\ x < a; Limit(x); ALL i j. i le j --> F(i) <= F(j) |] \ |
|
59 |
\ ==> (UN x<x. F(x)) <= X & \ |
|
60 |
\ (ALL xa<a. xa < x | (EX x:UN x<x. F(x). fa(xa) <= x) \ |
|
61 |
\ --> (EX! Y. Y : (UN x<x. F(x)) & fa(xa) <= Y))"; |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
62 |
by (rtac conjI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
63 |
by (rtac subsetI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
64 |
by (etac OUN_E 1); |
2469 | 65 |
by (dresolve_tac [ospec] 1 THEN (assume_tac 1)); |
66 |
by (Fast_tac 1); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
67 |
by (dtac lemma4 1 THEN (assume_tac 1)); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
68 |
by (rtac oallI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
69 |
by (rtac impI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
70 |
by (etac disjE 1); |
1196 | 71 |
by (forward_tac [Limit_has_succ RSN (2, ospec)] 1 THEN (REPEAT (assume_tac 1))); |
72 |
by (dres_inst_tac [("A","a"),("x","xa")] ospec 1 THEN (assume_tac 1)); |
|
73 |
by (eresolve_tac [lt_Ord RS le_refl RSN (2, disjI1 RSN (2, impE))] 1 |
|
1461 | 74 |
THEN (assume_tac 1)); |
1196 | 75 |
by (REPEAT (eresolve_tac [ex1E, conjE] 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
76 |
by (rtac ex1I 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
77 |
by (rtac conjI 1 THEN (assume_tac 2)); |
1196 | 78 |
by (eresolve_tac [Limit_has_succ RS OUN_I] 1 THEN (TRYALL assume_tac)); |
79 |
by (REPEAT (eresolve_tac [conjE, OUN_E] 1)); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
80 |
by (etac lemma3 1 THEN (TRYALL assume_tac)); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
81 |
by (etac Limit_has_succ 1 THEN (assume_tac 1)); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
82 |
by (etac bexE 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
83 |
by (rtac ex1I 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
84 |
by (etac conjI 1 THEN (assume_tac 1)); |
1196 | 85 |
by (REPEAT (eresolve_tac [conjE, OUN_E] 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
86 |
by (etac lemma3 1 THEN (TRYALL assume_tac)); |
1196 | 87 |
val lemma5 = result(); |
88 |
||
89 |
(* ********************************************************************** *) |
|
1461 | 90 |
(* case of successor ordinal *) |
1196 | 91 |
(* ********************************************************************** *) |
92 |
||
93 |
(* |
|
94 |
First quite complicated proof of the fact used in the recursive construction |
|
95 |
of the family T_gamma (WO2 ==> AC16(k #+ m, k)) - the fact that at any stage |
|
96 |
gamma the set (s - Union(...) - k_gamma) is equipollent to s |
|
97 |
(Rubin & Rubin page 15). |
|
98 |
*) |
|
99 |
||
100 |
(* ********************************************************************** *) |
|
1461 | 101 |
(* dbl_Diff_eqpoll_Card *) |
1196 | 102 |
(* ********************************************************************** *) |
103 |
||
104 |
goal thy "!!A. [| A eqpoll a; Card(a); ~Finite(a); B lesspoll a; \ |
|
1461 | 105 |
\ C lesspoll a |] ==> A - B - C eqpoll a"; |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
106 |
by (rtac Diff_lesspoll_eqpoll_Card 1 THEN (REPEAT (assume_tac 1))); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
107 |
by (rtac Diff_lesspoll_eqpoll_Card 1 THEN (REPEAT (assume_tac 1))); |
3731 | 108 |
qed "dbl_Diff_eqpoll_Card"; |
1196 | 109 |
|
110 |
(* ********************************************************************** *) |
|
1461 | 111 |
(* Case of finite ordinals *) |
1196 | 112 |
(* ********************************************************************** *) |
113 |
||
114 |
goalw thy [lesspoll_def] |
|
1461 | 115 |
"!!X. [| Finite(X); ~Finite(a); Ord(a) |] ==> X lesspoll a"; |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
116 |
by (rtac conjI 1); |
1196 | 117 |
by (dresolve_tac [nat_le_infinite_Ord RS le_imp_lepoll] 1 |
1461 | 118 |
THEN (assume_tac 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
119 |
by (rewtac Finite_def); |
2469 | 120 |
by (fast_tac (!claset addSEs [eqpoll_sym RS eqpoll_trans]) 2); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
121 |
by (rtac lepoll_trans 1 THEN (assume_tac 2)); |
2469 | 122 |
by (fast_tac (!claset addSEs [Ord_nat RSN (2, ltI) RS leI RS le_imp_subset RS |
1461 | 123 |
subset_imp_lepoll RSN (2, eqpoll_imp_lepoll RS lepoll_trans)]) 1); |
3731 | 124 |
qed "Finite_lesspoll_infinite_Ord"; |
1196 | 125 |
|
126 |
goal thy "!!x. x:X ==> Union(X) = Union(X-{x}) Un x"; |
|
2493 | 127 |
by (Fast_tac 1); |
3731 | 128 |
qed "Union_eq_Un_Diff"; |
1196 | 129 |
|
130 |
goal thy "!!n. n:nat ==> ALL X. X eqpoll n --> (ALL x:X. Finite(x)) \ |
|
1461 | 131 |
\ --> Finite(Union(X))"; |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
132 |
by (etac nat_induct 1); |
2469 | 133 |
by (fast_tac (!claset addSDs [eqpoll_imp_lepoll RS lepoll_0_is_0] |
134 |
addSIs [nat_0I RS nat_into_Finite] addss (!simpset)) 1); |
|
1196 | 135 |
by (REPEAT (resolve_tac [allI, impI] 1)); |
136 |
by (resolve_tac [eqpoll_succ_imp_not_empty RS not_emptyE] 1 THEN (assume_tac 1)); |
|
137 |
by (res_inst_tac [("P","%z. Finite(z)")] (Union_eq_Un_Diff RS ssubst) 1 |
|
1461 | 138 |
THEN (assume_tac 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
139 |
by (rtac Finite_Un 1); |
2469 | 140 |
by (Fast_tac 2); |
141 |
by (fast_tac (!claset addSIs [Diff_sing_eqpoll]) 1); |
|
3731 | 142 |
qed "Finite_Union_lemma"; |
1196 | 143 |
|
144 |
goal thy "!!X. [| ALL x:X. Finite(x); Finite(X) |] ==> Finite(Union(X))"; |
|
145 |
by (eresolve_tac [Finite_def RS def_imp_iff RS iffD1 RS bexE] 1); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
146 |
by (dtac Finite_Union_lemma 1); |
2469 | 147 |
by (Fast_tac 1); |
3731 | 148 |
qed "Finite_Union"; |
1196 | 149 |
|
150 |
goalw thy [Finite_def] "!!x. [| x lepoll n; n:nat |] ==> Finite(x)"; |
|
2469 | 151 |
by (fast_tac (!claset |
1461 | 152 |
addEs [nat_into_Ord RSN (2, lepoll_imp_ex_le_eqpoll) RS exE, |
153 |
Ord_nat RSN (2, ltI) RSN (2, lt_trans1) RS ltD]) 1); |
|
3731 | 154 |
qed "lepoll_nat_num_imp_Finite"; |
1196 | 155 |
|
156 |
goal thy "!!X. [| ALL x:X. x lepoll n & x <= T; well_ord(T, R); X lepoll b; \ |
|
1461 | 157 |
\ b<a; ~Finite(a); Card(a); n:nat |] \ |
158 |
\ ==> Union(X) lesspoll a"; |
|
1196 | 159 |
by (excluded_middle_tac "Finite(X)" 1); |
160 |
by (resolve_tac [Card_is_Ord RSN (3, Finite_lesspoll_infinite_Ord)] 2 |
|
1461 | 161 |
THEN (REPEAT (assume_tac 3))); |
2469 | 162 |
by (fast_tac (!claset addSEs [lepoll_nat_num_imp_Finite] |
1461 | 163 |
addSIs [Finite_Union]) 2); |
1196 | 164 |
by (dresolve_tac [lt_Ord RSN (2, lepoll_imp_ex_le_eqpoll)] 1 THEN (assume_tac 1)); |
165 |
by (REPEAT (eresolve_tac [exE, conjE] 1)); |
|
166 |
by (forward_tac [eqpoll_imp_lepoll RS lepoll_infinite] 1 THEN (assume_tac 1)); |
|
167 |
by (eresolve_tac [eqpoll_sym RS (eqpoll_def RS def_imp_iff RS iffD1) RS |
|
1461 | 168 |
exE] 1); |
1196 | 169 |
by (forward_tac [bij_is_surj RS surj_image_eq] 1); |
170 |
by (dresolve_tac [[bij_is_fun, subset_refl] MRS image_fun] 1); |
|
171 |
by (dresolve_tac [sym RS trans] 1 THEN (assume_tac 1)); |
|
172 |
by (hyp_subst_tac 1); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
173 |
by (rtac lepoll_lesspoll_lesspoll 1); |
1196 | 174 |
by (eresolve_tac [lt_trans1 RSN (2, lt_Card_imp_lesspoll)] 1 |
1461 | 175 |
THEN REPEAT (assume_tac 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
176 |
by (rtac UN_lepoll 1 |
2469 | 177 |
THEN (TRYALL (fast_tac (!claset addSEs [lt_Ord])))); |
3731 | 178 |
qed "Union_lesspoll"; |
1196 | 179 |
|
180 |
(* ********************************************************************** *) |
|
1461 | 181 |
(* recfunAC16_lepoll_index *) |
1196 | 182 |
(* ********************************************************************** *) |
183 |
||
184 |
goal thy "A Un {a} = cons(a, A)"; |
|
2493 | 185 |
by (Fast_tac 1); |
3731 | 186 |
qed "Un_sing_eq_cons"; |
1196 | 187 |
|
188 |
goal thy "!!A. A lepoll B ==> A Un {a} lepoll succ(B)"; |
|
2469 | 189 |
by (asm_simp_tac (!simpset addsimps [Un_sing_eq_cons, succ_def]) 1); |
1196 | 190 |
by (eresolve_tac [mem_not_refl RSN (2, cons_lepoll_cong)] 1); |
3731 | 191 |
qed "Un_lepoll_succ"; |
1196 | 192 |
|
193 |
goal thy "!!a. Ord(a) ==> F(a) - (UN b<succ(a). F(b)) = 0"; |
|
2496 | 194 |
by (fast_tac (!claset addSIs [OUN_I, le_refl]) 1); |
3731 | 195 |
qed "Diff_UN_succ_empty"; |
1196 | 196 |
|
197 |
goal thy "!!a. Ord(a) ==> F(a) Un X - (UN b<succ(a). F(b)) <= X"; |
|
2469 | 198 |
by (fast_tac (!claset addSIs [OUN_I, le_refl]) 1); |
3731 | 199 |
qed "Diff_UN_succ_subset"; |
1196 | 200 |
|
201 |
goal thy "!!x. Ord(x) ==> \ |
|
1461 | 202 |
\ recfunAC16(f, g, x, a) - (UN i<x. recfunAC16(f, g, i, a)) lepoll 1"; |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
203 |
by (etac Ord_cases 1); |
2469 | 204 |
by (asm_simp_tac (!simpset addsimps [recfunAC16_0, |
1461 | 205 |
empty_subsetI RS subset_imp_lepoll]) 1); |
2469 | 206 |
by (asm_simp_tac (!simpset addsimps [recfunAC16_Limit, |
1461 | 207 |
Diff_cancel, empty_subsetI RS subset_imp_lepoll]) 2); |
2469 | 208 |
by (asm_simp_tac (!simpset addsimps [recfunAC16_succ]) 1); |
1196 | 209 |
by (resolve_tac [conjI RS (expand_if RS iffD2)] 1); |
2469 | 210 |
by (fast_tac (!claset addSIs [empty_subsetI RS subset_imp_lepoll] |
1461 | 211 |
addSEs [Diff_UN_succ_empty RS ssubst]) 1); |
2469 | 212 |
by (fast_tac (!claset addSEs [Diff_UN_succ_subset RS subset_imp_lepoll RS |
1461 | 213 |
(singleton_eqpoll_1 RS eqpoll_imp_lepoll RSN (2, lepoll_trans))]) 1); |
3731 | 214 |
qed "recfunAC16_Diff_lepoll_1"; |
1196 | 215 |
|
216 |
goal thy "!!z. [| z : F(x); Ord(x) |] \ |
|
1461 | 217 |
\ ==> z:F(LEAST i. z:F(i)) - (UN j<(LEAST i. z:F(i)). F(j))"; |
2469 | 218 |
by (fast_tac (!claset addEs [less_LeastE] addSEs [OUN_E, LeastI]) 1); |
3731 | 219 |
qed "in_Least_Diff"; |
1196 | 220 |
|
221 |
goal thy "!!w. [| (LEAST i. w:F(i)) = (LEAST i. z:F(i)); \ |
|
1461 | 222 |
\ w:(UN i<a. F(i)); z:(UN i<a. F(i)) |] \ |
223 |
\ ==> EX b<a. w:(F(b) - (UN c<b. F(c))) & z:(F(b) - (UN c<b. F(c)))"; |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
224 |
by (REPEAT (etac OUN_E 1)); |
1196 | 225 |
by (dresolve_tac [lt_Ord RSN (2, in_Least_Diff)] 1 THEN (assume_tac 1)); |
226 |
by (forward_tac [lt_Ord RSN (2, in_Least_Diff)] 1 THEN (assume_tac 1)); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
227 |
by (rtac oexI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
228 |
by (rtac conjI 1 THEN (assume_tac 2)); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
229 |
by (etac subst 1 THEN (assume_tac 1)); |
1196 | 230 |
by (eresolve_tac [lt_Ord RSN (2, Least_le) RS lt_trans1] 1 |
1461 | 231 |
THEN (REPEAT (assume_tac 1))); |
3731 | 232 |
qed "Least_eq_imp_ex"; |
1196 | 233 |
|
234 |
goal thy "!!A. [| A lepoll 1; a:A; b:A |] ==> a=b"; |
|
2469 | 235 |
by (fast_tac (!claset addSDs [lepoll_1_is_sing]) 1); |
3731 | 236 |
qed "two_in_lepoll_1"; |
1196 | 237 |
|
238 |
goal thy "!!a. [| ALL i<a. F(i)-(UN j<i. F(j)) lepoll 1; Limit(a) |] \ |
|
1461 | 239 |
\ ==> (UN x<a. F(x)) lepoll a"; |
1196 | 240 |
by (resolve_tac [lepoll_def RS (def_imp_iff RS iffD2)] 1); |
241 |
by (res_inst_tac [("x","lam z: (UN x<a. F(x)). LEAST i. z:F(i)")] exI 1); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
242 |
by (rewtac inj_def); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
243 |
by (rtac CollectI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
244 |
by (rtac lam_type 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
245 |
by (etac OUN_E 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
246 |
by (etac Least_in_Ord 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
247 |
by (etac ltD 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
248 |
by (etac lt_Ord2 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
249 |
by (rtac ballI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
250 |
by (rtac ballI 1); |
2469 | 251 |
by (Asm_simp_tac 1); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
252 |
by (rtac impI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
253 |
by (dtac Least_eq_imp_ex 1 THEN (REPEAT (assume_tac 1))); |
2469 | 254 |
by (fast_tac (!claset addSEs [two_in_lepoll_1]) 1); |
3731 | 255 |
qed "UN_lepoll_index"; |
1196 | 256 |
|
257 |
goal thy "!!y. Ord(y) ==> recfunAC16(f, fa, y, a) lepoll y"; |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
258 |
by (etac trans_induct 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
259 |
by (etac Ord_cases 1); |
2469 | 260 |
by (asm_simp_tac (!simpset addsimps [recfunAC16_0, lepoll_refl]) 1); |
261 |
by (asm_simp_tac (!simpset addsimps [recfunAC16_succ]) 1); |
|
262 |
by (fast_tac (!claset addIs [conjI RS (expand_if RS iffD2)] |
|
1461 | 263 |
addSDs [succI1 RSN (2, bspec)] |
264 |
addSEs [subset_succI RS subset_imp_lepoll RSN (2, lepoll_trans), |
|
265 |
Un_lepoll_succ]) 1); |
|
2469 | 266 |
by (asm_simp_tac (!simpset addsimps [recfunAC16_Limit]) 1); |
267 |
by (fast_tac (!claset addSEs [lt_Ord RS recfunAC16_Diff_lepoll_1] |
|
1461 | 268 |
addSIs [UN_lepoll_index]) 1); |
3731 | 269 |
qed "recfunAC16_lepoll_index"; |
1196 | 270 |
|
271 |
goal thy "!!y. [| recfunAC16(f,g,y,a) <= {X: Pow(A). X eqpoll n}; \ |
|
1461 | 272 |
\ A eqpoll a; y<a; ~Finite(a); Card(a); n:nat |] \ |
273 |
\ ==> Union(recfunAC16(f,g,y,a)) lesspoll a"; |
|
1196 | 274 |
by (eresolve_tac [eqpoll_def RS def_imp_iff RS iffD1 RS exE] 1); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
275 |
by (rtac Union_lesspoll 1 THEN (TRYALL assume_tac)); |
1196 | 276 |
by (eresolve_tac [lt_Ord RS recfunAC16_lepoll_index] 3); |
277 |
by (eresolve_tac [[bij_is_inj, Card_is_Ord RS well_ord_Memrel] MRS |
|
1461 | 278 |
well_ord_rvimage] 2 THEN (assume_tac 2)); |
2469 | 279 |
by (fast_tac (!claset addSEs [eqpoll_imp_lepoll]) 1); |
3731 | 280 |
qed "Union_recfunAC16_lesspoll"; |
1196 | 281 |
|
282 |
goal thy |
|
283 |
"!!a. [| recfunAC16(f, fa, y, a) <= {X: Pow(A) . X eqpoll succ(k #+ m)}; \ |
|
1461 | 284 |
\ Card(a); ~ Finite(a); A eqpoll a; \ |
285 |
\ k : nat; m : nat; y<a; \ |
|
286 |
\ fa : bij(a, {Y: Pow(A). Y eqpoll succ(k)}) |] \ |
|
287 |
\ ==> A - Union(recfunAC16(f, fa, y, a)) - fa`y eqpoll a"; |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
288 |
by (rtac dbl_Diff_eqpoll_Card 1 THEN (TRYALL assume_tac)); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
289 |
by (rtac Union_recfunAC16_lesspoll 1 THEN (REPEAT (assume_tac 1))); |
1196 | 290 |
by (eresolve_tac [add_type RS nat_succI] 1 THEN (assume_tac 1)); |
291 |
by (resolve_tac [nat_succI RSN (2, bexI RS (Finite_def RS def_imp_iff RS |
|
1461 | 292 |
iffD2)) RS (Card_is_Ord RSN (3, Finite_lesspoll_infinite_Ord))] 1 |
293 |
THEN (TRYALL assume_tac)); |
|
1196 | 294 |
by (eresolve_tac [ltD RSN (2, bij_is_fun RS apply_type) RS CollectE] 1 |
1461 | 295 |
THEN (TRYALL assume_tac)); |
3731 | 296 |
qed "dbl_Diff_eqpoll"; |
1196 | 297 |
|
298 |
(* back to the proof *) |
|
299 |
||
300 |
val disj_Un_eqpoll_nat_sum = disj_Un_eqpoll_sum RS ( |
|
301 |
sum_eqpoll_cong RSN (2, |
|
302 |
nat_sum_eqpoll_sum RSN (3, |
|
303 |
eqpoll_trans RS eqpoll_trans))) |> standard; |
|
304 |
||
305 |
goal thy "!!x. [| x : Pow(A - B - fa`i); x eqpoll m; \ |
|
1461 | 306 |
\ fa : bij(a, {x: Pow(A) . x eqpoll k}); i<a; k:nat; m:nat |] \ |
307 |
\ ==> fa ` i Un x : {x: Pow(A) . x eqpoll k #+ m}"; |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
308 |
by (rtac CollectI 1); |
2469 | 309 |
by (fast_tac (!claset addSIs [PowD RS (PowD RSN (2, Un_least RS PowI))] |
1461 | 310 |
addSEs [ltD RSN (2, bij_is_fun RS apply_type RS CollectE)]) 1); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
311 |
by (rtac disj_Un_eqpoll_nat_sum 1 |
1461 | 312 |
THEN (TRYALL assume_tac)); |
2469 | 313 |
by (fast_tac (!claset addSIs [equals0I]) 1); |
1196 | 314 |
by (eresolve_tac [ltD RSN (2, bij_is_fun RS apply_type RS CollectE)] 1 |
1461 | 315 |
THEN (REPEAT (assume_tac 1))); |
3731 | 316 |
qed "Un_in_Collect"; |
1196 | 317 |
|
318 |
(* ********************************************************************** *) |
|
1461 | 319 |
(* Lemmas simplifying assumptions *) |
1196 | 320 |
(* ********************************************************************** *) |
321 |
||
2469 | 322 |
goal thy "!!j. [| ALL y<succ(j). F(y)<=X & (ALL x<a. x<y | P(x,y) \ |
1461 | 323 |
\ --> Q(x,y)); succ(j)<a |] \ |
324 |
\ ==> F(j)<=X & (ALL x<a. x<j | P(x,j) --> Q(x,j))"; |
|
2469 | 325 |
by (dresolve_tac [ospec] 1); |
326 |
by (resolve_tac [lt_Ord RS (succI1 RS ltI RS lt_Ord RS le_refl)] 1 |
|
1461 | 327 |
THEN (REPEAT (assume_tac 1))); |
1196 | 328 |
val lemma6 = result(); |
329 |
||
330 |
goal thy "!!j. [| F(j)<=X; (ALL x<a. x<j | P(x,j) --> Q(x,j)); succ(j)<a |] \ |
|
1461 | 331 |
\ ==> P(j,j) --> F(j) <= X & (ALL x<a. x le j | P(x,j) --> Q(x,j))"; |
2469 | 332 |
by (fast_tac (!claset addSEs [leE]) 1); |
1196 | 333 |
val lemma7 = result(); |
334 |
||
335 |
(* ********************************************************************** *) |
|
336 |
(* Lemmas needded to prove ex_next_set which means that for any successor *) |
|
1461 | 337 |
(* ordinal there is a set satisfying certain properties *) |
1196 | 338 |
(* ********************************************************************** *) |
339 |
||
340 |
goal thy "!!A. [| A eqpoll a; ~ Finite(a); Ord(a); m:nat |] \ |
|
1461 | 341 |
\ ==> EX X:Pow(A). X eqpoll m"; |
1196 | 342 |
by (eresolve_tac [Ord_nat RSN (2, ltI) RS |
1461 | 343 |
(nat_le_infinite_Ord RSN (2, lt_trans2)) RS |
344 |
leI RS le_imp_lepoll RS |
|
345 |
((eqpoll_sym RS eqpoll_imp_lepoll) RSN (2, lepoll_trans)) RS |
|
346 |
lepoll_imp_eqpoll_subset RS exE] 1 |
|
347 |
THEN REPEAT (assume_tac 1)); |
|
2469 | 348 |
by (fast_tac (!claset addSEs [eqpoll_sym]) 1); |
3731 | 349 |
qed "ex_subset_eqpoll"; |
1196 | 350 |
|
351 |
goal thy "!!A. [| A <= B Un C; A Int C = 0 |] ==> A <= B"; |
|
2469 | 352 |
by (fast_tac (!claset addDs [equals0D]) 1); |
3731 | 353 |
qed "subset_Un_disjoint"; |
1196 | 354 |
|
355 |
goal thy "!!F. [| X:Pow(A - Union(B) -C); T:B; F<=T |] ==> F Int X = 0"; |
|
2469 | 356 |
by (fast_tac (!claset addSIs [equals0I]) 1); |
3731 | 357 |
qed "Int_empty"; |
1196 | 358 |
|
359 |
(* ********************************************************************** *) |
|
1461 | 360 |
(* equipollent subset (and finite) is the whole set *) |
1196 | 361 |
(* ********************************************************************** *) |
362 |
||
363 |
goal thy "!!A. [| A <= B; a : A; A - {a} = B - {a} |] ==> A = B"; |
|
2493 | 364 |
by (fast_tac (!claset addSEs [equalityE]) 1); |
3731 | 365 |
qed "Diffs_eq_imp_eq"; |
1196 | 366 |
|
367 |
goal thy "!!A. m:nat ==> ALL A B. A <= B & m lepoll A & B lepoll m --> A=B"; |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
368 |
by (etac nat_induct 1); |
2496 | 369 |
by (fast_tac (!claset addSDs [lepoll_0_is_0]) 1); |
1196 | 370 |
by (REPEAT (resolve_tac [allI, impI] 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
371 |
by (REPEAT (etac conjE 1)); |
1196 | 372 |
by (resolve_tac [succ_lepoll_imp_not_empty RS not_emptyE] 1 |
1461 | 373 |
THEN (assume_tac 1)); |
1196 | 374 |
by (forward_tac [subsetD RS Diff_sing_lepoll] 1 |
1461 | 375 |
THEN REPEAT (assume_tac 1)); |
1196 | 376 |
by (forward_tac [lepoll_Diff_sing] 1); |
377 |
by (REPEAT (eresolve_tac [allE, impE] 1)); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
378 |
by (rtac conjI 1); |
2469 | 379 |
by (Fast_tac 2); |
380 |
by (Fast_tac 1); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
381 |
by (etac Diffs_eq_imp_eq 1 |
1461 | 382 |
THEN REPEAT (assume_tac 1)); |
3731 | 383 |
qed "subset_imp_eq_lemma"; |
1196 | 384 |
|
385 |
goal thy "!!A. [| A <= B; m lepoll A; B lepoll m; m:nat |] ==> A=B"; |
|
386 |
by (fast_tac (FOL_cs addSDs [subset_imp_eq_lemma]) 1); |
|
3731 | 387 |
qed "subset_imp_eq"; |
1196 | 388 |
|
389 |
goal thy "!!f. [| f:bij(a, {Y:X. Y eqpoll succ(k)}); k:nat; f`b<=f`y; b<a; \ |
|
1461 | 390 |
\ y<a |] ==> b=y"; |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
391 |
by (dtac subset_imp_eq 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
392 |
by (etac nat_succI 3); |
2469 | 393 |
by (fast_tac (!claset addSEs [bij_is_fun RS (ltD RSN (2, apply_type)) RS |
1461 | 394 |
CollectE, eqpoll_sym RS eqpoll_imp_lepoll]) 1); |
2469 | 395 |
by (fast_tac (!claset addSEs [bij_is_fun RS (ltD RSN (2, apply_type)) RS |
1461 | 396 |
CollectE, eqpoll_imp_lepoll]) 1); |
1196 | 397 |
by (rewrite_goals_tac [bij_def, inj_def]); |
2469 | 398 |
by (fast_tac (!claset addSDs [ltD]) 1); |
3731 | 399 |
qed "bij_imp_arg_eq"; |
1196 | 400 |
|
401 |
goal thy |
|
402 |
"!!a. [| recfunAC16(f, fa, y, a) <= {X: Pow(A) . X eqpoll succ(k #+ m)}; \ |
|
1461 | 403 |
\ Card(a); ~ Finite(a); A eqpoll a; \ |
404 |
\ k : nat; m : nat; y<a; \ |
|
405 |
\ fa : bij(a, {Y: Pow(A). Y eqpoll succ(k)}); \ |
|
406 |
\ ~ (EX Y:recfunAC16(f, fa, y, a). fa`y <= Y) |] \ |
|
407 |
\ ==> EX X:{Y: Pow(A). Y eqpoll succ(k #+ m)}. fa`y <= X & \ |
|
408 |
\ (ALL b<a. fa`b <= X --> \ |
|
409 |
\ (ALL T:recfunAC16(f, fa, y, a). ~ fa`b <= T))"; |
|
1196 | 410 |
by (eresolve_tac [dbl_Diff_eqpoll RS ex_subset_eqpoll RS bexE] 1 |
1461 | 411 |
THEN REPEAT (assume_tac 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
412 |
by (etac Card_is_Ord 1); |
1196 | 413 |
by (forward_tac [Un_in_Collect] 2 THEN REPEAT (assume_tac 2)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
414 |
by (etac CollectE 4); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
415 |
by (rtac bexI 4); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
416 |
by (rtac CollectI 5); |
1196 | 417 |
by (assume_tac 5); |
418 |
by (eresolve_tac [add_succ RS subst] 5); |
|
419 |
by (assume_tac 1); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
420 |
by (etac nat_succI 1); |
1196 | 421 |
by (assume_tac 1); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
422 |
by (rtac conjI 1); |
2469 | 423 |
by (Fast_tac 1); |
1196 | 424 |
by (REPEAT (resolve_tac [ballI, impI, oallI, notI] 1)); |
425 |
by (dresolve_tac [Int_empty RSN (2, subset_Un_disjoint)] 1 |
|
1461 | 426 |
THEN REPEAT (assume_tac 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
427 |
by (dtac bij_imp_arg_eq 1 THEN REPEAT (assume_tac 1)); |
1196 | 428 |
by (hyp_subst_tac 1); |
429 |
by (eresolve_tac [bexI RSN (2, notE)] 1 THEN TRYALL assume_tac); |
|
3731 | 430 |
qed "ex_next_set"; |
1196 | 431 |
|
432 |
(* ********************************************************************** *) |
|
1461 | 433 |
(* Lemma ex_next_Ord states that for any successor *) |
434 |
(* ordinal there is a number of the set satisfying certain properties *) |
|
1196 | 435 |
(* ********************************************************************** *) |
436 |
||
437 |
goal thy |
|
438 |
"!!a. [| recfunAC16(f, fa, y, a) <= {X: Pow(A) . X eqpoll succ(k #+ m)}; \ |
|
1461 | 439 |
\ Card(a); ~ Finite(a); A eqpoll a; \ |
440 |
\ k : nat; m : nat; y<a; \ |
|
441 |
\ fa : bij(a, {Y: Pow(A). Y eqpoll succ(k)}); \ |
|
442 |
\ f : bij(a, {Y: Pow(A). Y eqpoll succ(k #+ m)}); \ |
|
443 |
\ ~ (EX Y:recfunAC16(f, fa, y, a). fa`y <= Y) |] \ |
|
444 |
\ ==> EX c<a. fa`y <= f`c & \ |
|
445 |
\ (ALL b<a. fa`b <= f`c --> \ |
|
446 |
\ (ALL T:recfunAC16(f, fa, y, a). ~ fa`b <= T))"; |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
447 |
by (dtac ex_next_set 1 THEN REPEAT (assume_tac 1)); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
448 |
by (etac bexE 1); |
1196 | 449 |
by (resolve_tac [bij_converse_bij RS bij_is_fun RS apply_type RS ltI RSN |
1461 | 450 |
(2, oexI)] 1); |
1196 | 451 |
by (resolve_tac [right_inverse_bij RS ssubst] 1 |
1461 | 452 |
THEN REPEAT (ares_tac [Card_is_Ord] 1)); |
3731 | 453 |
qed "ex_next_Ord"; |
1196 | 454 |
|
2845 | 455 |
goal thy "!!Z. [| EX! Y. Y:Z & P(Y); ~P(W) |] ==> EX! Y. Y: (Z Un {W}) & P(Y)"; |
2469 | 456 |
by (Fast_tac 1); |
3731 | 457 |
qed "ex1_in_Un_sing"; |
1196 | 458 |
|
459 |
(* ********************************************************************** *) |
|
1461 | 460 |
(* Lemma simplifying assumptions *) |
1196 | 461 |
(* ********************************************************************** *) |
462 |
||
463 |
goal thy "!!j. [| ALL x<a. x<j | (EX xa:F(j). P(x, xa)) \ |
|
1461 | 464 |
\ --> (EX! Y. Y:F(j) & P(x, Y)); F(j) <= X; \ |
465 |
\ L : X; P(j, L) & (ALL x<a. P(x, L) --> (ALL xa:F(j). ~P(x, xa))) |] \ |
|
466 |
\ ==> F(j) Un {L} <= X & \ |
|
2845 | 467 |
\ (ALL x<a. x le j | (EX xa: (F(j) Un {L}). P(x, xa)) --> \ |
468 |
\ (EX! Y. Y: (F(j) Un {L}) & P(x, Y)))"; |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
469 |
by (rtac conjI 1); |
2469 | 470 |
by (fast_tac (!claset addSIs [singleton_subsetI]) 1); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
471 |
by (rtac oallI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
472 |
by (etac oallE 1 THEN (contr_tac 2)); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
473 |
by (rtac impI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
474 |
by (etac disjE 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
475 |
by (etac leE 1); |
1196 | 476 |
by (eresolve_tac [disjI1 RSN (2, impE)] 1 THEN (assume_tac 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
477 |
by (rtac ex1E 1 THEN (assume_tac 1)); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
478 |
by (etac ex1_in_Un_sing 1); |
2469 | 479 |
by (Fast_tac 1); |
2845 | 480 |
by (Deepen_tac 2 1); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
481 |
by (etac bexE 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
482 |
by (etac UnE 1); |
2845 | 483 |
by (fast_tac (!claset delrules [ex_ex1I] addSIs [ex1_in_Un_sing]) 1); |
484 |
by (Deepen_tac 2 1); |
|
1196 | 485 |
val lemma8 = result(); |
486 |
||
487 |
(* ********************************************************************** *) |
|
488 |
(* The main part of the proof: inductive proof of the property of T_gamma *) |
|
1461 | 489 |
(* lemma main_induct *) |
1196 | 490 |
(* ********************************************************************** *) |
491 |
||
492 |
goal thy |
|
1461 | 493 |
"!!a. [| b < a; f : bij(a, {Y: Pow(A) . Y eqpoll succ(k #+ m)}); \ |
494 |
\ fa : bij(a, {Y: Pow(A) . Y eqpoll succ(k)}); \ |
|
495 |
\ ~Finite(a); Card(a); A eqpoll a; k : nat; m : nat |] \ |
|
496 |
\ ==> recfunAC16(f, fa, b, a) <= {X: Pow(A) . X eqpoll succ(k #+ m)} & \ |
|
497 |
\ (ALL x<a. x < b | (EX Y:recfunAC16(f, fa, b, a). fa ` x <= Y) --> \ |
|
498 |
\ (EX! Y. Y:recfunAC16(f, fa, b, a) & fa ` x <= Y))"; |
|
2469 | 499 |
by (etac lt_induct 1); |
500 |
by (forward_tac [lt_Ord] 1); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
501 |
by (etac Ord_cases 1); |
1196 | 502 |
(* case 0 *) |
2469 | 503 |
by (asm_simp_tac (!simpset addsimps [recfunAC16_0]) 1); |
1196 | 504 |
(* case Limit *) |
2469 | 505 |
by (asm_simp_tac (!simpset addsimps [recfunAC16_Limit]) 2); |
506 |
by (rtac lemma5 2 THEN (REPEAT (assume_tac 2))); |
|
1196 | 507 |
by (fast_tac (FOL_cs addSEs [recfunAC16_mono]) 2); |
508 |
(* case succ *) |
|
509 |
by (hyp_subst_tac 1); |
|
510 |
by (eresolve_tac [lemma6 RS conjE] 1 THEN (assume_tac 1)); |
|
2469 | 511 |
by (asm_simp_tac (!simpset addsimps [recfunAC16_succ]) 1); |
1196 | 512 |
by (resolve_tac [conjI RS (expand_if RS iffD2)] 1); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
513 |
by (etac lemma7 1 THEN (REPEAT (assume_tac 1))); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
514 |
by (rtac impI 1); |
1196 | 515 |
by (resolve_tac [ex_next_Ord RS oexE] 1 |
1461 | 516 |
THEN REPEAT (ares_tac [le_refl RS lt_trans] 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
517 |
by (etac lemma8 1 THEN (assume_tac 1)); |
1196 | 518 |
by (resolve_tac [bij_is_fun RS apply_type] 1 THEN (assume_tac 1)); |
519 |
by (eresolve_tac [Least_le RS lt_trans2 RS ltD] 1 |
|
1461 | 520 |
THEN REPEAT (ares_tac [lt_Ord, succ_leI] 1)); |
2469 | 521 |
(*VERY SLOW! 24 secs??*) |
1196 | 522 |
by (eresolve_tac [lt_Ord RSN (2, LeastI)] 1 THEN (assume_tac 1)); |
3731 | 523 |
qed "main_induct"; |
1196 | 524 |
|
525 |
(* ********************************************************************** *) |
|
1461 | 526 |
(* Lemma to simplify the inductive proof *) |
1200 | 527 |
(* - the desired property is a consequence of the inductive assumption *) |
1196 | 528 |
(* ********************************************************************** *) |
529 |
||
530 |
val [prem1, prem2, prem3, prem4] = goal thy |
|
1461 | 531 |
"[| (!!b. b<a ==> F(b) <= S & (ALL x<a. (x<b | (EX Y:F(b). f`x <= Y)) \ |
532 |
\ --> (EX! Y. Y : F(b) & f`x <= Y))); \ |
|
533 |
\ f:a->f``(a); Limit(a); (!!i j. i le j ==> F(i) <= F(j)) |] \ |
|
534 |
\ ==> (UN j<a. F(j)) <= S & \ |
|
535 |
\ (ALL x:f``a. EX! Y. Y : (UN j<a. F(j)) & x <= Y)"; |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
536 |
by (rtac conjI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
537 |
by (rtac subsetI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
538 |
by (etac OUN_E 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
539 |
by (dtac prem1 1); |
2469 | 540 |
by (Fast_tac 1); |
2493 | 541 |
(** LEVEL 5 **) |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
542 |
by (rtac ballI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
543 |
by (etac imageE 1); |
1196 | 544 |
by (dresolve_tac [prem3 RS Limit_is_Ord RSN (2, ltI) RS |
1461 | 545 |
(prem3 RS Limit_has_succ)] 1); |
1196 | 546 |
by (forward_tac [prem1] 1); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
547 |
by (etac conjE 1); |
2493 | 548 |
(** LEVEL 10 **) |
1196 | 549 |
by (dresolve_tac [leI RS succ_leE RSN (2, ospec)] 1 THEN (assume_tac 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
550 |
by (etac impE 1); |
2469 | 551 |
by (fast_tac (!claset addSEs [leI RS succ_leE RS lt_Ord RS le_refl]) 1); |
1196 | 552 |
by (dresolve_tac [prem2 RSN (2, apply_equality)] 1); |
553 |
by (REPEAT (eresolve_tac [conjE, ex1E] 1)); |
|
2493 | 554 |
(** LEVEL 15 **) |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
555 |
by (rtac ex1I 1); |
2469 | 556 |
by (fast_tac (!claset addSIs [OUN_I]) 1); |
1196 | 557 |
by (REPEAT (eresolve_tac [conjE, OUN_E] 1)); |
558 |
by (eresolve_tac [lt_Ord RSN (2, lt_Ord RS Ord_linear_le)] 1 THEN (assume_tac 1)); |
|
559 |
by (dresolve_tac [prem4 RS subsetD] 2 THEN (assume_tac 2)); |
|
2493 | 560 |
(** LEVEL 20 **) |
561 |
by (fast_tac FOL_cs 2); |
|
1196 | 562 |
by (forward_tac [prem1] 1); |
563 |
by (forward_tac [succ_leE] 1); |
|
564 |
by (dresolve_tac [prem4 RS subsetD] 1 THEN (assume_tac 1)); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
565 |
by (etac conjE 1); |
2493 | 566 |
(** LEVEL 25 **) |
1196 | 567 |
by (dresolve_tac [lt_trans RSN (2, ospec)] 1 THEN (TRYALL assume_tac)); |
568 |
by (dresolve_tac [disjI1 RSN (2, mp)] 1 THEN (assume_tac 1)); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
569 |
by (etac ex1_two_eq 1); |
2469 | 570 |
by (REPEAT (Fast_tac 1)); |
3731 | 571 |
qed "lemma_simp_induct"; |
1196 | 572 |
|
573 |
(* ********************************************************************** *) |
|
1461 | 574 |
(* The target theorem *) |
1196 | 575 |
(* ********************************************************************** *) |
576 |
||
577 |
goalw thy [AC16_def] |
|
1461 | 578 |
"!!n k. [| WO2; 0<m; k:nat; m:nat |] ==> AC16(k #+ m,k)"; |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
579 |
by (rtac allI 1); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
580 |
by (rtac impI 1); |
2493 | 581 |
by (forward_tac [WO2_infinite_subsets_eqpoll_X] 1 |
582 |
THEN (REPEAT (assume_tac 1))); |
|
1196 | 583 |
by (forw_inst_tac [("n","k #+ m")] (WO2_infinite_subsets_eqpoll_X) 1 |
1461 | 584 |
THEN (REPEAT (ares_tac [add_type] 1))); |
1196 | 585 |
by (forward_tac [WO2_imp_ex_Card] 1); |
586 |
by (REPEAT (eresolve_tac [exE,conjE] 1)); |
|
587 |
by (dresolve_tac [eqpoll_trans RS eqpoll_sym RS (eqpoll_def RS |
|
1461 | 588 |
def_imp_iff RS iffD1)] 1 THEN (assume_tac 1)); |
1196 | 589 |
by (dresolve_tac [eqpoll_trans RS eqpoll_sym RS (eqpoll_def RS |
1461 | 590 |
def_imp_iff RS iffD1)] 1 THEN (assume_tac 1)); |
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
591 |
by (REPEAT (etac exE 1)); |
1196 | 592 |
by (res_inst_tac [("x","UN j<a. recfunAC16(fa,f,j,a)")] exI 1); |
593 |
by (res_inst_tac [("P","%z. ?Y & (ALL x:z. ?Z(x))")] |
|
1461 | 594 |
(bij_is_surj RS surj_image_eq RS subst) 1 |
595 |
THEN (assume_tac 1)); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
596 |
by (rtac lemma_simp_induct 1); |
1196 | 597 |
by (eresolve_tac [bij_is_fun RS surj_image RS surj_is_fun] 2); |
598 |
by (eresolve_tac [eqpoll_imp_lepoll RS lepoll_infinite RS |
|
1461 | 599 |
infinite_Card_is_InfCard RS InfCard_is_Limit] 2 |
600 |
THEN REPEAT (assume_tac 2)); |
|
1208
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
601 |
by (etac recfunAC16_mono 2); |
bc3093616ba4
Ran expandshort and corrected spelling of Grabczewski
paulson
parents:
1200
diff
changeset
|
602 |
by (rtac main_induct 1 |
1461 | 603 |
THEN REPEAT (ares_tac [eqpoll_imp_lepoll RS lepoll_infinite] 1)); |
1196 | 604 |
qed "WO2_AC16"; |