Fixed bug in dest_prem: premises of the form "p x_1 ... x_n"
authorberghofe
Sat, 31 Mar 2007 12:40:55 +0200
changeset 22556 b067fdca022d
parent 22555 d04a4c1b6ab2
child 22557 6775c71f1da0
Fixed bug in dest_prem: premises of the form "p x_1 ... x_n" (where p is a variable) are now treated as side conditions if p is not in the list of (global) parameters.
src/HOL/Tools/inductive_codegen.ML
--- a/src/HOL/Tools/inductive_codegen.ML	Sat Mar 31 08:22:14 2007 +0200
+++ b/src/HOL/Tools/inductive_codegen.ML	Sat Mar 31 12:40:55 2007 +0200
@@ -516,7 +516,7 @@
         | dest_prem (_ $ ((eq as Const ("op =", _)) $ t $ u)) = Prem ([t, u], eq)
         | dest_prem (_ $ t) =
             (case strip_comb t of
-               (v as Var _, ts) => Prem (ts, v)
+               (v as Var _, ts) => if v mem args then Prem (ts, v) else Sidecond t
              | (c as Const (s, _), ts) => (case get_nparms s of
                  NONE => Sidecond t
                | SOME k =>