# HG changeset patch # User haftmann # Date 1570530400 0 # Node ID 160eaf566bcb5581995b4c25d19ecf2b61ef12ff # Parent 5352449209b11d75e65e54279947900b46fed87b formally augmented corresponding rules for field_simps diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Brouwer_Fixpoint.thy --- a/src/HOL/Analysis/Brouwer_Fixpoint.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Brouwer_Fixpoint.thy Tue Oct 08 10:26:40 2019 +0000 @@ -2126,7 +2126,6 @@ apply (rule_tac x = "dd x / k" in exI) apply (simp add: field_simps that) apply (simp add: vector_add_divide_simps algebra_simps) - apply (metis (no_types) \k \ 0\ divide_inverse_commute inverse_eq_divide mult.left_commute right_inverse) done ultimately show ?thesis using segsub by (auto simp: rel_frontier_def) diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Change_Of_Vars.thy --- a/src/HOL/Analysis/Change_Of_Vars.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Change_Of_Vars.thy Tue Oct 08 10:26:40 2019 +0000 @@ -515,7 +515,7 @@ obtain \ where "0 < \" and \: "\y. \y \ S; y \ x; dist y x < \\ \ norm (f y - (f x + f' x (y - x))) / norm (y - x) < k" - using lim0 \k > 0\ by (force simp: Lim_within field_simps) + using lim0 \k > 0\ by (simp add: Lim_within) (auto simp add: field_simps) define r where "r \ min (min l (\/2)) (min 1 (d/2))" show ?thesis proof (intro exI conjI) @@ -1738,8 +1738,9 @@ then obtain d where "d>0" and d: "\y. y\S \ 0 < dist y x \ dist y x < d \ norm (f y - f x - f' x (y - x)) / (norm (y - x)) < e/2" - using f [OF \x \ S\] unfolding Deriv.has_derivative_at_within Lim_within - by (auto simp: field_simps dest: spec [of _ "e/2"]) + using f [OF \x \ S\] + by (simp add: Deriv.has_derivative_at_within Lim_within) + (auto simp add: field_simps dest: spec [of _ "e/2"]) let ?A = "matrix(f' x) - (\ i j. if i = m \ j = n then e / 4 else 0)" obtain B where BRats: "\i j. B$i$j \ \" and Bo_e6: "onorm((*v) (?A - B)) < e/6" using matrix_rational_approximation \e > 0\ diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Convex_Euclidean_Space.thy --- a/src/HOL/Analysis/Convex_Euclidean_Space.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Convex_Euclidean_Space.thy Tue Oct 08 10:26:40 2019 +0000 @@ -779,7 +779,7 @@ have zball: "z \ ball c d" using mem_ball z_def dist_norm[of c] using y and assms(4,5) - by (auto simp:field_simps norm_minus_commute) + by (simp add: norm_minus_commute) (simp add: field_simps) have "x \ affine hull S" using closure_affine_hull assms by auto moreover have "y \ affine hull S" @@ -790,7 +790,7 @@ using z_def affine_affine_hull[of S] mem_affine_3_minus [of "affine hull S" c x y "(1 - e) / e"] assms - by (auto simp: field_simps) + by simp then have "z \ S" using d zball by auto obtain d1 where "d1 > 0" and d1: "ball z d1 \ ball c d" using zball open_ball[of c d] openE[of "ball c d" z] by auto @@ -2218,7 +2218,7 @@ fix y assume "y \ cbox (x - ?d) (x + ?d)" then have "inverse (2 * d) *\<^sub>R (y - (x - ?d)) \ cbox 0 (\Basis)" - using assms by (simp add: mem_box field_simps inner_simps) + using assms by (simp add: mem_box inner_simps) (simp add: field_simps) with \0 < d\ show "y \ (\y. x - sum ((*\<^sub>R) d) Basis + (2 * d) *\<^sub>R y) ` cbox 0 One" by (auto intro: image_eqI[where x= "inverse (2 * d) *\<^sub>R (y - (x - ?d))"]) next diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Derivative.thy --- a/src/HOL/Analysis/Derivative.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Derivative.thy Tue Oct 08 10:26:40 2019 +0000 @@ -2419,7 +2419,7 @@ from fx[unfolded has_derivative_within, THEN conjunct2, THEN tendstoD, OF \0 < e\] have "\\<^sub>F x' in at x within X. ?le x'" by eventually_elim - (auto simp: dist_norm divide_simps blinfun.bilinear_simps field_simps split: if_split_asm) + (simp add: dist_norm divide_simps diff_diff_add ac_simps split: if_split_asm) then have "\\<^sub>F (x', y') in at (x, y) within X \ Y. ?le x'" by (rule eventually_at_Pair_within_TimesI1) (simp add: blinfun.bilinear_simps) diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy --- a/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Tue Oct 08 10:26:40 2019 +0000 @@ -1279,8 +1279,9 @@ proof (subst negligible_on_intervals, intro allI) fix u v show "negligible ((+) (- a) ` S \ cbox u v)" - using \closed S\ eq1 by (auto simp add: negligible_iff_null_sets field_simps + using \closed S\ eq1 by (auto simp add: negligible_iff_null_sets algebra_simps intro!: closed_translation_subtract starlike_negligible_compact cong: image_cong_simp) + (metis add_diff_eq diff_add_cancel scale_right_diff_distrib) qed then show ?thesis by (rule negligible_translation_rev) diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Equivalence_Measurable_On_Borel.thy --- a/src/HOL/Analysis/Equivalence_Measurable_On_Borel.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Equivalence_Measurable_On_Borel.thy Tue Oct 08 10:26:40 2019 +0000 @@ -390,7 +390,7 @@ unfolding i_def \_def BOX_def by (simp add: algebra_simps content_cbox_plus norm_minus_commute) finally have "measure lebesgue (\ D) * \ \ norm (content (\ D) *\<^sub>R f(tag D) - integral (\ D) f)" - using m_\ by (simp add: field_simps) + using m_\ by simp (simp add: field_simps) then show "\y\(\D. (tag D, \ D)) ` \. snd y = \ D \ measure lebesgue (\ D) * \ \ (case y of (x, k) \ norm (content k *\<^sub>R f x - integral k f))" using \D \ \\ by auto @@ -643,7 +643,7 @@ using that by (auto simp: dist_norm) qed then show ?thesis - using that by (simp add: dist_norm i_def BOX_def field_simps flip: scaleR_diff_right) + using that by (simp add: dist_norm i_def BOX_def flip: scaleR_diff_right) (simp add: field_simps) qed qed qed diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Fashoda_Theorem.thy --- a/src/HOL/Analysis/Fashoda_Theorem.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Fashoda_Theorem.thy Tue Oct 08 10:26:40 2019 +0000 @@ -17,8 +17,9 @@ lemma interval_bij_affine: "interval_bij (a,b) (u,v) = (\x. (\i\Basis. ((v\i - u\i) / (b\i - a\i) * (x\i)) *\<^sub>R i) + (\i\Basis. (u\i - (v\i - u\i) / (b\i - a\i) * (a\i)) *\<^sub>R i))" - by (auto simp: sum.distrib[symmetric] scaleR_add_left[symmetric] interval_bij_def fun_eq_iff - field_simps inner_simps add_divide_distrib[symmetric] intro!: sum.cong) + by (auto simp add: interval_bij_def sum.distrib [symmetric] scaleR_add_left [symmetric] + fun_eq_iff intro!: sum.cong) + (simp add: algebra_simps diff_divide_distrib [symmetric]) lemma continuous_interval_bij: fixes a b :: "'a::euclidean_space" diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Henstock_Kurzweil_Integration.thy --- a/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Henstock_Kurzweil_Integration.thy Tue Oct 08 10:26:40 2019 +0000 @@ -3585,7 +3585,7 @@ proof assume ?lhs from has_integral_affinity'[OF this, of "1 / m" "-c /\<^sub>R m"] and \m > 0\ - show ?rhs by (simp add: field_simps vector_add_divide_simps) + show ?rhs by (simp add: vector_add_divide_simps) (simp add: field_simps) next assume ?rhs from has_integral_affinity'[OF this, of m c] and \m > 0\ @@ -4253,7 +4253,7 @@ show "norm (?SUM p - integral {a..t} f) < e/3" using d2_fin by blast show "norm ((c - t) *\<^sub>R f c) < e/3" - using w cwt \t < c\ by (auto simp add: field_simps) + using w cwt \t < c\ by simp (simp add: field_simps) qed then show ?thesis by simp qed diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Homeomorphism.thy --- a/src/HOL/Analysis/Homeomorphism.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Homeomorphism.thy Tue Oct 08 10:26:40 2019 +0000 @@ -533,9 +533,8 @@ unfolding f_def using \norm b = 1\ norm_eq_1 by (force simp: field_simps inner_add_right inner_diff_right) moreover have "f ` T \ T" - unfolding f_def using assms - apply (auto simp: field_simps inner_add_right inner_diff_right) - by (metis add_0 diff_zero mem_affine_3_minus) + unfolding f_def using assms \subspace T\ + by (auto simp add: inner_add_right inner_diff_right mem_affine_3_minus subspace_mul) moreover have "{x. b\x = 0} \ T \ f ` ({x. norm x = 1 \ b\x \ 1} \ T)" apply clarify apply (rule_tac x = "g x" in image_eqI, auto) diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Homotopy.thy --- a/src/HOL/Analysis/Homotopy.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Homotopy.thy Tue Oct 08 10:26:40 2019 +0000 @@ -4701,16 +4701,18 @@ assume x: "norm (x - a) \ r" and "x \ T" have "\v \ {0..1}. ((1 - v) * r - norm ((x - a) - v *\<^sub>R (u - a))) \ 1 = 0" by (rule ivt_decreasing_component_on_1) (auto simp: x continuous_intros) - then obtain v where "0\v" "v\1" and v: "(1 - v) * r = norm ((x - a) - v *\<^sub>R (u - a))" + then obtain v where "0 \ v" "v \ 1" + and v: "(1 - v) * r = norm ((x - a) - v *\<^sub>R (u - a))" by auto + then have n: "norm (a - (x - v *\<^sub>R (u - a))) = r - r * v" + by (simp add: field_simps norm_minus_commute) show "x \ f ` (cball a r \ T)" proof (rule image_eqI) show "x = f (x - v *\<^sub>R (u - a))" - using \r > 0\ v by (simp add: f_def field_simps) + using \r > 0\ v by (simp add: f_def) (simp add: field_simps) have "x - v *\<^sub>R (u - a) \ cball a r" - using \r > 0\ v \0 \ v\ - apply (simp add: field_simps dist_norm norm_minus_commute) - by (metis le_add_same_cancel2 order.order_iff_strict zero_le_mult_iff) + using \r > 0\\0 \ v\ + by (simp add: dist_norm n) moreover have "x - v *\<^sub>R (u - a) \ T" by (simp add: f_def \affine T\ \u \ T\ \x \ T\ assms mem_affine_3_minus2) ultimately show "x - v *\<^sub>R (u - a) \ cball a r \ T" diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Path_Connected.thy --- a/src/HOL/Analysis/Path_Connected.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Path_Connected.thy Tue Oct 08 10:26:40 2019 +0000 @@ -3307,7 +3307,7 @@ have "\norm (z + C *\<^sub>R (z-a)) - norm (C *\<^sub>R (z-a))\ \ norm z" by (metis add_diff_cancel norm_triangle_ineq3) moreover have "norm (C *\<^sub>R (z-a)) > norm z + B" - using zna \B>0\ by (simp add: C_def le_max_iff_disj field_simps) + using zna \B>0\ by (simp add: C_def le_max_iff_disj) ultimately have C: "norm (z + C *\<^sub>R (z-a)) > B" by linarith { fix u::real assume u: "0\u" "u\1" and ins: "(1 - u) *\<^sub>R z + u *\<^sub>R (z + C *\<^sub>R (z - a)) \ s" diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Starlike.thy --- a/src/HOL/Analysis/Starlike.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Starlike.thy Tue Oct 08 10:26:40 2019 +0000 @@ -956,7 +956,7 @@ unfolding that(1) by (auto simp add:algebra_simps) show "norm (a - x) *\<^sub>R (x - b) = norm (x - b) *\<^sub>R (a - x)" unfolding norm_minus_commute[of x a] * using \0 \ u\ \u \ 1\ - by (auto simp add: field_simps) + by simp qed moreover have "\u. x = (1 - u) *\<^sub>R a + u *\<^sub>R b \ 0 \ u \ u \ 1" if "dist a b = dist a x + dist x b" proof - @@ -1160,8 +1160,7 @@ have "z \ interior S" apply (rule interior_mono[OF d,unfolded subset_eq,rule_format]) unfolding interior_open[OF open_ball] mem_ball z_def dist_norm using y and assms(4,5) - apply (auto simp add:field_simps norm_minus_commute) - done + by simp (simp add: field_simps norm_minus_commute) then show ?thesis unfolding * using mem_interior_convex_shrink \y \ S\ assms by blast @@ -5565,7 +5564,8 @@ have "e / norm (x - a) \ k" using k_def by linarith then have "a + k *\<^sub>R (x - a) \ cball a e" - using \0 < k\ False by (simp add: dist_norm field_simps) + using \0 < k\ False + by (simp add: dist_norm) (simp add: field_simps) then have T: "a + k *\<^sub>R (x - a) \ T" using e by blast have S: "a + k *\<^sub>R (x - a) \ S" diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Analysis/Topology_Euclidean_Space.thy --- a/src/HOL/Analysis/Topology_Euclidean_Space.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Analysis/Topology_Euclidean_Space.thy Tue Oct 08 10:26:40 2019 +0000 @@ -132,7 +132,7 @@ also have "... = norm ((-1 - (r / norm (a - a'))) *\<^sub>R (a - a'))" by (simp add: algebra_simps) also from \a \ a'\ have "... = \- norm (a - a') - r\" - by (simp add: abs_mult_pos field_simps) + by simp (simp add: field_simps) finally have [simp]: "norm (a' - (a + (r / norm (a - a')) *\<^sub>R (a - a'))) = \norm (a - a') + r\" by linarith from \a \ a'\ show ?thesis @@ -176,8 +176,10 @@ (metis \0 \ r\ \?lhs\ centre_in_cball dist_commute dist_norm less_asym mem_ball subset_eq) then show ?thesis using subsetD [where c = "a + (r' / norm(a - a') - 1) *\<^sub>R (a - a')", OF \?lhs\] \a \ a'\ - by (simp add: dist_norm field_simps) - (simp add: diff_divide_distrib scaleR_left_diff_distrib) + apply (simp add: dist_norm) + apply (simp add: scaleR_left_diff_distrib) + apply (simp add: field_simps) + done qed then show ?thesis by force qed diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Complex.thy --- a/src/HOL/Complex.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Complex.thy Tue Oct 08 10:26:40 2019 +0000 @@ -480,7 +480,7 @@ ((\x. Re (f x)) has_field_derivative (Re x)) F \ ((\x. Im (f x)) has_field_derivative (Im x)) F" by (simp add: has_vector_derivative_def has_field_derivative_def has_derivative_def - tendsto_complex_iff field_simps bounded_linear_scaleR_left bounded_linear_mult_right) + tendsto_complex_iff algebra_simps bounded_linear_scaleR_left bounded_linear_mult_right) lemma has_field_derivative_Re[derivative_intros]: "(f has_vector_derivative D) F \ ((\x. Re (f x)) has_field_derivative (Re D)) F" diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Modules.thy --- a/src/HOL/Modules.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Modules.thy Tue Oct 08 10:26:40 2019 +0000 @@ -86,8 +86,30 @@ lemma sum_constant_scale: "(\x\A. y) = scale (of_nat (card A)) y" by (induct A rule: infinite_finite_induct) (simp_all add: algebra_simps) +end + +setup \Sign.add_const_constraint (\<^const_name>\divide\, SOME \<^typ>\'a \ 'a \ 'a\)\ + +context module +begin + +lemma [field_simps]: + shows scale_left_distrib_NO_MATCH: "NO_MATCH (x div y) c \ (a + b) *s x = a *s x + b *s x" + and scale_right_distrib_NO_MATCH: "NO_MATCH (x div y) a \ a *s (x + y) = a *s x + a *s y" + and scale_left_diff_distrib_NO_MATCH: "NO_MATCH (x div y) c \ (a - b) *s x = a *s x - b *s x" + and scale_right_diff_distrib_NO_MATCH: "NO_MATCH (x div y) a \ a *s (x - y) = a *s x - a *s y" + by (rule scale_left_distrib scale_right_distrib scale_left_diff_distrib scale_right_diff_distrib)+ + +end + +setup \Sign.add_const_constraint (\<^const_name>\divide\, SOME \<^typ>\'a::divide \ 'a \ 'a\)\ + + section \Subspace\ +context module +begin + definition subspace :: "'b set \ bool" where "subspace S \ 0 \ S \ (\x\S. \y\S. x + y \ S) \ (\c. \x\S. c *s x \ S)" diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Real_Vector_Spaces.thy --- a/src/HOL/Real_Vector_Spaces.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Real_Vector_Spaces.thy Tue Oct 08 10:26:40 2019 +0000 @@ -113,6 +113,19 @@ lemmas scaleR_cancel_left = real_vector.scale_cancel_left lemmas scaleR_cancel_right = real_vector.scale_cancel_right +lemma [field_simps]: + "c \ 0 \ a = b /\<^sub>R c \ c *\<^sub>R a = b" + "c \ 0 \ b /\<^sub>R c = a \ b = c *\<^sub>R a" + "c \ 0 \ a + b /\<^sub>R c = (c *\<^sub>R a + b) /\<^sub>R c" + "c \ 0 \ a /\<^sub>R c + b = (a + c *\<^sub>R b) /\<^sub>R c" + "c \ 0 \ a - b /\<^sub>R c = (c *\<^sub>R a - b) /\<^sub>R c" + "c \ 0 \ a /\<^sub>R c - b = (a - c *\<^sub>R b) /\<^sub>R c" + "c \ 0 \ - (a /\<^sub>R c) + b = (- a + c *\<^sub>R b) /\<^sub>R c" + "c \ 0 \ - (a /\<^sub>R c) - b = (- a - c *\<^sub>R b) /\<^sub>R c" + for a b :: "'a :: real_vector" + by (auto simp add: scaleR_add_right scaleR_add_left scaleR_diff_right scaleR_diff_left) + + text \Legacy names\ lemmas scaleR_left_distrib = scaleR_add_left @@ -444,13 +457,15 @@ and scaleR_right_mono: "a \ b \ 0 \ x \ a *\<^sub>R x \ b *\<^sub>R x" begin -lemma scaleR_mono: "a \ b \ x \ y \ 0 \ b \ 0 \ x \ a *\<^sub>R x \ b *\<^sub>R y" - by (meson local.dual_order.trans local.scaleR_left_mono local.scaleR_right_mono) - -lemma scaleR_mono': "a \ b \ c \ d \ 0 \ a \ 0 \ c \ a *\<^sub>R c \ b *\<^sub>R d" +lemma scaleR_mono: + "a \ b \ x \ y \ 0 \ b \ 0 \ x \ a *\<^sub>R x \ b *\<^sub>R y" + by (meson order_trans scaleR_left_mono scaleR_right_mono) + +lemma scaleR_mono': + "a \ b \ c \ d \ 0 \ a \ 0 \ c \ a *\<^sub>R c \ b *\<^sub>R d" by (rule scaleR_mono) (auto intro: order.trans) -lemma pos_le_divideR_eq: +lemma pos_le_divideR_eq [field_simps]: "a \ b /\<^sub>R c \ c *\<^sub>R a \ b" (is "?P \ ?Q") if "0 < c" proof assume ?P @@ -466,35 +481,35 @@ by (simp add: scaleR_one scaleR_scaleR inverse_eq_divide) qed -lemma pos_less_divideR_eq: +lemma pos_less_divideR_eq [field_simps]: "a < b /\<^sub>R c \ c *\<^sub>R a < b" if "c > 0" using that pos_le_divideR_eq [of c a b] by (auto simp add: le_less scaleR_scaleR scaleR_one) -lemma pos_divideR_le_eq: +lemma pos_divideR_le_eq [field_simps]: "b /\<^sub>R c \ a \ b \ c *\<^sub>R a" if "c > 0" using that pos_le_divideR_eq [of "inverse c" b a] by simp -lemma pos_divideR_less_eq: +lemma pos_divideR_less_eq [field_simps]: "b /\<^sub>R c < a \ b < c *\<^sub>R a" if "c > 0" using that pos_less_divideR_eq [of "inverse c" b a] by simp -lemma pos_le_minus_divideR_eq: +lemma pos_le_minus_divideR_eq [field_simps]: "a \ - (b /\<^sub>R c) \ c *\<^sub>R a \ - b" if "c > 0" using that by (metis add_minus_cancel diff_0 left_minus minus_minus neg_le_iff_le scaleR_add_right uminus_add_conv_diff pos_le_divideR_eq) -lemma pos_less_minus_divideR_eq: +lemma pos_less_minus_divideR_eq [field_simps]: "a < - (b /\<^sub>R c) \ c *\<^sub>R a < - b" if "c > 0" using that by (metis le_less less_le_not_le pos_divideR_le_eq pos_divideR_less_eq pos_le_minus_divideR_eq) -lemma pos_minus_divideR_le_eq: +lemma pos_minus_divideR_le_eq [field_simps]: "- (b /\<^sub>R c) \ a \ - b \ c *\<^sub>R a" if "c > 0" using that by (metis pos_divideR_le_eq pos_le_minus_divideR_eq that inverse_positive_iff_positive le_imp_neg_le minus_minus) -lemma pos_minus_divideR_less_eq: +lemma pos_minus_divideR_less_eq [field_simps]: "- (b /\<^sub>R c) < a \ - b < c *\<^sub>R a" if "c > 0" using that by (simp add: less_le_not_le pos_le_minus_divideR_eq pos_minus_divideR_le_eq) @@ -506,32 +521,32 @@ end -lemma neg_le_divideR_eq: +lemma neg_le_divideR_eq [field_simps]: "a \ b /\<^sub>R c \ b \ c *\<^sub>R a" (is "?P \ ?Q") if "c < 0" for a b :: "'a :: ordered_real_vector" using that pos_le_divideR_eq [of "- c" a "- b"] by simp -lemma neg_less_divideR_eq: +lemma neg_less_divideR_eq [field_simps]: "a < b /\<^sub>R c \ b < c *\<^sub>R a" if "c < 0" for a b :: "'a :: ordered_real_vector" using that neg_le_divideR_eq [of c a b] by (auto simp add: le_less) -lemma neg_divideR_le_eq: +lemma neg_divideR_le_eq [field_simps]: "b /\<^sub>R c \ a \ c *\<^sub>R a \ b" if "c < 0" for a b :: "'a :: ordered_real_vector" using that pos_divideR_le_eq [of "- c" "- b" a] by simp -lemma neg_divideR_less_eq: +lemma neg_divideR_less_eq [field_simps]: "b /\<^sub>R c < a \ c *\<^sub>R a < b" if "c < 0" for a b :: "'a :: ordered_real_vector" using that neg_divideR_le_eq [of c b a] by (auto simp add: le_less) -lemma neg_le_minus_divideR_eq: +lemma neg_le_minus_divideR_eq [field_simps]: "a \ - (b /\<^sub>R c) \ - b \ c *\<^sub>R a" if "c < 0" for a b :: "'a :: ordered_real_vector" using that pos_le_minus_divideR_eq [of "- c" a "- b"] by (simp add: minus_le_iff) -lemma neg_less_minus_divideR_eq: +lemma neg_less_minus_divideR_eq [field_simps]: "a < - (b /\<^sub>R c) \ - b < c *\<^sub>R a" if "c < 0" for a b :: "'a :: ordered_real_vector" proof - @@ -541,12 +556,12 @@ show ?thesis by (auto simp add: le_less *) qed -lemma neg_minus_divideR_le_eq: +lemma neg_minus_divideR_le_eq [field_simps]: "- (b /\<^sub>R c) \ a \ c *\<^sub>R a \ - b" if "c < 0" for a b :: "'a :: ordered_real_vector" using that pos_minus_divideR_le_eq [of "- c" "- b" a] by (simp add: le_minus_iff) -lemma neg_minus_divideR_less_eq: +lemma neg_minus_divideR_less_eq [field_simps]: "- (b /\<^sub>R c) < a \ c *\<^sub>R a < - b" if "c < 0" for a b :: "'a :: ordered_real_vector" using that by (simp add: less_le_not_le neg_le_minus_divideR_eq neg_minus_divideR_le_eq) diff -r 5352449209b1 -r 160eaf566bcb src/HOL/Vector_Spaces.thy --- a/src/HOL/Vector_Spaces.thy Mon Oct 07 21:51:31 2019 +0200 +++ b/src/HOL/Vector_Spaces.thy Tue Oct 08 10:26:40 2019 +0000 @@ -66,7 +66,7 @@ context vector_space begin sublocale module scale rewrites "module_hom = linear" - by (unfold_locales) (fact vector_space_assms module_hom_eq_linear)+ + by unfold_locales (fact vector_space_assms module_hom_eq_linear)+ lemmas\ \from \module\\ linear_id = module_hom_id