author | paulson |
Fri, 26 Jul 1996 12:31:04 +0200 | |
changeset 1891 | 618f48bd4532 |
parent 1608 | e15e8c0c1e37 |
child 2037 | 2c2a95cbb5c9 |
permissions | -rw-r--r-- |
1459 | 1 |
(* Title: FOL/IFOL.ML |
0 | 2 |
ID: $Id$ |
1459 | 3 |
Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
0 | 4 |
Copyright 1992 University of Cambridge |
5 |
||
1280 | 6 |
Tactics and lemmas for IFOL.thy (intuitionistic first-order logic) |
0 | 7 |
*) |
8 |
||
9 |
open IFOL; |
|
10 |
||
11 |
||
779 | 12 |
qed_goalw "TrueI" IFOL.thy [True_def] "True" |
0 | 13 |
(fn _ => [ (REPEAT (ares_tac [impI] 1)) ]); |
14 |
||
15 |
(*** Sequent-style elimination rules for & --> and ALL ***) |
|
16 |
||
779 | 17 |
qed_goal "conjE" IFOL.thy |
0 | 18 |
"[| P&Q; [| P; Q |] ==> R |] ==> R" |
19 |
(fn prems=> |
|
20 |
[ (REPEAT (resolve_tac prems 1 |
|
21 |
ORELSE (resolve_tac [conjunct1, conjunct2] 1 THEN |
|
22 |
resolve_tac prems 1))) ]); |
|
23 |
||
779 | 24 |
qed_goal "impE" IFOL.thy |
0 | 25 |
"[| P-->Q; P; Q ==> R |] ==> R" |
26 |
(fn prems=> [ (REPEAT (resolve_tac (prems@[mp]) 1)) ]); |
|
27 |
||
779 | 28 |
qed_goal "allE" IFOL.thy |
0 | 29 |
"[| ALL x.P(x); P(x) ==> R |] ==> R" |
30 |
(fn prems=> [ (REPEAT (resolve_tac (prems@[spec]) 1)) ]); |
|
31 |
||
32 |
(*Duplicates the quantifier; for use with eresolve_tac*) |
|
779 | 33 |
qed_goal "all_dupE" IFOL.thy |
0 | 34 |
"[| ALL x.P(x); [| P(x); ALL x.P(x) |] ==> R \ |
35 |
\ |] ==> R" |
|
36 |
(fn prems=> [ (REPEAT (resolve_tac (prems@[spec]) 1)) ]); |
|
37 |
||
38 |
||
39 |
(*** Negation rules, which translate between ~P and P-->False ***) |
|
40 |
||
779 | 41 |
qed_goalw "notI" IFOL.thy [not_def] "(P ==> False) ==> ~P" |
0 | 42 |
(fn prems=> [ (REPEAT (ares_tac (prems@[impI]) 1)) ]); |
43 |
||
779 | 44 |
qed_goalw "notE" IFOL.thy [not_def] "[| ~P; P |] ==> R" |
0 | 45 |
(fn prems=> |
46 |
[ (resolve_tac [mp RS FalseE] 1), |
|
47 |
(REPEAT (resolve_tac prems 1)) ]); |
|
48 |
||
1891 | 49 |
qed_goal "rev_notE" IFOL.thy "!!P R. [| P; ~P |] ==> R" |
50 |
(fn _ => [REPEAT (ares_tac [notE] 1)]); |
|
51 |
||
0 | 52 |
(*This is useful with the special implication rules for each kind of P. *) |
779 | 53 |
qed_goal "not_to_imp" IFOL.thy |
0 | 54 |
"[| ~P; (P-->False) ==> Q |] ==> Q" |
55 |
(fn prems=> [ (REPEAT (ares_tac (prems@[impI,notE]) 1)) ]); |
|
56 |
||
1002 | 57 |
(* For substitution into an assumption P, reduce Q to P-->Q, substitute into |
0 | 58 |
this implication, then apply impI to move P back into the assumptions. |
59 |
To specify P use something like |
|
60 |
eres_inst_tac [ ("P","ALL y. ?S(x,y)") ] rev_mp 1 *) |
|
779 | 61 |
qed_goal "rev_mp" IFOL.thy "[| P; P --> Q |] ==> Q" |
0 | 62 |
(fn prems=> [ (REPEAT (resolve_tac (prems@[mp]) 1)) ]); |
63 |
||
64 |
||
65 |
(*Contrapositive of an inference rule*) |
|
779 | 66 |
qed_goal "contrapos" IFOL.thy "[| ~Q; P==>Q |] ==> ~P" |
0 | 67 |
(fn [major,minor]=> |
68 |
[ (rtac (major RS notE RS notI) 1), |
|
69 |
(etac minor 1) ]); |
|
70 |
||
71 |
||
72 |
(*** Modus Ponens Tactics ***) |
|
73 |
||
74 |
(*Finds P-->Q and P in the assumptions, replaces implication by Q *) |
|
75 |
fun mp_tac i = eresolve_tac [notE,impE] i THEN assume_tac i; |
|
76 |
||
77 |
(*Like mp_tac but instantiates no variables*) |
|
78 |
fun eq_mp_tac i = eresolve_tac [notE,impE] i THEN eq_assume_tac i; |
|
79 |
||
80 |
||
81 |
(*** If-and-only-if ***) |
|
82 |
||
779 | 83 |
qed_goalw "iffI" IFOL.thy [iff_def] |
0 | 84 |
"[| P ==> Q; Q ==> P |] ==> P<->Q" |
85 |
(fn prems=> [ (REPEAT (ares_tac (prems@[conjI, impI]) 1)) ]); |
|
86 |
||
87 |
||
88 |
(*Observe use of rewrite_rule to unfold "<->" in meta-assumptions (prems) *) |
|
779 | 89 |
qed_goalw "iffE" IFOL.thy [iff_def] |
0 | 90 |
"[| P <-> Q; [| P-->Q; Q-->P |] ==> R |] ==> R" |
1459 | 91 |
(fn prems => [ (rtac conjE 1), (REPEAT (ares_tac prems 1)) ]); |
0 | 92 |
|
93 |
(* Destruct rules for <-> similar to Modus Ponens *) |
|
94 |
||
779 | 95 |
qed_goalw "iffD1" IFOL.thy [iff_def] "[| P <-> Q; P |] ==> Q" |
0 | 96 |
(fn prems => [ (rtac (conjunct1 RS mp) 1), (REPEAT (ares_tac prems 1)) ]); |
97 |
||
779 | 98 |
qed_goalw "iffD2" IFOL.thy [iff_def] "[| P <-> Q; Q |] ==> P" |
0 | 99 |
(fn prems => [ (rtac (conjunct2 RS mp) 1), (REPEAT (ares_tac prems 1)) ]); |
100 |
||
779 | 101 |
qed_goal "iff_refl" IFOL.thy "P <-> P" |
0 | 102 |
(fn _ => [ (REPEAT (ares_tac [iffI] 1)) ]); |
103 |
||
779 | 104 |
qed_goal "iff_sym" IFOL.thy "Q <-> P ==> P <-> Q" |
0 | 105 |
(fn [major] => |
106 |
[ (rtac (major RS iffE) 1), |
|
107 |
(rtac iffI 1), |
|
108 |
(REPEAT (eresolve_tac [asm_rl,mp] 1)) ]); |
|
109 |
||
779 | 110 |
qed_goal "iff_trans" IFOL.thy |
0 | 111 |
"!!P Q R. [| P <-> Q; Q<-> R |] ==> P <-> R" |
112 |
(fn _ => |
|
113 |
[ (rtac iffI 1), |
|
114 |
(REPEAT (eresolve_tac [asm_rl,iffE] 1 ORELSE mp_tac 1)) ]); |
|
115 |
||
116 |
||
117 |
(*** Unique existence. NOTE THAT the following 2 quantifications |
|
118 |
EX!x such that [EX!y such that P(x,y)] (sequential) |
|
119 |
EX!x,y such that P(x,y) (simultaneous) |
|
120 |
do NOT mean the same thing. The parser treats EX!x y.P(x,y) as sequential. |
|
121 |
***) |
|
122 |
||
779 | 123 |
qed_goalw "ex1I" IFOL.thy [ex1_def] |
0 | 124 |
"[| P(a); !!x. P(x) ==> x=a |] ==> EX! x. P(x)" |
125 |
(fn prems => [ (REPEAT (ares_tac (prems@[exI,conjI,allI,impI]) 1)) ]); |
|
126 |
||
12
f17d542276b6
Added ex_ex1I: new introduction rule for the EX! quantifier.
lcp
parents:
0
diff
changeset
|
127 |
(*Sometimes easier to use: the premises have no shared variables*) |
779 | 128 |
qed_goal "ex_ex1I" IFOL.thy |
12
f17d542276b6
Added ex_ex1I: new introduction rule for the EX! quantifier.
lcp
parents:
0
diff
changeset
|
129 |
"[| EX x.P(x); !!x y. [| P(x); P(y) |] ==> x=y |] ==> EX! x. P(x)" |
f17d542276b6
Added ex_ex1I: new introduction rule for the EX! quantifier.
lcp
parents:
0
diff
changeset
|
130 |
(fn [ex,eq] => [ (rtac (ex RS exE) 1), |
1459 | 131 |
(REPEAT (ares_tac [ex1I,eq] 1)) ]); |
12
f17d542276b6
Added ex_ex1I: new introduction rule for the EX! quantifier.
lcp
parents:
0
diff
changeset
|
132 |
|
779 | 133 |
qed_goalw "ex1E" IFOL.thy [ex1_def] |
0 | 134 |
"[| EX! x.P(x); !!x. [| P(x); ALL y. P(y) --> y=x |] ==> R |] ==> R" |
135 |
(fn prems => |
|
136 |
[ (cut_facts_tac prems 1), |
|
137 |
(REPEAT (eresolve_tac [exE,conjE] 1 ORELSE ares_tac prems 1)) ]); |
|
138 |
||
139 |
||
140 |
(*** <-> congruence rules for simplification ***) |
|
141 |
||
142 |
(*Use iffE on a premise. For conj_cong, imp_cong, all_cong, ex_cong*) |
|
143 |
fun iff_tac prems i = |
|
144 |
resolve_tac (prems RL [iffE]) i THEN |
|
145 |
REPEAT1 (eresolve_tac [asm_rl,mp] i); |
|
146 |
||
779 | 147 |
qed_goal "conj_cong" IFOL.thy |
0 | 148 |
"[| P <-> P'; P' ==> Q <-> Q' |] ==> (P&Q) <-> (P'&Q')" |
149 |
(fn prems => |
|
150 |
[ (cut_facts_tac prems 1), |
|
151 |
(REPEAT (ares_tac [iffI,conjI] 1 |
|
152 |
ORELSE eresolve_tac [iffE,conjE,mp] 1 |
|
153 |
ORELSE iff_tac prems 1)) ]); |
|
154 |
||
793 | 155 |
(*Reversed congruence rule! Used in ZF/Order*) |
156 |
qed_goal "conj_cong2" IFOL.thy |
|
157 |
"[| P <-> P'; P' ==> Q <-> Q' |] ==> (Q&P) <-> (Q'&P')" |
|
158 |
(fn prems => |
|
159 |
[ (cut_facts_tac prems 1), |
|
160 |
(REPEAT (ares_tac [iffI,conjI] 1 |
|
161 |
ORELSE eresolve_tac [iffE,conjE,mp] 1 |
|
162 |
ORELSE iff_tac prems 1)) ]); |
|
163 |
||
779 | 164 |
qed_goal "disj_cong" IFOL.thy |
0 | 165 |
"[| P <-> P'; Q <-> Q' |] ==> (P|Q) <-> (P'|Q')" |
166 |
(fn prems => |
|
167 |
[ (cut_facts_tac prems 1), |
|
168 |
(REPEAT (eresolve_tac [iffE,disjE,disjI1,disjI2] 1 |
|
169 |
ORELSE ares_tac [iffI] 1 |
|
170 |
ORELSE mp_tac 1)) ]); |
|
171 |
||
779 | 172 |
qed_goal "imp_cong" IFOL.thy |
0 | 173 |
"[| P <-> P'; P' ==> Q <-> Q' |] ==> (P-->Q) <-> (P'-->Q')" |
174 |
(fn prems => |
|
175 |
[ (cut_facts_tac prems 1), |
|
176 |
(REPEAT (ares_tac [iffI,impI] 1 |
|
1459 | 177 |
ORELSE etac iffE 1 |
0 | 178 |
ORELSE mp_tac 1 ORELSE iff_tac prems 1)) ]); |
179 |
||
779 | 180 |
qed_goal "iff_cong" IFOL.thy |
0 | 181 |
"[| P <-> P'; Q <-> Q' |] ==> (P<->Q) <-> (P'<->Q')" |
182 |
(fn prems => |
|
183 |
[ (cut_facts_tac prems 1), |
|
1459 | 184 |
(REPEAT (etac iffE 1 |
0 | 185 |
ORELSE ares_tac [iffI] 1 |
186 |
ORELSE mp_tac 1)) ]); |
|
187 |
||
779 | 188 |
qed_goal "not_cong" IFOL.thy |
0 | 189 |
"P <-> P' ==> ~P <-> ~P'" |
190 |
(fn prems => |
|
191 |
[ (cut_facts_tac prems 1), |
|
192 |
(REPEAT (ares_tac [iffI,notI] 1 |
|
193 |
ORELSE mp_tac 1 |
|
194 |
ORELSE eresolve_tac [iffE,notE] 1)) ]); |
|
195 |
||
779 | 196 |
qed_goal "all_cong" IFOL.thy |
0 | 197 |
"(!!x.P(x) <-> Q(x)) ==> (ALL x.P(x)) <-> (ALL x.Q(x))" |
198 |
(fn prems => |
|
199 |
[ (REPEAT (ares_tac [iffI,allI] 1 |
|
200 |
ORELSE mp_tac 1 |
|
1459 | 201 |
ORELSE etac allE 1 ORELSE iff_tac prems 1)) ]); |
0 | 202 |
|
779 | 203 |
qed_goal "ex_cong" IFOL.thy |
0 | 204 |
"(!!x.P(x) <-> Q(x)) ==> (EX x.P(x)) <-> (EX x.Q(x))" |
205 |
(fn prems => |
|
1459 | 206 |
[ (REPEAT (etac exE 1 ORELSE ares_tac [iffI,exI] 1 |
0 | 207 |
ORELSE mp_tac 1 |
208 |
ORELSE iff_tac prems 1)) ]); |
|
209 |
||
779 | 210 |
qed_goal "ex1_cong" IFOL.thy |
0 | 211 |
"(!!x.P(x) <-> Q(x)) ==> (EX! x.P(x)) <-> (EX! x.Q(x))" |
212 |
(fn prems => |
|
213 |
[ (REPEAT (eresolve_tac [ex1E, spec RS mp] 1 ORELSE ares_tac [iffI,ex1I] 1 |
|
214 |
ORELSE mp_tac 1 |
|
215 |
ORELSE iff_tac prems 1)) ]); |
|
216 |
||
217 |
(*** Equality rules ***) |
|
218 |
||
779 | 219 |
qed_goal "sym" IFOL.thy "a=b ==> b=a" |
0 | 220 |
(fn [major] => [ (rtac (major RS subst) 1), (rtac refl 1) ]); |
221 |
||
779 | 222 |
qed_goal "trans" IFOL.thy "[| a=b; b=c |] ==> a=c" |
0 | 223 |
(fn [prem1,prem2] => [ (rtac (prem2 RS subst) 1), (rtac prem1 1) ]); |
224 |
||
225 |
(** ~ b=a ==> ~ a=b **) |
|
226 |
val [not_sym] = compose(sym,2,contrapos); |
|
227 |
||
228 |
(*calling "standard" reduces maxidx to 0*) |
|
779 | 229 |
bind_thm ("ssubst", (sym RS subst)); |
0 | 230 |
|
231 |
(*A special case of ex1E that would otherwise need quantifier expansion*) |
|
779 | 232 |
qed_goal "ex1_equalsE" IFOL.thy |
0 | 233 |
"[| EX! x.P(x); P(a); P(b) |] ==> a=b" |
234 |
(fn prems => |
|
235 |
[ (cut_facts_tac prems 1), |
|
236 |
(etac ex1E 1), |
|
237 |
(rtac trans 1), |
|
238 |
(rtac sym 2), |
|
239 |
(REPEAT (eresolve_tac [asm_rl, spec RS mp] 1)) ]); |
|
240 |
||
241 |
(** Polymorphic congruence rules **) |
|
242 |
||
779 | 243 |
qed_goal "subst_context" IFOL.thy |
0 | 244 |
"[| a=b |] ==> t(a)=t(b)" |
245 |
(fn prems=> |
|
246 |
[ (resolve_tac (prems RL [ssubst]) 1), |
|
1459 | 247 |
(rtac refl 1) ]); |
0 | 248 |
|
779 | 249 |
qed_goal "subst_context2" IFOL.thy |
0 | 250 |
"[| a=b; c=d |] ==> t(a,c)=t(b,d)" |
251 |
(fn prems=> |
|
252 |
[ (EVERY1 (map rtac ((prems RL [ssubst]) @ [refl]))) ]); |
|
253 |
||
779 | 254 |
qed_goal "subst_context3" IFOL.thy |
0 | 255 |
"[| a=b; c=d; e=f |] ==> t(a,c,e)=t(b,d,f)" |
256 |
(fn prems=> |
|
257 |
[ (EVERY1 (map rtac ((prems RL [ssubst]) @ [refl]))) ]); |
|
258 |
||
259 |
(*Useful with eresolve_tac for proving equalties from known equalities. |
|
1459 | 260 |
a = b |
261 |
| | |
|
262 |
c = d *) |
|
779 | 263 |
qed_goal "box_equals" IFOL.thy |
0 | 264 |
"[| a=b; a=c; b=d |] ==> c=d" |
265 |
(fn prems=> |
|
1459 | 266 |
[ (rtac trans 1), |
267 |
(rtac trans 1), |
|
268 |
(rtac sym 1), |
|
0 | 269 |
(REPEAT (resolve_tac prems 1)) ]); |
270 |
||
271 |
(*Dual of box_equals: for proving equalities backwards*) |
|
779 | 272 |
qed_goal "simp_equals" IFOL.thy |
0 | 273 |
"[| a=c; b=d; c=d |] ==> a=b" |
274 |
(fn prems=> |
|
1459 | 275 |
[ (rtac trans 1), |
276 |
(rtac trans 1), |
|
0 | 277 |
(REPEAT (resolve_tac (prems @ (prems RL [sym])) 1)) ]); |
278 |
||
279 |
(** Congruence rules for predicate letters **) |
|
280 |
||
779 | 281 |
qed_goal "pred1_cong" IFOL.thy |
0 | 282 |
"a=a' ==> P(a) <-> P(a')" |
283 |
(fn prems => |
|
284 |
[ (cut_facts_tac prems 1), |
|
285 |
(rtac iffI 1), |
|
286 |
(DEPTH_SOLVE (eresolve_tac [asm_rl, subst, ssubst] 1)) ]); |
|
287 |
||
779 | 288 |
qed_goal "pred2_cong" IFOL.thy |
0 | 289 |
"[| a=a'; b=b' |] ==> P(a,b) <-> P(a',b')" |
290 |
(fn prems => |
|
291 |
[ (cut_facts_tac prems 1), |
|
292 |
(rtac iffI 1), |
|
293 |
(DEPTH_SOLVE (eresolve_tac [asm_rl, subst, ssubst] 1)) ]); |
|
294 |
||
779 | 295 |
qed_goal "pred3_cong" IFOL.thy |
0 | 296 |
"[| a=a'; b=b'; c=c' |] ==> P(a,b,c) <-> P(a',b',c')" |
297 |
(fn prems => |
|
298 |
[ (cut_facts_tac prems 1), |
|
299 |
(rtac iffI 1), |
|
300 |
(DEPTH_SOLVE (eresolve_tac [asm_rl, subst, ssubst] 1)) ]); |
|
301 |
||
302 |
(*special cases for free variables P, Q, R, S -- up to 3 arguments*) |
|
303 |
||
304 |
val pred_congs = |
|
305 |
flat (map (fn c => |
|
1459 | 306 |
map (fn th => read_instantiate [("P",c)] th) |
307 |
[pred1_cong,pred2_cong,pred3_cong]) |
|
308 |
(explode"PQRS")); |
|
0 | 309 |
|
310 |
(*special case for the equality predicate!*) |
|
311 |
val eq_cong = read_instantiate [("P","op =")] pred2_cong; |
|
312 |
||
313 |
||
314 |
(*** Simplifications of assumed implications. |
|
315 |
Roy Dyckhoff has proved that conj_impE, disj_impE, and imp_impE |
|
316 |
used with mp_tac (restricted to atomic formulae) is COMPLETE for |
|
317 |
intuitionistic propositional logic. See |
|
318 |
R. Dyckhoff, Contraction-free sequent calculi for intuitionistic logic |
|
319 |
(preprint, University of St Andrews, 1991) ***) |
|
320 |
||
779 | 321 |
qed_goal "conj_impE" IFOL.thy |
0 | 322 |
"[| (P&Q)-->S; P-->(Q-->S) ==> R |] ==> R" |
323 |
(fn major::prems=> |
|
324 |
[ (REPEAT (ares_tac ([conjI, impI, major RS mp]@prems) 1)) ]); |
|
325 |
||
779 | 326 |
qed_goal "disj_impE" IFOL.thy |
0 | 327 |
"[| (P|Q)-->S; [| P-->S; Q-->S |] ==> R |] ==> R" |
328 |
(fn major::prems=> |
|
329 |
[ (DEPTH_SOLVE (ares_tac ([disjI1, disjI2, impI, major RS mp]@prems) 1)) ]); |
|
330 |
||
331 |
(*Simplifies the implication. Classical version is stronger. |
|
332 |
Still UNSAFE since Q must be provable -- backtracking needed. *) |
|
779 | 333 |
qed_goal "imp_impE" IFOL.thy |
0 | 334 |
"[| (P-->Q)-->S; [| P; Q-->S |] ==> Q; S ==> R |] ==> R" |
335 |
(fn major::prems=> |
|
336 |
[ (REPEAT (ares_tac ([impI, major RS mp]@prems) 1)) ]); |
|
337 |
||
338 |
(*Simplifies the implication. Classical version is stronger. |
|
339 |
Still UNSAFE since ~P must be provable -- backtracking needed. *) |
|
779 | 340 |
qed_goal "not_impE" IFOL.thy |
0 | 341 |
"[| ~P --> S; P ==> False; S ==> R |] ==> R" |
342 |
(fn major::prems=> |
|
343 |
[ (REPEAT (ares_tac ([notI, impI, major RS mp]@prems) 1)) ]); |
|
344 |
||
345 |
(*Simplifies the implication. UNSAFE. *) |
|
779 | 346 |
qed_goal "iff_impE" IFOL.thy |
0 | 347 |
"[| (P<->Q)-->S; [| P; Q-->S |] ==> Q; [| Q; P-->S |] ==> P; \ |
348 |
\ S ==> R |] ==> R" |
|
349 |
(fn major::prems=> |
|
350 |
[ (REPEAT (ares_tac ([iffI, impI, major RS mp]@prems) 1)) ]); |
|
351 |
||
352 |
(*What if (ALL x.~~P(x)) --> ~~(ALL x.P(x)) is an assumption? UNSAFE*) |
|
779 | 353 |
qed_goal "all_impE" IFOL.thy |
0 | 354 |
"[| (ALL x.P(x))-->S; !!x.P(x); S ==> R |] ==> R" |
355 |
(fn major::prems=> |
|
356 |
[ (REPEAT (ares_tac ([allI, impI, major RS mp]@prems) 1)) ]); |
|
357 |
||
358 |
(*Unsafe: (EX x.P(x))-->S is equivalent to ALL x.P(x)-->S. *) |
|
779 | 359 |
qed_goal "ex_impE" IFOL.thy |
0 | 360 |
"[| (EX x.P(x))-->S; P(x)-->S ==> R |] ==> R" |
361 |
(fn major::prems=> |
|
362 |
[ (REPEAT (ares_tac ([exI, impI, major RS mp]@prems) 1)) ]); |
|
821 | 363 |
|
1608 | 364 |
(*** Courtesy of Krzysztof Grabczewski ***) |
365 |
||
821 | 366 |
val major::prems = goal IFOL.thy "[| P|Q; P==>R; Q==>S |] ==> R|S"; |
1459 | 367 |
by (rtac (major RS disjE) 1); |
821 | 368 |
by (REPEAT (eresolve_tac (prems RL [disjI1, disjI2]) 1)); |
369 |
qed "disj_imp_disj"; |
|
1608 | 370 |
|
371 |
(* The following two theorms are useful when rewriting only one instance *) |
|
372 |
(* of a definition *) |
|
373 |
(* first one for definitions of formulae and the second for terms *) |
|
374 |
||
375 |
val prems = goal IFOL.thy "(A == B) ==> A <-> B"; |
|
376 |
by (rewrite_goals_tac prems); |
|
377 |
by (rtac iff_refl 1); |
|
378 |
qed "def_imp_iff"; |
|
379 |
||
380 |
val prems = goal IFOL.thy "(A == B) ==> A = B"; |
|
381 |
by (rewrite_goals_tac prems); |
|
382 |
by (rtac refl 1); |
|
383 |
qed "def_imp_eq"; |
|
384 |