| author | paulson | 
| Wed, 03 Feb 1999 13:26:07 +0100 | |
| changeset 6171 | cd237a10cbf8 | 
| parent 5865 | 2303f5a3036d | 
| child 6235 | c8a69ecafb99 | 
| permissions | -rw-r--r-- | 
| 1465 | 1  | 
(* Title: HOL/Fun  | 
| 923 | 2  | 
ID: $Id$  | 
| 1465 | 3  | 
Author: Tobias Nipkow, Cambridge University Computer Laboratory  | 
| 923 | 4  | 
Copyright 1993 University of Cambridge  | 
5  | 
||
6  | 
Lemmas about functions.  | 
|
7  | 
*)  | 
|
8  | 
||
| 4656 | 9  | 
|
| 5069 | 10  | 
Goal "(f = g) = (!x. f(x)=g(x))";  | 
| 923 | 11  | 
by (rtac iffI 1);  | 
| 1264 | 12  | 
by (Asm_simp_tac 1);  | 
13  | 
by (rtac ext 1 THEN Asm_simp_tac 1);  | 
|
| 923 | 14  | 
qed "expand_fun_eq";  | 
15  | 
||
| 5316 | 16  | 
val prems = Goal  | 
| 923 | 17  | 
"[| f(x)=u; !!x. P(x) ==> g(f(x)) = x; P(x) |] ==> x=g(u)";  | 
18  | 
by (rtac (arg_cong RS box_equals) 1);  | 
|
19  | 
by (REPEAT (resolve_tac (prems@[refl]) 1));  | 
|
20  | 
qed "apply_inverse";  | 
|
21  | 
||
22  | 
||
| 4656 | 23  | 
(** "Axiom" of Choice, proved using the description operator **)  | 
24  | 
||
| 5316 | 25  | 
Goal "!!Q. ALL x. EX y. Q x y ==> EX f. ALL x. Q x (f x)";  | 
| 4656 | 26  | 
by (fast_tac (claset() addEs [selectI]) 1);  | 
27  | 
qed "choice";  | 
|
28  | 
||
| 5316 | 29  | 
Goal "!!S. ALL x:S. EX y. Q x y ==> EX f. ALL x:S. Q x (f x)";  | 
| 4656 | 30  | 
by (fast_tac (claset() addEs [selectI]) 1);  | 
31  | 
qed "bchoice";  | 
|
32  | 
||
33  | 
||
| 5608 | 34  | 
section "id";  | 
| 5441 | 35  | 
|
| 5608 | 36  | 
qed_goalw "id_apply" thy [id_def] "id x = x" (K [rtac refl 1]);  | 
37  | 
Addsimps [id_apply];  | 
|
| 5441 | 38  | 
|
39  | 
||
| 5306 | 40  | 
section "o";  | 
41  | 
||
42  | 
qed_goalw "o_apply" thy [o_def] "(f o g) x = f (g x)"  | 
|
43  | 
(K [rtac refl 1]);  | 
|
44  | 
Addsimps [o_apply];  | 
|
45  | 
||
46  | 
qed_goalw "o_assoc" thy [o_def] "f o (g o h) = f o g o h"  | 
|
47  | 
(K [rtac ext 1, rtac refl 1]);  | 
|
48  | 
||
| 5608 | 49  | 
qed_goalw "id_o" thy [id_def] "id o g = g"  | 
| 5306 | 50  | 
(K [rtac ext 1, Simp_tac 1]);  | 
| 5608 | 51  | 
Addsimps [id_o];  | 
| 5306 | 52  | 
|
| 5608 | 53  | 
qed_goalw "o_id" thy [id_def] "f o id = f"  | 
| 5306 | 54  | 
(K [rtac ext 1, Simp_tac 1]);  | 
| 5608 | 55  | 
Addsimps [o_id];  | 
| 5306 | 56  | 
|
57  | 
Goalw [o_def] "(f o g)``r = f``(g``r)";  | 
|
58  | 
by (Blast_tac 1);  | 
|
59  | 
qed "image_compose";  | 
|
60  | 
||
| 5852 | 61  | 
Goalw [o_def] "UNION A (g o f) = UNION (f``A) g";  | 
62  | 
by (Blast_tac 1);  | 
|
63  | 
qed "UNION_o";  | 
|
64  | 
||
| 5306 | 65  | 
|
66  | 
section "inj";  | 
|
| 6171 | 67  | 
(**NB: inj now just translates to inj_on**)  | 
| 5306 | 68  | 
|
| 923 | 69  | 
(*** inj(f): f is a one-to-one function ***)  | 
70  | 
||
| 6171 | 71  | 
(*for Tools/datatype_rep_proofs*)  | 
72  | 
val [prem] = Goalw [inj_on_def]  | 
|
73  | 
"(!! x. ALL y. f(x) = f(y) --> x=y) ==> inj(f)";  | 
|
74  | 
by (blast_tac (claset() addIs [prem RS spec RS mp]) 1);  | 
|
75  | 
qed "datatype_injI";  | 
|
| 923 | 76  | 
|
| 6171 | 77  | 
Goalw [inj_on_def] "[| inj(f); f(x) = f(y) |] ==> x=y";  | 
| 5316 | 78  | 
by (Blast_tac 1);  | 
| 923 | 79  | 
qed "injD";  | 
80  | 
||
81  | 
(*Useful with the simplifier*)  | 
|
| 5316 | 82  | 
Goal "inj(f) ==> (f(x) = f(y)) = (x=y)";  | 
| 923 | 83  | 
by (rtac iffI 1);  | 
| 5316 | 84  | 
by (etac arg_cong 2);  | 
85  | 
by (etac injD 1);  | 
|
| 5318 | 86  | 
by (assume_tac 1);  | 
| 923 | 87  | 
qed "inj_eq";  | 
88  | 
||
| 5316 | 89  | 
Goal "inj(f) ==> (@x. f(x)=f(y)) = y";  | 
90  | 
by (etac injD 1);  | 
|
| 923 | 91  | 
by (rtac selectI 1);  | 
92  | 
by (rtac refl 1);  | 
|
93  | 
qed "inj_select";  | 
|
94  | 
||
95  | 
(*A one-to-one function has an inverse (given using select).*)  | 
|
| 5316 | 96  | 
Goalw [inv_def] "inj(f) ==> inv f (f x) = x";  | 
97  | 
by (etac inj_select 1);  | 
|
| 2912 | 98  | 
qed "inv_f_f";  | 
| 923 | 99  | 
|
100  | 
(* Useful??? *)  | 
|
| 5316 | 101  | 
val [oneone,minor] = Goal  | 
| 2912 | 102  | 
"[| inj(f); !!y. y: range(f) ==> P(inv f y) |] ==> P(x)";  | 
103  | 
by (res_inst_tac [("t", "x")] (oneone RS (inv_f_f RS subst)) 1);
 | 
