author | haftmann |
Mon, 05 Jun 2017 21:24:40 +0200 | |
changeset 66023 | 22ef720a92b0 |
parent 62143 | 3c9a0985e6be |
child 66453 | cc19f7ca2ed6 |
permissions | -rw-r--r-- |
60770 | 1 |
section \<open>Extending FOL by a modified version of HOL set theory\<close> |
17456 | 2 |
|
3 |
theory Set |
|
48475 | 4 |
imports "~~/src/FOL/FOL" |
17456 | 5 |
begin |
0 | 6 |
|
39128
93a7365fb4ee
turned eta_contract into proper configuration option;
wenzelm
parents:
38499
diff
changeset
|
7 |
declare [[eta_contract]] |
93a7365fb4ee
turned eta_contract into proper configuration option;
wenzelm
parents:
38499
diff
changeset
|
8 |
|
17456 | 9 |
typedecl 'a set |
55380
4de48353034e
prefer vacuous definitional type classes over axiomatic ones;
wenzelm
parents:
48475
diff
changeset
|
10 |
instance set :: ("term") "term" .. |
0 | 11 |
|
62143 | 12 |
|
13 |
subsection \<open>Set comprehension and membership\<close> |
|
14 |
||
15 |
axiomatization Collect :: "['a \<Rightarrow> o] \<Rightarrow> 'a set" |
|
16 |
and mem :: "['a, 'a set] \<Rightarrow> o" (infixl ":" 50) |
|
17 |
where mem_Collect_iff: "(a : Collect(P)) \<longleftrightarrow> P(a)" |
|
18 |
and set_extension: "A = B \<longleftrightarrow> (ALL x. x:A \<longleftrightarrow> x:B)" |
|
0 | 19 |
|
3935 | 20 |
syntax |
62143 | 21 |
"_Coll" :: "[idt, o] \<Rightarrow> 'a set" ("(1{_./ _})") |
0 | 22 |
translations |
62143 | 23 |
"{x. P}" == "CONST Collect(\<lambda>x. P)" |
20140 | 24 |
|
58977 | 25 |
lemma CollectI: "P(a) \<Longrightarrow> a : {x. P(x)}" |
20140 | 26 |
apply (rule mem_Collect_iff [THEN iffD2]) |
27 |
apply assumption |
|
28 |
done |
|
29 |
||
58977 | 30 |
lemma CollectD: "a : {x. P(x)} \<Longrightarrow> P(a)" |
20140 | 31 |
apply (erule mem_Collect_iff [THEN iffD1]) |
32 |
done |
|
33 |
||
34 |
lemmas CollectE = CollectD [elim_format] |
|
35 |
||
58977 | 36 |
lemma set_ext: "(\<And>x. x:A \<longleftrightarrow> x:B) \<Longrightarrow> A = B" |
20140 |