equal
deleted
inserted
replaced
198 qed "rev_mp"; |
198 qed "rev_mp"; |
199 |
199 |
200 val [major,minor] = Goal "[| ~Q; P==>Q |] ==> ~P"; |
200 val [major,minor] = Goal "[| ~Q; P==>Q |] ==> ~P"; |
201 by (rtac (major RS notE RS notI) 1); |
201 by (rtac (major RS notE RS notI) 1); |
202 by (etac minor 1) ; |
202 by (etac minor 1) ; |
203 qed "contrapos"; |
203 qed "contrapos_nn"; |
204 |
204 |
|
205 Goal "t ~= s ==> s ~= t"; |
|
206 by (etac contrapos_nn 1); |
|
207 by (etac sym 1); |
|
208 qed "not_sym"; |
|
209 |
|
210 (*still used in HOLCF*) |
205 val [major,minor] = Goal "[| P==>Q; ~Q |] ==> ~P"; |
211 val [major,minor] = Goal "[| P==>Q; ~Q |] ==> ~P"; |
206 by (rtac (minor RS contrapos) 1); |
212 by (rtac (minor RS contrapos_nn) 1); |
207 by (etac major 1) ; |
213 by (etac major 1) ; |
208 qed "rev_contrapos"; |
214 qed "rev_contrapos"; |
209 |
|
210 (* t ~= s ==> s ~= t *) |
|
211 bind_thm("not_sym", sym COMP rev_contrapos); |
|
212 |
|
213 |
215 |
214 section "Existential quantifier"; |
216 section "Existential quantifier"; |
215 |
217 |
216 Goalw [Ex_def] "P x ==> EX x::'a. P x"; |
218 Goalw [Ex_def] "P x ==> EX x::'a. P x"; |
217 by (etac someI 1) ; |
219 by (etac someI 1) ; |
305 val [p1,p2] = Goal "[| Q; ~ P ==> ~ Q |] ==> P"; |
307 val [p1,p2] = Goal "[| Q; ~ P ==> ~ Q |] ==> P"; |
306 by (rtac classical 1); |
308 by (rtac classical 1); |
307 by (dtac p2 1); |
309 by (dtac p2 1); |
308 by (etac notE 1); |
310 by (etac notE 1); |
309 by (rtac p1 1); |
311 by (rtac p1 1); |
310 qed "contrapos2"; |
312 qed "contrapos_pp"; |
311 |
|
312 val [p1,p2] = Goal "[| P; Q ==> ~ P |] ==> ~ Q"; |
|
313 by (rtac notI 1); |
|
314 by (dtac p2 1); |
|
315 by (etac notE 1); |
|
316 by (rtac p1 1); |
|
317 qed "swap2"; |
|
318 |
313 |
319 |
314 |
320 section "Unique existence"; |
315 section "Unique existence"; |
321 |
316 |
322 val prems = Goalw [Ex1_def] "[| P(a); !!x. P(x) ==> x=a |] ==> EX! x. P(x)"; |
317 val prems = Goalw [Ex1_def] "[| P(a); !!x. P(x) ==> x=a |] ==> EX! x. P(x)"; |