dummies may depend on goal params as well;
authorwenzelm
Wed, 25 Mar 2015 00:22:10 +0100
changeset 59805 a162f779925a
parent 59804 db0b87085c16
child 59806 d3d4ec6c21ef
dummies may depend on goal params as well;
src/Pure/Tools/rule_insts.ML
--- a/src/Pure/Tools/rule_insts.ML	Tue Mar 24 23:39:42 2015 +0100
+++ b/src/Pure/Tools/rule_insts.ML	Wed Mar 25 00:22:10 2015 +0100
@@ -225,11 +225,17 @@
 
     (* local fixes *)
 
-    val (fixed, fixes_ctxt) = param_ctxt
-      |> Proof_Context.read_vars fixes |-> Proof_Context.add_fixes;
+    val fixes_ctxt = param_ctxt
+      |> Proof_Context.read_vars fixes |-> Proof_Context.add_fixes |> #2;
 
     val ((inst_tvars, inst_vars), inst_ctxt) = read_insts thm mixed_insts fixes_ctxt;
 
+    fun add_fixed (Free (x, _)) =
+          if Variable.newly_fixed inst_ctxt param_ctxt x
+          then insert (op =) x else I
+      | add_fixed _ = I;
+    val fixed = fold (Term.fold_aterms add_fixed o #2) inst_vars [];
+
 
     (* lift and instantiate rule *)