slightly more general simproc (avoids errors of linarith)
authorboehmes
Sat, 27 Mar 2010 02:10:00 +0100
changeset 35983 27e2fa7d4ce7
parent 35982 c7d01a43e41b
child 35984 87e6e2737aee
child 35990 5ceedb86aa9d
slightly more general simproc (avoids errors of linarith)
src/HOL/SMT/Tools/z3_proof_rules.ML
src/HOL/Tools/numeral_simprocs.ML
--- a/src/HOL/SMT/Tools/z3_proof_rules.ML	Sat Mar 27 00:08:39 2010 +0100
+++ b/src/HOL/SMT/Tools/z3_proof_rules.ML	Sat Mar 27 02:10:00 2010 +0100
@@ -1143,6 +1143,7 @@
   addsimps @{thms add_bin_simps} addsimps @{thms succ_bin_simps}
   addsimps @{thms minus_bin_simps} addsimps @{thms pred_bin_simps}
   addsimps @{thms mult_bin_simps} addsimps @{thms iszero_simps}
+  addsimps [@{thm mult_1_left}]
   addsimprocs [
     Simplifier.simproc @{theory} "fast_int_arith" [
       "(m::int) < n", "(m::int) <= n", "(m::int) = n"] (K Lin_Arith.simproc),
--- a/src/HOL/Tools/numeral_simprocs.ML	Sat Mar 27 00:08:39 2010 +0100
+++ b/src/HOL/Tools/numeral_simprocs.ML	Sat Mar 27 02:10:00 2010 +0100
@@ -344,8 +344,7 @@
 struct
   val assoc_ss = HOL_ss addsimps @{thms mult_ac}
   val eq_reflection = eq_reflection
-  fun is_numeral (Const(@{const_name Int.number_of}, _) $ _) = true
-    | is_numeral _ = false;
+  val is_numeral = can HOLogic.dest_number
 end;
 
 structure Semiring_Times_Assoc = Assoc_Fold (Semiring_Times_Assoc_Data);