equal
deleted
inserted
replaced
4 |
4 |
5 The proof of "WO6 ==> WO1". Simplified by L C Paulson. |
5 The proof of "WO6 ==> WO1". Simplified by L C Paulson. |
6 |
6 |
7 From the book "Equivalents of the Axiom of Choice" by Rubin & Rubin, |
7 From the book "Equivalents of the Axiom of Choice" by Rubin & Rubin, |
8 pages 2-5 |
8 pages 2-5 |
9 |
|
10 Simplifier bug in proof of UN_gg2_eq???? |
|
11 *) |
9 *) |
12 |
10 |
13 open WO6_WO1; |
11 open WO6_WO1; |
14 |
12 |
15 goal OrderType.thy |
13 goal OrderType.thy |
202 by (resolve_tac [equalityI] 1); |
200 by (resolve_tac [equalityI] 1); |
203 by (assume_tac 2); |
201 by (assume_tac 2); |
204 by (resolve_tac [subsetI] 1); |
202 by (resolve_tac [subsetI] 1); |
205 by (excluded_middle_tac "?P" 1 THEN (assume_tac 2)); |
203 by (excluded_middle_tac "?P" 1 THEN (assume_tac 2)); |
206 by (eresolve_tac [subset_Diff_sing RS subset_imp_lepoll RSN (2, |
204 by (eresolve_tac [subset_Diff_sing RS subset_imp_lepoll RSN (2, |
207 diff_sing_lepoll RSN (3, lepoll_trans RS lepoll_trans)) RS |
205 Diff_sing_lepoll RSN (3, lepoll_trans RS lepoll_trans)) RS |
208 succ_lepoll_natE] 1 |
206 succ_lepoll_natE] 1 |
209 THEN REPEAT (assume_tac 1)); |
207 THEN REPEAT (assume_tac 1)); |
210 val supset_lepoll_imp_eq = result(); |
208 val supset_lepoll_imp_eq = result(); |
211 |
209 |
212 goal thy |
210 goal thy |
255 bd sym 1; |
253 bd sym 1; |
256 by (asm_simp_tac |
254 by (asm_simp_tac |
257 (OrdQuant_ss addsimps [UN_oadd, lt_oadd1, |
255 (OrdQuant_ss addsimps [UN_oadd, lt_oadd1, |
258 oadd_le_self RS le_imp_not_lt, lt_Ord, |
256 oadd_le_self RS le_imp_not_lt, lt_Ord, |
259 odiff_oadd_inverse, ww2_def, |
257 odiff_oadd_inverse, ww2_def, |
260 standard (vv2_subset RS Diff_partition)]) 1); |
258 vv2_subset RS Diff_partition]) 1); |
261 (*Omitting "standard" above causes "Failed congruence proof!" bug??*) |
|
262 val UN_gg2_eq = result(); |
259 val UN_gg2_eq = result(); |
263 |
260 |
264 goal thy "domain(gg2(f,a,b,s)) = a++a"; |
261 goal thy "domain(gg2(f,a,b,s)) = a++a"; |
265 by (simp_tac (ZF_ss addsimps [lam_funtype RS domain_of_fun, gg2_def]) 1); |
262 by (simp_tac (ZF_ss addsimps [lam_funtype RS domain_of_fun, gg2_def]) 1); |
266 val domain_gg2 = result(); |
263 val domain_gg2 = result(); |
269 (* every value of defined function is less than or equipollent to m *) |
266 (* every value of defined function is less than or equipollent to m *) |
270 (* ********************************************************************** *) |
267 (* ********************************************************************** *) |
271 |
268 |
272 goalw thy [vv2_def] |
269 goalw thy [vv2_def] |
273 "!!m. [| m:nat; m~=0 |] ==> vv2(f,b,g,s) lepoll m"; |
270 "!!m. [| m:nat; m~=0 |] ==> vv2(f,b,g,s) lepoll m"; |
274 by (asm_simp_tac (OrdQuant_ss |
271 by (asm_simp_tac (OrdQuant_ss addsimps [empty_lepollI] |
275 addsimps [empty_lepollI] |
272 setloop split_tac [expand_if]) 1); |
276 setloop split_tac [expand_if]) 1); |
|
277 by (fast_tac (AC_cs |
273 by (fast_tac (AC_cs |
278 addSDs [le_imp_subset RS subset_imp_lepoll RS lepoll_0_is_0] |
274 addSDs [le_imp_subset RS subset_imp_lepoll RS lepoll_0_is_0] |
279 addSIs [singleton_eqpoll_1 RS eqpoll_imp_lepoll RS lepoll_trans, |
275 addSIs [singleton_eqpoll_1 RS eqpoll_imp_lepoll RS lepoll_trans, |
280 not_lt_imp_le RS le_imp_subset RS subset_imp_lepoll, |
276 not_lt_imp_le RS le_imp_subset RS subset_imp_lepoll, |
281 nat_into_Ord, nat_1I]) 1); |
277 nat_into_Ord, nat_1I]) 1); |
283 |
279 |
284 goalw thy [ww2_def] |
280 goalw thy [ww2_def] |
285 "!!m. [| ALL b<a. f`b lepoll succ(m); g<a; m:nat; vv2(f,b,g,d) <= f`g \ |
281 "!!m. [| ALL b<a. f`b lepoll succ(m); g<a; m:nat; vv2(f,b,g,d) <= f`g \ |
286 \ |] ==> ww2(f,b,g,d) lepoll m"; |
282 \ |] ==> ww2(f,b,g,d) lepoll m"; |
287 by (excluded_middle_tac "f`g = 0" 1); |
283 by (excluded_middle_tac "f`g = 0" 1); |
288 by (asm_simp_tac (OrdQuant_ss |
284 by (asm_simp_tac (OrdQuant_ss addsimps [empty_lepollI]) 2); |
289 addsimps [empty_lepollI]) 2); |
|
290 by (dresolve_tac [ospec] 1 THEN (assume_tac 1)); |
285 by (dresolve_tac [ospec] 1 THEN (assume_tac 1)); |
291 by (resolve_tac [Diff_lepoll] 1 |
286 by (resolve_tac [Diff_lepoll] 1 |
292 THEN (TRYALL assume_tac)); |
287 THEN (TRYALL assume_tac)); |
293 by (asm_simp_tac (OrdQuant_ss addsimps [vv2_def, expand_if, not_emptyI]) 1); |
288 by (asm_simp_tac (OrdQuant_ss addsimps [vv2_def, expand_if, not_emptyI]) 1); |
294 val ww2_lepoll = result(); |
289 val ww2_lepoll = result(); |
447 by (eresolve_tac [impE] 4 THEN (assume_tac 5)); |
442 by (eresolve_tac [impE] 4 THEN (assume_tac 5)); |
448 by (REPEAT (ares_tac prems 1)); |
443 by (REPEAT (ares_tac prems 1)); |
449 val rev_induct = result(); |
444 val rev_induct = result(); |
450 |
445 |
451 goalw thy [NN_def] "!!n. n:NN(y) ==> n:nat"; |
446 goalw thy [NN_def] "!!n. n:NN(y) ==> n:nat"; |
452 by (fast_tac ZF_cs 1); |
447 by (etac CollectD1 1); |
453 val NN_into_nat = result(); |
448 val NN_into_nat = result(); |
454 |
449 |
455 goal thy "!!n. [| n:NN(y); y*y <= y; n~=0 |] ==> 1:NN(y)"; |
450 goal thy "!!n. [| n:NN(y); y*y <= y; n~=0 |] ==> 1:NN(y)"; |
456 by (resolve_tac [rev_induct] 1 THEN (REPEAT (ares_tac [NN_into_nat] 1))); |
451 by (resolve_tac [rev_induct] 1 THEN REPEAT (ares_tac [NN_into_nat] 1)); |
457 by (resolve_tac [lemma_ii] 1 THEN REPEAT (assume_tac 1)); |
452 by (resolve_tac [lemma_ii] 1 THEN REPEAT (assume_tac 1)); |
458 val lemma3 = result(); |
453 val lemma3 = result(); |
459 |
454 |
460 (* ********************************************************************** *) |
455 (* ********************************************************************** *) |
461 (* Main theorem "WO6 ==> WO1" *) |
456 (* Main theorem "WO6 ==> WO1" *) |