|
| 923 | 104  | 
by (rtac (rangeI RS minor) 1);  | 
105  | 
qed "inj_transfer";  | 
|
106  | 
||
107  | 
||
| 4830 | 108  | 
(*** inj_on f A: f is one-to-one over A ***)  | 
| 923 | 109  | 
|
| 5316 | 110  | 
val prems = Goalw [inj_on_def]  | 
| 4830 | 111  | 
"(!! x y. [| f(x) = f(y); x:A; y:A |] ==> x=y) ==> inj_on f A";  | 
| 4089 | 112  | 
by (blast_tac (claset() addIs prems) 1);  | 
| 4830 | 113  | 
qed "inj_onI";  | 
| 6171 | 114  | 
val injI = inj_onI; (*for compatibility*)  | 
| 923 | 115  | 
|
| 5316 | 116  | 
val [major] = Goal  | 
| 4830 | 117  | 
"(!!x. x:A ==> g(f(x)) = x) ==> inj_on f A";  | 
118  | 
by (rtac inj_onI 1);  | 
|
| 923 | 119  | 
by (etac (apply_inverse RS trans) 1);  | 
120  | 
by (REPEAT (eresolve_tac [asm_rl,major] 1));  | 
|
| 4830 | 121  | 
qed "inj_on_inverseI";  | 
| 6171 | 122  | 
val inj_inverseI = inj_on_inverseI; (*for compatibility*)  | 
| 923 | 123  | 
|
| 5316 | 124  | 
Goalw [inj_on_def] "[| inj_on f A; f(x)=f(y); x:A; y:A |] ==> x=y";  | 
125  | 
by (Blast_tac 1);  | 
|
| 4830 | 126  | 
qed "inj_onD";  | 
| 923 | 127  | 
|
| 
5143
 
