6108 by (simp_all add: contf contg cong: continuous_on_cong) |
6107 by (simp_all add: contf contg cong: continuous_on_cong) |
6109 then show ?thesis |
6108 then show ?thesis |
6110 by (rule continuous_on_Un_local_open [OF opS opT]) |
6109 by (rule continuous_on_Un_local_open [OF opS opT]) |
6111 qed |
6110 qed |
6112 |
6111 |
6113 lemma continuous_map_cases_le: |
|
6114 assumes contp: "continuous_map X euclideanreal p" |
|
6115 and contq: "continuous_map X euclideanreal q" |
|
6116 and contf: "continuous_map (subtopology X {x. x \<in> topspace X \<and> p x \<le> q x}) Y f" |
|
6117 and contg: "continuous_map (subtopology X {x. x \<in> topspace X \<and> q x \<le> p x}) Y g" |
|
6118 and fg: "\<And>x. \<lbrakk>x \<in> topspace X; p x = q x\<rbrakk> \<Longrightarrow> f x = g x" |
|
6119 shows "continuous_map X Y (\<lambda>x. if p x \<le> q x then f x else g x)" |
|
6120 proof - |
|
6121 have "continuous_map X Y (\<lambda>x. if q x - p x \<in> {0..} then f x else g x)" |
|
6122 proof (rule continuous_map_cases_function) |
|
6123 show "continuous_map X euclideanreal (\<lambda>x. q x - p x)" |
|
6124 by (intro contp contq continuous_intros) |
|
6125 show "continuous_map (subtopology X {x \<in> topspace X. q x - p x \<in> euclideanreal closure_of {0..}}) Y f" |
|
6126 by (simp add: contf) |
|
6127 show "continuous_map (subtopology X {x \<in> topspace X. q x - p x \<in> euclideanreal closure_of (topspace euclideanreal - {0..})}) Y g" |
|
6128 by (simp add: contg flip: Compl_eq_Diff_UNIV) |
|
6129 qed (auto simp: fg) |
|
6130 then show ?thesis |
|
6131 by simp |
|
6132 qed |
|
6133 |
|
6134 lemma continuous_map_cases_lt: |
|
6135 assumes contp: "continuous_map X euclideanreal p" |
|
6136 and contq: "continuous_map X euclideanreal q" |
|
6137 and contf: "continuous_map (subtopology X {x. x \<in> topspace X \<and> p x \<le> q x}) Y f" |
|
6138 and contg: "continuous_map (subtopology X {x. x \<in> topspace X \<and> q x \<le> p x}) Y g" |
|
6139 and fg: "\<And>x. \<lbrakk>x \<in> topspace X; p x = q x\<rbrakk> \<Longrightarrow> f x = g x" |
|
6140 shows "continuous_map X Y (\<lambda>x. if p x < q x then f x else g x)" |
|
6141 proof - |
|
6142 have "continuous_map X Y (\<lambda>x. if q x - p x \<in> {0<..} then f x else g x)" |
|
6143 proof (rule continuous_map_cases_function) |
|
6144 show "continuous_map X euclideanreal (\<lambda>x. q x - p x)" |
|
6145 by (intro contp contq continuous_intros) |
|
6146 show "continuous_map (subtopology X {x \<in> topspace X. q x - p x \<in> euclideanreal closure_of {0<..}}) Y f" |
|
6147 by (simp add: contf) |
|
6148 show "continuous_map (subtopology X {x \<in> topspace X. q x - p x \<in> euclideanreal closure_of (topspace euclideanreal - {0<..})}) Y g" |
|
6149 by (simp add: contg flip: Compl_eq_Diff_UNIV) |
|
6150 qed (auto simp: fg) |
|
6151 then show ?thesis |
|
6152 by simp |
|
6153 qed |
|
6154 |
|
6155 subsection\<^marker>\<open>tag unimportant\<close>\<open>The union of two collinear segments is another segment\<close> |
6112 subsection\<^marker>\<open>tag unimportant\<close>\<open>The union of two collinear segments is another segment\<close> |
6156 |
6113 |
6157 proposition\<^marker>\<open>tag unimportant\<close> in_convex_hull_exchange: |
6114 proposition\<^marker>\<open>tag unimportant\<close> in_convex_hull_exchange: |
6158 fixes a :: "'a::euclidean_space" |
6115 fixes a :: "'a::euclidean_space" |
6159 assumes a: "a \<in> convex hull S" and xS: "x \<in> convex hull S" |
6116 assumes a: "a \<in> convex hull S" and xS: "x \<in> convex hull S" |