--- a/NEWS Sun Mar 01 10:24:57 2009 +0100
+++ b/NEWS Sun Mar 01 12:01:57 2009 +0100
@@ -385,6 +385,7 @@
nat_mod_mod_trivial -> mod_mod_trivial
zdiv_zadd_self1 -> div_add_self1
zdiv_zadd_self2 -> div_add_self2
+zdiv_zmult_self1 -> div_mult_self2_is_id
zdiv_zmult_self2 -> div_mult_self1_is_id
zdvd_triv_left -> dvd_triv_left
zdvd_triv_right -> dvd_triv_right
--- a/src/HOL/IntDiv.thy Sun Mar 01 10:24:57 2009 +0100
+++ b/src/HOL/IntDiv.thy Sun Mar 01 12:01:57 2009 +0100
@@ -689,9 +689,6 @@
apply (blast intro: divmod_rel_div_mod [THEN zmult1_lemma, THEN divmod_rel_mod])
done
-lemma zdiv_zmult_self1 [simp]: "b \<noteq> (0::int) ==> (a*b) div b = a"
-by (simp add: zdiv_zmult1_eq)
-
lemma zmod_zdiv_trivial: "(a mod b) div b = (0::int)"
apply (case_tac "b = 0", simp)
apply (auto simp add: linorder_neq_iff div_pos_pos_trivial div_neg_neg_trivial)
@@ -717,7 +714,7 @@
assume not0: "b \<noteq> 0"
show "(a + c * b) div b = c + a div b"
unfolding zdiv_zadd1_eq [of a "c * b"] using not0
- by (simp add: zmod_zmult1_eq zmod_zdiv_trivial)
+ by (simp add: zmod_zmult1_eq zmod_zdiv_trivial zdiv_zmult1_eq)
qed auto
lemma posDivAlg_div_mod:
--- a/src/HOL/Library/Float.thy Sun Mar 01 10:24:57 2009 +0100
+++ b/src/HOL/Library/Float.thy Sun Mar 01 12:01:57 2009 +0100
@@ -1093,7 +1093,7 @@
{ have "2^(prec - 1) * m \<le> 2^(prec - 1) * 2^?b" using `m < 2^?b`[THEN less_imp_le] by (rule mult_left_mono, auto)
also have "\<dots> = 2 ^ nat (int prec + bitlen m - 1)" unfolding pow_split zpower_zadd_distrib by auto
finally have "2^(prec - 1) * m div m \<le> 2 ^ nat (int prec + bitlen m - 1) div m" using `0 < m` by (rule zdiv_mono1)
- hence "2^(prec - 1) \<le> 2 ^ nat (int prec + bitlen m - 1) div m" unfolding zdiv_zmult_self1[OF `m \<noteq> 0`] .
+ hence "2^(prec - 1) \<le> 2 ^ nat (int prec + bitlen m - 1) div m" unfolding div_mult_self2_is_id[OF `m \<noteq> 0`] .
hence "2^(prec - 1) * inverse (2 ^ nat (int prec + bitlen m - 1)) \<le> ?d"
unfolding real_of_int_le_iff[of "2^(prec - 1)", symmetric] by auto }
from mult_left_mono[OF this[unfolded pow_split power_add inverse_mult_distrib real_mult_assoc[symmetric] right_inverse[OF pow_not0] real_mult_1], of "2^?e"]