b94cd208f073
Removal of leading "\!\!..." from most Goal commands
 
paulson 
parents: 
5069 
diff
changeset
 | 
128  | 
Goal "[| inj_on f A; x:A; y:A |] ==> (f(x)=f(y)) = (x=y)";  | 
| 4830 | 129  | 
by (blast_tac (claset() addSDs [inj_onD]) 1);  | 
130  | 
qed "inj_on_iff";  | 
|
| 923 | 131  | 
|
| 5316 | 132  | 
Goalw [inj_on_def] "[| inj_on f A; ~x=y; x:A; y:A |] ==> ~ f(x)=f(y)";  | 
133  | 
by (Blast_tac 1);  | 
|
| 4830 | 134  | 
qed "inj_on_contraD";  | 
| 923 | 135  | 
|
| 5316 | 136  | 
Goalw [inj_on_def] "[| A<=B; inj_on f B |] ==> inj_on f A";  | 
| 3341 | 137  | 
by (Blast_tac 1);  | 
| 4830 | 138  | 
qed "subset_inj_on";  | 
| 3341 | 139  | 
|
| 923 | 140  | 
|
| 6171 | 141  | 
(*** Lemmas about injective functions and inv ***)  | 
| 923 | 142  | 
|
| 6171 | 143  | 
Goalw [o_def] "[| inj_on f A; inj_on g (range f) |] ==> inj_on (g o f) A";  | 
144  | 
by (fast_tac (claset() addIs [inj_onI] addEs [inj_onD]) 1);  | 
|
145  | 
qed "comp_inj_on";  | 
|
| 923 | 146  | 
|
| 5316 | 147  | 
Goalw [inv_def] "y : range(f) ==> f(inv f y) = y";  | 
148  | 
by (fast_tac (claset() addIs [selectI]) 1);  | 
|
| 2912 | 149  | 
qed "f_inv_f";  | 
| 923 | 150  | 
|
| 6171 | 151  | 
Goal "[| inv f x = inv f y; x: range(f); y: range(f) |] ==> x=y";  | 
| 2912 | 152  | 
by (rtac (arg_cong RS box_equals) 1);  | 
| 5316 | 153  | 
by (REPEAT (ares_tac [f_inv_f] 1));  | 
| 2912 | 154  | 
qed "inv_injective";  | 
155  | 
||
| 
5143
 
b94cd208f073
Removal of leading "\!\!..." from most Goal commands
 
paulson 
parents: 
5069 
diff
changeset
 | 
156  | 
Goal "[| inj(f); A<=range(f) |] ==> inj_on (inv f) A";  | 
| 4830 | 157  | 
by (fast_tac (claset() addIs [inj_onI]  | 
| 2912 | 158  | 
addEs [inv_injective,injD]) 1);  | 
| 4830 | 159  | 
qed "inj_on_inv";  | 
| 923 | 160  | 
|
| 5069 | 161  | 
Goalw [inj_on_def]  | 
| 
5148
 
74919e8f221c
More tidying and removal of "\!\!... from Goal commands
 
paulson 
parents: 
5143 
diff
changeset
 | 
