src/HOL/Analysis/Convex_Euclidean_Space.thy
changeset 63957 c3da799b1b45
parent 63955 51a3d38d2281
child 63967 2aa42596edc3
equal deleted inserted replaced
63956:b235e845c8e8 63957:c3da799b1b45
  6415 
  6415 
  6416 lemma ends_in_segment [iff]: "a \<in> closed_segment a b" "b \<in> closed_segment a b"
  6416 lemma ends_in_segment [iff]: "a \<in> closed_segment a b" "b \<in> closed_segment a b"
  6417   unfolding segment_convex_hull
  6417   unfolding segment_convex_hull
  6418   by (auto intro!: hull_subset[unfolded subset_eq, rule_format])
  6418   by (auto intro!: hull_subset[unfolded subset_eq, rule_format])
  6419 
  6419 
       
  6420 lemma eventually_closed_segment:
       
  6421   fixes x0::"'a::real_normed_vector"
       
  6422   assumes "open X0" "x0 \<in> X0"
       
  6423   shows "\<forall>\<^sub>F x in at x0 within U. closed_segment x0 x \<subseteq> X0"
       
  6424 proof -
       
  6425   from openE[OF assms]
       
  6426   obtain e where e: "0 < e" "ball x0 e \<subseteq> X0" .
       
  6427   then have "\<forall>\<^sub>F x in at x0 within U. x \<in> ball x0 e"
       
  6428     by (auto simp: dist_commute eventually_at)
       
  6429   then show ?thesis
       
  6430   proof eventually_elim
       
  6431     case (elim x)
       
  6432     have "x0 \<in> ball x0 e" using \<open>e > 0\<close> by simp
       
  6433     from convex_ball[unfolded convex_contains_segment, rule_format, OF this elim]
       
  6434     have "closed_segment x0 x \<subseteq> ball x0 e" .
       
  6435     also note \<open>\<dots> \<subseteq> X0\<close>
       
  6436     finally show ?case .
       
  6437   qed
       
  6438 qed
       
  6439 
  6420 lemma segment_furthest_le:
  6440 lemma segment_furthest_le:
  6421   fixes a b x y :: "'a::euclidean_space"
  6441   fixes a b x y :: "'a::euclidean_space"
  6422   assumes "x \<in> closed_segment a b"
  6442   assumes "x \<in> closed_segment a b"
  6423   shows "norm (y - x) \<le> norm (y - a) \<or>  norm (y - x) \<le> norm (y - b)"
  6443   shows "norm (y - x) \<le> norm (y - a) \<or>  norm (y - x) \<le> norm (y - b)"
  6424 proof -
  6444 proof -
 10498 lemma collinear_3: "NO_MATCH 0 x \<Longrightarrow> collinear {x,y,z} \<longleftrightarrow> collinear {0, x-y, z-y}"
 10518 lemma collinear_3: "NO_MATCH 0 x \<Longrightarrow> collinear {x,y,z} \<longleftrightarrow> collinear {0, x-y, z-y}"
 10499   by (auto simp add: collinear_def)
 10519   by (auto simp add: collinear_def)
 10500 
 10520 
 10501 lemma collinear_3_expand:
 10521 lemma collinear_3_expand:
 10502    "collinear{a,b,c} \<longleftrightarrow> a = c \<or> (\<exists>u. b = u *\<^sub>R a + (1 - u) *\<^sub>R c)"
 10522    "collinear{a,b,c} \<longleftrightarrow> a = c \<or> (\<exists>u. b = u *\<^sub>R a + (1 - u) *\<^sub>R c)"
 10503 proof -                          
 10523 proof -
 10504   have "collinear{a,b,c} = collinear{a,c,b}"
 10524   have "collinear{a,b,c} = collinear{a,c,b}"
 10505     by (simp add: insert_commute)
 10525     by (simp add: insert_commute)
 10506   also have "... = collinear {0, a - c, b - c}"
 10526   also have "... = collinear {0, a - c, b - c}"
 10507     by (simp add: collinear_3)
 10527     by (simp add: collinear_3)
 10508   also have "... \<longleftrightarrow> (a = c \<or> b = c \<or> (\<exists>ca. b - c = ca *\<^sub>R (a - c)))"
 10528   also have "... \<longleftrightarrow> (a = c \<or> b = c \<or> (\<exists>ca. b - c = ca *\<^sub>R (a - c)))"