code preprocessor applies simplifier when schematic variables are fixed to free variables to allow rewriting with congruence rules in the preprocessing steps
authorbulwahn
Wed, 01 Jun 2011 08:07:27 +0200
changeset 43122 027ed67f5d98
parent 43121 5df3777f376d
child 43123 28e6351b2f8e
code preprocessor applies simplifier when schematic variables are fixed to free variables to allow rewriting with congruence rules in the preprocessing steps
src/Tools/Code/code_preproc.ML
--- a/src/Tools/Code/code_preproc.ML	Wed Jun 01 00:23:16 2011 +0200
+++ b/src/Tools/Code/code_preproc.ML	Wed Jun 01 08:07:27 2011 +0200
@@ -157,15 +157,15 @@
 
 fun preprocess thy =
   let
+    val ctxt = Proof_Context.init_global thy;
     val pre = (Simplifier.global_context thy o #pre o the_thmproc) thy;
   in
     preprocess_functrans thy
-    #> (map o apfst) (rewrite_eqn pre)
+    #> (map o apfst) (singleton (Variable.trade (K (map (rewrite_eqn pre))) ctxt)) 
   end;
 
 fun preprocess_conv thy =
   let
-    val ctxt = Proof_Context.init_global thy;
     val pre = (Simplifier.global_context thy o #pre o the_thmproc) thy;
   in
     Simplifier.rewrite pre