162  | 
"[| inj_on f C; A<=C; B<=C |] ==> f``(A Int B) = f``A Int f``B";  | 
| 4059 | 163  | 
by (Blast_tac 1);  | 
| 4830 | 164  | 
qed "inj_on_image_Int";  | 
| 4059 | 165  | 
|
| 5069 | 166  | 
Goalw [inj_on_def]  | 
| 
5148
 
74919e8f221c
More tidying and removal of "\!\!... from Goal commands
 
paulson 
parents: 
5143 
diff
changeset
 | 
167  | 
"[| inj_on f C; A<=C; B<=C |] ==> f``(A-B) = f``A - f``B";  | 
| 4059 | 168  | 
by (Blast_tac 1);  | 
| 4830 | 169  | 
qed "inj_on_image_set_diff";  | 
| 4059 | 170  | 
|
| 6171 | 171  | 
Goalw [inj_on_def] "inj f ==> f``(A Int B) = f``A Int f``B";  | 
| 4059 | 172  | 
by (Blast_tac 1);  | 
173  | 
qed "image_Int";  | 
|
174  | 
||
| 6171 | 175  | 
Goalw [inj_on_def] "inj f ==> f``(A-B) = f``A - f``B";  | 
| 4059 | 176  | 
by (Blast_tac 1);  | 
177  | 
qed "image_set_diff";  | 
|
178  | 
||
| 923 | 179  | 
|
| 5847 | 180  | 
val [major] = Goalw [surj_def] "(!! x. g(f x) = x) ==> surj g";  | 
181  | 
by (blast_tac (claset() addIs [major RS sym]) 1);  | 
|
182  | 
qed "surjI";  | 
|
183  | 
||
184  | 
||
| 4089 | 185  | 
val set_cs = claset() delrules [equalityI];  | 
| 5305 | 186  | 
|
187  | 
||
188  | 
section "fun_upd";  | 
|
189  | 
||
190  | 
Goalw [fun_upd_def] "(f(x:=y) = f) = (f x = y)";  | 
|
191  | 
by Safe_tac;  | 
|
192  | 
by (etac subst 1);  | 
|
193  | 
by (rtac ext 2);  | 
|
194  | 
by Auto_tac;  | 
|
195  | 
qed "fun_upd_idem_iff";  | 
|
196  | 
||
197  | 
(* f x = y ==> f(x:=y) = f *)  | 
|
198  | 
bind_thm("fun_upd_idem", fun_upd_idem_iff RS iffD2);
 | 
