Added rule impCE'
authorpaulson
Wed, 26 Nov 1997 17:23:18 +0100
changeset 4302 2c99775d953f
parent 4301 ed343192de45
child 4303 c872cc541db2
Added rule impCE'
src/HOL/HOL.ML
--- a/src/HOL/HOL.ML	Wed Nov 26 17:16:48 1997 +0100
+++ b/src/HOL/HOL.ML	Wed Nov 26 17:23:18 1997 +0100
@@ -321,6 +321,15 @@
   [ rtac (excluded_middle RS disjE) 1,
     REPEAT (DEPTH_SOLVE_1 (ares_tac (prems @ [major RS mp]) 1))]);
 
+(*This version of --> elimination works on Q before P.  It works best for
+  those cases in which P holds "almost everywhere".  Can't install as
+  default: would break old proofs.*)
+qed_goal "impCE'" thy 
+    "[| P-->Q;  Q ==> R;  ~P ==> R |] ==> R"
+ (fn major::prems=>
+  [ (resolve_tac [excluded_middle RS disjE] 1),
+    (DEPTH_SOLVE (ares_tac (prems@[major RS mp]) 1)) ]);
+
 (*Classical <-> elimination. *)
 qed_goal "iffCE" HOL.thy
     "[| P=Q;  [| P; Q |] ==> R;  [| ~P; ~Q |] ==> R |] ==> R"