# HG changeset patch # User paulson # Date 907259118 -7200 # Node ID 64697e426048f45fe0ac1abba2d823d04278b445 # Parent fbb4e1ac234d39a769cb51759983599d4215c5a2 better handling of literals diff -r fbb4e1ac234d -r 64697e426048 src/HOL/Integ/Bin.ML --- a/src/HOL/Integ/Bin.ML Thu Oct 01 18:23:00 1998 +0200 +++ b/src/HOL/Integ/Bin.ML Thu Oct 01 18:25:18 1998 +0200 @@ -158,18 +158,19 @@ by (Simp_tac 1); qed "zadd_0_right"; -Goal "z + (- z) = #0"; -by (Simp_tac 1); -qed "zadd_zminus_inverse"; +Addsimps [zadd_0, zadd_0_right]; + + +(** Converting simple cases of (int n) to numerals **) -Goal "(- z) + z = #0"; -by (Simp_tac 1); -qed "zadd_zminus_inverse2"; +(*int 0 = #0 *) +bind_thm ("int_0", integ_of_Pls RS sym); -(*These rewrite to int 0. Henceforth we should rewrite to #0 *) -Delsimps [zadd_zminus_inverse_nat, zadd_zminus_inverse_nat2]; +Goal "int (Suc n) = #1 + int n"; +by (simp_tac (simpset() addsimps [zadd_int]) 1); +qed "int_Suc"; -Addsimps [zadd_0, zadd_0_right, zadd_zminus_inverse, zadd_zminus_inverse2]; +val int_simps = [int_0, int_Suc]; Goal "- (#0) = #0"; by (Simp_tac 1); @@ -221,11 +222,11 @@ zmult_2, zmult_2_right]; Goal "(w < z + #1) = (w (nat w < nat z) = (w