|
199  | 
||
200  | 
(* f(x := f x) = f *)  | 
|
201  | 
AddIffs [refl RS fun_upd_idem];  | 
|
202  | 
||
203  | 
Goal "(f(x:=y))z = (if z=x then y else f z)";  | 
|
204  | 
by (simp_tac (simpset() addsimps [fun_upd_def]) 1);  | 
|
205  | 
qed "fun_upd_apply";  | 
|
206  | 
Addsimps [fun_upd_apply];  | 
|
207  | 
||
208  | 
qed_goal "fun_upd_same" thy "(f(x:=y)) x = y"  | 
|
209  | 
(K [Simp_tac 1]);  | 
|
| 5306 | 210  | 
qed_goal "fun_upd_other" thy "!!X. z~=x ==> (f(x:=y)) z = f z"  | 
| 5305 | 211  | 
(K [Asm_simp_tac 1]);  | 
212  | 
(*Addsimps [fun_upd_same, fun_upd_other];*)  | 
|
213  | 
||
214  | 
Goal "a ~= c ==> m(a:=b)(c:=d) = m(c:=d)(a:=b)";  | 
|
215  | 
by (rtac ext 1);  | 
|
216  | 
by (Auto_tac);  | 
|
217  | 
qed "fun_upd_twist";  | 
|
| 5852 | 218  | 
|
219  | 
||
220  | 
(*** -> and Pi, by Florian Kammueller and LCP ***)  | 
|
221  | 
||
222  | 
val prems = Goalw [Pi_def]  | 
|
223  | 
"[| !!x. x: A ==> f x: B x; !!x. x ~: A ==> f(x) = (@ y. True)|] \  | 
|
224  | 
\ ==> f: Pi A B";  | 
|
225  | 
by (auto_tac (claset(), simpset() addsimps prems));  | 
|
226  | 
qed "Pi_I";  | 
|
227  | 
||
228  | 
val prems = Goal  | 
|
229  | 
"[| !!x. x: A ==> f x: B; !!x. x ~: A ==> f(x) = (@ y. True)|] ==> f: A funcset B";  | 
|
230  | 
by (blast_tac (claset() addIs Pi_I::prems) 1);  | 
|
231  | 
qed "funcsetI";  | 
|
232  | 
||
233  | 
Goalw [Pi_def] "[|f: Pi A B; x: A|] ==> f x: B x";  | 
|
234  | 
by Auto_tac;  | 
|
235  | 
qed "Pi_mem";  | 
|
236  | 
||
237  | 
Goalw [Pi_def] "[|f: A funcset B; x: A|] ==> f x: B";  | 
|
238  | 
by Auto_tac;  | 
|
239  | 
qed "funcset_mem";  | 
|
240  | 
||
241  | 
Goalw [Pi_def] "[|f: Pi A B; x~: A|] ==> f x = (@ y. True)";  | 
|
242  | 
by Auto_tac;  | 
|
243  | 
qed "apply_arb";  | 
|
244  | 
||
245  | 
Goalw [Pi_def] "[| f: Pi A B; g: Pi A B; ! x: A. f x = g x |] ==> f = g";  | 
|
246  | 
by (rtac ext 1);  | 
|
247  | 
by Auto_tac;  | 
|
248  | 
val Pi_extensionality = ballI RSN (3, result());  | 
|
249  | 
||
250  | 
(*** compose ***)  | 
|
251  | 
||
252  | 
Goalw [Pi_def, compose_def, restrict_def]  | 
|
253  | 
"[| f: A funcset B; g: B funcset C |]==> compose A g f: A funcset C";  | 
|
254  | 
by Auto_tac;  | 
|
255  | 
qed "funcset_compose";  | 
|
256  | 
||
257  | 
Goal "[| f: A funcset B; g: B funcset C; h: C funcset D |]\  | 
|
258  | 
\ ==> compose A h (compose A g f) = compose A (compose B h g) f";  | 
|
259  | 
by (res_inst_tac [("A","A")] Pi_extensionality 1);
 | 
