src/HOL/Hilbert_Choice.thy
 author nipkow Wed Aug 06 13:57:25 2008 +0200 (2008-08-06) changeset 27760 3aa86edac080 parent 26748 4d51ddd6aa5c child 29655 ac31940cfb69 permissions -rw-r--r--
1 (*  Title:      HOL/Hilbert_Choice.thy
2     ID:         \$Id\$
3     Author:     Lawrence C Paulson
4     Copyright   2001  University of Cambridge
5 *)
7 header {* Hilbert's Epsilon-Operator and the Axiom of Choice *}
9 theory Hilbert_Choice
10 imports Nat Wellfounded
11 uses ("Tools/meson.ML") ("Tools/specification_package.ML")
12 begin
14 subsection {* Hilbert's epsilon *}
16 axiomatization
17   Eps :: "('a => bool) => 'a"
18 where
19   someI: "P x ==> P (Eps P)"
21 syntax (epsilon)
22   "_Eps"        :: "[pttrn, bool] => 'a"    ("(3\<some>_./ _)" [0, 10] 10)
23 syntax (HOL)
24   "_Eps"        :: "[pttrn, bool] => 'a"    ("(3@ _./ _)" [0, 10] 10)
25 syntax
26   "_Eps"        :: "[pttrn, bool] => 'a"    ("(3SOME _./ _)" [0, 10] 10)
27 translations
28   "SOME x. P" == "CONST Eps (%x. P)"
30 print_translation {*
31 (* to avoid eta-contraction of body *)
32 [(@{const_syntax Eps}, fn [Abs abs] =>
33      let val (x,t) = atomic_abs_tr' abs
34      in Syntax.const "_Eps" \$ x \$ t end)]
35 *}
37 constdefs
38   inv :: "('a => 'b) => ('b => 'a)"
39   "inv(f :: 'a => 'b) == %y. SOME x. f x = y"
41   Inv :: "'a set => ('a => 'b) => ('b => 'a)"
42   "Inv A f == %x. SOME y. y \<in> A & f y = x"
45 subsection {*Hilbert's Epsilon-operator*}
47 text{*Easier to apply than @{text someI} if the witness comes from an
48 existential formula*}
49 lemma someI_ex [elim?]: "\<exists>x. P x ==> P (SOME x. P x)"
50 apply (erule exE)
51 apply (erule someI)
52 done
54 text{*Easier to apply than @{text someI} because the conclusion has only one
55 occurrence of @{term P}.*}
56 lemma someI2: "[| P a;  !!x. P x ==> Q x |] ==> Q (SOME x. P x)"
57 by (blast intro: someI)
59 text{*Easier to apply than @{text someI2} if the witness comes from an
60 existential formula*}
61 lemma someI2_ex: "[| \<exists>a. P a; !!x. P x ==> Q x |] ==> Q (SOME x. P x)"
62 by (blast intro: someI2)
64 lemma some_equality [intro]:
65      "[| P a;  !!x. P x ==> x=a |] ==> (SOME x. P x) = a"
66 by (blast intro: someI2)
68 lemma some1_equality: "[| EX!x. P x; P a |] ==> (SOME x. P x) = a"
69 by (blast intro: some_equality)
71 lemma some_eq_ex: "P (SOME x. P x) =  (\<exists>x. P x)"
72 by (blast intro: someI)
74 lemma some_eq_trivial [simp]: "(SOME y. y=x) = x"
75 apply (rule some_equality)
76 apply (rule refl, assumption)
77 done
79 lemma some_sym_eq_trivial [simp]: "(SOME y. x=y) = x"
80 apply (rule some_equality)
81 apply (rule refl)
82 apply (erule sym)
83 done
86 subsection{*Axiom of Choice, Proved Using the Description Operator*}
88 text{*Used in @{text "Tools/meson.ML"}*}
89 lemma choice: "\<forall>x. \<exists>y. Q x y ==> \<exists>f. \<forall>x. Q x (f x)"
90 by (fast elim: someI)
92 lemma bchoice: "\<forall>x\<in>S. \<exists>y. Q x y ==> \<exists>f. \<forall>x\<in>S. Q x (f x)"
93 by (fast elim: someI)
96 subsection {*Function Inverse*}
98 lemma inv_id [simp]: "inv id = id"
99 by (simp add: inv_def id_def)
101 text{*A one-to-one function has an inverse.*}
102 lemma inv_f_f [simp]: "inj f ==> inv f (f x) = x"
103 by (simp add: inv_def inj_eq)
105 lemma inv_f_eq: "[| inj f;  f x = y |] ==> inv f y = x"
106 apply (erule subst)
107 apply (erule inv_f_f)
108 done
110 lemma inj_imp_inv_eq: "[| inj f; \<forall>x. f(g x) = x |] ==> inv f = g"
111 by (blast intro: ext inv_f_eq)
113 text{*But is it useful?*}
114 lemma inj_transfer:
115   assumes injf: "inj f" and minor: "!!y. y \<in> range(f) ==> P(inv f y)"
116   shows "P x"
117 proof -
118   have "f x \<in> range f" by auto
119   hence "P(inv f (f x))" by (rule minor)
120   thus "P x" by (simp add: inv_f_f [OF injf])
121 qed
124 lemma inj_iff: "(inj f) = (inv f o f = id)"
125 apply (simp add: o_def expand_fun_eq)
126 apply (blast intro: inj_on_inverseI inv_f_f)
127 done
129 lemma inv_o_cancel[simp]: "inj f ==> inv f o f = id"
130 by (simp add: inj_iff)
132 lemma o_inv_o_cancel[simp]: "inj f ==> g o inv f o f = g"
133 by (simp add: o_assoc[symmetric])
135 lemma inv_image_cancel[simp]:
136   "inj f ==> inv f ` f ` S = S"
137 by (simp add: image_compose[symmetric])
139 lemma inj_imp_surj_inv: "inj f ==> surj (inv f)"
140 by (blast intro: surjI inv_f_f)
142 lemma f_inv_f: "y \<in> range(f) ==> f(inv f y) = y"
143 apply (simp add: inv_def)
144 apply (fast intro: someI)
145 done
147 lemma surj_f_inv_f: "surj f ==> f(inv f y) = y"
148 by (simp add: f_inv_f surj_range)
150 lemma inv_injective:
151   assumes eq: "inv f x = inv f y"
152       and x: "x: range f"
153       and y: "y: range f"
154   shows "x=y"
155 proof -
156   have "f (inv f x) = f (inv f y)" using eq by simp
157   thus ?thesis by (simp add: f_inv_f x y)
158 qed
160 lemma inj_on_inv: "A <= range(f) ==> inj_on (inv f) A"
161 by (fast intro: inj_onI elim: inv_injective injD)
163 lemma surj_imp_inj_inv: "surj f ==> inj (inv f)"
164 by (simp add: inj_on_inv surj_range)
166 lemma surj_iff: "(surj f) = (f o inv f = id)"
167 apply (simp add: o_def expand_fun_eq)
168 apply (blast intro: surjI surj_f_inv_f)
169 done
171 lemma surj_imp_inv_eq: "[| surj f; \<forall>x. g(f x) = x |] ==> inv f = g"
172 apply (rule ext)
173 apply (drule_tac x = "inv f x" in spec)
174 apply (simp add: surj_f_inv_f)
175 done
177 lemma bij_imp_bij_inv: "bij f ==> bij (inv f)"
178 by (simp add: bij_def inj_imp_surj_inv surj_imp_inj_inv)
180 lemma inv_equality: "[| !!x. g (f x) = x;  !!y. f (g y) = y |] ==> inv f = g"
181 apply (rule ext)
182 apply (auto simp add: inv_def)
183 done
185 lemma inv_inv_eq: "bij f ==> inv (inv f) = f"
186 apply (rule inv_equality)
187 apply (auto simp add: bij_def surj_f_inv_f)
188 done
190 (** bij(inv f) implies little about f.  Consider f::bool=>bool such that
191     f(True)=f(False)=True.  Then it's consistent with axiom someI that
192     inv f could be any function at all, including the identity function.
193     If inv f=id then inv f is a bijection, but inj f, surj(f) and
194     inv(inv f)=f all fail.
195 **)
197 lemma o_inv_distrib: "[| bij f; bij g |] ==> inv (f o g) = inv g o inv f"
198 apply (rule inv_equality)
199 apply (auto simp add: bij_def surj_f_inv_f)
200 done
203 lemma image_surj_f_inv_f: "surj f ==> f ` (inv f ` A) = A"
204 by (simp add: image_eq_UN surj_f_inv_f)
206 lemma image_inv_f_f: "inj f ==> (inv f) ` (f ` A) = A"
207 by (simp add: image_eq_UN)
209 lemma inv_image_comp: "inj f ==> inv f ` (f`X) = X"
210 by (auto simp add: image_def)
212 lemma bij_image_Collect_eq: "bij f ==> f ` Collect P = {y. P (inv f y)}"
213 apply auto
214 apply (force simp add: bij_is_inj)
215 apply (blast intro: bij_is_surj [THEN surj_f_inv_f, symmetric])
216 done
218 lemma bij_vimage_eq_inv_image: "bij f ==> f -` A = inv f ` A"
219 apply (auto simp add: bij_is_surj [THEN surj_f_inv_f])
220 apply (blast intro: bij_is_inj [THEN inv_f_f, symmetric])
221 done
224 subsection {*Inverse of a PI-function (restricted domain)*}
226 lemma Inv_f_f: "[| inj_on f A;  x \<in> A |] ==> Inv A f (f x) = x"
227 apply (simp add: Inv_def inj_on_def)
228 apply (blast intro: someI2)
229 done
231 lemma f_Inv_f: "y \<in> f`A  ==> f (Inv A f y) = y"
232 apply (simp add: Inv_def)
233 apply (fast intro: someI2)
234 done
236 lemma Inv_injective:
237   assumes eq: "Inv A f x = Inv A f y"
238       and x: "x: f`A"
239       and y: "y: f`A"
240   shows "x=y"
241 proof -
242   have "f (Inv A f x) = f (Inv A f y)" using eq by simp
243   thus ?thesis by (simp add: f_Inv_f x y)
244 qed
246 lemma inj_on_Inv: "B <= f`A ==> inj_on (Inv A f) B"
247 apply (rule inj_onI)
248 apply (blast intro: inj_onI dest: Inv_injective injD)
249 done
251 lemma Inv_mem: "[| f ` A = B;  x \<in> B |] ==> Inv A f x \<in> A"
252 apply (simp add: Inv_def)
253 apply (fast intro: someI2)
254 done
256 lemma Inv_f_eq: "[| inj_on f A; f x = y; x \<in> A |] ==> Inv A f y = x"
257   apply (erule subst)
258   apply (erule Inv_f_f, assumption)
259   done
261 lemma Inv_comp:
262   "[| inj_on f (g ` A); inj_on g A; x \<in> f ` g ` A |] ==>
263   Inv A (f o g) x = (Inv A g o Inv (g ` A) f) x"
264   apply simp
265   apply (rule Inv_f_eq)
266     apply (fast intro: comp_inj_on)
267    apply (simp add: f_Inv_f Inv_mem)
268   apply (simp add: Inv_mem)
269   done
271 lemma bij_betw_Inv: "bij_betw f A B \<Longrightarrow> bij_betw (Inv A f) B A"
272   apply (auto simp add: bij_betw_def inj_on_Inv Inv_mem)
273   apply (simp add: image_compose [symmetric] o_def)
274   apply (simp add: image_def Inv_f_f)
275   done
277 subsection {*Other Consequences of Hilbert's Epsilon*}
279 text {*Hilbert's Epsilon and the @{term split} Operator*}
281 text{*Looping simprule*}
282 lemma split_paired_Eps: "(SOME x. P x) = (SOME (a,b). P(a,b))"
283   by simp
285 lemma Eps_split: "Eps (split P) = (SOME xy. P (fst xy) (snd xy))"
286   by (simp add: split_def)
288 lemma Eps_split_eq [simp]: "(@(x',y'). x = x' & y = y') = (x,y)"
289   by blast
292 text{*A relation is wellfounded iff it has no infinite descending chain*}
293 lemma wf_iff_no_infinite_down_chain:
294   "wf r = (~(\<exists>f. \<forall>i. (f(Suc i),f i) \<in> r))"
295 apply (simp only: wf_eq_minimal)
296 apply (rule iffI)
297  apply (rule notI)
298  apply (erule exE)
299  apply (erule_tac x = "{w. \<exists>i. w=f i}" in allE, blast)
300 apply (erule contrapos_np, simp, clarify)
301 apply (subgoal_tac "\<forall>n. nat_rec x (%i y. @z. z:Q & (z,y) :r) n \<in> Q")
302  apply (rule_tac x = "nat_rec x (%i y. @z. z:Q & (z,y) :r)" in exI)
303  apply (rule allI, simp)
304  apply (rule someI2_ex, blast, blast)
305 apply (rule allI)
306 apply (induct_tac "n", simp_all)
307 apply (rule someI2_ex, blast+)
308 done
310 lemma wf_no_infinite_down_chainE:
311   assumes "wf r" obtains k where "(f (Suc k), f k) \<notin> r"
312 using `wf r` wf_iff_no_infinite_down_chain[of r] by blast
315 text{*A dynamically-scoped fact for TFL *}
316 lemma tfl_some: "\<forall>P x. P x --> P (Eps P)"
317   by (blast intro: someI)
320 subsection {* Least value operator *}
322 constdefs
323   LeastM :: "['a => 'b::ord, 'a => bool] => 'a"
324   "LeastM m P == SOME x. P x & (\<forall>y. P y --> m x <= m y)"
326 syntax
327   "_LeastM" :: "[pttrn, 'a => 'b::ord, bool] => 'a"    ("LEAST _ WRT _. _" [0, 4, 10] 10)
328 translations
329   "LEAST x WRT m. P" == "LeastM m (%x. P)"
331 lemma LeastMI2:
332   "P x ==> (!!y. P y ==> m x <= m y)
333     ==> (!!x. P x ==> \<forall>y. P y --> m x \<le> m y ==> Q x)
334     ==> Q (LeastM m P)"
335   apply (simp add: LeastM_def)
336   apply (rule someI2_ex, blast, blast)
337   done
339 lemma LeastM_equality:
340   "P k ==> (!!x. P x ==> m k <= m x)
341     ==> m (LEAST x WRT m. P x) = (m k::'a::order)"
342   apply (rule LeastMI2, assumption, blast)
343   apply (blast intro!: order_antisym)
344   done
346 lemma wf_linord_ex_has_least:
347   "wf r ==> \<forall>x y. ((x,y):r^+) = ((y,x)~:r^*) ==> P k
348     ==> \<exists>x. P x & (!y. P y --> (m x,m y):r^*)"
349   apply (drule wf_trancl [THEN wf_eq_minimal [THEN iffD1]])
350   apply (drule_tac x = "m`Collect P" in spec, force)
351   done
353 lemma ex_has_least_nat:
354     "P k ==> \<exists>x. P x & (\<forall>y. P y --> m x <= (m y::nat))"
355   apply (simp only: pred_nat_trancl_eq_le [symmetric])
356   apply (rule wf_pred_nat [THEN wf_linord_ex_has_least])
357    apply (simp add: less_eq linorder_not_le pred_nat_trancl_eq_le, assumption)
358   done
360 lemma LeastM_nat_lemma:
361     "P k ==> P (LeastM m P) & (\<forall>y. P y --> m (LeastM m P) <= (m y::nat))"
362   apply (simp add: LeastM_def)
363   apply (rule someI_ex)
364   apply (erule ex_has_least_nat)
365   done
367 lemmas LeastM_natI = LeastM_nat_lemma [THEN conjunct1, standard]
369 lemma LeastM_nat_le: "P x ==> m (LeastM m P) <= (m x::nat)"
370 by (rule LeastM_nat_lemma [THEN conjunct2, THEN spec, THEN mp], assumption, assumption)
373 subsection {* Greatest value operator *}
375 constdefs
376   GreatestM :: "['a => 'b::ord, 'a => bool] => 'a"
377   "GreatestM m P == SOME x. P x & (\<forall>y. P y --> m y <= m x)"
379   Greatest :: "('a::ord => bool) => 'a"    (binder "GREATEST " 10)
380   "Greatest == GreatestM (%x. x)"
382 syntax
383   "_GreatestM" :: "[pttrn, 'a=>'b::ord, bool] => 'a"
384       ("GREATEST _ WRT _. _" [0, 4, 10] 10)
386 translations
387   "GREATEST x WRT m. P" == "GreatestM m (%x. P)"
389 lemma GreatestMI2:
390   "P x ==> (!!y. P y ==> m y <= m x)
391     ==> (!!x. P x ==> \<forall>y. P y --> m y \<le> m x ==> Q x)
392     ==> Q (GreatestM m P)"
393   apply (simp add: GreatestM_def)
394   apply (rule someI2_ex, blast, blast)
395   done
397 lemma GreatestM_equality:
398  "P k ==> (!!x. P x ==> m x <= m k)
399     ==> m (GREATEST x WRT m. P x) = (m k::'a::order)"
400   apply (rule_tac m = m in GreatestMI2, assumption, blast)
401   apply (blast intro!: order_antisym)
402   done
404 lemma Greatest_equality:
405   "P (k::'a::order) ==> (!!x. P x ==> x <= k) ==> (GREATEST x. P x) = k"
406   apply (simp add: Greatest_def)
407   apply (erule GreatestM_equality, blast)
408   done
410 lemma ex_has_greatest_nat_lemma:
411   "P k ==> \<forall>x. P x --> (\<exists>y. P y & ~ ((m y::nat) <= m x))
412     ==> \<exists>y. P y & ~ (m y < m k + n)"
413   apply (induct n, force)
414   apply (force simp add: le_Suc_eq)
415   done
417 lemma ex_has_greatest_nat:
418   "P k ==> \<forall>y. P y --> m y < b
419     ==> \<exists>x. P x & (\<forall>y. P y --> (m y::nat) <= m x)"
420   apply (rule ccontr)
421   apply (cut_tac P = P and n = "b - m k" in ex_has_greatest_nat_lemma)
422     apply (subgoal_tac  "m k <= b", auto)
423   done
425 lemma GreatestM_nat_lemma:
426   "P k ==> \<forall>y. P y --> m y < b
427     ==> P (GreatestM m P) & (\<forall>y. P y --> (m y::nat) <= m (GreatestM m P))"
428   apply (simp add: GreatestM_def)
429   apply (rule someI_ex)
430   apply (erule ex_has_greatest_nat, assumption)
431   done
433 lemmas GreatestM_natI = GreatestM_nat_lemma [THEN conjunct1, standard]
435 lemma GreatestM_nat_le:
436   "P x ==> \<forall>y. P y --> m y < b
437     ==> (m x::nat) <= m (GreatestM m P)"
438   apply (blast dest: GreatestM_nat_lemma [THEN conjunct2, THEN spec, of P])
439   done
442 text {* \medskip Specialization to @{text GREATEST}. *}
444 lemma GreatestI: "P (k::nat) ==> \<forall>y. P y --> y < b ==> P (GREATEST x. P x)"
445   apply (simp add: Greatest_def)
446   apply (rule GreatestM_natI, auto)
447   done
449 lemma Greatest_le:
450     "P x ==> \<forall>y. P y --> y < b ==> (x::nat) <= (GREATEST x. P x)"
451   apply (simp add: Greatest_def)
452   apply (rule GreatestM_nat_le, auto)
453   done
456 subsection {* The Meson proof procedure *}
458 subsubsection {* Negation Normal Form *}
460 text {* de Morgan laws *}
462 lemma meson_not_conjD: "~(P&Q) ==> ~P | ~Q"
463   and meson_not_disjD: "~(P|Q) ==> ~P & ~Q"
464   and meson_not_notD: "~~P ==> P"
465   and meson_not_allD: "!!P. ~(\<forall>x. P(x)) ==> \<exists>x. ~P(x)"
466   and meson_not_exD: "!!P. ~(\<exists>x. P(x)) ==> \<forall>x. ~P(x)"
467   by fast+
469 text {* Removal of @{text "-->"} and @{text "<->"} (positive and
470 negative occurrences) *}
472 lemma meson_imp_to_disjD: "P-->Q ==> ~P | Q"
473   and meson_not_impD: "~(P-->Q) ==> P & ~Q"
474   and meson_iff_to_disjD: "P=Q ==> (~P | Q) & (~Q | P)"
475   and meson_not_iffD: "~(P=Q) ==> (P | Q) & (~P | ~Q)"
476     -- {* Much more efficient than @{prop "(P & ~Q) | (Q & ~P)"} for computing CNF *}
477   and meson_not_refl_disj_D: "x ~= x | P ==> P"
478   by fast+
481 subsubsection {* Pulling out the existential quantifiers *}
483 text {* Conjunction *}
485 lemma meson_conj_exD1: "!!P Q. (\<exists>x. P(x)) & Q ==> \<exists>x. P(x) & Q"
486   and meson_conj_exD2: "!!P Q. P & (\<exists>x. Q(x)) ==> \<exists>x. P & Q(x)"
487   by fast+
490 text {* Disjunction *}
492 lemma meson_disj_exD: "!!P Q. (\<exists>x. P(x)) | (\<exists>x. Q(x)) ==> \<exists>x. P(x) | Q(x)"
493   -- {* DO NOT USE with forall-Skolemization: makes fewer schematic variables!! *}
494   -- {* With ex-Skolemization, makes fewer Skolem constants *}
495   and meson_disj_exD1: "!!P Q. (\<exists>x. P(x)) | Q ==> \<exists>x. P(x) | Q"
496   and meson_disj_exD2: "!!P Q. P | (\<exists>x. Q(x)) ==> \<exists>x. P | Q(x)"
497   by fast+
500 subsubsection {* Generating clauses for the Meson Proof Procedure *}
502 text {* Disjunctions *}
504 lemma meson_disj_assoc: "(P|Q)|R ==> P|(Q|R)"
505   and meson_disj_comm: "P|Q ==> Q|P"
506   and meson_disj_FalseD1: "False|P ==> P"
507   and meson_disj_FalseD2: "P|False ==> P"
508   by fast+
511 subsection{*Lemmas for Meson, the Model Elimination Procedure*}
513 text{* Generation of contrapositives *}
515 text{*Inserts negated disjunct after removing the negation; P is a literal.
516   Model elimination requires assuming the negation of every attempted subgoal,
517   hence the negated disjuncts.*}
518 lemma make_neg_rule: "~P|Q ==> ((~P==>P) ==> Q)"
519 by blast
521 text{*Version for Plaisted's "Postive refinement" of the Meson procedure*}
522 lemma make_refined_neg_rule: "~P|Q ==> (P ==> Q)"
523 by blast
525 text{*@{term P} should be a literal*}
526 lemma make_pos_rule: "P|Q ==> ((P==>~P) ==> Q)"
527 by blast
529 text{*Versions of @{text make_neg_rule} and @{text make_pos_rule} that don't
530 insert new assumptions, for ordinary resolution.*}
532 lemmas make_neg_rule' = make_refined_neg_rule
534 lemma make_pos_rule': "[|P|Q; ~P|] ==> Q"
535 by blast
537 text{* Generation of a goal clause -- put away the final literal *}
539 lemma make_neg_goal: "~P ==> ((~P==>P) ==> False)"
540 by blast
542 lemma make_pos_goal: "P ==> ((P==>~P) ==> False)"
543 by blast
546 subsubsection{* Lemmas for Forward Proof*}
548 text{*There is a similarity to congruence rules*}
550 (*NOTE: could handle conjunctions (faster?) by
551     nf(th RS conjunct2) RS (nf(th RS conjunct1) RS conjI) *)
552 lemma conj_forward: "[| P'&Q';  P' ==> P;  Q' ==> Q |] ==> P&Q"
553 by blast
555 lemma disj_forward: "[| P'|Q';  P' ==> P;  Q' ==> Q |] ==> P|Q"
556 by blast
558 (*Version of @{text disj_forward} for removal of duplicate literals*)
559 lemma disj_forward2:
560     "[| P'|Q';  P' ==> P;  [| Q'; P==>False |] ==> Q |] ==> P|Q"
561 apply blast
562 done
564 lemma all_forward: "[| \<forall>x. P'(x);  !!x. P'(x) ==> P(x) |] ==> \<forall>x. P(x)"
565 by blast
567 lemma ex_forward: "[| \<exists>x. P'(x);  !!x. P'(x) ==> P(x) |] ==> \<exists>x. P(x)"
568 by blast
571 text{*Many of these bindings are used by the ATP linkup, and not just by
572 legacy proof scripts.*}
573 ML
574 {*
575 val inv_def = thm "inv_def";
576 val Inv_def = thm "Inv_def";
578 val someI = thm "someI";
579 val someI_ex = thm "someI_ex";
580 val someI2 = thm "someI2";
581 val someI2_ex = thm "someI2_ex";
582 val some_equality = thm "some_equality";
583 val some1_equality = thm "some1_equality";
584 val some_eq_ex = thm "some_eq_ex";
585 val some_eq_trivial = thm "some_eq_trivial";
586 val some_sym_eq_trivial = thm "some_sym_eq_trivial";
587 val choice = thm "choice";
588 val bchoice = thm "bchoice";
589 val inv_id = thm "inv_id";
590 val inv_f_f = thm "inv_f_f";
591 val inv_f_eq = thm "inv_f_eq";
592 val inj_imp_inv_eq = thm "inj_imp_inv_eq";
593 val inj_transfer = thm "inj_transfer";
594 val inj_iff = thm "inj_iff";
595 val inj_imp_surj_inv = thm "inj_imp_surj_inv";
596 val f_inv_f = thm "f_inv_f";
597 val surj_f_inv_f = thm "surj_f_inv_f";
598 val inv_injective = thm "inv_injective";
599 val inj_on_inv = thm "inj_on_inv";
600 val surj_imp_inj_inv = thm "surj_imp_inj_inv";
601 val surj_iff = thm "surj_iff";
602 val surj_imp_inv_eq = thm "surj_imp_inv_eq";
603 val bij_imp_bij_inv = thm "bij_imp_bij_inv";
604 val inv_equality = thm "inv_equality";
605 val inv_inv_eq = thm "inv_inv_eq";
606 val o_inv_distrib = thm "o_inv_distrib";
607 val image_surj_f_inv_f = thm "image_surj_f_inv_f";
608 val image_inv_f_f = thm "image_inv_f_f";
609 val inv_image_comp = thm "inv_image_comp";
610 val bij_image_Collect_eq = thm "bij_image_Collect_eq";
611 val bij_vimage_eq_inv_image = thm "bij_vimage_eq_inv_image";
612 val Inv_f_f = thm "Inv_f_f";
613 val f_Inv_f = thm "f_Inv_f";
614 val Inv_injective = thm "Inv_injective";
615 val inj_on_Inv = thm "inj_on_Inv";
616 val split_paired_Eps = thm "split_paired_Eps";
617 val Eps_split = thm "Eps_split";
618 val Eps_split_eq = thm "Eps_split_eq";
619 val wf_iff_no_infinite_down_chain = thm "wf_iff_no_infinite_down_chain";
620 val Inv_mem = thm "Inv_mem";
621 val Inv_f_eq = thm "Inv_f_eq";
622 val Inv_comp = thm "Inv_comp";
623 val tfl_some = thm "tfl_some";
624 val make_neg_rule = thm "make_neg_rule";
625 val make_refined_neg_rule = thm "make_refined_neg_rule";
626 val make_pos_rule = thm "make_pos_rule";
627 val make_neg_rule' = thm "make_neg_rule'";
628 val make_pos_rule' = thm "make_pos_rule'";
629 val make_neg_goal = thm "make_neg_goal";
630 val make_pos_goal = thm "make_pos_goal";
631 val conj_forward = thm "conj_forward";
632 val disj_forward = thm "disj_forward";
633 val disj_forward2 = thm "disj_forward2";
634 val all_forward = thm "all_forward";
635 val ex_forward = thm "ex_forward";
636 *}
639 subsection {* Meson package *}
641 use "Tools/meson.ML"
643 setup Meson.setup
646 subsection {* Specification package -- Hilbertized version *}
648 lemma exE_some: "[| Ex P ; c == Eps P |] ==> P c"
649   by (simp only: someI_ex)
651 use "Tools/specification_package.ML"
653 end