replaced obsolete diff_right_cancel by diff_diff_eq
authorpaulson
Tue, 18 Apr 2000 15:56:41 +0200
changeset 8740 fa6c4e4182d9
parent 8739 60a1ed9e3c34
child 8741 61bc5ed22b62
replaced obsolete diff_right_cancel by diff_diff_eq
src/HOL/Arith.ML
--- a/src/HOL/Arith.ML	Tue Apr 18 15:54:56 2000 +0200
+++ b/src/HOL/Arith.ML	Tue Apr 18 15:56:41 2000 +0200
@@ -1107,6 +1107,11 @@
 by (arith_tac 1);
 qed "diff_less";
 
+Goal "j <= (k::nat) ==> (j+i)-k = i-(k-j)";
+by (asm_simp_tac (simpset() addsplits [nat_diff_split']) 1);
+qed "diff_add_assoc_diff";
+
+
 (*** Reducing subtraction to addition ***)
 
 Goal "n<=(l::nat) --> Suc l - n + m = Suc (l - n + m)";
@@ -1125,11 +1130,11 @@
 by (simp_tac (simpset() addsplits [nat_diff_split]) 1);
 qed "diff_Suc_le_Suc_diff";
 
-Goal "[| k<=n; n<=m |] ==> (m-k) - (n-k) = m-(n::nat)";
-by (asm_simp_tac (simpset() addsplits [nat_diff_split]) 1);
-qed "diff_right_cancel";
+(** Simplification of relational expressions involving subtraction **)
 
-(** Simplification of relational expressions involving subtraction **)
+Goal "[| k <= m;  k <= (n::nat) |] ==> ((m-k) - (n-k)) = (m-n)";
+by (asm_simp_tac (simpset() addsplits [nat_diff_split']) 1);
+qed "diff_diff_eq";
 
 Goal "[| k <= m;  k <= (n::nat) |] ==> (m-k = n-k) = (m=n)";
 by (auto_tac (claset(), simpset() addsplits [nat_diff_split']));