src/Pure/Isar/auto_bind.ML
changeset 7331 aee8f76fe54c
parent 7048 3535eec33c50
child 7452 c2289eabf706
--- a/src/Pure/Isar/auto_bind.ML	Tue Aug 24 11:43:30 1999 +0200
+++ b/src/Pure/Isar/auto_bind.ML	Tue Aug 24 11:50:17 1999 +0200
@@ -19,9 +19,12 @@
 
 fun statement_binds (name, prop) =
   let
-    val concl = Logic.strip_imp_concl prop;
-    val env = [(name ^ "_prop", prop), (name ^ "_concl", concl)] @
-      (case concl of Const ("Trueprop", _) $ t => [(name, t)] | _ => []);
+    val concl = Logic.strip_assums_concl prop;
+    val parms = Logic.strip_params prop;
+    fun list_abs tm = foldr (fn ((x, T), t) => Abs (x, T, t)) (parms, tm);
+
+    val env = [(name ^ "_prop", prop), (name ^ "_concl", list_abs concl)] @
+      (case concl of Const ("Trueprop", _) $ t => [(name, list_abs t)] | _ => []);
   in map (fn (s, t) => ((Syntax.binding s, 0), t)) env end;
 
 fun goal prop = statement_binds ("thesis", prop);