src/HOL/Multivariate_Analysis/Path_Connected.thy
changeset 62618 f7f2467ab854
parent 62533 bc25f3916a99
child 62620 d21dab28b3f9
equal deleted inserted replaced
62616:b89d4b320464 62618:f7f2467ab854
  1150 
  1150 
  1151 lemma continuous_on_linepath [intro,continuous_intros]: "continuous_on s (linepath a b)"
  1151 lemma continuous_on_linepath [intro,continuous_intros]: "continuous_on s (linepath a b)"
  1152   using continuous_linepath_at
  1152   using continuous_linepath_at
  1153   by (auto intro!: continuous_at_imp_continuous_on)
  1153   by (auto intro!: continuous_at_imp_continuous_on)
  1154 
  1154 
  1155 lemma path_linepath[intro]: "path (linepath a b)"
  1155 lemma path_linepath[iff]: "path (linepath a b)"
  1156   unfolding path_def
  1156   unfolding path_def
  1157   by (rule continuous_on_linepath)
  1157   by (rule continuous_on_linepath)
  1158 
  1158 
  1159 lemma path_image_linepath[simp]: "path_image (linepath a b) = closed_segment a b"
  1159 lemma path_image_linepath[simp]: "path_image (linepath a b) = closed_segment a b"
  1160   unfolding path_image_def segment linepath_def
  1160   unfolding path_image_def segment linepath_def
  1166 
  1166 
  1167 lemma linepath_0 [simp]: "linepath 0 b x = x *\<^sub>R b"
  1167 lemma linepath_0 [simp]: "linepath 0 b x = x *\<^sub>R b"
  1168   by (simp add: linepath_def)
  1168   by (simp add: linepath_def)
  1169 
  1169 
  1170 lemma arc_linepath:
  1170 lemma arc_linepath:
  1171   assumes "a \<noteq> b"
  1171   assumes "a \<noteq> b" shows [simp]: "arc (linepath a b)"
  1172   shows "arc (linepath a b)"
       
  1173 proof -
  1172 proof -
  1174   {
  1173   {
  1175     fix x y :: "real"
  1174     fix x y :: "real"
  1176     assume "x *\<^sub>R b + y *\<^sub>R a = x *\<^sub>R a + y *\<^sub>R b"
  1175     assume "x *\<^sub>R b + y *\<^sub>R a = x *\<^sub>R a + y *\<^sub>R b"
  1177     then have "(x - y) *\<^sub>R a = (x - y) *\<^sub>R b"
  1176     then have "(x - y) *\<^sub>R a = (x - y) *\<^sub>R b"
  1190 lemma linepath_trivial [simp]: "linepath a a x = a"
  1189 lemma linepath_trivial [simp]: "linepath a a x = a"
  1191   by (simp add: linepath_def real_vector.scale_left_diff_distrib)
  1190   by (simp add: linepath_def real_vector.scale_left_diff_distrib)
  1192 
  1191 
  1193 lemma subpath_refl: "subpath a a g = linepath (g a) (g a)"
  1192 lemma subpath_refl: "subpath a a g = linepath (g a) (g a)"
  1194   by (simp add: subpath_def linepath_def algebra_simps)
  1193   by (simp add: subpath_def linepath_def algebra_simps)
       
  1194 
       
  1195 lemma linepath_of_real: "(linepath (of_real a) (of_real b) x) = of_real ((1 - x)*a + x*b)"
       
  1196   by (simp add: scaleR_conv_of_real linepath_def)
       
  1197 
       
  1198 lemma of_real_linepath: "of_real (linepath a b x) = linepath (of_real a) (of_real b) x"
       
  1199   by (metis linepath_of_real mult.right_neutral of_real_def real_scaleR_def)
       
  1200 
       
  1201 
       
  1202 subsection\<open>Segments via convex hulls\<close>
       
  1203 
       
  1204 lemma segments_subset_convex_hull:
       
  1205     "closed_segment a b \<subseteq> (convex hull {a,b,c})"
       
  1206     "closed_segment a c \<subseteq> (convex hull {a,b,c})"
       
  1207     "closed_segment b c \<subseteq> (convex hull {a,b,c})"
       
  1208     "closed_segment b a \<subseteq> (convex hull {a,b,c})"
       
  1209     "closed_segment c a \<subseteq> (convex hull {a,b,c})"
       
  1210     "closed_segment c b \<subseteq> (convex hull {a,b,c})"
       
  1211 by (auto simp: segment_convex_hull linepath_of_real  elim!: rev_subsetD [OF _ hull_mono])
       
  1212 
       
  1213 lemma midpoints_in_convex_hull:
       
  1214   assumes "x \<in> convex hull s" "y \<in> convex hull s"
       
  1215     shows "midpoint x y \<in> convex hull s"
       
  1216 proof -
       
  1217   have "(1 - inverse(2)) *\<^sub>R x + inverse(2) *\<^sub>R y \<in> convex hull s"
       
  1218     apply (rule convexD_alt)
       
  1219     using assms
       
  1220     apply (auto simp: convex_convex_hull)
       
  1221     done
       
  1222   then show ?thesis
       
  1223     by (simp add: midpoint_def algebra_simps)
       
  1224 qed
       
  1225 
       
  1226 lemma convex_hull_subset:
       
  1227     "s \<subseteq> convex hull t \<Longrightarrow> convex hull s \<subseteq> convex hull t"
       
  1228   by (simp add: convex_convex_hull subset_hull)
       
  1229 
       
  1230 lemma not_in_interior_convex_hull_3:
       
  1231   fixes a :: "complex"
       
  1232   shows "a \<notin> interior(convex hull {a,b,c})"
       
  1233         "b \<notin> interior(convex hull {a,b,c})"
       
  1234         "c \<notin> interior(convex hull {a,b,c})"
       
  1235   by (auto simp: card_insert_le_m1 not_in_interior_convex_hull)
       
  1236 
       
  1237 lemma midpoint_in_closed_segment [simp]: "midpoint a b \<in> closed_segment a b"
       
  1238   using midpoints_in_convex_hull segment_convex_hull by blast
       
  1239 
       
  1240 lemma midpoint_in_open_segment [simp]: "midpoint a b \<in> open_segment a b \<longleftrightarrow> a \<noteq> b"
       
  1241   by (simp add: midpoint_eq_endpoint(1) midpoint_eq_endpoint(2) open_segment_def)
  1195 
  1242 
  1196 
  1243 
  1197 subsection \<open>Bounding a point away from a path\<close>
  1244 subsection \<open>Bounding a point away from a path\<close>
  1198 
  1245 
  1199 lemma not_on_path_ball:
  1246 lemma not_on_path_ball: