src/HOL/Tools/function_package/fundef_lib.ML
changeset 27790 37b4e65d1dbf
parent 27330 1af2598b5f7d
child 27792 e4a4d057749d
--- a/src/HOL/Tools/function_package/fundef_lib.ML	Fri Aug 08 09:26:15 2008 +0200
+++ b/src/HOL/Tools/function_package/fundef_lib.ML	Fri Aug 08 09:44:16 2008 +0200
@@ -134,4 +134,12 @@
     |> rev
 
 
+datatype proof_attempt = Solved of thm | Stuck of thm | Fail
+
+fun try_proof cgoal tac = 
+    case SINGLE tac (Goal.init cgoal) of
+      NONE => Fail
+    | SOME st => if Thm.no_prems st then Solved (Goal.finish st) else Stuck st
+
+
 end