|
260  | 
by (blast_tac (claset() addIs [funcset_compose]) 1);  | 
|
261  | 
by (blast_tac (claset() addIs [funcset_compose]) 1);  | 
|
262  | 
by (rewrite_goals_tac [Pi_def, compose_def, restrict_def]);  | 
|
263  | 
by Auto_tac;  | 
|
264  | 
qed "compose_assoc";  | 
|
265  | 
||
266  | 
Goal "[| f: A funcset B; g: B funcset C; x: A |]==> compose A g f x = g(f(x))";  | 
|
267  | 
by (asm_full_simp_tac (simpset() addsimps [compose_def, restrict_def]) 1);  | 
|
268  | 
qed "compose_eq";  | 
|
269  | 
||
270  | 
Goal "[| f : A funcset B; f `` A = B; g: B funcset C; g `` B = C |]\  | 
|
271  | 
\ ==> compose A g f `` A = C";  | 
|
272  | 
by (auto_tac (claset(),  | 
|
273  | 
simpset() addsimps [image_def, compose_eq]));  | 
|
274  | 
qed "surj_compose";  | 
|
275  | 
||
276  | 
||
277  | 
Goal "[| f : A funcset B; g: B funcset C; f `` A = B; inj_on f A; inj_on g B |]\  | 
|
278  | 
\ ==> inj_on (compose A g f) A";  | 
|
279  | 
by (auto_tac (claset(),  | 
|
280  | 
simpset() addsimps [inj_on_def, compose_eq]));  | 
|
281  | 
qed "inj_on_compose";  | 
|
282  | 
||
283  | 
||
284  | 
(*** restrict / lam ***)  | 
|
285  | 
Goal "[| f `` A <= B |] ==> (lam x: A. f x) : A funcset B";  | 
|
286  | 
by (auto_tac (claset(),  | 
|
287  | 
simpset() addsimps [restrict_def, Pi_def]));  | 
|
288  | 
qed "restrict_in_funcset";  | 
|
289  | 
||
290  | 
val prems = Goalw [restrict_def, Pi_def]  | 
|
291  | 
"(!!x. x: A ==> f x: B x) ==> (lam x: A. f x) : Pi A B";  | 
|
292  | 
by (asm_simp_tac (simpset() addsimps prems) 1);  | 
|
293  | 
qed "restrictI";  | 
|
294  | 
||
295  | 
||
296  | 
Goal "x: A ==> (lam y: A. f y) x = f x";  | 
|
297  | 
by (asm_simp_tac (simpset() addsimps [restrict_def]) 1);  | 
|
298  | 
qed "restrict_apply1";  | 
|
299  | 
||
300  | 
Goal "[| x: A; f : A funcset B |] ==> (lam y: A. f y) x : B";  | 
|
301  | 
by (asm_full_simp_tac (simpset() addsimps [restrict_apply1,Pi_def]) 1);  | 
|
302  | 
qed "restrict_apply1_mem";  | 
|
303  | 
||
304  | 
Goal "x ~: A ==> (lam y: A. f y) x = (@ y. True)";  | 
|
305  | 
by (asm_simp_tac (simpset() addsimps [restrict_def]) 1);  | 
|
306  | 
qed "restrict_apply2";  | 
|
307  | 
||
308  | 
||
309  | 
val prems = Goal  | 
|
310  | 
"(!!x. x: A ==> f x = g x) ==> (lam x: A. f x) = (lam x: A. g x)";  | 
|
311  | 
by (rtac ext 1);  | 
|
312  | 
by (auto_tac (claset(),  | 
|
313  | 
simpset() addsimps prems@[restrict_def, Pi_def]));  | 
|
314  | 
qed "restrict_ext";  | 
|
315  | 
||
316  | 
||
317  | 
(*** Inverse ***)  | 
|
318  | 
||
319  | 
Goal "[|f `` A = B; x: B |] ==> ? y: A. f y = x";  | 
|
320  | 
by (Blast_tac 1);  | 
|
321  | 
qed "surj_image";  | 
|
322  | 
||
323  | 
Goalw [Inv_def] "[| f `` A = B; f : A funcset B |] \  | 
|
324  | 
\ ==> (lam x: B. (Inv A f) x) : B funcset A";  | 
|
325  | 
by (fast_tac (claset() addIs [restrict_in_funcset, selectI2]) 1);  | 
|
326  | 
qed "Inv_funcset";  | 
|
327  | 
||
328  | 
||
329  | 
Goal "[| f: A funcset B; inj_on f A; f `` A = B; x: A |] \  | 
|
330  | 
\ ==> (lam y: B. (Inv A f) y) (f x) = x";  | 
|
331  | 
by (asm_simp_tac (simpset() addsimps [restrict_apply1, funcset_mem]) 1);  | 
|
332  | 
by (asm_full_simp_tac (simpset() addsimps [Inv_def, inj_on_def]) 1);  | 
|
333  | 
by (rtac selectI2 1);  | 
|
334  | 
by Auto_tac;  | 
|
335  | 
qed "Inv_f_f";  | 
|
336  | 
||
337  | 
Goal "[| f: A funcset B; f `` A = B; x: B |] \  | 
|
338  | 
\ ==> f ((lam y: B. (Inv A f y)) x) = x";  | 
|
339  | 
by (asm_simp_tac (simpset() addsimps [Inv_def, restrict_apply1]) 1);  | 
|
340  | 
by (fast_tac (claset() addIs [selectI2]) 1);  | 
|
341  | 
qed "f_Inv_f";  | 
|
342  | 
||
343  | 
Goal "[| f: A funcset B; inj_on f A; f `` A = B |]\  | 
|
344  | 
\ ==> compose A (lam y:B. (Inv A f) y) f = (lam x: A. x)";  | 
|
345  | 
by (rtac Pi_extensionality 1);  | 
|
346  | 
by (blast_tac (claset() addIs [funcset_compose, Inv_funcset]) 1);  | 
|
347  | 
by (blast_tac (claset() addIs [restrict_in_funcset]) 1);  | 
|
348  | 
by (asm_simp_tac  | 
|
349  | 
(simpset() addsimps [restrict_apply1, compose_def, Inv_f_f]) 1);  | 
|
350  | 
qed "compose_Inv_id";  | 
|
351  | 
||
352  | 
||
353  | 
(*** Pi and Applyall ***)  | 
|
354  | 
||
355  | 
Goalw [Pi_def] "[| B(x) = {};  x: A |] ==> (PI x: A. B x) = {}";
 | 
