1219 show "dist (x - min (e/2 / norm (x - a)) 1 *\<^sub>R (x - a)) x < e" |
1219 show "dist (x - min (e/2 / norm (x - a)) 1 *\<^sub>R (x - a)) x < e" |
1220 using \<open>0 < e\<close> by (auto simp: dist_norm min_def) |
1220 using \<open>0 < e\<close> by (auto simp: dist_norm min_def) |
1221 show "x - min (e/2 / norm (x - a)) 1 *\<^sub>R (x - a) \<in> interior S" |
1221 show "x - min (e/2 / norm (x - a)) 1 *\<^sub>R (x - a) \<in> interior S" |
1222 apply (clarsimp simp add: min_def a) |
1222 apply (clarsimp simp add: min_def a) |
1223 apply (rule mem_interior_closure_convex_shrink [OF \<open>convex S\<close> a x]) |
1223 apply (rule mem_interior_closure_convex_shrink [OF \<open>convex S\<close> a x]) |
1224 using \<open>0 < e\<close> False apply (auto simp: divide_simps) |
1224 using \<open>0 < e\<close> False apply (auto simp: field_split_simps) |
1225 done |
1225 done |
1226 qed |
1226 qed |
1227 qed |
1227 qed |
1228 qed |
1228 qed |
1229 qed |
1229 qed |
3431 show ?thesis |
3431 show ?thesis |
3432 using e [OF ain] nonrel dle by force |
3432 using e [OF ain] nonrel dle by force |
3433 qed |
3433 qed |
3434 qed |
3434 qed |
3435 then show False |
3435 then show False |
3436 using \<open>0 < e\<close> \<open>l \<noteq> 0\<close> by (simp add: d_def [symmetric] divide_simps) |
3436 using \<open>0 < e\<close> \<open>l \<noteq> 0\<close> by (simp add: d_def [symmetric] field_simps) |
3437 qed |
3437 qed |
3438 moreover have "a + d *\<^sub>R l \<in> closure S" |
3438 moreover have "a + d *\<^sub>R l \<in> closure S" |
3439 proof (clarsimp simp: closure_approachable) |
3439 proof (clarsimp simp: closure_approachable) |
3440 fix \<eta>::real assume "0 < \<eta>" |
3440 fix \<eta>::real assume "0 < \<eta>" |
3441 have 1: "a + (d - min d (\<eta> / 2 / norm l)) *\<^sub>R l \<in> S" |
3441 have 1: "a + (d - min d (\<eta> / 2 / norm l)) *\<^sub>R l \<in> S" |
3442 apply (rule subsetD [OF rel_interior_subset inint]) |
3442 apply (rule subsetD [OF rel_interior_subset inint]) |
3443 using \<open>l \<noteq> 0\<close> \<open>0 < d\<close> \<open>0 < \<eta>\<close> by auto |
3443 using \<open>l \<noteq> 0\<close> \<open>0 < d\<close> \<open>0 < \<eta>\<close> by auto |
3444 have "norm l * min d (\<eta> / (norm l * 2)) \<le> norm l * (\<eta> / (norm l * 2))" |
3444 have "norm l * min d (\<eta> / (norm l * 2)) \<le> norm l * (\<eta> / (norm l * 2))" |
3445 by (metis min_def mult_left_mono norm_ge_zero order_refl) |
3445 by (metis min_def mult_left_mono norm_ge_zero order_refl) |
3446 also have "... < \<eta>" |
3446 also have "... < \<eta>" |
3447 using \<open>l \<noteq> 0\<close> \<open>0 < \<eta>\<close> by (simp add: divide_simps) |
3447 using \<open>l \<noteq> 0\<close> \<open>0 < \<eta>\<close> by (simp add: field_simps) |
3448 finally have 2: "norm l * min d (\<eta> / (norm l * 2)) < \<eta>" . |
3448 finally have 2: "norm l * min d (\<eta> / (norm l * 2)) < \<eta>" . |
3449 show "\<exists>y\<in>S. dist y (a + d *\<^sub>R l) < \<eta>" |
3449 show "\<exists>y\<in>S. dist y (a + d *\<^sub>R l) < \<eta>" |
3450 apply (rule_tac x="a + (d - min d (\<eta> / 2 / norm l)) *\<^sub>R l" in bexI) |
3450 apply (rule_tac x="a + (d - min d (\<eta> / 2 / norm l)) *\<^sub>R l" in bexI) |
3451 using 1 2 \<open>0 < d\<close> \<open>0 < \<eta>\<close> apply (auto simp: algebra_simps) |
3451 using 1 2 \<open>0 < d\<close> \<open>0 < \<eta>\<close> apply (auto simp: algebra_simps) |
3452 done |
3452 done |
3496 using rel_interior_closure_convex_segment [OF \<open>convex S\<close> x] closure_subset y by blast |
3496 using rel_interior_closure_convex_segment [OF \<open>convex S\<close> x] closure_subset y by blast |
3497 moreover have "x + d *\<^sub>R (y - x) \<in> open_segment x y" if "d < 1" |
3497 moreover have "x + d *\<^sub>R (y - x) \<in> open_segment x y" if "d < 1" |
3498 using xy |
3498 using xy |
3499 apply (auto simp: in_segment) |
3499 apply (auto simp: in_segment) |
3500 apply (rule_tac x="d" in exI) |
3500 apply (rule_tac x="d" in exI) |
3501 using \<open>0 < d\<close> that apply (auto simp: divide_simps algebra_simps) |
3501 using \<open>0 < d\<close> that apply (auto simp: algebra_simps) |
3502 done |
3502 done |
3503 ultimately have "1 \<le> d" |
3503 ultimately have "1 \<le> d" |
3504 using df rel_frontier_def by fastforce |
3504 using df rel_frontier_def by fastforce |
3505 moreover have "x = (1 / d) *\<^sub>R x + ((d - 1) / d) *\<^sub>R x" |
3505 moreover have "x = (1 / d) *\<^sub>R x + ((d - 1) / d) *\<^sub>R x" |
3506 by (metis \<open>0 < d\<close> add.commute add_divide_distrib diff_add_cancel divide_self_if less_irrefl scaleR_add_left scaleR_one) |
3506 by (metis \<open>0 < d\<close> add.commute add_divide_distrib diff_add_cancel divide_self_if less_irrefl scaleR_add_left scaleR_one) |
3507 ultimately show "y \<in> closed_segment x (x + d *\<^sub>R (y - x))" |
3507 ultimately show "y \<in> closed_segment x (x + d *\<^sub>R (y - x))" |
3508 apply (auto simp: in_segment) |
3508 apply (auto simp: in_segment) |
3509 apply (rule_tac x="1/d" in exI) |
3509 apply (rule_tac x="1/d" in exI) |
3510 apply (auto simp: divide_simps algebra_simps) |
3510 apply (auto simp: algebra_simps) |
3511 done |
3511 done |
3512 next |
3512 next |
3513 show "open_segment x (x + d *\<^sub>R (y - x)) \<subseteq> rel_interior S" |
3513 show "open_segment x (x + d *\<^sub>R (y - x)) \<subseteq> rel_interior S" |
3514 apply (rule rel_interior_closure_convex_segment [OF \<open>convex S\<close> x]) |
3514 apply (rule rel_interior_closure_convex_segment [OF \<open>convex S\<close> x]) |
3515 using df rel_frontier_def by auto |
3515 using df rel_frontier_def by auto |
5970 moreover have "a /\<^sub>R (norm a) \<in> span S" |
5970 moreover have "a /\<^sub>R (norm a) \<in> span S" |
5971 by (simp add: \<open>a \<in> S\<close> span_scale span_base) |
5971 by (simp add: \<open>a \<in> S\<close> span_scale span_base) |
5972 ultimately have ass: "a /\<^sub>R (norm a) \<in> span S \<inter> sphere 0 1" |
5972 ultimately have ass: "a /\<^sub>R (norm a) \<in> span S \<inter> sphere 0 1" |
5973 by simp |
5973 by simp |
5974 have aa: "a /\<^sub>R (norm a) \<in> (\<Inter>c\<in>C. {x. 0 \<le> c \<bullet> x})" |
5974 have aa: "a /\<^sub>R (norm a) \<in> (\<Inter>c\<in>C. {x. 0 \<le> c \<bullet> x})" |
5975 apply (clarsimp simp add: divide_simps) |
5975 apply (clarsimp simp add: field_split_simps) |
5976 using ab \<open>0 < b\<close> |
5976 using ab \<open>0 < b\<close> |
5977 by (metis hull_inc inner_commute less_eq_real_def less_trans) |
5977 by (metis hull_inc inner_commute less_eq_real_def less_trans) |
5978 show ?thesis |
5978 show ?thesis |
5979 apply (simp add: C k_def) |
5979 apply (simp add: C k_def) |
5980 using ass aa Int_iff empty_iff by blast |
5980 using ass aa Int_iff empty_iff by blast |
7444 have "closure (\<Union>x\<in>- S. \<Union>y\<in>ball 0 (1 / (2 + real n)). {x + y}) |
7444 have "closure (\<Union>x\<in>- S. \<Union>y\<in>ball 0 (1 / (2 + real n)). {x + y}) |
7445 \<subseteq> (\<Union>x \<in> -S. \<Union>e \<in> cball 0 (1 / (2 + real n)). {x + e})" |
7445 \<subseteq> (\<Union>x \<in> -S. \<Union>e \<in> cball 0 (1 / (2 + real n)). {x + e})" |
7446 by (intro closure_minimal UN_mono ball_subset_cball order_refl cl) |
7446 by (intro closure_minimal UN_mono ball_subset_cball order_refl cl) |
7447 also have "... \<subseteq> (\<Union>x \<in> -S. \<Union>y\<in>ball 0 (1 / (1 + real n)). {x + y})" |
7447 also have "... \<subseteq> (\<Union>x \<in> -S. \<Union>y\<in>ball 0 (1 / (1 + real n)). {x + y})" |
7448 apply (intro UN_mono order_refl) |
7448 apply (intro UN_mono order_refl) |
7449 apply (simp add: cball_subset_ball_iff divide_simps) |
7449 apply (simp add: cball_subset_ball_iff field_split_simps) |
7450 done |
7450 done |
7451 finally show "closure (\<Union>x\<in>- S. \<Union>y\<in>ball 0 (1 / (2 + real n)). {x + y}) |
7451 finally show "closure (\<Union>x\<in>- S. \<Union>y\<in>ball 0 (1 / (2 + real n)). {x + y}) |
7452 \<subseteq> (\<Union>x \<in> -S. \<Union>y\<in>ball 0 (1 / (1 + real n)). {x + y})" . |
7452 \<subseteq> (\<Union>x \<in> -S. \<Union>y\<in>ball 0 (1 / (1 + real n)). {x + y})" . |
7453 qed |
7453 qed |
7454 have "S \<subseteq> \<Union> (range ?C)" |
7454 have "S \<subseteq> \<Union> (range ?C)" |
7461 using reals_Archimedean2 |
7461 using reals_Archimedean2 |
7462 by (metis divide_less_0_iff less_eq_real_def neq0_conv not_le of_nat_0 of_nat_1 of_nat_less_0_iff) |
7462 by (metis divide_less_0_iff less_eq_real_def neq0_conv not_le of_nat_0 of_nat_1 of_nat_less_0_iff) |
7463 obtain N2 where N2: "norm(x - a) \<le> real N2" |
7463 obtain N2 where N2: "norm(x - a) \<le> real N2" |
7464 by (meson real_arch_simple) |
7464 by (meson real_arch_simple) |
7465 have N12: "inverse((N1 + N2) + 1) \<le> inverse(N1)" |
7465 have N12: "inverse((N1 + N2) + 1) \<le> inverse(N1)" |
7466 using \<open>N1 > 0\<close> by (auto simp: divide_simps) |
7466 using \<open>N1 > 0\<close> by (auto simp: field_split_simps) |
7467 have "x \<noteq> y + z" if "y \<notin> S" "norm z < 1 / (1 + (real N1 + real N2))" for y z |
7467 have "x \<noteq> y + z" if "y \<notin> S" "norm z < 1 / (1 + (real N1 + real N2))" for y z |
7468 proof - |
7468 proof - |
7469 have "e * real N1 < e * (1 + (real N1 + real N2))" |
7469 have "e * real N1 < e * (1 + (real N1 + real N2))" |
7470 by (simp add: \<open>0 < e\<close>) |
7470 by (simp add: \<open>0 < e\<close>) |
7471 then have "1 / (1 + (real N1 + real N2)) < e" |
7471 then have "1 / (1 + (real N1 + real N2)) < e" |