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