|
356  | 
by Auto_tac;  | 
|
357  | 
qed "Pi_eq_empty";  | 
|
358  | 
||
359  | 
Goal "[| (PI x: A. B x) ~= {};  x: A |] ==> B(x) ~= {}";
 | 
|
360  | 
by (blast_tac (HOL_cs addIs [Pi_eq_empty]) 1);  | 
|
361  | 
qed "Pi_total1";  | 
|
362  | 
||
363  | 
Goal "[| a : A; Pi A B ~= {} |] ==> Applyall (Pi A B) a = B a";
 | 
|
364  | 
by (auto_tac (claset(), simpset() addsimps [Applyall_def, Pi_def]));  | 
|
365  | 
by (rename_tac "g z" 1);  | 
|
366  | 
by (res_inst_tac [("x","%y. if  (y = a) then z else g y")] exI 1);
 | 
|
367  | 
by (auto_tac (claset(), simpset() addsimps [split_if_mem1, split_if_eq1]));  | 
|
368  | 
qed "Applyall_beta";  | 
|
369  | 
||
| 
5865
 
2303f5a3036d
moved some facts about Pi from ex/PiSets to Fun.ML
 
paulson 
parents: 
5852 
diff
changeset
 | 
370  | 
Goal "Pi {} B = { (%x. @ y. True) }";
 | 
| 
 
2303f5a3036d
moved some facts about Pi from ex/PiSets to Fun.ML
 
paulson 
parents: 
5852 
diff
changeset
 | 
371  | 
by (auto_tac (claset() addIs [ext], simpset() addsimps [Pi_def]));  | 
| 
 
2303f5a3036d
moved some facts about Pi from ex/PiSets to Fun.ML
 
paulson 
parents: 
5852 
diff
changeset
 | 
372  | 
qed "Pi_empty";  | 
| 5852 | 373  | 
|
| 
5865
 
2303f5a3036d
moved some facts about Pi from ex/PiSets to Fun.ML
 
paulson 
parents: 
5852 
diff
changeset
 | 
374  | 
val [major] = Goalw [Pi_def] "(!!x. x: A ==> B x <= C x) ==> Pi A B <= Pi A C";  | 
| 
 
2303f5a3036d
moved some facts about Pi from ex/PiSets to Fun.ML
 
paulson 
parents: 
5852 
diff
changeset
 | 
375  | 
by (auto_tac (claset(),  | 
| 
 
2303f5a3036d
moved some facts about Pi from ex/PiSets to Fun.ML
 
paulson 
parents: 
5852 
diff
changeset
 | 
376  | 
simpset() addsimps [impOfSubs major]));  | 
| 
 
2303f5a3036d
moved some facts about Pi from ex/PiSets to Fun.ML
 
paulson 
parents: 
5852 
diff
changeset
 | 
377  | 
qed "Pi_mono";  |