author | paulson |
Wed, 15 Jul 1998 14:13:18 +0200 | |
changeset 5147 | 825877190618 |
parent 5137 | 60205b0de9b9 |
child 5241 | e5129172cb2b |
permissions | -rw-r--r-- |
1461 | 1 |
(* Title: ZF/AC/AC18_AC19.ML |
1123 | 2 |
ID: $Id$ |
1461 | 3 |
Author: Krzysztof Grabczewski |
1123 | 4 |
|
5 |
The proof of AC1 ==> AC18 ==> AC19 ==> AC1 |
|
6 |
*) |
|
7 |
||
8 |
open AC18_AC19; |
|
9 |
||
10 |
(* ********************************************************************** *) |
|
1461 | 11 |
(* AC1 ==> AC18 *) |
1123 | 12 |
(* ********************************************************************** *) |
13 |
||
5137 | 14 |
Goal "[| f: (PROD b:{P(a). a:A}. b); ALL a:A. P(a)<=Q(a) |] \ |
1461 | 15 |
\ ==> (lam a:A. f`P(a)):(PROD a:A. Q(a))"; |
1206 | 16 |
by (rtac lam_type 1); |
17 |
by (dtac apply_type 1); |
|
18 |
by (rtac RepFunI 1 THEN (assume_tac 1)); |
|
19 |
by (dtac bspec 1 THEN (assume_tac 1)); |
|
20 |
by (etac subsetD 1 THEN (assume_tac 1)); |
|
3731 | 21 |
qed "PROD_subsets"; |
1123 | 22 |
|
5137 | 23 |
Goal "[| ALL A. 0 ~: A --> (EX f. f : (PROD X:A. X)); A ~= 0 |] ==> \ |
1123 | 24 |
\ (INT a:A. UN b:B(a). X(a, b)) <= (UN f:PROD a:A. B(a). INT a:A. X(a, f`a))"; |
1206 | 25 |
by (rtac subsetI 1); |
1123 | 26 |
by (eres_inst_tac [("x","{{b:B(a). x:X(a,b)}. a:A}")] allE 1); |
1206 | 27 |
by (etac impE 1); |
4091 | 28 |
by (fast_tac (claset() addSEs [RepFunE] addSDs [INT_E] |
1461 | 29 |
addEs [UN_E, sym RS equals0D]) 1); |
1206 | 30 |
by (etac exE 1); |
31 |
by (rtac UN_I 1); |
|
4091 | 32 |
by (fast_tac (claset() addSEs [PROD_subsets]) 1); |
2469 | 33 |
by (Simp_tac 1); |
4091 | 34 |
by (fast_tac (claset() addSEs [not_emptyE] addDs [RepFunI RSN (2, apply_type)] |
1461 | 35 |
addEs [CollectD2] addSIs [INT_I]) 1); |
3731 | 36 |
qed "lemma_AC18"; |
1123 | 37 |
|
38 |
val [prem] = goalw thy (AC18_def::AC_defs) "AC1 ==> AC18"; |
|
39 |
by (resolve_tac [prem RS revcut_rl] 1); |
|
4091 | 40 |
by (fast_tac (claset() addSEs [lemma_AC18, not_emptyE, apply_type] |
1461 | 41 |
addSIs [equalityI, INT_I, UN_I]) 1); |
1196 | 42 |
qed "AC1_AC18"; |
1123 | 43 |
|
44 |
(* ********************************************************************** *) |
|
1461 | 45 |
(* AC18 ==> AC19 *) |
1123 | 46 |
(* ********************************************************************** *) |
47 |
||
48 |
val [prem] = goalw thy [AC18_def, AC19_def] "AC18 ==> AC19"; |
|
1206 | 49 |
by (rtac allI 1); |
3840 | 50 |
by (res_inst_tac [("B1","%x. x")] (forall_elim_vars 0 prem RS revcut_rl) 1); |
2469 | 51 |
by (Fast_tac 1); |
1196 | 52 |
qed "AC18_AC19"; |
1123 | 53 |
|
54 |
(* ********************************************************************** *) |
|
1461 | 55 |
(* AC19 ==> AC1 *) |
1123 | 56 |
(* ********************************************************************** *) |
57 |
||
5068 | 58 |
Goalw [u_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
59 |
"[| A ~= 0; 0 ~: A |] ==> {u_(a). a:A} ~= 0 & 0 ~: {u_(a). a:A}"; |
4091 | 60 |
by (fast_tac (claset() addSIs [not_emptyI, RepFunI] |
1461 | 61 |
addSEs [not_emptyE, RepFunE] |
62 |
addSDs [sym RS (RepFun_eq_0_iff RS iffD1)]) 1); |
|
3731 | 63 |
qed "RepRep_conj"; |
1123 | 64 |
|
5137 | 65 |
Goal "[|c : a; x = c Un {0}; x ~: a |] ==> x - {0} : a"; |
1123 | 66 |
by (hyp_subst_tac 1); |
1206 | 67 |
by (rtac subst_elem 1 THEN (assume_tac 1)); |
68 |
by (rtac equalityI 1); |
|
2469 | 69 |
by (Fast_tac 1); |
1206 | 70 |
by (rtac subsetI 1); |
1123 | 71 |
by (excluded_middle_tac "x=0" 1); |
2469 | 72 |
by (Fast_tac 1); |
4091 | 73 |
by (fast_tac (claset() addEs [notE, subst_elem]) 1); |
1123 | 74 |
val lemma1_1 = result(); |
75 |
||
5068 | 76 |
Goalw [u_def] |
5147
825877190618
More tidying and removal of "\!\!... from Goal commands
paulson
parents:
5137
diff
changeset
|
77 |
"[| f`(u_(a)) ~: a; f: (PROD B:{u_(a). a:A}. B); a:A |] \ |
1461 | 78 |
\ ==> f`(u_(a))-{0} : a"; |
4091 | 79 |
by (fast_tac (claset() addSEs [RepFunI, RepFunE, lemma1_1] |
1461 | 80 |
addSDs [apply_type]) 1); |
1123 | 81 |
val lemma1_2 = result(); |
82 |
||
5137 | 83 |
Goal "EX f. f: (PROD B:{u_(a). a:A}. B) ==> EX f. f: (PROD B:A. B)"; |
1206 | 84 |
by (etac exE 1); |
1123 | 85 |
by (res_inst_tac |
1461 | 86 |
[("x","lam a:A. if(f`(u_(a)) : a, f`(u_(a)), f`(u_(a))-{0})")] exI 1); |
1206 | 87 |
by (rtac lam_type 1); |
5116
8eb343ab5748
Renamed expand_if to split_if and setloop split_tac to addsplits,
paulson
parents:
5068
diff
changeset
|
88 |
by (split_tac [split_if] 1); |
1206 | 89 |
by (rtac conjI 1); |
2469 | 90 |
by (Fast_tac 1); |
4091 | 91 |
by (fast_tac (claset() addSEs [lemma1_2]) 1); |
1123 | 92 |
val lemma1 = result(); |
93 |
||
5137 | 94 |
Goalw [u_def] "a~=0 ==> 0: (UN b:u_(a). b)"; |
4091 | 95 |
by (fast_tac (claset() addSEs [not_emptyE] addSIs [UN_I, RepFunI]) 1); |
1123 | 96 |
val lemma2_1 = result(); |
97 |
||
5137 | 98 |
Goal "[| A~=0; 0~:A |] ==> (INT x:{u_(a). a:A}. UN b:x. b) ~= 0"; |
1206 | 99 |
by (etac not_emptyE 1); |
1123 | 100 |
by (res_inst_tac [("a","0")] not_emptyI 1); |
4091 | 101 |
by (fast_tac (claset() addSIs [INT_I, RepFunI, lemma2_1] addSEs [RepFunE]) 1); |
1123 | 102 |
val lemma2 = result(); |
103 |
||
5137 | 104 |
Goal "(UN f:F. P(f)) ~= 0 ==> F ~= 0"; |
4091 | 105 |
by (fast_tac (claset() addSEs [not_emptyE]) 1); |
1123 | 106 |
val lemma3 = result(); |
107 |
||
5137 | 108 |
Goalw AC_defs "AC19 ==> AC1"; |
1123 | 109 |
by (REPEAT (resolve_tac [allI,impI] 1)); |
110 |
by (excluded_middle_tac "A=0" 1); |
|
4091 | 111 |
by (fast_tac (claset() addSIs [exI, empty_fun]) 2); |
1123 | 112 |
by (eres_inst_tac [("x","{u_(a). a:A}")] allE 1); |
1206 | 113 |
by (etac impE 1); |
114 |
by (etac RepRep_conj 1 THEN (assume_tac 1)); |
|
115 |
by (rtac lemma1 1); |
|
116 |
by (dtac lemma2 1 THEN (assume_tac 1)); |
|
1123 | 117 |
by (dres_inst_tac [("P","%x. x~=0")] subst 1 THEN (assume_tac 1)); |
4091 | 118 |
by (fast_tac (claset() addSEs [lemma3 RS not_emptyE]) 1); |
1196 | 119 |
qed "AC19_AC1"; |
1123 | 120 |
|
121 |