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.
--- 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 =>