# HG changeset patch # User immler # Date 1566943694 -7200 # Node ID f95193669ad7e0feefd5ea4fc43ea36c666277c5 # Parent 191bb458b95c465380afcd021d218742126c91c6 removed Brouwer_Fixpoint from imports of Derivative diff -r 191bb458b95c -r f95193669ad7 src/HOL/Analysis/Brouwer_Fixpoint.thy --- a/src/HOL/Analysis/Brouwer_Fixpoint.thy Tue Aug 27 23:12:28 2019 +0200 +++ b/src/HOL/Analysis/Brouwer_Fixpoint.thy Wed Aug 28 00:08:14 2019 +0200 @@ -19,6 +19,7 @@ Path_Connected Homeomorphism Continuous_Extension + Derivative begin subsection \Retractions\ @@ -4936,4 +4937,249 @@ shows "connected(-S)" using assms path_connected_complement_homeomorphic_interval path_connected_imp_connected by blast +subsubsection \Proving surjectivity via Brouwer fixpoint theorem\ + +lemma brouwer_surjective: + fixes f :: "'n::euclidean_space \ 'n" + assumes "compact T" + and "convex T" + and "T \ {}" + and "continuous_on T f" + and "\x y. \x\S; y\T\ \ x + (y - f y) \ T" + and "x \ S" + shows "\y\T. f y = x" +proof - + have *: "\x y. f y = x \ x + (y - f y) = y" + by (auto simp add: algebra_simps) + show ?thesis + unfolding * + apply (rule brouwer[OF assms(1-3), of "\y. x + (y - f y)"]) + apply (intro continuous_intros) + using assms + apply auto + done +qed + +lemma brouwer_surjective_cball: + fixes f :: "'n::euclidean_space \ 'n" + assumes "continuous_on (cball a e) f" + and "e > 0" + and "x \ S" + and "\x y. \x\S; y\cball a e\ \ x + (y - f y) \ cball a e" + shows "\y\cball a e. f y = x" + apply (rule brouwer_surjective) + apply (rule compact_cball convex_cball)+ + unfolding cball_eq_empty + using assms + apply auto + done + +subsubsection \Inverse function theorem\ + +text \See Sussmann: "Multidifferential calculus", Theorem 2.1.1\ + +lemma sussmann_open_mapping: + fixes f :: "'a::real_normed_vector \ 'b::euclidean_space" + assumes "open S" + and contf: "continuous_on S f" + and "x \ S" + and derf: "(f has_derivative f') (at x)" + and "bounded_linear g'" "f' \ g' = id" + and "T \ S" + and x: "x \ interior T" + shows "f x \ interior (f ` T)" +proof - + interpret f': bounded_linear f' + using assms unfolding has_derivative_def by auto + interpret g': bounded_linear g' + using assms by auto + obtain B where B: "0 < B" "\x. norm (g' x) \ norm x * B" + using bounded_linear.pos_bounded[OF assms(5)] by blast + hence *: "1 / (2 * B) > 0" by auto + obtain e0 where e0: + "0 < e0" + "\y. norm (y - x) < e0 \ norm (f y - f x - f' (y - x)) \ 1 / (2 * B) * norm (y - x)" + using derf unfolding has_derivative_at_alt + using * by blast + obtain e1 where e1: "0 < e1" "cball x e1 \ T" + using mem_interior_cball x by blast + have *: "0 < e0 / B" "0 < e1 / B" using e0 e1 B by auto + obtain e where e: "0 < e" "e < e0 / B" "e < e1 / B" + using field_lbound_gt_zero[OF *] by blast + have lem: "\y\cball (f x) e. f (x + g' (y - f x)) = z" if "z\cball (f x) (e / 2)" for z + proof (rule brouwer_surjective_cball) + have z: "z \ S" if as: "y \cball (f x) e" "z = x + (g' y - g' (f x))" for y z + proof- + have "dist x z = norm (g' (f x) - g' y)" + unfolding as(2) and dist_norm by auto + also have "\ \ norm (f x - y) * B" + by (metis B(2) g'.diff) + also have "\ \ e * B" + by (metis B(1) dist_norm mem_cball real_mult_le_cancel_iff1 that(1)) + also have "\ \ e1" + using B(1) e(3) pos_less_divide_eq by fastforce + finally have "z \ cball x e1" + by force + then show "z \ S" + using e1 assms(7) by auto + qed + show "continuous_on (cball (f x) e) (\y. f (x + g' (y - f x)))" + unfolding g'.diff + proof (rule continuous_on_compose2 [OF _ _ order_refl, of _ _ f]) + show "continuous_on ((\y. x + (g' y - g' (f x))) ` cball (f x) e) f" + by (rule continuous_on_subset[OF contf]) (use z in blast) + show "continuous_on (cball (f x) e) (\y. x + (g' y - g' (f x)))" + by (intro continuous_intros linear_continuous_on[OF \bounded_linear g'\]) + qed + next + fix y z + assume y: "y \ cball (f x) (e / 2)" and z: "z \ cball (f x) e" + have "norm (g' (z - f x)) \ norm (z - f x) * B" + using B by auto + also have "\ \ e * B" + by (metis B(1) z dist_norm mem_cball norm_minus_commute real_mult_le_cancel_iff1) + also have "\ < e0" + using B(1) e(2) pos_less_divide_eq by blast + finally have *: "norm (x + g' (z - f x) - x) < e0" + by auto + have **: "f x + f' (x + g' (z - f x) - x) = z" + using assms(6)[unfolded o_def id_def,THEN cong] + by auto + have "norm (f x - (y + (z - f (x + g' (z - f x))))) \ + norm (f (x + g' (z - f x)) - z) + norm (f x - y)" + using norm_triangle_ineq[of "f (x + g'(z - f x)) - z" "f x - y"] + by (auto simp add: algebra_simps) + also have "\ \ 1 / (B * 2) * norm (g' (z - f x)) + norm (f x - y)" + using e0(2)[rule_format, OF *] + by (simp only: algebra_simps **) auto + also have "\ \ 1 / (B * 2) * norm (g' (z - f x)) + e/2" + using y by (auto simp: dist_norm) + also have "\ \ 1 / (B * 2) * B * norm (z - f x) + e/2" + using * B by (auto simp add: field_simps) + also have "\ \ 1 / 2 * norm (z - f x) + e/2" + by auto + also have "\ \ e/2 + e/2" + using B(1) \norm (z - f x) * B \ e * B\ by auto + finally show "y + (z - f (x + g' (z - f x))) \ cball (f x) e" + by (auto simp: dist_norm) + qed (use e that in auto) + show ?thesis + unfolding mem_interior + proof (intro exI conjI subsetI) + fix y + assume "y \ ball (f x) (e / 2)" + then have *: "y \ cball (f x) (e / 2)" + by auto + obtain z where z: "z \ cball (f x) e" "f (x + g' (z - f x)) = y" + using lem * by blast + then have "norm (g' (z - f x)) \ norm (z - f x) * B" + using B + by (auto simp add: field_simps) + also have "\ \ e * B" + by (metis B(1) dist_norm mem_cball norm_minus_commute real_mult_le_cancel_iff1 z(1)) + also have "\ \ e1" + using e B unfolding less_divide_eq by auto + finally have "x + g'(z - f x) \ T" + by (metis add_diff_cancel diff_diff_add dist_norm e1(2) mem_cball norm_minus_commute subset_eq) + then show "y \ f ` T" + using z by auto + qed (use e in auto) +qed + +text \Hence the following eccentric variant of the inverse function theorem. + This has no continuity assumptions, but we do need the inverse function. + We could put \f' \ g = I\ but this happens to fit with the minimal linear + algebra theory I've set up so far.\ + +lemma has_derivative_inverse_strong: + fixes f :: "'n::euclidean_space \ 'n" + assumes "open S" + and "x \ S" + and contf: "continuous_on S f" + and gf: "\x. x \ S \ g (f x) = x" + and derf: "(f has_derivative f') (at x)" + and id: "f' \ g' = id" + shows "(g has_derivative g') (at (f x))" +proof - + have linf: "bounded_linear f'" + using derf unfolding has_derivative_def by auto + then have ling: "bounded_linear g'" + unfolding linear_conv_bounded_linear[symmetric] + using id right_inverse_linear by blast + moreover have "g' \ f' = id" + using id linf ling + unfolding linear_conv_bounded_linear[symmetric] + using linear_inverse_left + by auto + moreover have *: "\T. \T \ S; x \ interior T\ \ f x \ interior (f ` T)" + apply (rule sussmann_open_mapping) + apply (rule assms ling)+ + apply auto + done + have "continuous (at (f x)) g" + unfolding continuous_at Lim_at + proof (rule, rule) + fix e :: real + assume "e > 0" + then have "f x \ interior (f ` (ball x e \ S))" + using *[rule_format,of "ball x e \ S"] \x \ S\ + by (auto simp add: interior_open[OF open_ball] interior_open[OF assms(1)]) + then obtain d where d: "0 < d" "ball (f x) d \ f ` (ball x e \ S)" + unfolding mem_interior by blast + show "\d>0. \y. 0 < dist y (f x) \ dist y (f x) < d \ dist (g y) (g (f x)) < e" + proof (intro exI allI impI conjI) + fix y + assume "0 < dist y (f x) \ dist y (f x) < d" + then have "g y \ g ` f ` (ball x e \ S)" + by (metis d(2) dist_commute mem_ball rev_image_eqI subset_iff) + then show "dist (g y) (g (f x)) < e" + using gf[OF \x \ S\] + by (simp add: assms(4) dist_commute image_iff) + qed (use d in auto) + qed + moreover have "f x \ interior (f ` S)" + apply (rule sussmann_open_mapping) + apply (rule assms ling)+ + using interior_open[OF assms(1)] and \x \ S\ + apply auto + done + moreover have "f (g y) = y" if "y \ interior (f ` S)" for y + by (metis gf imageE interiorE subsetD that) + ultimately show ?thesis using assms + by (metis has_derivative_inverse_basic_x open_interior) +qed + +text \A rewrite based on the other domain.\ + +lemma has_derivative_inverse_strong_x: + fixes f :: "'a::euclidean_space \ 'a" + assumes "open S" + and "g y \ S" + and "continuous_on S f" + and "\x. x \ S \ g (f x) = x" + and "(f has_derivative f') (at (g y))" + and "f' \ g' = id" + and "f (g y) = y" + shows "(g has_derivative g') (at y)" + using has_derivative_inverse_strong[OF assms(1-6)] + unfolding assms(7) + by simp + +text \On a region.\ + +theorem has_derivative_inverse_on: + fixes f :: "'n::euclidean_space \ 'n" + assumes "open S" + and derf: "\x. x \ S \ (f has_derivative f'(x)) (at x)" + and "\x. x \ S \ g (f x) = x" + and "f' x \ g' x = id" + and "x \ S" + shows "(g has_derivative g'(x)) (at (f x))" +proof (rule has_derivative_inverse_strong[where g'="g' x" and f=f]) + show "continuous_on S f" + unfolding continuous_on_eq_continuous_at[OF \open S\] + using derf has_derivative_continuous by blast +qed (use assms in auto) + + end diff -r 191bb458b95c -r f95193669ad7 src/HOL/Analysis/Complex_Analysis_Basics.thy --- a/src/HOL/Analysis/Complex_Analysis_Basics.thy Tue Aug 27 23:12:28 2019 +0200 +++ b/src/HOL/Analysis/Complex_Analysis_Basics.thy Wed Aug 28 00:08:14 2019 +0200 @@ -5,7 +5,7 @@ section \Complex Analysis Basics\ theory Complex_Analysis_Basics - imports Derivative "HOL-Library.Nonpos_Ints" + imports Brouwer_Fixpoint "HOL-Library.Nonpos_Ints" begin (* TODO FIXME: A lot of the things in here have nothing to do with complex analysis *) diff -r 191bb458b95c -r f95193669ad7 src/HOL/Analysis/Derivative.thy --- a/src/HOL/Analysis/Derivative.thy Tue Aug 27 23:12:28 2019 +0200 +++ b/src/HOL/Analysis/Derivative.thy Wed Aug 28 00:08:14 2019 +0200 @@ -6,7 +6,11 @@ section \Derivative\ theory Derivative -imports Brouwer_Fixpoint Operator_Norm Uniform_Limit Bounded_Linear_Function + imports + Path_Connected + Operator_Norm + Uniform_Limit + Bounded_Linear_Function begin declare bounded_linear_inner_left [intro] @@ -1203,251 +1207,6 @@ qed -subsection \Inverse function theorem\ - -text \Proving surjectivity via Brouwer fixpoint theorem\ - -lemma brouwer_surjective: - fixes f :: "'n::euclidean_space \ 'n" - assumes "compact T" - and "convex T" - and "T \ {}" - and "continuous_on T f" - and "\x y. \x\S; y\T\ \ x + (y - f y) \ T" - and "x \ S" - shows "\y\T. f y = x" -proof - - have *: "\x y. f y = x \ x + (y - f y) = y" - by (auto simp add: algebra_simps) - show ?thesis - unfolding * - apply (rule brouwer[OF assms(1-3), of "\y. x + (y - f y)"]) - apply (intro continuous_intros) - using assms - apply auto - done -qed - -lemma brouwer_surjective_cball: - fixes f :: "'n::euclidean_space \ 'n" - assumes "continuous_on (cball a e) f" - and "e > 0" - and "x \ S" - and "\x y. \x\S; y\cball a e\ \ x + (y - f y) \ cball a e" - shows "\y\cball a e. f y = x" - apply (rule brouwer_surjective) - apply (rule compact_cball convex_cball)+ - unfolding cball_eq_empty - using assms - apply auto - done - -text \See Sussmann: "Multidifferential calculus", Theorem 2.1.1\ - -lemma sussmann_open_mapping: - fixes f :: "'a::real_normed_vector \ 'b::euclidean_space" - assumes "open S" - and contf: "continuous_on S f" - and "x \ S" - and derf: "(f has_derivative f') (at x)" - and "bounded_linear g'" "f' \ g' = id" - and "T \ S" - and x: "x \ interior T" - shows "f x \ interior (f ` T)" -proof - - interpret f': bounded_linear f' - using assms unfolding has_derivative_def by auto - interpret g': bounded_linear g' - using assms by auto - obtain B where B: "0 < B" "\x. norm (g' x) \ norm x * B" - using bounded_linear.pos_bounded[OF assms(5)] by blast - hence *: "1 / (2 * B) > 0" by auto - obtain e0 where e0: - "0 < e0" - "\y. norm (y - x) < e0 \ norm (f y - f x - f' (y - x)) \ 1 / (2 * B) * norm (y - x)" - using derf unfolding has_derivative_at_alt - using * by blast - obtain e1 where e1: "0 < e1" "cball x e1 \ T" - using mem_interior_cball x by blast - have *: "0 < e0 / B" "0 < e1 / B" using e0 e1 B by auto - obtain e where e: "0 < e" "e < e0 / B" "e < e1 / B" - using field_lbound_gt_zero[OF *] by blast - have lem: "\y\cball (f x) e. f (x + g' (y - f x)) = z" if "z\cball (f x) (e / 2)" for z - proof (rule brouwer_surjective_cball) - have z: "z \ S" if as: "y \cball (f x) e" "z = x + (g' y - g' (f x))" for y z - proof- - have "dist x z = norm (g' (f x) - g' y)" - unfolding as(2) and dist_norm by auto - also have "\ \ norm (f x - y) * B" - by (metis B(2) g'.diff) - also have "\ \ e * B" - by (metis B(1) dist_norm mem_cball real_mult_le_cancel_iff1 that(1)) - also have "\ \ e1" - using B(1) e(3) pos_less_divide_eq by fastforce - finally have "z \ cball x e1" - by force - then show "z \ S" - using e1 assms(7) by auto - qed - show "continuous_on (cball (f x) e) (\y. f (x + g' (y - f x)))" - unfolding g'.diff - proof (rule continuous_on_compose2 [OF _ _ order_refl, of _ _ f]) - show "continuous_on ((\y. x + (g' y - g' (f x))) ` cball (f x) e) f" - by (rule continuous_on_subset[OF contf]) (use z in blast) - show "continuous_on (cball (f x) e) (\y. x + (g' y - g' (f x)))" - by (intro continuous_intros linear_continuous_on[OF \bounded_linear g'\]) - qed - next - fix y z - assume y: "y \ cball (f x) (e / 2)" and z: "z \ cball (f x) e" - have "norm (g' (z - f x)) \ norm (z - f x) * B" - using B by auto - also have "\ \ e * B" - by (metis B(1) z dist_norm mem_cball norm_minus_commute real_mult_le_cancel_iff1) - also have "\ < e0" - using B(1) e(2) pos_less_divide_eq by blast - finally have *: "norm (x + g' (z - f x) - x) < e0" - by auto - have **: "f x + f' (x + g' (z - f x) - x) = z" - using assms(6)[unfolded o_def id_def,THEN cong] - by auto - have "norm (f x - (y + (z - f (x + g' (z - f x))))) \ - norm (f (x + g' (z - f x)) - z) + norm (f x - y)" - using norm_triangle_ineq[of "f (x + g'(z - f x)) - z" "f x - y"] - by (auto simp add: algebra_simps) - also have "\ \ 1 / (B * 2) * norm (g' (z - f x)) + norm (f x - y)" - using e0(2)[rule_format, OF *] - by (simp only: algebra_simps **) auto - also have "\ \ 1 / (B * 2) * norm (g' (z - f x)) + e/2" - using y by (auto simp: dist_norm) - also have "\ \ 1 / (B * 2) * B * norm (z - f x) + e/2" - using * B by (auto simp add: field_simps) - also have "\ \ 1 / 2 * norm (z - f x) + e/2" - by auto - also have "\ \ e/2 + e/2" - using B(1) \norm (z - f x) * B \ e * B\ by auto - finally show "y + (z - f (x + g' (z - f x))) \ cball (f x) e" - by (auto simp: dist_norm) - qed (use e that in auto) - show ?thesis - unfolding mem_interior - proof (intro exI conjI subsetI) - fix y - assume "y \ ball (f x) (e / 2)" - then have *: "y \ cball (f x) (e / 2)" - by auto - obtain z where z: "z \ cball (f x) e" "f (x + g' (z - f x)) = y" - using lem * by blast - then have "norm (g' (z - f x)) \ norm (z - f x) * B" - using B - by (auto simp add: field_simps) - also have "\ \ e * B" - by (metis B(1) dist_norm mem_cball norm_minus_commute real_mult_le_cancel_iff1 z(1)) - also have "\ \ e1" - using e B unfolding less_divide_eq by auto - finally have "x + g'(z - f x) \ T" - by (metis add_diff_cancel diff_diff_add dist_norm e1(2) mem_cball norm_minus_commute subset_eq) - then show "y \ f ` T" - using z by auto - qed (use e in auto) -qed - -text \Hence the following eccentric variant of the inverse function theorem. - This has no continuity assumptions, but we do need the inverse function. - We could put \f' \ g = I\ but this happens to fit with the minimal linear - algebra theory I've set up so far.\ - -lemma has_derivative_inverse_strong: - fixes f :: "'n::euclidean_space \ 'n" - assumes "open S" - and "x \ S" - and contf: "continuous_on S f" - and gf: "\x. x \ S \ g (f x) = x" - and derf: "(f has_derivative f') (at x)" - and id: "f' \ g' = id" - shows "(g has_derivative g') (at (f x))" -proof - - have linf: "bounded_linear f'" - using derf unfolding has_derivative_def by auto - then have ling: "bounded_linear g'" - unfolding linear_conv_bounded_linear[symmetric] - using id right_inverse_linear by blast - moreover have "g' \ f' = id" - using id linf ling - unfolding linear_conv_bounded_linear[symmetric] - using linear_inverse_left - by auto - moreover have *: "\T. \T \ S; x \ interior T\ \ f x \ interior (f ` T)" - apply (rule sussmann_open_mapping) - apply (rule assms ling)+ - apply auto - done - have "continuous (at (f x)) g" - unfolding continuous_at Lim_at - proof (rule, rule) - fix e :: real - assume "e > 0" - then have "f x \ interior (f ` (ball x e \ S))" - using *[rule_format,of "ball x e \ S"] \x \ S\ - by (auto simp add: interior_open[OF open_ball] interior_open[OF assms(1)]) - then obtain d where d: "0 < d" "ball (f x) d \ f ` (ball x e \ S)" - unfolding mem_interior by blast - show "\d>0. \y. 0 < dist y (f x) \ dist y (f x) < d \ dist (g y) (g (f x)) < e" - proof (intro exI allI impI conjI) - fix y - assume "0 < dist y (f x) \ dist y (f x) < d" - then have "g y \ g ` f ` (ball x e \ S)" - by (metis d(2) dist_commute mem_ball rev_image_eqI subset_iff) - then show "dist (g y) (g (f x)) < e" - using gf[OF \x \ S\] - by (simp add: assms(4) dist_commute image_iff) - qed (use d in auto) - qed - moreover have "f x \ interior (f ` S)" - apply (rule sussmann_open_mapping) - apply (rule assms ling)+ - using interior_open[OF assms(1)] and \x \ S\ - apply auto - done - moreover have "f (g y) = y" if "y \ interior (f ` S)" for y - by (metis gf imageE interiorE subsetD that) - ultimately show ?thesis using assms - by (metis has_derivative_inverse_basic_x open_interior) -qed - -text \A rewrite based on the other domain.\ - -lemma has_derivative_inverse_strong_x: - fixes f :: "'a::euclidean_space \ 'a" - assumes "open S" - and "g y \ S" - and "continuous_on S f" - and "\x. x \ S \ g (f x) = x" - and "(f has_derivative f') (at (g y))" - and "f' \ g' = id" - and "f (g y) = y" - shows "(g has_derivative g') (at y)" - using has_derivative_inverse_strong[OF assms(1-6)] - unfolding assms(7) - by simp - -text \On a region.\ - -theorem has_derivative_inverse_on: - fixes f :: "'n::euclidean_space \ 'n" - assumes "open S" - and derf: "\x. x \ S \ (f has_derivative f'(x)) (at x)" - and "\x. x \ S \ g (f x) = x" - and "f' x \ g' x = id" - and "x \ S" - shows "(g has_derivative g'(x)) (at (f x))" -proof (rule has_derivative_inverse_strong[where g'="g' x" and f=f]) - show "continuous_on S f" - unfolding continuous_on_eq_continuous_at[OF \open S\] - using derf has_derivative_continuous by blast -qed (use assms in auto) - - text \Invertible derivative continuous at a point implies local injectivity. It's only for this we need continuity of the derivative, except of course if we want the fact that the inverse derivative is diff -r 191bb458b95c -r f95193669ad7 src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy --- a/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Tue Aug 27 23:12:28 2019 +0200 +++ b/src/HOL/Analysis/Equivalence_Lebesgue_Henstock_Integration.thy Wed Aug 28 00:08:14 2019 +0200 @@ -5,7 +5,7 @@ *) theory Equivalence_Lebesgue_Henstock_Integration - imports Lebesgue_Measure Henstock_Kurzweil_Integration Complete_Measure Set_Integral + imports Lebesgue_Measure Henstock_Kurzweil_Integration Complete_Measure Set_Integral Homeomorphism begin lemma le_left_mono: "x \ y \ y \ a \ x \ (a::'a::preorder)" diff -r 191bb458b95c -r f95193669ad7 src/HOL/Analysis/Further_Topology.thy --- a/src/HOL/Analysis/Further_Topology.thy Tue Aug 27 23:12:28 2019 +0200 +++ b/src/HOL/Analysis/Further_Topology.thy Wed Aug 28 00:08:14 2019 +0200 @@ -6,6 +6,18 @@ imports Weierstrass_Theorems Polytope Complex_Transcendental Equivalence_Lebesgue_Henstock_Integration begin +subsection\<^marker>\tag unimportant\\Retracts and intervals in ordered euclidean space\ + +lemma ANR_interval [iff]: + fixes a :: "'a::ordered_euclidean_space" + shows "ANR{a..b}" + by (simp add: interval_cbox) + +lemma ENR_interval [iff]: + fixes a :: "'a::ordered_euclidean_space" + shows "ENR{a..b}" + by (auto simp: interval_cbox) + subsection\A map from a sphere to a higher dimensional sphere is nullhomotopic\ lemma spheremap_lemma1: diff -r 191bb458b95c -r f95193669ad7 src/HOL/Analysis/Homeomorphism.thy --- a/src/HOL/Analysis/Homeomorphism.thy Tue Aug 27 23:12:28 2019 +0200 +++ b/src/HOL/Analysis/Homeomorphism.thy Wed Aug 28 00:08:14 2019 +0200 @@ -38,246 +38,6 @@ subsection \Homeomorphism of all convex compact sets with nonempty interior\ -proposition ray_to_rel_frontier: - fixes a :: "'a::real_inner" - assumes "bounded S" - and a: "a \ rel_interior S" - and aff: "(a + l) \ affine hull S" - and "l \ 0" - obtains d where "0 < d" "(a + d *\<^sub>R l) \ rel_frontier S" - "\e. \0 \ e; e < d\ \ (a + e *\<^sub>R l) \ rel_interior S" -proof - - have aaff: "a \ affine hull S" - by (meson a hull_subset rel_interior_subset rev_subsetD) - let ?D = "{d. 0 < d \ a + d *\<^sub>R l \ rel_interior S}" - obtain B where "B > 0" and B: "S \ ball a B" - using bounded_subset_ballD [OF \bounded S\] by blast - have "a + (B / norm l) *\<^sub>R l \ ball a B" - by (simp add: dist_norm \l \ 0\) - with B have "a + (B / norm l) *\<^sub>R l \ rel_interior S" - using rel_interior_subset subsetCE by blast - with \B > 0\ \l \ 0\ have nonMT: "?D \ {}" - using divide_pos_pos zero_less_norm_iff by fastforce - have bdd: "bdd_below ?D" - by (metis (no_types, lifting) bdd_belowI le_less mem_Collect_eq) - have relin_Ex: "\x. x \ rel_interior S \ - \e>0. \x'\affine hull S. dist x' x < e \ x' \ rel_interior S" - using openin_rel_interior [of S] by (simp add: openin_euclidean_subtopology_iff) - define d where "d = Inf ?D" - obtain \ where "0 < \" and \: "\\. \0 \ \; \ < \\ \ (a + \ *\<^sub>R l) \ rel_interior S" - proof - - obtain e where "e>0" - and e: "\x'. x' \ affine hull S \ dist x' a < e \ x' \ rel_interior S" - using relin_Ex a by blast - show thesis - proof (rule_tac \ = "e / norm l" in that) - show "0 < e / norm l" by (simp add: \0 < e\ \l \ 0\) - next - show "a + \ *\<^sub>R l \ rel_interior S" if "0 \ \" "\ < e / norm l" for \ - proof (rule e) - show "a + \ *\<^sub>R l \ affine hull S" - by (metis (no_types) add_diff_cancel_left' aff affine_affine_hull mem_affine_3_minus aaff) - show "dist (a + \ *\<^sub>R l) a < e" - using that by (simp add: \l \ 0\ dist_norm pos_less_divide_eq) - qed - qed - qed - have inint: "\e. \0 \ e; e < d\ \ a + e *\<^sub>R l \ rel_interior S" - unfolding d_def using cInf_lower [OF _ bdd] - by (metis (no_types, lifting) a add.right_neutral le_less mem_Collect_eq not_less real_vector.scale_zero_left) - have "\ \ d" - unfolding d_def - apply (rule cInf_greatest [OF nonMT]) - using \ dual_order.strict_implies_order le_less_linear by blast - with \0 < \\ have "0 < d" by simp - have "a + d *\<^sub>R l \ rel_interior S" - proof - assume adl: "a + d *\<^sub>R l \ rel_interior S" - obtain e where "e > 0" - and e: "\x'. x' \ affine hull S \ dist x' (a + d *\<^sub>R l) < e \ x' \ rel_interior S" - using relin_Ex adl by blast - have "d + e / norm l \ Inf {d. 0 < d \ a + d *\<^sub>R l \ rel_interior S}" - proof (rule cInf_greatest [OF nonMT], clarsimp) - fix x::real - assume "0 < x" and nonrel: "a + x *\<^sub>R l \ rel_interior S" - show "d + e / norm l \ x" - proof (cases "x < d") - case True with inint nonrel \0 < x\ - show ?thesis by auto - next - case False - then have dle: "x < d + e / norm l \ dist (a + x *\<^sub>R l) (a + d *\<^sub>R l) < e" - by (simp add: field_simps \l \ 0\) - have ain: "a + x *\<^sub>R l \ affine hull S" - by (metis add_diff_cancel_left' aff affine_affine_hull mem_affine_3_minus aaff) - show ?thesis - using e [OF ain] nonrel dle by force - qed - qed - then show False - using \0 < e\ \l \ 0\ by (simp add: d_def [symmetric] divide_simps) - qed - moreover have "a + d *\<^sub>R l \ closure S" - proof (clarsimp simp: closure_approachable) - fix \::real assume "0 < \" - have 1: "a + (d - min d (\ / 2 / norm l)) *\<^sub>R l \ S" - apply (rule subsetD [OF rel_interior_subset inint]) - using \l \ 0\ \0 < d\ \0 < \\ by auto - have "norm l * min d (\ / (norm l * 2)) \ norm l * (\ / (norm l * 2))" - by (metis min_def mult_left_mono norm_ge_zero order_refl) - also have "... < \" - using \l \ 0\ \0 < \\ by (simp add: divide_simps) - finally have 2: "norm l * min d (\ / (norm l * 2)) < \" . - show "\y\S. dist y (a + d *\<^sub>R l) < \" - apply (rule_tac x="a + (d - min d (\ / 2 / norm l)) *\<^sub>R l" in bexI) - using 1 2 \0 < d\ \0 < \\ apply (auto simp: algebra_simps) - done - qed - ultimately have infront: "a + d *\<^sub>R l \ rel_frontier S" - by (simp add: rel_frontier_def) - show ?thesis - by (rule that [OF \0 < d\ infront inint]) -qed - -corollary ray_to_frontier: - fixes a :: "'a::euclidean_space" - assumes "bounded S" - and a: "a \ interior S" - and "l \ 0" - obtains d where "0 < d" "(a + d *\<^sub>R l) \ frontier S" - "\e. \0 \ e; e < d\ \ (a + e *\<^sub>R l) \ interior S" -proof - - have "interior S = rel_interior S" - using a rel_interior_nonempty_interior by auto - then have "a \ rel_interior S" - using a by simp - then show ?thesis - apply (rule ray_to_rel_frontier [OF \bounded S\ _ _ \l \ 0\]) - using a affine_hull_nonempty_interior apply blast - by (simp add: \interior S = rel_interior S\ frontier_def rel_frontier_def that) -qed - - -lemma segment_to_rel_frontier_aux: - fixes x :: "'a::euclidean_space" - assumes "convex S" "bounded S" and x: "x \ rel_interior S" and y: "y \ S" and xy: "x \ y" - obtains z where "z \ rel_frontier S" "y \ closed_segment x z" - "open_segment x z \ rel_interior S" -proof - - have "x + (y - x) \ affine hull S" - using hull_inc [OF y] by auto - then obtain d where "0 < d" and df: "(x + d *\<^sub>R (y-x)) \ rel_frontier S" - and di: "\e. \0 \ e; e < d\ \ (x + e *\<^sub>R (y-x)) \ rel_interior S" - by (rule ray_to_rel_frontier [OF \bounded S\ x]) (use xy in auto) - show ?thesis - proof - show "x + d *\<^sub>R (y - x) \ rel_frontier S" - by (simp add: df) - next - have "open_segment x y \ rel_interior S" - using rel_interior_closure_convex_segment [OF \convex S\ x] closure_subset y by blast - moreover have "x + d *\<^sub>R (y - x) \ open_segment x y" if "d < 1" - using xy - apply (auto simp: in_segment) - apply (rule_tac x="d" in exI) - using \0 < d\ that apply (auto simp: divide_simps algebra_simps) - done - ultimately have "1 \ d" - using df rel_frontier_def by fastforce - moreover have "x = (1 / d) *\<^sub>R x + ((d - 1) / d) *\<^sub>R x" - by (metis \0 < d\ add.commute add_divide_distrib diff_add_cancel divide_self_if less_irrefl scaleR_add_left scaleR_one) - ultimately show "y \ closed_segment x (x + d *\<^sub>R (y - x))" - apply (auto simp: in_segment) - apply (rule_tac x="1/d" in exI) - apply (auto simp: divide_simps algebra_simps) - done - next - show "open_segment x (x + d *\<^sub>R (y - x)) \ rel_interior S" - apply (rule rel_interior_closure_convex_segment [OF \convex S\ x]) - using df rel_frontier_def by auto - qed -qed - -lemma segment_to_rel_frontier: - fixes x :: "'a::euclidean_space" - assumes S: "convex S" "bounded S" and x: "x \ rel_interior S" - and y: "y \ S" and xy: "\(x = y \ S = {x})" - obtains z where "z \ rel_frontier S" "y \ closed_segment x z" - "open_segment x z \ rel_interior S" -proof (cases "x=y") - case True - with xy have "S \ {x}" - by blast - with True show ?thesis - by (metis Set.set_insert all_not_in_conv ends_in_segment(1) insert_iff segment_to_rel_frontier_aux[OF S x] that y) -next - case False - then show ?thesis - using segment_to_rel_frontier_aux [OF S x y] that by blast -qed - -proposition rel_frontier_not_sing: - fixes a :: "'a::euclidean_space" - assumes "bounded S" - shows "rel_frontier S \ {a}" -proof (cases "S = {}") - case True then show ?thesis by simp -next - case False - then obtain z where "z \ S" - by blast - then show ?thesis - proof (cases "S = {z}") - case True then show ?thesis by simp - next - case False - then obtain w where "w \ S" "w \ z" - using \z \ S\ by blast - show ?thesis - proof - assume "rel_frontier S = {a}" - then consider "w \ rel_frontier S" | "z \ rel_frontier S" - using \w \ z\ by auto - then show False - proof cases - case 1 - then have w: "w \ rel_interior S" - using \w \ S\ closure_subset rel_frontier_def by fastforce - have "w + (w - z) \ affine hull S" - by (metis \w \ S\ \z \ S\ affine_affine_hull hull_inc mem_affine_3_minus scaleR_one) - then obtain e where "0 < e" "(w + e *\<^sub>R (w - z)) \ rel_frontier S" - using \w \ z\ \z \ S\ by (metis assms ray_to_rel_frontier right_minus_eq w) - moreover obtain d where "0 < d" "(w + d *\<^sub>R (z - w)) \ rel_frontier S" - using ray_to_rel_frontier [OF \bounded S\ w, of "1 *\<^sub>R (z - w)"] \w \ z\ \z \ S\ - by (metis add.commute add.right_neutral diff_add_cancel hull_inc scaleR_one) - ultimately have "d *\<^sub>R (z - w) = e *\<^sub>R (w - z)" - using \rel_frontier S = {a}\ by force - moreover have "e \ -d " - using \0 < e\ \0 < d\ by force - ultimately show False - by (metis (no_types, lifting) \w \ z\ eq_iff_diff_eq_0 minus_diff_eq real_vector.scale_cancel_right real_vector.scale_minus_right scaleR_left.minus) - next - case 2 - then have z: "z \ rel_interior S" - using \z \ S\ closure_subset rel_frontier_def by fastforce - have "z + (z - w) \ affine hull S" - by (metis \z \ S\ \w \ S\ affine_affine_hull hull_inc mem_affine_3_minus scaleR_one) - then obtain e where "0 < e" "(z + e *\<^sub>R (z - w)) \ rel_frontier S" - using \w \ z\ \w \ S\ by (metis assms ray_to_rel_frontier right_minus_eq z) - moreover obtain d where "0 < d" "(z + d *\<^sub>R (w - z)) \ rel_frontier S" - using ray_to_rel_frontier [OF \bounded S\ z, of "1 *\<^sub>R (w - z)"] \w \ z\ \w \ S\ - by (metis add.commute add.right_neutral diff_add_cancel hull_inc scaleR_one) - ultimately have "d *\<^sub>R (w - z) = e *\<^sub>R (z - w)" - using \rel_frontier S = {a}\ by force - moreover have "e \ -d " - using \0 < e\ \0 < d\ by force - ultimately show False - by (metis (no_types, lifting) \w \ z\ eq_iff_diff_eq_0 minus_diff_eq real_vector.scale_cancel_right real_vector.scale_minus_right scaleR_left.minus) - qed - qed - qed -qed - proposition fixes S :: "'a::euclidean_space set" assumes "compact S" and 0: "0 \ rel_interior S" @@ -1268,6 +1028,20 @@ using assms by (meson zero_less_one homeomorphic_trans homeomorphic_convex_compact_cball homeomorphic_sym) +lemma homeomorphic_closed_intervals: + fixes a :: "'a::euclidean_space" and b and c :: "'a::euclidean_space" and d + assumes "box a b \ {}" and "box c d \ {}" + shows "(cbox a b) homeomorphic (cbox c d)" +apply (rule homeomorphic_convex_compact) +using assms apply auto +done + +lemma homeomorphic_closed_intervals_real: + fixes a::real and b and c::real and d + assumes "aCovering spaces and lifting results for them\ definition\<^marker>\tag important\ covering_space diff -r 191bb458b95c -r f95193669ad7 src/HOL/Analysis/Ordered_Euclidean_Space.thy --- a/src/HOL/Analysis/Ordered_Euclidean_Space.thy Tue Aug 27 23:12:28 2019 +0200 +++ b/src/HOL/Analysis/Ordered_Euclidean_Space.thy Wed Aug 28 00:08:14 2019 +0200 @@ -300,20 +300,6 @@ shows "compact {a .. b}" by (metis compact_cbox interval_cbox) -lemma homeomorphic_closed_intervals: - fixes a :: "'a::euclidean_space" and b and c :: "'a::euclidean_space" and d - assumes "box a b \ {}" and "box c d \ {}" - shows "(cbox a b) homeomorphic (cbox c d)" -apply (rule homeomorphic_convex_compact) -using assms apply auto -done - -lemma homeomorphic_closed_intervals_real: - fixes a::real and b and c::real and d - assumes "a ?rhs" by blast qed +proposition ray_to_rel_frontier: + fixes a :: "'a::real_inner" + assumes "bounded S" + and a: "a \ rel_interior S" + and aff: "(a + l) \ affine hull S" + and "l \ 0" + obtains d where "0 < d" "(a + d *\<^sub>R l) \ rel_frontier S" + "\e. \0 \ e; e < d\ \ (a + e *\<^sub>R l) \ rel_interior S" +proof - + have aaff: "a \ affine hull S" + by (meson a hull_subset rel_interior_subset rev_subsetD) + let ?D = "{d. 0 < d \ a + d *\<^sub>R l \ rel_interior S}" + obtain B where "B > 0" and B: "S \ ball a B" + using bounded_subset_ballD [OF \bounded S\] by blast + have "a + (B / norm l) *\<^sub>R l \ ball a B" + by (simp add: dist_norm \l \ 0\) + with B have "a + (B / norm l) *\<^sub>R l \ rel_interior S" + using rel_interior_subset subsetCE by blast + with \B > 0\ \l \ 0\ have nonMT: "?D \ {}" + using divide_pos_pos zero_less_norm_iff by fastforce + have bdd: "bdd_below ?D" + by (metis (no_types, lifting) bdd_belowI le_less mem_Collect_eq) + have relin_Ex: "\x. x \ rel_interior S \ + \e>0. \x'\affine hull S. dist x' x < e \ x' \ rel_interior S" + using openin_rel_interior [of S] by (simp add: openin_euclidean_subtopology_iff) + define d where "d = Inf ?D" + obtain \ where "0 < \" and \: "\\. \0 \ \; \ < \\ \ (a + \ *\<^sub>R l) \ rel_interior S" + proof - + obtain e where "e>0" + and e: "\x'. x' \ affine hull S \ dist x' a < e \ x' \ rel_interior S" + using relin_Ex a by blast + show thesis + proof (rule_tac \ = "e / norm l" in that) + show "0 < e / norm l" by (simp add: \0 < e\ \l \ 0\) + next + show "a + \ *\<^sub>R l \ rel_interior S" if "0 \ \" "\ < e / norm l" for \ + proof (rule e) + show "a + \ *\<^sub>R l \ affine hull S" + by (metis (no_types) add_diff_cancel_left' aff affine_affine_hull mem_affine_3_minus aaff) + show "dist (a + \ *\<^sub>R l) a < e" + using that by (simp add: \l \ 0\ dist_norm pos_less_divide_eq) + qed + qed + qed + have inint: "\e. \0 \ e; e < d\ \ a + e *\<^sub>R l \ rel_interior S" + unfolding d_def using cInf_lower [OF _ bdd] + by (metis (no_types, lifting) a add.right_neutral le_less mem_Collect_eq not_less real_vector.scale_zero_left) + have "\ \ d" + unfolding d_def + apply (rule cInf_greatest [OF nonMT]) + using \ dual_order.strict_implies_order le_less_linear by blast + with \0 < \\ have "0 < d" by simp + have "a + d *\<^sub>R l \ rel_interior S" + proof + assume adl: "a + d *\<^sub>R l \ rel_interior S" + obtain e where "e > 0" + and e: "\x'. x' \ affine hull S \ dist x' (a + d *\<^sub>R l) < e \ x' \ rel_interior S" + using relin_Ex adl by blast + have "d + e / norm l \ Inf {d. 0 < d \ a + d *\<^sub>R l \ rel_interior S}" + proof (rule cInf_greatest [OF nonMT], clarsimp) + fix x::real + assume "0 < x" and nonrel: "a + x *\<^sub>R l \ rel_interior S" + show "d + e / norm l \ x" + proof (cases "x < d") + case True with inint nonrel \0 < x\ + show ?thesis by auto + next + case False + then have dle: "x < d + e / norm l \ dist (a + x *\<^sub>R l) (a + d *\<^sub>R l) < e" + by (simp add: field_simps \l \ 0\) + have ain: "a + x *\<^sub>R l \ affine hull S" + by (metis add_diff_cancel_left' aff affine_affine_hull mem_affine_3_minus aaff) + show ?thesis + using e [OF ain] nonrel dle by force + qed + qed + then show False + using \0 < e\ \l \ 0\ by (simp add: d_def [symmetric] divide_simps) + qed + moreover have "a + d *\<^sub>R l \ closure S" + proof (clarsimp simp: closure_approachable) + fix \::real assume "0 < \" + have 1: "a + (d - min d (\ / 2 / norm l)) *\<^sub>R l \ S" + apply (rule subsetD [OF rel_interior_subset inint]) + using \l \ 0\ \0 < d\ \0 < \\ by auto + have "norm l * min d (\ / (norm l * 2)) \ norm l * (\ / (norm l * 2))" + by (metis min_def mult_left_mono norm_ge_zero order_refl) + also have "... < \" + using \l \ 0\ \0 < \\ by (simp add: divide_simps) + finally have 2: "norm l * min d (\ / (norm l * 2)) < \" . + show "\y\S. dist y (a + d *\<^sub>R l) < \" + apply (rule_tac x="a + (d - min d (\ / 2 / norm l)) *\<^sub>R l" in bexI) + using 1 2 \0 < d\ \0 < \\ apply (auto simp: algebra_simps) + done + qed + ultimately have infront: "a + d *\<^sub>R l \ rel_frontier S" + by (simp add: rel_frontier_def) + show ?thesis + by (rule that [OF \0 < d\ infront inint]) +qed + +corollary ray_to_frontier: + fixes a :: "'a::euclidean_space" + assumes "bounded S" + and a: "a \ interior S" + and "l \ 0" + obtains d where "0 < d" "(a + d *\<^sub>R l) \ frontier S" + "\e. \0 \ e; e < d\ \ (a + e *\<^sub>R l) \ interior S" +proof - + have "interior S = rel_interior S" + using a rel_interior_nonempty_interior by auto + then have "a \ rel_interior S" + using a by simp + then show ?thesis + apply (rule ray_to_rel_frontier [OF \bounded S\ _ _ \l \ 0\]) + using a affine_hull_nonempty_interior apply blast + by (simp add: \interior S = rel_interior S\ frontier_def rel_frontier_def that) +qed + + +lemma segment_to_rel_frontier_aux: + fixes x :: "'a::euclidean_space" + assumes "convex S" "bounded S" and x: "x \ rel_interior S" and y: "y \ S" and xy: "x \ y" + obtains z where "z \ rel_frontier S" "y \ closed_segment x z" + "open_segment x z \ rel_interior S" +proof - + have "x + (y - x) \ affine hull S" + using hull_inc [OF y] by auto + then obtain d where "0 < d" and df: "(x + d *\<^sub>R (y-x)) \ rel_frontier S" + and di: "\e. \0 \ e; e < d\ \ (x + e *\<^sub>R (y-x)) \ rel_interior S" + by (rule ray_to_rel_frontier [OF \bounded S\ x]) (use xy in auto) + show ?thesis + proof + show "x + d *\<^sub>R (y - x) \ rel_frontier S" + by (simp add: df) + next + have "open_segment x y \ rel_interior S" + using rel_interior_closure_convex_segment [OF \convex S\ x] closure_subset y by blast + moreover have "x + d *\<^sub>R (y - x) \ open_segment x y" if "d < 1" + using xy + apply (auto simp: in_segment) + apply (rule_tac x="d" in exI) + using \0 < d\ that apply (auto simp: divide_simps algebra_simps) + done + ultimately have "1 \ d" + using df rel_frontier_def by fastforce + moreover have "x = (1 / d) *\<^sub>R x + ((d - 1) / d) *\<^sub>R x" + by (metis \0 < d\ add.commute add_divide_distrib diff_add_cancel divide_self_if less_irrefl scaleR_add_left scaleR_one) + ultimately show "y \ closed_segment x (x + d *\<^sub>R (y - x))" + apply (auto simp: in_segment) + apply (rule_tac x="1/d" in exI) + apply (auto simp: divide_simps algebra_simps) + done + next + show "open_segment x (x + d *\<^sub>R (y - x)) \ rel_interior S" + apply (rule rel_interior_closure_convex_segment [OF \convex S\ x]) + using df rel_frontier_def by auto + qed +qed + +lemma segment_to_rel_frontier: + fixes x :: "'a::euclidean_space" + assumes S: "convex S" "bounded S" and x: "x \ rel_interior S" + and y: "y \ S" and xy: "\(x = y \ S = {x})" + obtains z where "z \ rel_frontier S" "y \ closed_segment x z" + "open_segment x z \ rel_interior S" +proof (cases "x=y") + case True + with xy have "S \ {x}" + by blast + with True show ?thesis + by (metis Set.set_insert all_not_in_conv ends_in_segment(1) insert_iff segment_to_rel_frontier_aux[OF S x] that y) +next + case False + then show ?thesis + using segment_to_rel_frontier_aux [OF S x y] that by blast +qed + +proposition rel_frontier_not_sing: + fixes a :: "'a::euclidean_space" + assumes "bounded S" + shows "rel_frontier S \ {a}" +proof (cases "S = {}") + case True then show ?thesis by simp +next + case False + then obtain z where "z \ S" + by blast + then show ?thesis + proof (cases "S = {z}") + case True then show ?thesis by simp + next + case False + then obtain w where "w \ S" "w \ z" + using \z \ S\ by blast + show ?thesis + proof + assume "rel_frontier S = {a}" + then consider "w \ rel_frontier S" | "z \ rel_frontier S" + using \w \ z\ by auto + then show False + proof cases + case 1 + then have w: "w \ rel_interior S" + using \w \ S\ closure_subset rel_frontier_def by fastforce + have "w + (w - z) \ affine hull S" + by (metis \w \ S\ \z \ S\ affine_affine_hull hull_inc mem_affine_3_minus scaleR_one) + then obtain e where "0 < e" "(w + e *\<^sub>R (w - z)) \ rel_frontier S" + using \w \ z\ \z \ S\ by (metis assms ray_to_rel_frontier right_minus_eq w) + moreover obtain d where "0 < d" "(w + d *\<^sub>R (z - w)) \ rel_frontier S" + using ray_to_rel_frontier [OF \bounded S\ w, of "1 *\<^sub>R (z - w)"] \w \ z\ \z \ S\ + by (metis add.commute add.right_neutral diff_add_cancel hull_inc scaleR_one) + ultimately have "d *\<^sub>R (z - w) = e *\<^sub>R (w - z)" + using \rel_frontier S = {a}\ by force + moreover have "e \ -d " + using \0 < e\ \0 < d\ by force + ultimately show False + by (metis (no_types, lifting) \w \ z\ eq_iff_diff_eq_0 minus_diff_eq real_vector.scale_cancel_right real_vector.scale_minus_right scaleR_left.minus) + next + case 2 + then have z: "z \ rel_interior S" + using \z \ S\ closure_subset rel_frontier_def by fastforce + have "z + (z - w) \ affine hull S" + by (metis \z \ S\ \w \ S\ affine_affine_hull hull_inc mem_affine_3_minus scaleR_one) + then obtain e where "0 < e" "(z + e *\<^sub>R (z - w)) \ rel_frontier S" + using \w \ z\ \w \ S\ by (metis assms ray_to_rel_frontier right_minus_eq z) + moreover obtain d where "0 < d" "(z + d *\<^sub>R (w - z)) \ rel_frontier S" + using ray_to_rel_frontier [OF \bounded S\ z, of "1 *\<^sub>R (w - z)"] \w \ z\ \w \ S\ + by (metis add.commute add.right_neutral diff_add_cancel hull_inc scaleR_one) + ultimately have "d *\<^sub>R (w - z) = e *\<^sub>R (z - w)" + using \rel_frontier S = {a}\ by force + moreover have "e \ -d " + using \0 < e\ \0 < d\ by force + ultimately show False + by (metis (no_types, lifting) \w \ z\ eq_iff_diff_eq_0 minus_diff_eq real_vector.scale_cancel_right real_vector.scale_minus_right scaleR_left.minus) + qed + qed + qed +qed + subsection\<^marker>\tag unimportant\ \Convexity on direct sums\