author | berghofe |
Fri, 11 Jul 2003 14:55:17 +0200 | |
changeset 14102 | 8af7334af4b3 |
parent 5143 | b94cd208f073 |
child 17456 | bcf7544875b2 |
permissions | -rw-r--r-- |
1459 | 1 |
(* Title: set/set |
0 | 2 |
ID: $Id$ |
3 |
||
4 |
For set.thy. |
|
5 |
||
6 |
Modified version of |
|
1459 | 7 |
Title: HOL/set |
8 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
|
0 | 9 |
Copyright 1991 University of Cambridge |
10 |
||
11 |
For set.thy. Set theory for higher-order logic. A set is simply a predicate. |
|
12 |
*) |
|
13 |
||
14 |
open Set; |
|
15 |
||
3837 | 16 |
val [prem] = goal Set.thy "[| P(a) |] ==> a : {x. P(x)}"; |
0 | 17 |
by (rtac (mem_Collect_iff RS iffD2) 1); |
18 |
by (rtac prem 1); |
|
757 | 19 |
qed "CollectI"; |
0 | 20 |
|
3837 | 21 |
val prems = goal Set.thy "[| a : {x. P(x)} |] ==> P(a)"; |
0 | 22 |
by (resolve_tac (prems RL [mem_Collect_iff RS iffD1]) 1); |
757 | 23 |
qed "CollectD"; |
0 | 24 |
|
8
c3d2c6dcf3f0
Installation of new simplfier. Previously appeared to set up the old
lcp
parents:
0
diff
changeset
|
25 |
val CollectE = make_elim CollectD; |
c3d2c6dcf3f0
Installation of new simplfier. Previously appeared to set up the old
lcp
parents:
0
diff
changeset
|
26 |
|
0 | 27 |
val [prem] = goal Set.thy "[| !!x. x:A <-> x:B |] ==> A = B"; |
28 |
by (rtac (set_extension RS iffD2) 1); |
|
29 |
by (rtac (prem RS allI) 1); |
|
757 | 30 |
qed "set_ext"; |
0 | 31 |
|
32 |
(*** Bounded quantifiers ***) |
|
33 |
||
34 |
val prems = goalw Set.thy [Ball_def] |
|
35 |
"[| !!x. x:A ==> P(x) |] ==> ALL x:A. P(x)"; |
|
36 |
by (REPEAT (ares_tac (prems @ [allI,impI]) 1)); |
|
757 | 37 |
qed "ballI"; |
0 | 38 |
|
39 |
val [major,minor] = goalw Set.thy [Ball_def] |
|
40 |
"[| ALL x:A. P(x); x:A |] ==> P(x)"; |
|