--- a/src/HOL/Complex.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Complex.thy Thu Apr 03 23:51:52 2014 +0100
@@ -145,7 +145,7 @@
by (simp add: complex_inverse_def)
instance
- by intro_classes (simp_all add: complex_mult_def
+ by intro_classes (simp_all add: complex_mult_def divide_minus_left
distrib_left distrib_right right_diff_distrib left_diff_distrib
complex_inverse_def complex_divide_def
power2_eq_square add_divide_distrib [symmetric]
@@ -656,7 +656,7 @@
moreover have "!!u v. u / (x\<^sup>2 + y\<^sup>2) + v / (x\<^sup>2 + y\<^sup>2) = (u + v) / (x\<^sup>2 + y\<^sup>2)"
by (metis add_divide_distrib)
ultimately show ?thesis using Complex False `0 < x\<^sup>2 + y\<^sup>2`
- apply (simp add: complex_divide_def zero_less_divide_iff less_divide_eq)
+ apply (simp add: complex_divide_def divide_minus_left zero_less_divide_iff less_divide_eq)
apply (metis less_divide_eq mult_zero_left diff_conv_add_uminus minus_divide_left)
done
qed
@@ -844,7 +844,7 @@
real (fact n) *\<^sub>R Complex (cos_coeff n * b ^ n) (sin_coeff n * b ^ n)"
apply (induct n)
apply (simp add: cos_coeff_def sin_coeff_def)
- apply (simp add: sin_coeff_Suc cos_coeff_Suc del: mult_Suc)
+ apply (simp add: sin_coeff_Suc cos_coeff_Suc divide_minus_left del: mult_Suc)
done } note * = this
show "Re (cis b) = Re (exp (Complex 0 b))"
unfolding exp_def cis_def cos_def
--- a/src/HOL/Deriv.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Deriv.thy Thu Apr 03 23:51:52 2014 +0100
@@ -825,7 +825,7 @@
lemma DERIV_mirror:
"(DERIV f (- x) :> y) \<longleftrightarrow> (DERIV (\<lambda>x. f (- x::real) :: real) x :> - y)"
- by (simp add: DERIV_def filterlim_at_split filterlim_at_left_to_right
+ by (simp add: DERIV_def filterlim_at_split filterlim_at_left_to_right divide_minus_right
tendsto_minus_cancel_left field_simps conj_commute)
text {* Caratheodory formulation of derivative at a point *}
@@ -908,8 +908,8 @@
fix h::real
assume "0 < h" "h < s"
with all [of "-h"] show "f x < f (x-h)"
- proof (simp add: abs_if pos_less_divide_eq split add: split_if_asm)
- assume " - ((f (x-h) - f x) / h) < l" and h: "0 < h"
+ proof (simp add: abs_if pos_less_divide_eq divide_minus_right split add: split_if_asm)
+ assume "- ((f (x-h) - f x) / h) < l" and h: "0 < h"
with l
have "0 < (f (x-h) - f x) / h" by arith
thus "f x < f (x-h)"
@@ -1628,7 +1628,8 @@
((\<lambda> x. (f' x / g' x)) ---> y) (at_left x) \<Longrightarrow>
((\<lambda> x. f x / g x) ---> y) (at_left x)"
unfolding eventually_at_left_to_right filterlim_at_left_to_right DERIV_mirror
- by (rule lhopital_right[where f'="\<lambda>x. - f' (- x)"]) (auto simp: DERIV_mirror)
+ by (rule lhopital_right[where f'="\<lambda>x. - f' (- x)"])
+ (auto simp: DERIV_mirror divide_minus_left divide_minus_right)
lemma lhopital:
"((f::real \<Rightarrow> real) ---> 0) (at x) \<Longrightarrow> (g ---> 0) (at x) \<Longrightarrow>
@@ -1739,7 +1740,8 @@
((\<lambda> x. (f' x / g' x)) ---> y) (at_left x) \<Longrightarrow>
((\<lambda> x. f x / g x) ---> y) (at_left x)"
unfolding eventually_at_left_to_right filterlim_at_left_to_right DERIV_mirror
- by (rule lhopital_right_at_top[where f'="\<lambda>x. - f' (- x)"]) (auto simp: DERIV_mirror)
+ by (rule lhopital_right_at_top[where f'="\<lambda>x. - f' (- x)"])
+ (auto simp: divide_minus_left divide_minus_right DERIV_mirror)
lemma lhopital_at_top:
"LIM x at x. (g::real \<Rightarrow> real) x :> at_top \<Longrightarrow>
@@ -1796,7 +1798,7 @@
unfolding filterlim_at_right_to_top
apply (intro filterlim_cong[THEN iffD2, OF refl refl _ lim])
using eventually_ge_at_top[where c="1::real"]
- by eventually_elim simp
+ by eventually_elim (simp add: divide_minus_left divide_minus_right)
qed
end
--- a/src/HOL/Fields.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Fields.thy Thu Apr 03 23:51:52 2014 +0100
@@ -152,11 +152,11 @@
lemma nonzero_minus_divide_divide: "b \<noteq> 0 ==> (-a) / (-b) = a / b"
by (simp add: divide_inverse nonzero_inverse_minus_eq)
-lemma divide_minus_left [simp]: "(-a) / b = - (a / b)"
+lemma divide_minus_left: "(-a) / b = - (a / b)"
by (simp add: divide_inverse)
lemma diff_divide_distrib: "(a - b) / c = a / c - b / c"
- using add_divide_distrib [of a "- b" c] by simp
+ using add_divide_distrib [of a "- b" c] by (simp add: divide_inverse)
lemma nonzero_eq_divide_eq [field_simps]: "c \<noteq> 0 \<Longrightarrow> a = b / c \<longleftrightarrow> a * c = b"
proof -
@@ -408,7 +408,7 @@
"- (a / b) = a / - b"
by (simp add: divide_inverse)
-lemma divide_minus_right [simp]:
+lemma divide_minus_right:
"a / - b = - (a / b)"
by (simp add: divide_inverse)
@@ -1045,13 +1045,13 @@
lemma divide_right_mono_neg: "a <= b
==> c <= 0 ==> b / c <= a / c"
apply (drule divide_right_mono [of _ _ "- c"])
-apply auto
+apply (auto simp: divide_minus_right)
done
lemma divide_left_mono_neg: "a <= b
==> c <= 0 ==> 0 < a * b ==> c / a <= c / b"
apply (drule divide_left_mono [of _ _ "- c"])
- apply (auto simp add: mult_commute)
+ apply (auto simp add: divide_minus_left mult_commute)
done
lemma inverse_le_iff:
--- a/src/HOL/Library/Convex.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Library/Convex.thy Thu Apr 03 23:51:52 2014 +0100
@@ -656,7 +656,7 @@
proof -
have "\<And>z. z > 0 \<Longrightarrow> DERIV (log b) z :> 1 / (ln b * z)" using DERIV_log by auto
then have f': "\<And>z. z > 0 \<Longrightarrow> DERIV (\<lambda> z. - log b z) z :> - 1 / (ln b * z)"
- by (auto simp: DERIV_minus)
+ by (auto simp: divide_minus_left DERIV_minus)
have "\<And>z :: real. z > 0 \<Longrightarrow> DERIV inverse z :> - (inverse z ^ Suc (Suc 0))"
using less_imp_neq[THEN not_sym, THEN DERIV_inverse] by auto
from this[THEN DERIV_cmult, of _ "- 1 / ln b"]
@@ -664,7 +664,7 @@
DERIV (\<lambda> z. (- 1 / ln b) * inverse z) z :> (- 1 / ln b) * (- (inverse z ^ Suc (Suc 0)))"
by auto
then have f''0: "\<And>z :: real. z > 0 \<Longrightarrow> DERIV (\<lambda> z. - 1 / (ln b * z)) z :> 1 / (ln b * z * z)"
- unfolding inverse_eq_divide by (auto simp add: mult_assoc)
+ by (auto simp add: inverse_eq_divide divide_minus_left mult_assoc)
have f''_ge0: "\<And>z :: real. z > 0 \<Longrightarrow> 1 / (ln b * z * z) \<ge> 0"
using `b > 1` by (auto intro!:less_imp_le simp add: divide_pos_pos[of 1] mult_pos_pos)
from f''_ge0_imp_convex[OF pos_is_convex,
--- a/src/HOL/Multivariate_Analysis/Complex_Analysis_Basics.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Multivariate_Analysis/Complex_Analysis_Basics.thy Thu Apr 03 23:51:52 2014 +0100
@@ -998,7 +998,7 @@
f (Suc n) u * (z-u) ^ n / of_nat (fact n) +
f (Suc (Suc n)) u * ((z-u) * (z-u) ^ n) / of_nat (fact (Suc n)) -
f (Suc n) u * ((1 + of_nat n) * (z-u) ^ n) / of_nat (fact (Suc n))"
- using Suc by simp
+ using Suc by (simp add: divide_minus_left)
also have "... = f (Suc (Suc n)) u * (z-u) ^ Suc n / of_nat (fact (Suc n))"
proof -
have "of_nat(fact(Suc n)) *
--- a/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Multivariate_Analysis/Convex_Euclidean_Space.thy Thu Apr 03 23:51:52 2014 +0100
@@ -2277,9 +2277,7 @@
using Min_ge_iff[of i 0 ] and obt(1)
unfolding t_def i_def
using obt(4)[unfolded le_less]
- apply auto
- unfolding divide_le_0_iff
- apply auto
+ apply (auto simp: divide_le_0_iff divide_minus_right)
done
have t: "\<forall>v\<in>s. u v + t * w v \<ge> 0"
proof
@@ -2316,7 +2314,7 @@
obtain a where "a \<in> s" and "t = (\<lambda>v. (u v) / (- w v)) a" and "w a < 0"
using Min_in[OF _ `i\<noteq>{}`] and obt(1) unfolding i_def t_def by auto
- then have a: "a \<in> s" "u a + t * w a = 0" by auto
+ then have a: "a \<in> s" "u a + t * w a = 0" by (auto simp: divide_minus_right)
have *: "\<And>f. setsum f (s - {a}) = setsum f s - ((f a)::'b::ab_group_add)"
unfolding setsum_diff1'[OF obt(1) `a\<in>s`] by auto
have "(\<Sum>v\<in>s. u v + t * w v) = 1"
--- a/src/HOL/Multivariate_Analysis/Linear_Algebra.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Multivariate_Analysis/Linear_Algebra.thy Thu Apr 03 23:51:52 2014 +0100
@@ -1139,7 +1139,7 @@
setsum (\<lambda>v. (- (inverse (u ?a))) *\<^sub>R (u v *\<^sub>R v)) S - ?u v *\<^sub>R v"
using fS vS uv by (simp add: setsum_diff1 divide_inverse field_simps)
also have "\<dots> = ?a"
- unfolding scaleR_right.setsum [symmetric] u using uv by simp
+ unfolding scaleR_right.setsum [symmetric] u using uv by (simp add: divide_minus_left)
finally have "setsum (\<lambda>v. ?u v *\<^sub>R v) ?S = ?a" .
with th0 have ?lhs
unfolding dependent_def span_explicit
@@ -2131,7 +2131,7 @@
case False
with span_mul[OF th, of "- 1/ k"]
have th1: "f a \<in> span (f ` b)"
- by auto
+ by (auto simp: divide_minus_left)
from inj_on_image_set_diff[OF "2.prems"(3), of "insert a b " "{a}", symmetric]
have tha: "f ` insert a b - f ` {a} = f ` (insert a b - {a})" by blast
from "2.prems"(2) [unfolded dependent_def bex_simps(8), rule_format, of "f a"]
--- a/src/HOL/NSA/HDeriv.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/NSA/HDeriv.thy Thu Apr 03 23:51:52 2014 +0100
@@ -359,7 +359,7 @@
have "inverse (- (h * star_of x) + - (star_of x * star_of x)) =
(inverse (star_of x + h) - inverse (star_of x)) / h"
apply (simp add: division_ring_inverse_diff nonzero_inverse_mult_distrib [symmetric]
- nonzero_inverse_minus_eq [symmetric] ac_simps ring_distribs)
+ nonzero_inverse_minus_eq [symmetric] ac_simps ring_distribs divide_minus_left)
apply (subst nonzero_inverse_minus_eq [symmetric])
using distrib_right [symmetric, of h "star_of x" "star_of x"] apply simp
apply (simp add: field_simps)
--- a/src/HOL/Probability/Information.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Probability/Information.thy Thu Apr 03 23:51:52 2014 +0100
@@ -945,7 +945,7 @@
show "- (\<integral> x. indicator A x / measure MX A * log b (indicator A x / measure MX A) \<partial>MX) =
log b (measure MX A)"
unfolding eq using uniform_distributed_params[OF X]
- by (subst lebesgue_integral_cmult) (auto simp: measure_def)
+ by (subst lebesgue_integral_cmult) (auto simp: divide_minus_left measure_def)
qed
lemma (in information_space) entropy_simple_distributed:
--- a/src/HOL/Probability/Radon_Nikodym.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Probability/Radon_Nikodym.thy Thu Apr 03 23:51:52 2014 +0100
@@ -241,7 +241,7 @@
by (auto simp: finite_measure_restricted N.finite_measure_restricted sets_eq)
from finite_measure.Radon_Nikodym_aux_epsilon[OF this] guess X .. note X = this
with S have "?P (S \<inter> X) S n"
- by (simp add: measure_restricted sets_eq sets.Int) (metis inf_absorb2)
+ by (simp add: divide_minus_left measure_restricted sets_eq sets.Int) (metis inf_absorb2)
hence "\<exists>A. ?P A S n" .. }
note Ex_P = this
def A \<equiv> "rec_nat (space M) (\<lambda>n A. SOME B. ?P B A n)"
@@ -280,7 +280,7 @@
hence "0 < - ?d B" by auto
from ex_inverse_of_nat_Suc_less[OF this]
obtain n where *: "?d B < - 1 / real (Suc n)"
- by (auto simp: real_eq_of_nat inverse_eq_divide field_simps)
+ by (auto simp: divide_minus_left real_eq_of_nat inverse_eq_divide field_simps)
have "B \<subseteq> A (Suc n)" using B by (auto simp del: nat.rec(2))
from epsilon[OF B(1) this] *
show False by auto
--- a/src/HOL/Rat.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Rat.thy Thu Apr 03 23:51:52 2014 +0100
@@ -665,7 +665,7 @@
by transfer (simp add: add_frac_eq)
lemma of_rat_minus: "of_rat (- a) = - of_rat a"
- by transfer simp
+ by transfer (simp add: divide_minus_left)
lemma of_rat_neg_one [simp]:
"of_rat (- 1) = - 1"
--- a/src/HOL/Real_Vector_Spaces.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Real_Vector_Spaces.thy Thu Apr 03 23:51:52 2014 +0100
@@ -1116,10 +1116,10 @@
by (simp add: sgn_div_norm divide_inverse)
lemma real_sgn_pos: "0 < (x::real) \<Longrightarrow> sgn x = 1"
-unfolding real_sgn_eq by simp
+ by (rule sgn_pos)
lemma real_sgn_neg: "(x::real) < 0 \<Longrightarrow> sgn x = -1"
-unfolding real_sgn_eq by simp
+ by (rule sgn_neg)
lemma norm_conv_dist: "norm x = dist x 0"
unfolding dist_norm by simp
--- a/src/HOL/Transcendental.thy Fri Apr 04 16:43:47 2014 +0200
+++ b/src/HOL/Transcendental.thy Thu Apr 03 23:51:52 2014 +0100
@@ -2145,7 +2145,7 @@
lemma cos_coeff_Suc: "cos_coeff (Suc n) = - sin_coeff n / real (Suc n)"
unfolding cos_coeff_def sin_coeff_def
- by (simp del: mult_Suc, auto simp add: odd_Suc_mult_two_ex)
+ by (simp del: mult_Suc, auto simp add: divide_minus_left odd_Suc_mult_two_ex)
lemma summable_sin: "summable (\<lambda>n. sin_coeff n * x ^ n)"
unfolding sin_coeff_def
@@ -2169,7 +2169,7 @@
by (simp add: diffs_def sin_coeff_Suc real_of_nat_def del: of_nat_Suc)
lemma diffs_cos_coeff: "diffs cos_coeff = (\<lambda>n. - sin_coeff n)"
- by (simp add: diffs_def cos_coeff_Suc real_of_nat_def del: of_nat_Suc)
+ by (simp add: divide_minus_left diffs_def cos_coeff_Suc real_of_nat_def del: of_nat_Suc)
text{*Now at last we can get the derivatives of exp, sin and cos*}
@@ -3239,7 +3239,7 @@
assume "x \<in> {-1..1}"
then show "x \<in> sin ` {- pi / 2..pi / 2}"
using arcsin_lbound arcsin_ubound
- by (intro image_eqI[where x="arcsin x"]) auto
+ by (intro image_eqI[where x="arcsin x"]) (auto simp: divide_minus_left)
qed simp
finally show ?thesis .
qed
@@ -3338,12 +3338,14 @@
lemma filterlim_tan_at_right: "filterlim tan at_bot (at_right (- pi/2))"
by (rule filterlim_at_bot_at_right[where Q="\<lambda>x. - pi/2 < x \<and> x < pi/2" and P="\<lambda>x. True" and g=arctan])
- (auto simp: le_less eventually_at dist_real_def simp del: less_divide_eq_numeral1
+ (auto simp: le_less eventually_at dist_real_def divide_minus_left
+ simp del: less_divide_eq_numeral1
intro!: tan_monotone exI[of _ "pi/2"])
lemma filterlim_tan_at_left: "filterlim tan at_top (at_left (pi/2))"
by (rule filterlim_at_top_at_left[where Q="\<lambda>x. - pi/2 < x \<and> x < pi/2" and P="\<lambda>x. True" and g=arctan])
- (auto simp: le_less eventually_at dist_real_def simp del: less_divide_eq_numeral1
+ (auto simp: le_less eventually_at dist_real_def divide_minus_left
+ simp del: less_divide_eq_numeral1
intro!: tan_monotone exI[of _ "pi/2"])
lemma tendsto_arctan_at_top: "(arctan ---> (pi/2)) at_top"
@@ -3965,7 +3967,7 @@
show "tan (sgn x * pi / 2 - arctan x) = 1 / x"
unfolding tan_inverse [of "arctan x", unfolded tan_arctan]
unfolding sgn_real_def
- by (simp add: tan_def cos_arctan sin_arctan sin_diff cos_diff)
+ by (simp add: divide_minus_left tan_def cos_arctan sin_arctan sin_diff cos_diff)
qed
theorem pi_series: "pi / 4 = (\<Sum> k. (-1)^k * 1 / real (k*2+1))" (is "_ = ?SUM")