| author | wenzelm | 
| Fri, 07 May 2021 12:43:03 +0200 | |
| changeset 73640 | f4778e08dcd7 | 
| parent 72569 | d56e4eeae967 | 
| child 73932 | fd21b4a93043 | 
| permissions | -rw-r--r-- | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1  | 
(* Title: HOL/Analysis/Starlike.thy  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2  | 
Author: L C Paulson, University of Cambridge  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3  | 
Author: Robert Himmelmann, TU Muenchen  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4  | 
Author: Bogdan Grechuk, University of Edinburgh  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5  | 
Author: Armin Heller, TU Muenchen  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6  | 
Author: Johannes Hoelzl, TU Muenchen  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
7  | 
*)  | 
| 69676 | 8  | 
chapter \<open>Unsorted\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
9  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
10  | 
theory Starlike  | 
| 
71028
 
c2465b429e6e
Line_Segment is independent of Convex_Euclidean_Space
 
immler 
parents: 
71026 
diff
changeset
 | 
11  | 
imports  | 
| 
 
c2465b429e6e
Line_Segment is independent of Convex_Euclidean_Space
 
immler 
parents: 
71026 
diff
changeset
 | 
12  | 
Convex_Euclidean_Space  | 
| 
 
c2465b429e6e
Line_Segment is independent of Convex_Euclidean_Space
 
immler 
parents: 
71026 
diff
changeset
 | 
13  | 
Line_Segment  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
14  | 
begin  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
15  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
16  | 
lemma affine_hull_closed_segment [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
17  | 
     "affine hull (closed_segment a b) = affine hull {a,b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
18  | 
by (simp add: segment_convex_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
19  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
20  | 
lemma affine_hull_open_segment [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
21  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
22  | 
    shows "affine hull (open_segment a b) = (if a = b then {} else affine hull {a,b})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
23  | 
by (metis affine_hull_convex_hull affine_hull_empty closure_open_segment closure_same_affine_hull segment_convex_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
24  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
25  | 
lemma rel_interior_closure_convex_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
26  | 
fixes S :: "_::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
27  | 
assumes "convex S" "a \<in> rel_interior S" "b \<in> closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
28  | 
shows "open_segment a b \<subseteq> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
29  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
30  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
31  | 
have [simp]: "(1 - u) *\<^sub>R a + u *\<^sub>R b = b - (1 - u) *\<^sub>R (b - a)" for u  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
32  | 
by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
33  | 
assume "x \<in> open_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
34  | 
then show "x \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
35  | 
unfolding closed_segment_def open_segment_def using assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
36  | 
by (auto intro: rel_interior_closure_convex_shrink)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
37  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
38  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
39  | 
lemma convex_hull_insert_segments:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
40  | 
"convex hull (insert a S) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
41  | 
    (if S = {} then {a} else  \<Union>x \<in> convex hull S. closed_segment a x)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
42  | 
by (force simp add: convex_hull_insert_alt in_segment)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
43  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
44  | 
lemma Int_convex_hull_insert_rel_exterior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
45  | 
fixes z :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
46  | 
assumes "convex C" "T \<subseteq> C" and z: "z \<in> rel_interior C" and dis: "disjnt S (rel_interior C)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
47  | 
shows "S \<inter> (convex hull (insert z T)) = S \<inter> (convex hull T)" (is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
48  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
49  | 
  have "T = {} \<Longrightarrow> z \<notin> S"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
50  | 
using dis z by (auto simp add: disjnt_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
51  | 
then show "?lhs \<subseteq> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
52  | 
proof (clarsimp simp add: convex_hull_insert_segments)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
53  | 
fix x y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
54  | 
assume "x \<in> S" and y: "y \<in> convex hull T" and "x \<in> closed_segment z y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
55  | 
have "y \<in> closure C"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
56  | 
by (metis y \<open>convex C\<close> \<open>T \<subseteq> C\<close> closure_subset contra_subsetD convex_hull_eq hull_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
57  | 
moreover have "x \<notin> rel_interior C"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
58  | 
by (meson \<open>x \<in> S\<close> dis disjnt_iff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
59  | 
    moreover have "x \<in> open_segment z y \<union> {z, y}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
60  | 
using \<open>x \<in> closed_segment z y\<close> closed_segment_eq_open by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
61  | 
ultimately show "x \<in> convex hull T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
62  | 
using rel_interior_closure_convex_segment [OF \<open>convex C\<close> z]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
63  | 
using y z by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
64  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
65  | 
show "?rhs \<subseteq> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
66  | 
by (meson hull_mono inf_mono subset_insertI subset_refl)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
67  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
68  | 
|
| 70136 | 69  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Shrinking towards the interior of a convex set\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
70  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
71  | 
lemma mem_interior_convex_shrink:  | 
| 68056 | 72  | 
fixes S :: "'a::euclidean_space set"  | 
73  | 
assumes "convex S"  | 
|
74  | 
and "c \<in> interior S"  | 
|
75  | 
and "x \<in> S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
76  | 
and "0 < e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
77  | 
and "e \<le> 1"  | 
| 68056 | 78  | 
shows "x - e *\<^sub>R (x - c) \<in> interior S"  | 
79  | 
proof -  | 
|
80  | 
obtain d where "d > 0" and d: "ball c d \<subseteq> S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
81  | 
using assms(2) unfolding mem_interior by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
82  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
83  | 
unfolding mem_interior  | 
| 68056 | 84  | 
proof (intro exI subsetI conjI)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
85  | 
fix y  | 
| 68056 | 86  | 
assume "y \<in> ball (x - e *\<^sub>R (x - c)) (e*d)"  | 
87  | 
then have as: "dist (x - e *\<^sub>R (x - c)) y < e * d"  | 
|
88  | 
by simp  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
89  | 
have *: "y = (1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
90  | 
using \<open>e > 0\<close> by (auto simp add: scaleR_left_diff_distrib scaleR_right_diff_distrib)  | 
| 72211 | 91  | 
have "c - ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = (1 / e) *\<^sub>R (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
92  | 
using \<open>e > 0\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
93  | 
by (auto simp add: euclidean_eq_iff[where 'a='a] field_simps inner_simps)  | 
| 72211 | 94  | 
then have "dist c ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) = \<bar>1/e\<bar> * norm (e *\<^sub>R c - y + (1 - e) *\<^sub>R x)"  | 
95  | 
by (simp add: dist_norm)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
96  | 
also have "\<dots> = \<bar>1/e\<bar> * norm (x - e *\<^sub>R (x - c) - y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
97  | 
by (auto intro!:arg_cong[where f=norm] simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
98  | 
also have "\<dots> < d"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
99  | 
using as[unfolded dist_norm] and \<open>e > 0\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
100  | 
by (auto simp add:pos_divide_less_eq[OF \<open>e > 0\<close>] mult.commute)  | 
| 72211 | 101  | 
finally have "(1 - (1 - e)) *\<^sub>R ((1 / e) *\<^sub>R y - ((1 - e) / e) *\<^sub>R x) + (1 - e) *\<^sub>R x \<in> S"  | 
102  | 
using assms(3-5) d  | 
|
| 72238 | 103  | 
by (intro convexD_alt [OF \<open>convex S\<close>]) (auto intro: convexD_alt [OF \<open>convex S\<close>])  | 
| 72211 | 104  | 
with \<open>e > 0\<close> show "y \<in> S"  | 
105  | 
by (auto simp add: scaleR_left_diff_distrib scaleR_right_diff_distrib)  | 
|
106  | 
qed (use \<open>e>0\<close> \<open>d>0\<close> in auto)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
107  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
108  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
109  | 
lemma mem_interior_closure_convex_shrink:  | 
| 68056 | 110  | 
fixes S :: "'a::euclidean_space set"  | 
111  | 
assumes "convex S"  | 
|
112  | 
and "c \<in> interior S"  | 
|
113  | 
and "x \<in> closure S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
114  | 
and "0 < e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
115  | 
and "e \<le> 1"  | 
| 68056 | 116  | 
shows "x - e *\<^sub>R (x - c) \<in> interior S"  | 
117  | 
proof -  | 
|
118  | 
obtain d where "d > 0" and d: "ball c d \<subseteq> S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
119  | 
using assms(2) unfolding mem_interior by auto  | 
| 68056 | 120  | 
have "\<exists>y\<in>S. norm (y - x) * (1 - e) < e * d"  | 
121  | 
proof (cases "x \<in> S")  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
122  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
123  | 
then show ?thesis  | 
| 72211 | 124  | 
using \<open>e > 0\<close> \<open>d > 0\<close> by force  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
125  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
126  | 
case False  | 
| 68056 | 127  | 
then have x: "x islimpt S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
128  | 
using assms(3)[unfolded closure_def] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
129  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
130  | 
proof (cases "e = 1")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
131  | 
case True  | 
| 68056 | 132  | 
obtain y where "y \<in> S" "y \<noteq> x" "dist y x < 1"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
133  | 
using x[unfolded islimpt_approachable,THEN spec[where x=1]] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
134  | 
then show ?thesis  | 
| 72211 | 135  | 
using True \<open>0 < d\<close> by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
136  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
137  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
138  | 
then have "0 < e * d / (1 - e)" and *: "1 - e > 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
139  | 
using \<open>e \<le> 1\<close> \<open>e > 0\<close> \<open>d > 0\<close> by auto  | 
| 68056 | 140  | 
then obtain y where "y \<in> S" "y \<noteq> x" "dist y x < e * d / (1 - e)"  | 
| 72211 | 141  | 
using islimpt_approachable x by blast  | 
142  | 
then have "norm (y - x) * (1 - e) < e * d"  | 
|
143  | 
by (metis "*" dist_norm mult_imp_div_pos_le not_less)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
144  | 
then show ?thesis  | 
| 72211 | 145  | 
using \<open>y \<in> S\<close> by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
146  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
147  | 
qed  | 
| 68056 | 148  | 
then obtain y where "y \<in> S" and y: "norm (y - x) * (1 - e) < e * d"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
149  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
150  | 
define z where "z = c + ((1 - e) / e) *\<^sub>R (x - y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
151  | 
have *: "x - e *\<^sub>R (x - c) = y - e *\<^sub>R (y - z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
152  | 
unfolding z_def using \<open>e > 0\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
153  | 
by (auto simp add: scaleR_right_diff_distrib scaleR_right_distrib scaleR_left_diff_distrib)  | 
| 72567 | 154  | 
have "(1 - e) * norm (x - y) / e < d"  | 
155  | 
using y \<open>0 < e\<close> by (simp add: field_simps norm_minus_commute)  | 
|
156  | 
then have "z \<in> interior (ball c d)"  | 
|
157  | 
using \<open>0 < e\<close> \<open>e \<le> 1\<close> by (simp add: interior_open[OF open_ball] z_def dist_norm)  | 
|
| 72211 | 158  | 
then have "z \<in> interior S"  | 
159  | 
using d interiorI interior_ball by blast  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
160  | 
then show ?thesis  | 
| 72567 | 161  | 
unfolding * using mem_interior_convex_shrink \<open>y \<in> S\<close> assms by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
162  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
163  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
164  | 
lemma in_interior_closure_convex_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
165  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
166  | 
assumes "convex S" and a: "a \<in> interior S" and b: "b \<in> closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
167  | 
shows "open_segment a b \<subseteq> interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
168  | 
proof (clarsimp simp: in_segment)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
169  | 
fix u::real  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
170  | 
assume u: "0 < u" "u < 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
171  | 
have "(1 - u) *\<^sub>R a + u *\<^sub>R b = b - (1 - u) *\<^sub>R (b - a)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
172  | 
by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
173  | 
also have "... \<in> interior S" using mem_interior_closure_convex_shrink [OF assms] u  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
174  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
175  | 
finally show "(1 - u) *\<^sub>R a + u *\<^sub>R b \<in> interior S" .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
176  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
177  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
178  | 
lemma convex_closure_interior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
179  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
180  | 
  assumes "convex S" and int: "interior S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
181  | 
shows "closure(interior S) = closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
182  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
183  | 
obtain a where a: "a \<in> interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
184  | 
using int by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
185  | 
have "closure S \<subseteq> closure(interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
186  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
187  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
188  | 
assume x: "x \<in> closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
189  | 
show "x \<in> closure (interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
190  | 
proof (cases "x=a")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
191  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
192  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
193  | 
using \<open>a \<in> interior S\<close> closure_subset by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
194  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
195  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
196  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
197  | 
proof (clarsimp simp add: closure_def islimpt_approachable)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
198  | 
fix e::real  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
199  | 
assume xnotS: "x \<notin> interior S" and "0 < e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
200  | 
show "\<exists>x'\<in>interior S. x' \<noteq> x \<and> dist x' x < e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
201  | 
proof (intro bexI conjI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
202  | 
show "x - min (e/2 / norm (x - a)) 1 *\<^sub>R (x - a) \<noteq> x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
203  | 
using False \<open>0 < e\<close> by (auto simp: algebra_simps min_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
204  | 
show "dist (x - min (e/2 / norm (x - a)) 1 *\<^sub>R (x - a)) x < e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
205  | 
using \<open>0 < e\<close> by (auto simp: dist_norm min_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
206  | 
show "x - min (e/2 / norm (x - a)) 1 *\<^sub>R (x - a) \<in> interior S"  | 
| 72211 | 207  | 
using \<open>0 < e\<close> False  | 
208  | 
by (auto simp add: min_def a intro: mem_interior_closure_convex_shrink [OF \<open>convex S\<close> a x])  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
209  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
210  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
211  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
212  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
213  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
214  | 
by (simp add: closure_mono interior_subset subset_antisym)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
215  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
216  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
217  | 
lemma closure_convex_Int_superset:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
218  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
219  | 
  assumes "convex S" "interior S \<noteq> {}" "interior S \<subseteq> closure T"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
220  | 
shows "closure(S \<inter> T) = closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
221  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
222  | 
have "closure S \<subseteq> closure(interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
223  | 
by (simp add: convex_closure_interior assms)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
224  | 
also have "... \<subseteq> closure (S \<inter> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
225  | 
using interior_subset [of S] assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
226  | 
by (metis (no_types, lifting) Int_assoc Int_lower2 closure_mono closure_open_Int_superset inf.orderE open_interior)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
227  | 
finally show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
228  | 
by (simp add: closure_mono dual_order.antisym)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
229  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
230  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
231  | 
|
| 70136 | 232  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Some obvious but surprisingly hard simplex lemmas\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
233  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
234  | 
lemma simplex:  | 
| 68056 | 235  | 
assumes "finite S"  | 
236  | 
and "0 \<notin> S"  | 
|
237  | 
  shows "convex hull (insert 0 S) = {y. \<exists>u. (\<forall>x\<in>S. 0 \<le> u x) \<and> sum u S \<le> 1 \<and> sum (\<lambda>x. u x *\<^sub>R x) S = y}"
 | 
|
238  | 
proof (simp add: convex_hull_finite set_eq_iff assms, safe)  | 
|
239  | 
fix x and u :: "'a \<Rightarrow> real"  | 
|
240  | 
assume "0 \<le> u 0" "\<forall>x\<in>S. 0 \<le> u x" "u 0 + sum u S = 1"  | 
|
241  | 
then show "\<exists>v. (\<forall>x\<in>S. 0 \<le> v x) \<and> sum v S \<le> 1 \<and> (\<Sum>x\<in>S. v x *\<^sub>R x) = (\<Sum>x\<in>S. u x *\<^sub>R x)"  | 
|
242  | 
by force  | 
|
243  | 
next  | 
|
244  | 
fix x and u :: "'a \<Rightarrow> real"  | 
|
245  | 
assume "\<forall>x\<in>S. 0 \<le> u x" "sum u S \<le> 1"  | 
|
246  | 
then show "\<exists>v. 0 \<le> v 0 \<and> (\<forall>x\<in>S. 0 \<le> v x) \<and> v 0 + sum v S = 1 \<and> (\<Sum>x\<in>S. v x *\<^sub>R x) = (\<Sum>x\<in>S. u x *\<^sub>R x)"  | 
|
247  | 
by (rule_tac x="\<lambda>x. if x = 0 then 1 - sum u S else u x" in exI) (auto simp: sum_delta_notmem assms if_smult)  | 
|
248  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
249  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
250  | 
lemma substd_simplex:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
251  | 
assumes d: "d \<subseteq> Basis"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
252  | 
shows "convex hull (insert 0 d) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
253  | 
    {x. (\<forall>i\<in>Basis. 0 \<le> x\<bullet>i) \<and> (\<Sum>i\<in>d. x\<bullet>i) \<le> 1 \<and> (\<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x\<bullet>i = 0)}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
254  | 
(is "convex hull (insert 0 ?p) = ?s")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
255  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
256  | 
let ?D = d  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
257  | 
have "0 \<notin> ?p"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
258  | 
using assms by (auto simp: image_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
259  | 
from d have "finite d"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
260  | 
by (blast intro: finite_subset finite_Basis)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
261  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
262  | 
unfolding simplex[OF \<open>finite d\<close> \<open>0 \<notin> ?p\<close>]  | 
| 68056 | 263  | 
proof (intro set_eqI; safe)  | 
264  | 
fix u :: "'a \<Rightarrow> real"  | 
|
265  | 
assume as: "\<forall>x\<in>?D. 0 \<le> u x" "sum u ?D \<le> 1"  | 
|
266  | 
let ?x = "(\<Sum>x\<in>?D. u x *\<^sub>R x)"  | 
|
267  | 
have ind: "\<forall>i\<in>Basis. i \<in> d \<longrightarrow> u i = ?x \<bullet> i"  | 
|
268  | 
and notind: "(\<forall>i\<in>Basis. i \<notin> d \<longrightarrow> ?x \<bullet> i = 0)"  | 
|
269  | 
using substdbasis_expansion_unique[OF assms] by blast+  | 
|
270  | 
then have **: "sum u ?D = sum ((\<bullet>) ?x) ?D"  | 
|
271  | 
using assms by (auto intro!: sum.cong)  | 
|
272  | 
show "0 \<le> ?x \<bullet> i" if "i \<in> Basis" for i  | 
|
273  | 
using as(1) ind notind that by fastforce  | 
|
274  | 
show "sum ((\<bullet>) ?x) ?D \<le> 1"  | 
|
275  | 
using "**" as(2) by linarith  | 
|
276  | 
show "?x \<bullet> i = 0" if "i \<in> Basis" "i \<notin> d" for i  | 
|
277  | 
using notind that by blast  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
278  | 
next  | 
| 68056 | 279  | 
fix x  | 
280  | 
assume "\<forall>i\<in>Basis. 0 \<le> x \<bullet> i" "sum ((\<bullet>) x) ?D \<le> 1" "(\<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = 0)"  | 
|
281  | 
with d show "\<exists>u. (\<forall>x\<in>?D. 0 \<le> u x) \<and> sum u ?D \<le> 1 \<and> (\<Sum>x\<in>?D. u x *\<^sub>R x) = x"  | 
|
282  | 
unfolding substdbasis_expansion_unique[OF assms]  | 
|
283  | 
by (rule_tac x="inner x" in exI) auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
284  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
285  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
286  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
287  | 
lemma std_simplex:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
288  | 
"convex hull (insert 0 Basis) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
289  | 
    {x::'a::euclidean_space. (\<forall>i\<in>Basis. 0 \<le> x\<bullet>i) \<and> sum (\<lambda>i. x\<bullet>i) Basis \<le> 1}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
290  | 
using substd_simplex[of Basis] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
291  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
292  | 
lemma interior_std_simplex:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
293  | 
"interior (convex hull (insert 0 Basis)) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
294  | 
    {x::'a::euclidean_space. (\<forall>i\<in>Basis. 0 < x\<bullet>i) \<and> sum (\<lambda>i. x\<bullet>i) Basis < 1}"
 | 
| 68056 | 295  | 
unfolding set_eq_iff mem_interior std_simplex  | 
296  | 
proof (intro allI iffI CollectI; clarify)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
297  | 
fix x :: 'a  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
298  | 
fix e  | 
| 68056 | 299  | 
  assume "e > 0" and as: "ball x e \<subseteq> {x. (\<forall>i\<in>Basis. 0 \<le> x \<bullet> i) \<and> sum ((\<bullet>) x) Basis \<le> 1}"
 | 
300  | 
show "(\<forall>i\<in>Basis. 0 < x \<bullet> i) \<and> sum ((\<bullet>) x) Basis < 1"  | 
|
301  | 
proof safe  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
302  | 
fix i :: 'a  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
303  | 
assume i: "i \<in> Basis"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
304  | 
then show "0 < x \<bullet> i"  | 
| 72567 | 305  | 
using as[THEN subsetD[where c="x - (e/2) *\<^sub>R i"]] and \<open>e > 0\<close>  | 
| 68056 | 306  | 
by (force simp add: inner_simps)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
307  | 
next  | 
| 72567 | 308  | 
have **: "dist x (x + (e/2) *\<^sub>R (SOME i. i\<in>Basis)) < e" using \<open>e > 0\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
309  | 
unfolding dist_norm  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
310  | 
by (auto intro!: mult_strict_left_mono simp: SOME_Basis)  | 
| 72567 | 311  | 
have "\<And>i. i \<in> Basis \<Longrightarrow> (x + (e/2) *\<^sub>R (SOME i. i\<in>Basis)) \<bullet> i =  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
312  | 
x\<bullet>i + (if i = (SOME i. i\<in>Basis) then e/2 else 0)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
313  | 
by (auto simp: SOME_Basis inner_Basis inner_simps)  | 
| 72567 | 314  | 
then have *: "sum ((\<bullet>) (x + (e/2) *\<^sub>R (SOME i. i\<in>Basis))) Basis =  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
315  | 
sum (\<lambda>i. x\<bullet>i + (if (SOME i. i\<in>Basis) = i then e/2 else 0)) Basis"  | 
| 68056 | 316  | 
by (auto simp: intro!: sum.cong)  | 
| 72567 | 317  | 
have "sum ((\<bullet>) x) Basis < sum ((\<bullet>) (x + (e/2) *\<^sub>R (SOME i. i\<in>Basis))) Basis"  | 
| 68056 | 318  | 
using \<open>e > 0\<close> DIM_positive by (auto simp: SOME_Basis sum.distrib *)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
319  | 
also have "\<dots> \<le> 1"  | 
| 68056 | 320  | 
using ** as by force  | 
| 67399 | 321  | 
finally show "sum ((\<bullet>) x) Basis < 1" by auto  | 
| 68056 | 322  | 
qed  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
323  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
324  | 
fix x :: 'a  | 
| 67399 | 325  | 
assume as: "\<forall>i\<in>Basis. 0 < x \<bullet> i" "sum ((\<bullet>) x) Basis < 1"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
326  | 
obtain a :: 'b where "a \<in> UNIV" using UNIV_witness ..  | 
| 67399 | 327  | 
  let ?d = "(1 - sum ((\<bullet>) x) Basis) / real (DIM('a))"
 | 
| 68056 | 328  | 
  show "\<exists>e>0. ball x e \<subseteq> {x. (\<forall>i\<in>Basis. 0 \<le> x \<bullet> i) \<and> sum ((\<bullet>) x) Basis \<le> 1}"
 | 
329  | 
proof (rule_tac x="min (Min (((\<bullet>) x) ` Basis)) D" for D in exI, intro conjI subsetI CollectI)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
330  | 
fix y  | 
| 68056 | 331  | 
assume y: "y \<in> ball x (min (Min ((\<bullet>) x ` Basis)) ?d)"  | 
| 67399 | 332  | 
have "sum ((\<bullet>) y) Basis \<le> sum (\<lambda>i. x\<bullet>i + ?d) Basis"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
333  | 
proof (rule sum_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
334  | 
fix i :: 'a  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
335  | 
assume i: "i \<in> Basis"  | 
| 68056 | 336  | 
have "\<bar>y\<bullet>i - x\<bullet>i\<bar> \<le> norm (y - x)"  | 
337  | 
by (metis Basis_le_norm i inner_commute inner_diff_right)  | 
|
338  | 
also have "... < ?d"  | 
|
339  | 
using y by (simp add: dist_norm norm_minus_commute)  | 
|
340  | 
finally have "\<bar>y\<bullet>i - x\<bullet>i\<bar> < ?d" .  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
341  | 
then show "y \<bullet> i \<le> x \<bullet> i + ?d" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
342  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
343  | 
also have "\<dots> \<le> 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
344  | 
unfolding sum.distrib sum_constant  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
345  | 
by (auto simp add: Suc_le_eq)  | 
| 67399 | 346  | 
finally show "sum ((\<bullet>) y) Basis \<le> 1" .  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
347  | 
show "(\<forall>i\<in>Basis. 0 \<le> y \<bullet> i)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
348  | 
proof safe  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
349  | 
fix i :: 'a  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
350  | 
assume i: "i \<in> Basis"  | 
| 
68796
 
9ca183045102
simplified syntax setup for big operators under image, retaining input abbreviations for backward compatibility
 
haftmann 
parents: 
68607 
diff
changeset
 | 
351  | 
have "norm (x - y) < Min (((\<bullet>) x) ` Basis)"  | 
| 68056 | 352  | 
using y by (auto simp: dist_norm less_eq_real_def)  | 
353  | 
also have "... \<le> x\<bullet>i"  | 
|
354  | 
using i by auto  | 
|
355  | 
finally have "norm (x - y) < x\<bullet>i" .  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
356  | 
then show "0 \<le> y\<bullet>i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
357  | 
using Basis_le_norm[OF i, of "x - y"] and as(1)[rule_format, OF i]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
358  | 
by (auto simp: inner_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
359  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
360  | 
next  | 
| 67399 | 361  | 
have "Min (((\<bullet>) x) ` Basis) > 0"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
362  | 
using as by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
363  | 
moreover have "?d > 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
364  | 
using as by (auto simp: Suc_le_eq)  | 
| 67399 | 365  | 
    ultimately show "0 < min (Min ((\<bullet>) x ` Basis)) ((1 - sum ((\<bullet>) x) Basis) / real DIM('a))"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
366  | 
by linarith  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
367  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
368  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
369  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
370  | 
lemma interior_std_simplex_nonempty:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
371  | 
obtains a :: "'a::euclidean_space" where  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
372  | 
"a \<in> interior(convex hull (insert 0 Basis))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
373  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
374  | 
let ?D = "Basis :: 'a set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
375  | 
  let ?a = "sum (\<lambda>b::'a. inverse (2 * real DIM('a)) *\<^sub>R b) Basis"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
376  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
377  | 
fix i :: 'a  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
378  | 
assume i: "i \<in> Basis"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
379  | 
    have "?a \<bullet> i = inverse (2 * real DIM('a))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
380  | 
      by (rule trans[of _ "sum (\<lambda>j. if i = j then inverse (2 * real DIM('a)) else 0) ?D"])
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
381  | 
(simp_all add: sum.If_cases i) }  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
382  | 
note ** = this  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
383  | 
show ?thesis  | 
| 72211 | 384  | 
proof  | 
385  | 
show "?a \<in> interior(convex hull (insert 0 Basis))"  | 
|
386  | 
unfolding interior_std_simplex mem_Collect_eq  | 
|
387  | 
proof safe  | 
|
388  | 
fix i :: 'a  | 
|
389  | 
assume i: "i \<in> Basis"  | 
|
390  | 
show "0 < ?a \<bullet> i"  | 
|
391  | 
unfolding **[OF i] by (auto simp add: Suc_le_eq)  | 
|
392  | 
next  | 
|
393  | 
      have "sum ((\<bullet>) ?a) ?D = sum (\<lambda>i. inverse (2 * real DIM('a))) ?D"
 | 
|
394  | 
by (auto intro: sum.cong)  | 
|
395  | 
also have "\<dots> < 1"  | 
|
396  | 
unfolding sum_constant divide_inverse[symmetric]  | 
|
397  | 
by (auto simp add: field_simps)  | 
|
398  | 
finally show "sum ((\<bullet>) ?a) ?D < 1" by auto  | 
|
399  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
400  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
401  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
402  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
403  | 
lemma rel_interior_substd_simplex:  | 
| 68056 | 404  | 
assumes D: "D \<subseteq> Basis"  | 
405  | 
shows "rel_interior (convex hull (insert 0 D)) =  | 
|
| 72567 | 406  | 
         {x::'a::euclidean_space. (\<forall>i\<in>D. 0 < x\<bullet>i) \<and> (\<Sum>i\<in>D. x\<bullet>i) < 1 \<and> (\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> x\<bullet>i = 0)}"
 | 
407  | 
(is "_ = ?s")  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
408  | 
proof -  | 
| 68056 | 409  | 
have "finite D"  | 
410  | 
using D finite_Basis finite_subset by blast  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
411  | 
show ?thesis  | 
| 68056 | 412  | 
  proof (cases "D = {}")
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
413  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
414  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
415  | 
using rel_interior_sing using euclidean_eq_iff[of _ 0] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
416  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
417  | 
case False  | 
| 72567 | 418  | 
have h0: "affine hull (convex hull (insert 0 D)) =  | 
419  | 
              {x::'a::euclidean_space. (\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> x\<bullet>i = 0)}"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
420  | 
using affine_hull_convex_hull affine_hull_substd_basis assms by auto  | 
| 68056 | 421  | 
have aux: "\<And>x::'a. \<forall>i\<in>Basis. (\<forall>i\<in>D. 0 \<le> x\<bullet>i) \<and> (\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> x\<bullet>i = 0) \<longrightarrow> 0 \<le> x\<bullet>i"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
422  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
423  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
424  | 
fix x :: "'a::euclidean_space"  | 
| 72567 | 425  | 
assume x: "x \<in> rel_interior (convex hull (insert 0 D))"  | 
| 68056 | 426  | 
then obtain e where "e > 0" and  | 
| 72567 | 427  | 
        "ball x e \<inter> {xa. (\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> xa\<bullet>i = 0)} \<subseteq> convex hull (insert 0 D)"
 | 
428  | 
using mem_rel_interior_ball[of x "convex hull (insert 0 D)"] h0 by auto  | 
|
429  | 
then have as: "\<And>y. \<lbrakk>dist x y < e \<and> (\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> y\<bullet>i = 0)\<rbrakk> \<Longrightarrow>  | 
|
430  | 
(\<forall>i\<in>D. 0 \<le> y \<bullet> i) \<and> sum ((\<bullet>) y) D \<le> 1"  | 
|
431  | 
using assms by (force simp: substd_simplex)  | 
|
| 68056 | 432  | 
have x0: "(\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> x\<bullet>i = 0)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
433  | 
using x rel_interior_subset substd_simplex[OF assms] by auto  | 
| 68056 | 434  | 
have "(\<forall>i\<in>D. 0 < x \<bullet> i) \<and> sum ((\<bullet>) x) D < 1 \<and> (\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> x\<bullet>i = 0)"  | 
435  | 
proof (intro conjI ballI)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
436  | 
fix i :: 'a  | 
| 68056 | 437  | 
assume "i \<in> D"  | 
| 72567 | 438  | 
then have "\<forall>j\<in>D. 0 \<le> (x - (e/2) *\<^sub>R i) \<bullet> j"  | 
| 68056 | 439  | 
using D \<open>e > 0\<close> x0  | 
| 72567 | 440  | 
by (intro as[THEN conjunct1]) (force simp: dist_norm inner_simps inner_Basis)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
441  | 
then show "0 < x \<bullet> i"  | 
| 68056 | 442  | 
using \<open>e > 0\<close> \<open>i \<in> D\<close> D by (force simp: inner_simps inner_Basis)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
443  | 
next  | 
| 68056 | 444  | 
obtain a where a: "a \<in> D"  | 
445  | 
          using \<open>D \<noteq> {}\<close> by auto
 | 
|
| 72567 | 446  | 
then have **: "dist x (x + (e/2) *\<^sub>R a) < e"  | 
447  | 
using \<open>e > 0\<close> norm_Basis[of a] D by (auto simp: dist_norm)  | 
|
448  | 
have "\<And>i. i \<in> Basis \<Longrightarrow> (x + (e/2) *\<^sub>R a) \<bullet> i = x\<bullet>i + (if i = a then e/2 else 0)"  | 
|
| 68056 | 449  | 
using a D by (auto simp: inner_simps inner_Basis)  | 
| 72567 | 450  | 
then have *: "sum ((\<bullet>) (x + (e/2) *\<^sub>R a)) D = sum (\<lambda>i. x\<bullet>i + (if a = i then e/2 else 0)) D"  | 
| 68056 | 451  | 
using D by (intro sum.cong) auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
452  | 
have "a \<in> Basis"  | 
| 68056 | 453  | 
using \<open>a \<in> D\<close> D by auto  | 
| 72567 | 454  | 
then have h1: "(\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> (x + (e/2) *\<^sub>R a) \<bullet> i = 0)"  | 
| 68056 | 455  | 
using x0 D \<open>a\<in>D\<close> by (auto simp add: inner_add_left inner_Basis)  | 
| 72567 | 456  | 
have "sum ((\<bullet>) x) D < sum ((\<bullet>) (x + (e/2) *\<^sub>R a)) D"  | 
| 68056 | 457  | 
using \<open>e > 0\<close> \<open>a \<in> D\<close> \<open>finite D\<close> by (auto simp add: * sum.distrib)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
458  | 
also have "\<dots> \<le> 1"  | 
| 72567 | 459  | 
using ** h1 as[rule_format, of "x + (e/2) *\<^sub>R a"]  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
460  | 
by auto  | 
| 68056 | 461  | 
finally show "sum ((\<bullet>) x) D < 1" "\<And>i. i\<in>Basis \<Longrightarrow> i \<notin> D \<longrightarrow> x\<bullet>i = 0"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
462  | 
using x0 by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
463  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
464  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
465  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
466  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
467  | 
fix x :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
468  | 
assume as: "x \<in> ?s"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
469  | 
have "\<forall>i. 0 < x\<bullet>i \<or> 0 = x\<bullet>i \<longrightarrow> 0 \<le> x\<bullet>i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
470  | 
by auto  | 
| 68056 | 471  | 
moreover have "\<forall>i. i \<in> D \<or> i \<notin> D" by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
472  | 
ultimately  | 
| 68056 | 473  | 
have "\<forall>i. (\<forall>i\<in>D. 0 < x\<bullet>i) \<and> (\<forall>i. i \<notin> D \<longrightarrow> x\<bullet>i = 0) \<longrightarrow> 0 \<le> x\<bullet>i"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
474  | 
by metis  | 
| 72567 | 475  | 
then have h2: "x \<in> convex hull (insert 0 D)"  | 
476  | 
using as assms by (force simp add: substd_simplex)  | 
|
| 68056 | 477  | 
obtain a where a: "a \<in> D"  | 
478  | 
        using \<open>D \<noteq> {}\<close> by auto
 | 
|
| 72567 | 479  | 
define d where "d \<equiv> (1 - sum ((\<bullet>) x) D) / real (card D)"  | 
480  | 
      have "\<exists>e>0. ball x e \<inter> {x. \<forall>i\<in>Basis. i \<notin> D \<longrightarrow> x \<bullet> i = 0} \<subseteq> convex hull insert 0 D"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
481  | 
unfolding substd_simplex[OF assms]  | 
| 72567 | 482  | 
proof (intro exI; safe)  | 
483  | 
        have "0 < card D" using \<open>D \<noteq> {}\<close> \<open>finite D\<close>
 | 
|
484  | 
by (simp add: card_gt_0_iff)  | 
|
485  | 
have "Min (((\<bullet>) x) ` D) > 0"  | 
|
486  | 
          using as \<open>D \<noteq> {}\<close> \<open>finite D\<close> by (simp)
 | 
|
487  | 
moreover have "d > 0"  | 
|
488  | 
using as \<open>0 < card D\<close> by (auto simp: d_def)  | 
|
489  | 
ultimately show "min (Min (((\<bullet>) x) ` D)) d > 0"  | 
|
490  | 
by auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
491  | 
fix y :: 'a  | 
| 68056 | 492  | 
assume y2: "\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> y\<bullet>i = 0"  | 
| 72567 | 493  | 
assume "y \<in> ball x (min (Min ((\<bullet>) x ` D)) d)"  | 
494  | 
then have y: "dist x y < min (Min ((\<bullet>) x ` D)) d"  | 
|
495  | 
by auto  | 
|
496  | 
have "sum ((\<bullet>) y) D \<le> sum (\<lambda>i. x\<bullet>i + d) D"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
497  | 
proof (rule sum_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
498  | 
fix i  | 
| 68056 | 499  | 
assume "i \<in> D"  | 
500  | 
with D have i: "i \<in> Basis"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
501  | 
by auto  | 
| 68056 | 502  | 
have "\<bar>y\<bullet>i - x\<bullet>i\<bar> \<le> norm (y - x)"  | 
503  | 
by (metis i inner_commute inner_diff_right norm_bound_Basis_le order_refl)  | 
|
| 72567 | 504  | 
also have "... < d"  | 
| 68056 | 505  | 
by (metis dist_norm min_less_iff_conj norm_minus_commute y)  | 
| 72567 | 506  | 
finally have "\<bar>y\<bullet>i - x\<bullet>i\<bar> < d" .  | 
507  | 
then show "y \<bullet> i \<le> x \<bullet> i + d" by auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
508  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
509  | 
also have "\<dots> \<le> 1"  | 
| 72567 | 510  | 
unfolding sum.distrib sum_constant d_def using \<open>0 < card D\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
511  | 
by auto  | 
| 68056 | 512  | 
finally show "sum ((\<bullet>) y) D \<le> 1" .  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
513  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
514  | 
fix i :: 'a  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
515  | 
assume i: "i \<in> Basis"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
516  | 
then show "0 \<le> y\<bullet>i"  | 
| 68056 | 517  | 
proof (cases "i\<in>D")  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
518  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
519  | 
have "norm (x - y) < x\<bullet>i"  | 
| 72567 | 520  | 
using y Min_gr_iff[of "(\<bullet>) x ` D" "norm (x - y)"] \<open>0 < card D\<close> \<open>i \<in> D\<close>  | 
521  | 
by (simp add: dist_norm card_gt_0_iff)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
522  | 
then show "0 \<le> y\<bullet>i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
523  | 
using Basis_le_norm[OF i, of "x - y"] and as(1)[rule_format]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
524  | 
by (auto simp: inner_simps)  | 
| 72211 | 525  | 
qed (use y2 in auto)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
526  | 
qed  | 
| 72567 | 527  | 
then have "x \<in> rel_interior (convex hull (insert 0 D))"  | 
| 72211 | 528  | 
using h0 h2 rel_interior_ball by force  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
529  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
530  | 
ultimately have  | 
| 68056 | 531  | 
"\<And>x. x \<in> rel_interior (convex hull insert 0 D) \<longleftrightarrow>  | 
532  | 
        x \<in> {x. (\<forall>i\<in>D. 0 < x \<bullet> i) \<and> sum ((\<bullet>) x) D < 1 \<and> (\<forall>i\<in>Basis. i \<notin> D \<longrightarrow> x \<bullet> i = 0)}"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
533  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
534  | 
then show ?thesis by (rule set_eqI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
535  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
536  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
537  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
538  | 
lemma rel_interior_substd_simplex_nonempty:  | 
| 68056 | 539  | 
  assumes "D \<noteq> {}"
 | 
540  | 
and "D \<subseteq> Basis"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
541  | 
obtains a :: "'a::euclidean_space"  | 
| 68056 | 542  | 
where "a \<in> rel_interior (convex hull (insert 0 D))"  | 
543  | 
proof -  | 
|
| 72567 | 544  | 
let ?a = "sum (\<lambda>b::'a::euclidean_space. inverse (2 * real (card D)) *\<^sub>R b) D"  | 
| 68056 | 545  | 
have "finite D"  | 
| 72211 | 546  | 
using assms finite_Basis infinite_super by blast  | 
| 68056 | 547  | 
then have d1: "0 < real (card D)"  | 
548  | 
    using \<open>D \<noteq> {}\<close> by auto
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
549  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
550  | 
fix i  | 
| 68056 | 551  | 
assume "i \<in> D"  | 
| 72567 | 552  | 
have "?a \<bullet> i = sum (\<lambda>j. if i = j then inverse (2 * real (card D)) else 0) D"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
553  | 
unfolding inner_sum_left  | 
| 72211 | 554  | 
using \<open>i \<in> D\<close> by (auto simp: inner_Basis subsetD[OF assms(2)] intro: sum.cong)  | 
555  | 
also have "... = inverse (2 * real (card D))"  | 
|
556  | 
using \<open>i \<in> D\<close> \<open>finite D\<close> by auto  | 
|
557  | 
finally have "?a \<bullet> i = inverse (2 * real (card D))" .  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
558  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
559  | 
note ** = this  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
560  | 
show ?thesis  | 
| 72211 | 561  | 
proof  | 
562  | 
show "?a \<in> rel_interior (convex hull (insert 0 D))"  | 
|
563  | 
unfolding rel_interior_substd_simplex[OF assms(2)]  | 
|
564  | 
proof safe  | 
|
565  | 
fix i  | 
|
566  | 
assume "i \<in> D"  | 
|
567  | 
have "0 < inverse (2 * real (card D))"  | 
|
568  | 
using d1 by auto  | 
|
569  | 
also have "\<dots> = ?a \<bullet> i" using **[of i] \<open>i \<in> D\<close>  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
570  | 
by auto  | 
| 72211 | 571  | 
finally show "0 < ?a \<bullet> i" by auto  | 
572  | 
next  | 
|
| 72567 | 573  | 
have "sum ((\<bullet>) ?a) D = sum (\<lambda>i. inverse (2 * real (card D))) D"  | 
| 72211 | 574  | 
by (rule sum.cong) (rule refl, rule **)  | 
575  | 
also have "\<dots> < 1"  | 
|
576  | 
unfolding sum_constant divide_real_def[symmetric]  | 
|
577  | 
by (auto simp add: field_simps)  | 
|
| 72567 | 578  | 
finally show "sum ((\<bullet>) ?a) D < 1" by auto  | 
| 72211 | 579  | 
next  | 
580  | 
fix i  | 
|
581  | 
assume "i \<in> Basis" and "i \<notin> D"  | 
|
582  | 
have "?a \<in> span D"  | 
|
583  | 
proof (rule span_sum[of D "(\<lambda>b. b /\<^sub>R (2 * real (card D)))" D])  | 
|
584  | 
        {
 | 
|
585  | 
fix x :: "'a::euclidean_space"  | 
|
586  | 
assume "x \<in> D"  | 
|
587  | 
then have "x \<in> span D"  | 
|
588  | 
using span_base[of _ "D"] by auto  | 
|
589  | 
then have "x /\<^sub>R (2 * real (card D)) \<in> span D"  | 
|
590  | 
using span_mul[of x "D" "(inverse (real (card D)) / 2)"] by auto  | 
|
591  | 
}  | 
|
592  | 
then show "\<And>x. x\<in>D \<Longrightarrow> x /\<^sub>R (2 * real (card D)) \<in> span D"  | 
|
593  | 
by auto  | 
|
594  | 
qed  | 
|
595  | 
then show "?a \<bullet> i = 0 "  | 
|
596  | 
using \<open>i \<notin> D\<close> unfolding span_substd_basis[OF assms(2)] using \<open>i \<in> Basis\<close> by auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
597  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
598  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
599  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
600  | 
|
| 70136 | 601  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Relative interior of convex set\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
602  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
603  | 
lemma rel_interior_convex_nonempty_aux:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
604  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
605  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
606  | 
and "0 \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
607  | 
  shows "rel_interior S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
608  | 
proof (cases "S = {0}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
609  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
610  | 
then show ?thesis using rel_interior_sing by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
611  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
612  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
613  | 
obtain B where B: "independent B \<and> B \<le> S \<and> S \<le> span B \<and> card B = dim S"  | 
| 
68069
 
36209dfb981e
tidying up and using real induction methods
 
paulson <lp15@cam.ac.uk> 
parents: 
68056 
diff
changeset
 | 
614  | 
using basis_exists[of S] by metis  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
615  | 
  then have "B \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
616  | 
    using B assms \<open>S \<noteq> {0}\<close> span_empty by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
617  | 
have "insert 0 B \<le> span B"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
618  | 
using subspace_span[of B] subspace_0[of "span B"]  | 
| 
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
619  | 
span_superset by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
620  | 
then have "span (insert 0 B) \<le> span B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
621  | 
using span_span[of B] span_mono[of "insert 0 B" "span B"] by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
622  | 
then have "convex hull insert 0 B \<le> span B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
623  | 
using convex_hull_subset_span[of "insert 0 B"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
624  | 
then have "span (convex hull insert 0 B) \<le> span B"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
625  | 
using span_span[of B]  | 
| 
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
626  | 
span_mono[of "convex hull insert 0 B" "span B"] by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
627  | 
then have *: "span (convex hull insert 0 B) = span B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
628  | 
using span_mono[of B "convex hull insert 0 B"] hull_subset[of "insert 0 B"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
629  | 
then have "span (convex hull insert 0 B) = span S"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
630  | 
using B span_mono[of B S] span_mono[of S "span B"]  | 
| 
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
631  | 
span_span[of B] by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
632  | 
moreover have "0 \<in> affine hull (convex hull insert 0 B)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
633  | 
using hull_subset[of "convex hull insert 0 B"] hull_subset[of "insert 0 B"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
634  | 
ultimately have **: "affine hull (convex hull insert 0 B) = affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
635  | 
using affine_hull_span_0[of "convex hull insert 0 B"] affine_hull_span_0[of "S"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
636  | 
assms hull_subset[of S]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
637  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
638  | 
obtain d and f :: "'n \<Rightarrow> 'n" where  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
639  | 
fd: "card d = card B" "linear f" "f ` B = d"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
640  | 
      "f ` span B = {x. \<forall>i\<in>Basis. i \<notin> d \<longrightarrow> x \<bullet> i = (0::real)} \<and> inj_on f (span B)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
641  | 
and d: "d \<subseteq> Basis"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
642  | 
using basis_to_substdbasis_subspace_isomorphism[of B,OF _ ] B by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
643  | 
then have "bounded_linear f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
644  | 
using linear_conv_bounded_linear by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
645  | 
  have "d \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
646  | 
    using fd B \<open>B \<noteq> {}\<close> by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
647  | 
have "insert 0 d = f ` (insert 0 B)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
648  | 
using fd linear_0 by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
649  | 
then have "(convex hull (insert 0 d)) = f ` (convex hull (insert 0 B))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
650  | 
using convex_hull_linear_image[of f "(insert 0 d)"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
651  | 
convex_hull_linear_image[of f "(insert 0 B)"] \<open>linear f\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
652  | 
by auto  | 
| 72238 | 653  | 
moreover have "rel_interior (f ` (convex hull insert 0 B)) = f ` rel_interior (convex hull insert 0 B)"  | 
654  | 
proof (rule rel_interior_injective_on_span_linear_image[OF \<open>bounded_linear f\<close>])  | 
|
655  | 
show "inj_on f (span (convex hull insert 0 B))"  | 
|
656  | 
using fd * by auto  | 
|
657  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
658  | 
  ultimately have "rel_interior (convex hull insert 0 B) \<noteq> {}"
 | 
| 72238 | 659  | 
    using rel_interior_substd_simplex_nonempty[OF \<open>d \<noteq> {}\<close> d] by fastforce
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
660  | 
moreover have "convex hull (insert 0 B) \<subseteq> S"  | 
| 72238 | 661  | 
using B assms hull_mono[of "insert 0 B" "S" "convex"] convex_hull_eq by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
662  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
663  | 
using subset_rel_interior[of "convex hull insert 0 B" S] ** by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
664  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
665  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
666  | 
lemma rel_interior_eq_empty:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
667  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
668  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
669  | 
  shows "rel_interior S = {} \<longleftrightarrow> S = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
670  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
671  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
672  | 
    assume "S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
673  | 
then obtain a where "a \<in> S" by auto  | 
| 67399 | 674  | 
then have "0 \<in> (+) (-a) ` S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
675  | 
using assms exI[of "(\<lambda>x. x \<in> S \<and> - a + x = 0)" a] by auto  | 
| 67399 | 676  | 
    then have "rel_interior ((+) (-a) ` S) \<noteq> {}"
 | 
677  | 
using rel_interior_convex_nonempty_aux[of "(+) (-a) ` S"]  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
678  | 
convex_translation[of S "-a"] assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
679  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
680  | 
    then have "rel_interior S \<noteq> {}"
 | 
| 69661 | 681  | 
using rel_interior_translation [of "- a"] by simp  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
682  | 
}  | 
| 71176 | 683  | 
then show ?thesis by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
684  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
685  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
686  | 
lemma interior_simplex_nonempty:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
687  | 
fixes S :: "'N :: euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
688  | 
  assumes "independent S" "finite S" "card S = DIM('N)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
689  | 
obtains a where "a \<in> interior (convex hull (insert 0 S))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
690  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
691  | 
have "affine hull (insert 0 S) = UNIV"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
692  | 
by (simp add: hull_inc affine_hull_span_0 dim_eq_full[symmetric]  | 
| 
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
693  | 
assms(1) assms(3) dim_eq_card_independent)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
694  | 
  moreover have "rel_interior (convex hull insert 0 S) \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
695  | 
using rel_interior_eq_empty [of "convex hull (insert 0 S)"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
696  | 
  ultimately have "interior (convex hull insert 0 S) \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
697  | 
by (simp add: rel_interior_interior)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
698  | 
with that show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
699  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
700  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
701  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
702  | 
lemma convex_rel_interior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
703  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
704  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
705  | 
shows "convex (rel_interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
706  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
707  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
708  | 
fix x y and u :: real  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
709  | 
assume assm: "x \<in> rel_interior S" "y \<in> rel_interior S" "0 \<le> u" "u \<le> 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
710  | 
then have "x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
711  | 
using rel_interior_subset by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
712  | 
have "x - u *\<^sub>R (x-y) \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
713  | 
proof (cases "0 = u")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
714  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
715  | 
then have "0 < u" using assm by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
716  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
717  | 
using assm rel_interior_convex_shrink[of S y x u] assms \<open>x \<in> S\<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
718  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
719  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
720  | 
then show ?thesis using assm by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
721  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
722  | 
then have "(1 - u) *\<^sub>R x + u *\<^sub>R y \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
723  | 
by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
724  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
725  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
726  | 
unfolding convex_alt by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
727  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
728  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
729  | 
lemma convex_closure_rel_interior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
730  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
731  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
732  | 
shows "closure (rel_interior S) = closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
733  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
734  | 
have h1: "closure (rel_interior S) \<le> closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
735  | 
using closure_mono[of "rel_interior S" S] rel_interior_subset[of S] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
736  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
737  | 
  proof (cases "S = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
738  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
739  | 
then obtain a where a: "a \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
740  | 
using rel_interior_eq_empty assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
741  | 
    { fix x
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
742  | 
assume x: "x \<in> closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
743  | 
      {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
744  | 
assume "x = a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
745  | 
then have "x \<in> closure (rel_interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
746  | 
using a unfolding closure_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
747  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
748  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
749  | 
      {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
750  | 
assume "x \<noteq> a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
751  | 
         {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
752  | 
fix e :: real  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
753  | 
assume "e > 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
754  | 
define e1 where "e1 = min 1 (e/norm (x - a))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
755  | 
then have e1: "e1 > 0" "e1 \<le> 1" "e1 * norm (x - a) \<le> e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
756  | 
using \<open>x \<noteq> a\<close> \<open>e > 0\<close> le_divide_eq[of e1 e "norm (x - a)"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
757  | 
by simp_all  | 
| 67613 | 758  | 
then have *: "x - e1 *\<^sub>R (x - a) \<in> rel_interior S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
759  | 
using rel_interior_closure_convex_shrink[of S a x e1] assms x a e1_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
760  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
761  | 
have "\<exists>y. y \<in> rel_interior S \<and> y \<noteq> x \<and> dist y x \<le> e"  | 
| 72567 | 762  | 
using "*" \<open>x \<noteq> a\<close> e1 by force  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
763  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
764  | 
then have "x islimpt rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
765  | 
unfolding islimpt_approachable_le by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
766  | 
then have "x \<in> closure(rel_interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
767  | 
unfolding closure_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
768  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
769  | 
ultimately have "x \<in> closure(rel_interior S)" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
770  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
771  | 
then show ?thesis using h1 by auto  | 
| 72567 | 772  | 
qed auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
773  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
774  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
775  | 
lemma rel_interior_same_affine_hull:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
776  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
777  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
778  | 
shows "affine hull (rel_interior S) = affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
779  | 
by (metis assms closure_same_affine_hull convex_closure_rel_interior)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
780  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
781  | 
lemma rel_interior_aff_dim:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
782  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
783  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
784  | 
shows "aff_dim (rel_interior S) = aff_dim S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
785  | 
by (metis aff_dim_affine_hull2 assms rel_interior_same_affine_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
786  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
787  | 
lemma rel_interior_rel_interior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
788  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
789  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
790  | 
shows "rel_interior (rel_interior S) = rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
791  | 
proof -  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
792  | 
have "openin (top_of_set (affine hull (rel_interior S))) (rel_interior S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
793  | 
using openin_rel_interior[of S] rel_interior_same_affine_hull[of S] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
794  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
795  | 
using rel_interior_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
796  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
797  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
798  | 
lemma rel_interior_rel_open:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
799  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
800  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
801  | 
shows "rel_open (rel_interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
802  | 
unfolding rel_open_def using rel_interior_rel_interior assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
803  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
804  | 
lemma convex_rel_interior_closure_aux:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
805  | 
fixes x y z :: "'n::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
806  | 
assumes "0 < a" "0 < b" "(a + b) *\<^sub>R z = a *\<^sub>R x + b *\<^sub>R y"  | 
| 72567 | 807  | 
obtains e where "0 < e" "e < 1" "z = y - e *\<^sub>R (y - x)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
808  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
809  | 
define e where "e = a / (a + b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
810  | 
have "z = (1 / (a + b)) *\<^sub>R ((a + b) *\<^sub>R z)"  | 
| 68056 | 811  | 
using assms by (simp add: eq_vector_fraction_iff)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
812  | 
also have "\<dots> = (1 / (a + b)) *\<^sub>R (a *\<^sub>R x + b *\<^sub>R y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
813  | 
using assms scaleR_cancel_left[of "1/(a+b)" "(a + b) *\<^sub>R z" "a *\<^sub>R x + b *\<^sub>R y"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
814  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
815  | 
also have "\<dots> = y - e *\<^sub>R (y-x)"  | 
| 72238 | 816  | 
using e_def assms  | 
| 72567 | 817  | 
by (simp add: divide_simps vector_fraction_eq_iff) (simp add: algebra_simps)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
818  | 
finally have "z = y - e *\<^sub>R (y-x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
819  | 
by auto  | 
| 72567 | 820  | 
moreover have "e > 0" "e < 1" using e_def assms by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
821  | 
ultimately show ?thesis using that[of e] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
822  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
823  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
824  | 
lemma convex_rel_interior_closure:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
825  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
826  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
827  | 
shows "rel_interior (closure S) = rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
828  | 
proof (cases "S = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
829  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
830  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
831  | 
using assms rel_interior_eq_empty by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
832  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
833  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
834  | 
have "rel_interior (closure S) \<supseteq> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
835  | 
using subset_rel_interior[of S "closure S"] closure_same_affine_hull closure_subset  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
836  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
837  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
838  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
839  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
840  | 
assume z: "z \<in> rel_interior (closure S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
841  | 
obtain x where x: "x \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
842  | 
      using \<open>S \<noteq> {}\<close> assms rel_interior_eq_empty by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
843  | 
have "z \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
844  | 
proof (cases "x = z")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
845  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
846  | 
then show ?thesis using x by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
847  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
848  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
849  | 
obtain e where e: "e > 0" "cball z e \<inter> affine hull closure S \<le> closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
850  | 
using z rel_interior_cball[of "closure S"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
851  | 
hence *: "0 < e/norm(z-x)" using e False by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
852  | 
define y where "y = z + (e/norm(z-x)) *\<^sub>R (z-x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
853  | 
have yball: "y \<in> cball z e"  | 
| 71174 | 854  | 
using y_def dist_norm[of z y] e by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
855  | 
have "x \<in> affine hull closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
856  | 
using x rel_interior_subset_closure hull_inc[of x "closure S"] by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
857  | 
moreover have "z \<in> affine hull closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
858  | 
using z rel_interior_subset hull_subset[of "closure S"] by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
859  | 
ultimately have "y \<in> affine hull closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
860  | 
using y_def affine_affine_hull[of "closure S"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
861  | 
mem_affine_3_minus [of "affine hull closure S" z z x "e/norm(z-x)"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
862  | 
then have "y \<in> closure S" using e yball by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
863  | 
have "(1 + (e/norm(z-x))) *\<^sub>R z = (e/norm(z-x)) *\<^sub>R x + y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
864  | 
using y_def by (simp add: algebra_simps)  | 
| 72567 | 865  | 
then obtain e1 where "0 < e1" "e1 < 1" "z = y - e1 *\<^sub>R (y - x)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
866  | 
using * convex_rel_interior_closure_aux[of "e / norm (z - x)" 1 z x y]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
867  | 
by (auto simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
868  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
869  | 
using rel_interior_closure_convex_shrink assms x \<open>y \<in> closure S\<close>  | 
| 72567 | 870  | 
by fastforce  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
871  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
872  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
873  | 
ultimately show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
874  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
875  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
876  | 
lemma convex_interior_closure:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
877  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
878  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
879  | 
shows "interior (closure S) = interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
880  | 
using closure_aff_dim[of S] interior_rel_interior_gen[of S]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
881  | 
interior_rel_interior_gen[of "closure S"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
882  | 
convex_rel_interior_closure[of S] assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
883  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
884  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
885  | 
lemma closure_eq_rel_interior_eq:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
886  | 
fixes S1 S2 :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
887  | 
assumes "convex S1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
888  | 
and "convex S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
889  | 
shows "closure S1 = closure S2 \<longleftrightarrow> rel_interior S1 = rel_interior S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
890  | 
by (metis convex_rel_interior_closure convex_closure_rel_interior assms)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
891  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
892  | 
lemma closure_eq_between:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
893  | 
fixes S1 S2 :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
894  | 
assumes "convex S1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
895  | 
and "convex S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
896  | 
shows "closure S1 = closure S2 \<longleftrightarrow> rel_interior S1 \<le> S2 \<and> S2 \<subseteq> closure S1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
897  | 
(is "?A \<longleftrightarrow> ?B")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
898  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
899  | 
assume ?A  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
900  | 
then show ?B  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
901  | 
by (metis assms closure_subset convex_rel_interior_closure rel_interior_subset)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
902  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
903  | 
assume ?B  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
904  | 
then have "closure S1 \<subseteq> closure S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
905  | 
by (metis assms(1) convex_closure_rel_interior closure_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
906  | 
moreover from \<open>?B\<close> have "closure S1 \<supseteq> closure S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
907  | 
by (metis closed_closure closure_minimal)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
908  | 
ultimately show ?A ..  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
909  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
910  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
911  | 
lemma open_inter_closure_rel_interior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
912  | 
fixes S A :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
913  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
914  | 
and "open A"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
915  | 
  shows "A \<inter> closure S = {} \<longleftrightarrow> A \<inter> rel_interior S = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
916  | 
by (metis assms convex_closure_rel_interior open_Int_closure_eq_empty)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
917  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
918  | 
lemma rel_interior_open_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
919  | 
fixes a :: "'a :: euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
920  | 
shows "rel_interior(open_segment a b) = open_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
921  | 
proof (cases "a = b")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
922  | 
case True then show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
923  | 
next  | 
| 72238 | 924  | 
case False then  | 
925  | 
  have "open_segment a b = affine hull {a, b} \<inter> ball ((a + b) /\<^sub>R 2) (norm (b - a) / 2)"
 | 
|
926  | 
by (simp add: open_segment_as_ball)  | 
|
927  | 
then show ?thesis  | 
|
928  | 
unfolding rel_interior_eq openin_open  | 
|
929  | 
by (metis Elementary_Metric_Spaces.open_ball False affine_hull_open_segment)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
930  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
931  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
932  | 
lemma rel_interior_closed_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
933  | 
fixes a :: "'a :: euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
934  | 
shows "rel_interior(closed_segment a b) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
935  | 
         (if a = b then {a} else open_segment a b)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
936  | 
proof (cases "a = b")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
937  | 
case True then show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
938  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
939  | 
case False then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
940  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
941  | 
(metis closure_open_segment convex_open_segment convex_rel_interior_closure  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
942  | 
rel_interior_open_segment)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
943  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
944  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
945  | 
lemmas rel_interior_segment = rel_interior_closed_segment rel_interior_open_segment  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
946  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
947  | 
subsection\<open>The relative frontier of a set\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
948  | 
|
| 70136 | 949  | 
definition\<^marker>\<open>tag important\<close> "rel_frontier S = closure S - rel_interior S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
950  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
951  | 
lemma rel_frontier_empty [simp]: "rel_frontier {} = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
952  | 
by (simp add: rel_frontier_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
953  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
954  | 
lemma rel_frontier_eq_empty:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
955  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
956  | 
    shows "rel_frontier S = {} \<longleftrightarrow> affine S"
 | 
| 68056 | 957  | 
unfolding rel_frontier_def  | 
958  | 
using rel_interior_subset_closure by (auto simp add: rel_interior_eq_closure [symmetric])  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
959  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
960  | 
lemma rel_frontier_sing [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
961  | 
fixes a :: "'n::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
962  | 
    shows "rel_frontier {a} = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
963  | 
by (simp add: rel_frontier_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
964  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
965  | 
lemma rel_frontier_affine_hull:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
966  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
967  | 
shows "rel_frontier S \<subseteq> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
968  | 
using closure_affine_hull rel_frontier_def by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
969  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
970  | 
lemma rel_frontier_cball [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
971  | 
fixes a :: "'n::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
972  | 
    shows "rel_frontier(cball a r) = (if r = 0 then {} else sphere a r)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
973  | 
proof (cases rule: linorder_cases [of r 0])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
974  | 
case less then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
975  | 
by (force simp: sphere_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
976  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
977  | 
case equal then show ?thesis by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
978  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
979  | 
case greater then show ?thesis  | 
| 72238 | 980  | 
by simp (metis centre_in_ball empty_iff frontier_cball frontier_def interior_cball interior_rel_interior_gen rel_frontier_def)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
981  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
982  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
983  | 
lemma rel_frontier_translation:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
984  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
985  | 
shows "rel_frontier((\<lambda>x. a + x) ` S) = (\<lambda>x. a + x) ` (rel_frontier S)"  | 
| 72238 | 986  | 
by (simp add: rel_frontier_def translation_diff rel_interior_translation closure_translation)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
987  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
988  | 
lemma rel_frontier_nonempty_interior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
989  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
990  | 
  shows "interior S \<noteq> {} \<Longrightarrow> rel_frontier S = frontier S"
 | 
| 72238 | 991  | 
by (metis frontier_def interior_rel_interior_gen rel_frontier_def)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
992  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
993  | 
lemma rel_frontier_frontier:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
994  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
995  | 
shows "affine hull S = UNIV \<Longrightarrow> rel_frontier S = frontier S"  | 
| 72238 | 996  | 
by (simp add: frontier_def rel_frontier_def rel_interior_interior)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
997  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
998  | 
lemma closest_point_in_rel_frontier:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
999  | 
   "\<lbrakk>closed S; S \<noteq> {}; x \<in> affine hull S - rel_interior S\<rbrakk>
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1000  | 
\<Longrightarrow> closest_point S x \<in> rel_frontier S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1001  | 
by (simp add: closest_point_in_rel_interior closest_point_in_set rel_frontier_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1002  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1003  | 
lemma closed_rel_frontier [iff]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1004  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1005  | 
shows "closed (rel_frontier S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1006  | 
proof -  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
1007  | 
have *: "closedin (top_of_set (affine hull S)) (closure S - rel_interior S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1008  | 
by (simp add: closed_subset closedin_diff closure_affine_hull openin_rel_interior)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1009  | 
show ?thesis  | 
| 72238 | 1010  | 
proof (rule closedin_closed_trans[of "affine hull S" "rel_frontier S"])  | 
1011  | 
show "closedin (top_of_set (affine hull S)) (rel_frontier S)"  | 
|
1012  | 
by (simp add: "*" rel_frontier_def)  | 
|
1013  | 
qed simp  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1014  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1015  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1016  | 
lemma closed_rel_boundary:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1017  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1018  | 
shows "closed S \<Longrightarrow> closed(S - rel_interior S)"  | 
| 72238 | 1019  | 
by (metis closed_rel_frontier closure_closed rel_frontier_def)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1020  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1021  | 
lemma compact_rel_boundary:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1022  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1023  | 
shows "compact S \<Longrightarrow> compact(S - rel_interior S)"  | 
| 72238 | 1024  | 
by (metis bounded_diff closed_rel_boundary closure_eq compact_closure compact_imp_closed)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1025  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1026  | 
lemma bounded_rel_frontier:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1027  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1028  | 
shows "bounded S \<Longrightarrow> bounded(rel_frontier S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1029  | 
by (simp add: bounded_closure bounded_diff rel_frontier_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1030  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1031  | 
lemma compact_rel_frontier_bounded:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1032  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1033  | 
shows "bounded S \<Longrightarrow> compact(rel_frontier S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1034  | 
using bounded_rel_frontier closed_rel_frontier compact_eq_bounded_closed by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1035  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1036  | 
lemma compact_rel_frontier:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1037  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1038  | 
shows "compact S \<Longrightarrow> compact(rel_frontier S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1039  | 
by (meson compact_eq_bounded_closed compact_rel_frontier_bounded)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1040  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1041  | 
lemma convex_same_rel_interior_closure:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1042  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1043  | 
shows "\<lbrakk>convex S; convex T\<rbrakk>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1044  | 
\<Longrightarrow> rel_interior S = rel_interior T \<longleftrightarrow> closure S = closure T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1045  | 
by (simp add: closure_eq_rel_interior_eq)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1046  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1047  | 
lemma convex_same_rel_interior_closure_straddle:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1048  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1049  | 
shows "\<lbrakk>convex S; convex T\<rbrakk>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1050  | 
\<Longrightarrow> rel_interior S = rel_interior T \<longleftrightarrow>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1051  | 
rel_interior S \<subseteq> T \<and> T \<subseteq> closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1052  | 
by (simp add: closure_eq_between convex_same_rel_interior_closure)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1053  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1054  | 
lemma convex_rel_frontier_aff_dim:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1055  | 
fixes S1 S2 :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1056  | 
assumes "convex S1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1057  | 
and "convex S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1058  | 
    and "S2 \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1059  | 
and "S1 \<le> rel_frontier S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1060  | 
shows "aff_dim S1 < aff_dim S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1061  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1062  | 
have "S1 \<subseteq> closure S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1063  | 
using assms unfolding rel_frontier_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1064  | 
then have *: "affine hull S1 \<subseteq> affine hull S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1065  | 
using hull_mono[of "S1" "closure S2"] closure_same_affine_hull[of S2] by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1066  | 
then have "aff_dim S1 \<le> aff_dim S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1067  | 
using * aff_dim_affine_hull[of S1] aff_dim_affine_hull[of S2]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1068  | 
aff_dim_subset[of "affine hull S1" "affine hull S2"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1069  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1070  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1071  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1072  | 
assume eq: "aff_dim S1 = aff_dim S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1073  | 
    then have "S1 \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1074  | 
      using aff_dim_empty[of S1] aff_dim_empty[of S2] \<open>S2 \<noteq> {}\<close> by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1075  | 
have **: "affine hull S1 = affine hull S2"  | 
| 72238 | 1076  | 
      by (simp_all add: * eq \<open>S1 \<noteq> {}\<close> affine_dim_equal)
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1077  | 
obtain a where a: "a \<in> rel_interior S1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1078  | 
      using \<open>S1 \<noteq> {}\<close> rel_interior_eq_empty assms by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1079  | 
obtain T where T: "open T" "a \<in> T \<inter> S1" "T \<inter> affine hull S1 \<subseteq> S1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1080  | 
using mem_rel_interior[of a S1] a by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1081  | 
then have "a \<in> T \<inter> closure S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1082  | 
using a assms unfolding rel_frontier_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1083  | 
then obtain b where b: "b \<in> T \<inter> rel_interior S2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1084  | 
using open_inter_closure_rel_interior[of S2 T] assms T by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1085  | 
then have "b \<in> affine hull S1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1086  | 
using rel_interior_subset hull_subset[of S2] ** by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1087  | 
then have "b \<in> S1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1088  | 
using T b by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1089  | 
then have False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1090  | 
using b assms unfolding rel_frontier_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1091  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1092  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1093  | 
using less_le by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1094  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1095  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1096  | 
lemma convex_rel_interior_if:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1097  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1098  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1099  | 
and "z \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1100  | 
shows "\<forall>x\<in>affine hull S. \<exists>m. m > 1 \<and> (\<forall>e. e > 1 \<and> e \<le> m \<longrightarrow> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1101  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1102  | 
obtain e1 where e1: "e1 > 0 \<and> cball z e1 \<inter> affine hull S \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1103  | 
using mem_rel_interior_cball[of z S] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1104  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1105  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1106  | 
assume x: "x \<in> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1107  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1108  | 
assume "x \<noteq> z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1109  | 
define m where "m = 1 + e1/norm(x-z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1110  | 
hence "m > 1" using e1 \<open>x \<noteq> z\<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1111  | 
      {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1112  | 
fix e  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1113  | 
assume e: "e > 1 \<and> e \<le> m"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1114  | 
have "z \<in> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1115  | 
using assms rel_interior_subset hull_subset[of S] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1116  | 
then have *: "(1 - e)*\<^sub>R x + e *\<^sub>R z \<in> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1117  | 
using mem_affine[of "affine hull S" x z "(1-e)" e] affine_affine_hull[of S] x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1118  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1119  | 
have "norm (z + e *\<^sub>R x - (x + e *\<^sub>R z)) = norm ((e - 1) *\<^sub>R (x - z))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1120  | 
by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1121  | 
also have "\<dots> = (e - 1) * norm (x-z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1122  | 
using norm_scaleR e by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1123  | 
also have "\<dots> \<le> (m - 1) * norm (x - z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1124  | 
using e mult_right_mono[of _ _ "norm(x-z)"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1125  | 
also have "\<dots> = (e1 / norm (x - z)) * norm (x - z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1126  | 
using m_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1127  | 
also have "\<dots> = e1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1128  | 
using \<open>x \<noteq> z\<close> e1 by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1129  | 
finally have **: "norm (z + e *\<^sub>R x - (x + e *\<^sub>R z)) \<le> e1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1130  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1131  | 
have "(1 - e)*\<^sub>R x+ e *\<^sub>R z \<in> cball z e1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1132  | 
using m_def **  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1133  | 
unfolding cball_def dist_norm  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1134  | 
by (auto simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1135  | 
then have "(1 - e) *\<^sub>R x+ e *\<^sub>R z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1136  | 
using e * e1 by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1137  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1138  | 
then have "\<exists>m. m > 1 \<and> (\<forall>e. e > 1 \<and> e \<le> m \<longrightarrow> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S )"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1139  | 
using \<open>m> 1 \<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1140  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1141  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1142  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1143  | 
assume "x = z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1144  | 
define m where "m = 1 + e1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1145  | 
then have "m > 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1146  | 
using e1 by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1147  | 
      {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1148  | 
fix e  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1149  | 
assume e: "e > 1 \<and> e \<le> m"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1150  | 
then have "(1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1151  | 
using e1 x \<open>x = z\<close> by (auto simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1152  | 
then have "(1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1153  | 
using e by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1154  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1155  | 
then have "\<exists>m. m > 1 \<and> (\<forall>e. e > 1 \<and> e \<le> m \<longrightarrow> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1156  | 
using \<open>m > 1\<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1157  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1158  | 
ultimately have "\<exists>m. m > 1 \<and> (\<forall>e. e > 1 \<and> e \<le> m \<longrightarrow> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S )"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1159  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1160  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1161  | 
then show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1162  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1163  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1164  | 
lemma convex_rel_interior_if2:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1165  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1166  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1167  | 
assumes "z \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1168  | 
shows "\<forall>x\<in>affine hull S. \<exists>e. e > 1 \<and> (1 - e)*\<^sub>R x + e *\<^sub>R z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1169  | 
using convex_rel_interior_if[of S z] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1170  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1171  | 
lemma convex_rel_interior_only_if:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1172  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1173  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1174  | 
    and "S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1175  | 
assumes "\<forall>x\<in>S. \<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1176  | 
shows "z \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1177  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1178  | 
obtain x where x: "x \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1179  | 
using rel_interior_eq_empty assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1180  | 
then have "x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1181  | 
using rel_interior_subset by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1182  | 
then obtain e where e: "e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1183  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1184  | 
define y where [abs_def]: "y = (1 - e) *\<^sub>R x + e *\<^sub>R z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1185  | 
then have "y \<in> S" using e by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1186  | 
define e1 where "e1 = 1/e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1187  | 
then have "0 < e1 \<and> e1 < 1" using e by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1188  | 
then have "z =y - (1 - e1) *\<^sub>R (y - x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1189  | 
using e1_def y_def by (auto simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1190  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1191  | 
using rel_interior_convex_shrink[of S x y "1-e1"] \<open>0 < e1 \<and> e1 < 1\<close> \<open>y \<in> S\<close> x assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1192  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1193  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1194  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1195  | 
lemma convex_rel_interior_iff:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1196  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1197  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1198  | 
    and "S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1199  | 
shows "z \<in> rel_interior S \<longleftrightarrow> (\<forall>x\<in>S. \<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1200  | 
using assms hull_subset[of S "affine"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1201  | 
convex_rel_interior_if[of S z] convex_rel_interior_only_if[of S z]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1202  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1203  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1204  | 
lemma convex_rel_interior_iff2:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1205  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1206  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1207  | 
    and "S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1208  | 
shows "z \<in> rel_interior S \<longleftrightarrow> (\<forall>x\<in>affine hull S. \<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1209  | 
using assms hull_subset[of S] convex_rel_interior_if2[of S z] convex_rel_interior_only_if[of S z]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1210  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1211  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1212  | 
lemma convex_interior_iff:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1213  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1214  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1215  | 
shows "z \<in> interior S \<longleftrightarrow> (\<forall>x. \<exists>e. e > 0 \<and> z + e *\<^sub>R x \<in> S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1216  | 
proof (cases "aff_dim S = int DIM('n)")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1217  | 
case False  | 
| 68056 | 1218  | 
  { assume "z \<in> interior S"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1219  | 
then have False  | 
| 68056 | 1220  | 
using False interior_rel_interior_gen[of S] by auto }  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1221  | 
moreover  | 
| 68056 | 1222  | 
  { assume r: "\<forall>x. \<exists>e. e > 0 \<and> z + e *\<^sub>R x \<in> S"
 | 
1223  | 
    { fix x
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1224  | 
obtain e1 where e1: "e1 > 0 \<and> z + e1 *\<^sub>R (x - z) \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1225  | 
using r by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1226  | 
obtain e2 where e2: "e2 > 0 \<and> z + e2 *\<^sub>R (z - x) \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1227  | 
using r by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1228  | 
define x1 where [abs_def]: "x1 = z + e1 *\<^sub>R (x - z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1229  | 
then have x1: "x1 \<in> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1230  | 
using e1 hull_subset[of S] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1231  | 
define x2 where [abs_def]: "x2 = z + e2 *\<^sub>R (z - x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1232  | 
then have x2: "x2 \<in> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1233  | 
using e2 hull_subset[of S] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1234  | 
have *: "e1/(e1+e2) + e2/(e1+e2) = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1235  | 
using add_divide_distrib[of e1 e2 "e1+e2"] e1 e2 by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1236  | 
then have "z = (e2/(e1+e2)) *\<^sub>R x1 + (e1/(e1+e2)) *\<^sub>R x2"  | 
| 72567 | 1237  | 
by (simp add: x1_def x2_def algebra_simps) (simp add: "*" pth_8)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1238  | 
then have z: "z \<in> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1239  | 
using mem_affine[of "affine hull S" x1 x2 "e2/(e1+e2)" "e1/(e1+e2)"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1240  | 
x1 x2 affine_affine_hull[of S] *  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1241  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1242  | 
have "x1 - x2 = (e1 + e2) *\<^sub>R (x - z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1243  | 
using x1_def x2_def by (auto simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1244  | 
then have "x = z+(1/(e1+e2)) *\<^sub>R (x1-x2)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1245  | 
using e1 e2 by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1246  | 
then have "x \<in> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1247  | 
using mem_affine_3_minus[of "affine hull S" z x1 x2 "1/(e1+e2)"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1248  | 
x1 x2 z affine_affine_hull[of S]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1249  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1250  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1251  | 
then have "affine hull S = UNIV"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1252  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1253  | 
    then have "aff_dim S = int DIM('n)"
 | 
| 71176 | 1254  | 
using aff_dim_affine_hull[of S] by (simp)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1255  | 
then have False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1256  | 
using False by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1257  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1258  | 
ultimately show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1259  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1260  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1261  | 
  then have "S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1262  | 
using aff_dim_empty[of S] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1263  | 
have *: "affine hull S = UNIV"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1264  | 
using True affine_hull_UNIV by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1265  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1266  | 
assume "z \<in> interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1267  | 
then have "z \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1268  | 
using True interior_rel_interior_gen[of S] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1269  | 
then have **: "\<forall>x. \<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1270  | 
      using convex_rel_interior_iff2[of S z] assms \<open>S \<noteq> {}\<close> * by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1271  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1272  | 
obtain e1 where e1: "e1 > 1" "(1 - e1) *\<^sub>R (z - x) + e1 *\<^sub>R z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1273  | 
using **[rule_format, of "z-x"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1274  | 
define e where [abs_def]: "e = e1 - 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1275  | 
then have "(1 - e1) *\<^sub>R (z - x) + e1 *\<^sub>R z = z + e *\<^sub>R x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1276  | 
by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1277  | 
then have "e > 0" "z + e *\<^sub>R x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1278  | 
using e1 e_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1279  | 
then have "\<exists>e. e > 0 \<and> z + e *\<^sub>R x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1280  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1281  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1282  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1283  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1284  | 
assume r: "\<forall>x. \<exists>e. e > 0 \<and> z + e *\<^sub>R x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1285  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1286  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1287  | 
obtain e1 where e1: "e1 > 0" "z + e1 *\<^sub>R (z - x) \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1288  | 
using r[rule_format, of "z-x"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1289  | 
define e where "e = e1 + 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1290  | 
then have "z + e1 *\<^sub>R (z - x) = (1 - e) *\<^sub>R x + e *\<^sub>R z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1291  | 
by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1292  | 
then have "e > 1" "(1 - e)*\<^sub>R x + e *\<^sub>R z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1293  | 
using e1 e_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1294  | 
then have "\<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1295  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1296  | 
then have "z \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1297  | 
      using convex_rel_interior_iff2[of S z] assms \<open>S \<noteq> {}\<close> by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1298  | 
then have "z \<in> interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1299  | 
using True interior_rel_interior_gen[of S] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1300  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1301  | 
ultimately show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1302  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1303  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1304  | 
|
| 70136 | 1305  | 
subsubsection\<^marker>\<open>tag unimportant\<close> \<open>Relative interior and closure under common operations\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1306  | 
|
| 67613 | 1307  | 
lemma rel_interior_inter_aux: "\<Inter>{rel_interior S |S. S \<in> I} \<subseteq> \<Inter>I"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1308  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1309  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1310  | 
fix y  | 
| 67613 | 1311  | 
    assume "y \<in> \<Inter>{rel_interior S |S. S \<in> I}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1312  | 
then have y: "\<forall>S \<in> I. y \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1313  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1314  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1315  | 
fix S  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1316  | 
assume "S \<in> I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1317  | 
then have "y \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1318  | 
using rel_interior_subset y by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1319  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1320  | 
then have "y \<in> \<Inter>I" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1321  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1322  | 
then show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1323  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1324  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1325  | 
lemma convex_closure_rel_interior_inter:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1326  | 
assumes "\<forall>S\<in>I. convex (S :: 'n::euclidean_space set)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1327  | 
    and "\<Inter>{rel_interior S |S. S \<in> I} \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1328  | 
  shows "\<Inter>{closure S |S. S \<in> I} \<le> closure (\<Inter>{rel_interior S |S. S \<in> I})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1329  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1330  | 
obtain x where x: "\<forall>S\<in>I. x \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1331  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1332  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1333  | 
fix y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1334  | 
    assume "y \<in> \<Inter>{closure S |S. S \<in> I}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1335  | 
then have y: "\<forall>S \<in> I. y \<in> closure S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1336  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1337  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1338  | 
assume "y = x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1339  | 
      then have "y \<in> closure (\<Inter>{rel_interior S |S. S \<in> I})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1340  | 
        using x closure_subset[of "\<Inter>{rel_interior S |S. S \<in> I}"] by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1341  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1342  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1343  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1344  | 
assume "y \<noteq> x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1345  | 
      { fix e :: real
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1346  | 
assume e: "e > 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1347  | 
define e1 where "e1 = min 1 (e/norm (y - x))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1348  | 
then have e1: "e1 > 0" "e1 \<le> 1" "e1 * norm (y - x) \<le> e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1349  | 
using \<open>y \<noteq> x\<close> \<open>e > 0\<close> le_divide_eq[of e1 e "norm (y - x)"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1350  | 
by simp_all  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1351  | 
define z where "z = y - e1 *\<^sub>R (y - x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1352  | 
        {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1353  | 
fix S  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1354  | 
assume "S \<in> I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1355  | 
then have "z \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1356  | 
using rel_interior_closure_convex_shrink[of S x y e1] assms x y e1 z_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1357  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1358  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1359  | 
        then have *: "z \<in> \<Inter>{rel_interior S |S. S \<in> I}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1360  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1361  | 
        have "\<exists>z. z \<in> \<Inter>{rel_interior S |S. S \<in> I} \<and> z \<noteq> y \<and> dist z y \<le> e"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1362  | 
using \<open>y \<noteq> x\<close> z_def * e1 e dist_norm[of z y]  | 
| 72238 | 1363  | 
by (rule_tac x="z" in exI) auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1364  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1365  | 
      then have "y islimpt \<Inter>{rel_interior S |S. S \<in> I}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1366  | 
unfolding islimpt_approachable_le by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1367  | 
      then have "y \<in> closure (\<Inter>{rel_interior S |S. S \<in> I})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1368  | 
unfolding closure_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1369  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1370  | 
    ultimately have "y \<in> closure (\<Inter>{rel_interior S |S. S \<in> I})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1371  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1372  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1373  | 
then show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1374  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1375  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1376  | 
lemma convex_closure_inter:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1377  | 
assumes "\<forall>S\<in>I. convex (S :: 'n::euclidean_space set)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1378  | 
    and "\<Inter>{rel_interior S |S. S \<in> I} \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1379  | 
  shows "closure (\<Inter>I) = \<Inter>{closure S |S. S \<in> I}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1380  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1381  | 
  have "\<Inter>{closure S |S. S \<in> I} \<le> closure (\<Inter>{rel_interior S |S. S \<in> I})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1382  | 
using convex_closure_rel_interior_inter assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1383  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1384  | 
  have "closure (\<Inter>{rel_interior S |S. S \<in> I}) \<le> closure (\<Inter>I)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1385  | 
    using rel_interior_inter_aux closure_mono[of "\<Inter>{rel_interior S |S. S \<in> I}" "\<Inter>I"]
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1386  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1387  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1388  | 
using closure_Int[of I] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1389  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1390  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1391  | 
lemma convex_inter_rel_interior_same_closure:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1392  | 
assumes "\<forall>S\<in>I. convex (S :: 'n::euclidean_space set)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1393  | 
    and "\<Inter>{rel_interior S |S. S \<in> I} \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1394  | 
  shows "closure (\<Inter>{rel_interior S |S. S \<in> I}) = closure (\<Inter>I)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1395  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1396  | 
  have "\<Inter>{closure S |S. S \<in> I} \<le> closure (\<Inter>{rel_interior S |S. S \<in> I})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1397  | 
using convex_closure_rel_interior_inter assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1398  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1399  | 
  have "closure (\<Inter>{rel_interior S |S. S \<in> I}) \<le> closure (\<Inter>I)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1400  | 
    using rel_interior_inter_aux closure_mono[of "\<Inter>{rel_interior S |S. S \<in> I}" "\<Inter>I"]
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1401  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1402  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1403  | 
using closure_Int[of I] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1404  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1405  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1406  | 
lemma convex_rel_interior_inter:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1407  | 
assumes "\<forall>S\<in>I. convex (S :: 'n::euclidean_space set)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1408  | 
    and "\<Inter>{rel_interior S |S. S \<in> I} \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1409  | 
  shows "rel_interior (\<Inter>I) \<subseteq> \<Inter>{rel_interior S |S. S \<in> I}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1410  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1411  | 
have "convex (\<Inter>I)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1412  | 
using assms convex_Inter by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1413  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1414  | 
  have "convex (\<Inter>{rel_interior S |S. S \<in> I})"
 | 
| 72238 | 1415  | 
using assms convex_rel_interior by (force intro: convex_Inter)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1416  | 
ultimately  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1417  | 
  have "rel_interior (\<Inter>{rel_interior S |S. S \<in> I}) = rel_interior (\<Inter>I)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1418  | 
using convex_inter_rel_interior_same_closure assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1419  | 
      closure_eq_rel_interior_eq[of "\<Inter>{rel_interior S |S. S \<in> I}" "\<Inter>I"]
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1420  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1421  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1422  | 
    using rel_interior_subset[of "\<Inter>{rel_interior S |S. S \<in> I}"] by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1423  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1424  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1425  | 
lemma convex_rel_interior_finite_inter:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1426  | 
assumes "\<forall>S\<in>I. convex (S :: 'n::euclidean_space set)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1427  | 
    and "\<Inter>{rel_interior S |S. S \<in> I} \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1428  | 
and "finite I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1429  | 
  shows "rel_interior (\<Inter>I) = \<Inter>{rel_interior S |S. S \<in> I}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1430  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1431  | 
  have "\<Inter>I \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1432  | 
using assms rel_interior_inter_aux[of I] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1433  | 
have "convex (\<Inter>I)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1434  | 
using convex_Inter assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1435  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1436  | 
  proof (cases "I = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1437  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1438  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1439  | 
using Inter_empty rel_interior_UNIV by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1440  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1441  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1442  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1443  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1444  | 
      assume z: "z \<in> \<Inter>{rel_interior S |S. S \<in> I}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1445  | 
      {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1446  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1447  | 
assume x: "x \<in> \<Inter>I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1448  | 
        {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1449  | 
fix S  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1450  | 
assume S: "S \<in> I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1451  | 
then have "z \<in> rel_interior S" "x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1452  | 
using z x by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1453  | 
then have "\<exists>m. m > 1 \<and> (\<forall>e. e > 1 \<and> e \<le> m \<longrightarrow> (1 - e)*\<^sub>R x + e *\<^sub>R z \<in> S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1454  | 
using convex_rel_interior_if[of S z] S assms hull_subset[of S] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1455  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1456  | 
then obtain mS where  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1457  | 
mS: "\<forall>S\<in>I. mS S > 1 \<and> (\<forall>e. e > 1 \<and> e \<le> mS S \<longrightarrow> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> S)" by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1458  | 
define e where "e = Min (mS ` I)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1459  | 
        then have "e \<in> mS ` I" using assms \<open>I \<noteq> {}\<close> by simp
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1460  | 
then have "e > 1" using mS by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1461  | 
moreover have "\<forall>S\<in>I. e \<le> mS S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1462  | 
using e_def assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1463  | 
ultimately have "\<exists>e > 1. (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> \<Inter>I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1464  | 
using mS by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1465  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1466  | 
then have "z \<in> rel_interior (\<Inter>I)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1467  | 
        using convex_rel_interior_iff[of "\<Inter>I" z] \<open>\<Inter>I \<noteq> {}\<close> \<open>convex (\<Inter>I)\<close> by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1468  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1469  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1470  | 
using convex_rel_interior_inter[of I] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1471  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1472  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1473  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1474  | 
lemma convex_closure_inter_two:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1475  | 
fixes S T :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1476  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1477  | 
and "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1478  | 
  assumes "rel_interior S \<inter> rel_interior T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1479  | 
shows "closure (S \<inter> T) = closure S \<inter> closure T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1480  | 
  using convex_closure_inter[of "{S,T}"] assms by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1481  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1482  | 
lemma convex_rel_interior_inter_two:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1483  | 
fixes S T :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1484  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1485  | 
and "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1486  | 
    and "rel_interior S \<inter> rel_interior T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1487  | 
shows "rel_interior (S \<inter> T) = rel_interior S \<inter> rel_interior T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1488  | 
  using convex_rel_interior_finite_inter[of "{S,T}"] assms by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1489  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1490  | 
lemma convex_affine_closure_Int:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1491  | 
fixes S T :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1492  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1493  | 
and "affine T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1494  | 
    and "rel_interior S \<inter> T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1495  | 
shows "closure (S \<inter> T) = closure S \<inter> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1496  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1497  | 
have "affine hull T = T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1498  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1499  | 
then have "rel_interior T = T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1500  | 
using rel_interior_affine_hull[of T] by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1501  | 
moreover have "closure T = T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1502  | 
using assms affine_closed[of T] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1503  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1504  | 
using convex_closure_inter_two[of S T] assms affine_imp_convex by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1505  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1506  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1507  | 
lemma connected_component_1_gen:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1508  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1509  | 
  assumes "DIM('a) = 1"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1510  | 
shows "connected_component S a b \<longleftrightarrow> closed_segment a b \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1511  | 
unfolding connected_component_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1512  | 
by (metis (no_types, lifting) assms subsetD subsetI convex_contains_segment convex_segment(1)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1513  | 
ends_in_segment connected_convex_1_gen)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1514  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1515  | 
lemma connected_component_1:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1516  | 
fixes S :: "real set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1517  | 
shows "connected_component S a b \<longleftrightarrow> closed_segment a b \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1518  | 
by (simp add: connected_component_1_gen)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1519  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1520  | 
lemma convex_affine_rel_interior_Int:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1521  | 
fixes S T :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1522  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1523  | 
and "affine T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1524  | 
    and "rel_interior S \<inter> T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1525  | 
shows "rel_interior (S \<inter> T) = rel_interior S \<inter> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1526  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1527  | 
have "affine hull T = T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1528  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1529  | 
then have "rel_interior T = T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1530  | 
using rel_interior_affine_hull[of T] by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1531  | 
moreover have "closure T = T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1532  | 
using assms affine_closed[of T] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1533  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1534  | 
using convex_rel_interior_inter_two[of S T] assms affine_imp_convex by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1535  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1536  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1537  | 
lemma convex_affine_rel_frontier_Int:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1538  | 
fixes S T :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1539  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1540  | 
and "affine T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1541  | 
    and "interior S \<inter> T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1542  | 
shows "rel_frontier(S \<inter> T) = frontier S \<inter> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1543  | 
using assms  | 
| 72567 | 1544  | 
unfolding rel_frontier_def frontier_def  | 
1545  | 
using convex_affine_closure_Int convex_affine_rel_interior_Int rel_interior_nonempty_interior by fastforce  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1546  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1547  | 
lemma rel_interior_convex_Int_affine:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1548  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1549  | 
  assumes "convex S" "affine T" "interior S \<inter> T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1550  | 
shows "rel_interior(S \<inter> T) = interior S \<inter> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1551  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1552  | 
obtain a where aS: "a \<in> interior S" and aT:"a \<in> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1553  | 
using assms by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1554  | 
have "rel_interior S = interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1555  | 
by (metis (no_types) aS affine_hull_nonempty_interior equals0D rel_interior_interior)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1556  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1557  | 
by (metis (no_types) affine_imp_convex assms convex_rel_interior_inter_two hull_same rel_interior_affine_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1558  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1559  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1560  | 
lemma closure_convex_Int_affine:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1561  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1562  | 
  assumes "convex S" "affine T" "rel_interior S \<inter> T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1563  | 
shows "closure(S \<inter> T) = closure S \<inter> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1564  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1565  | 
have "closure (S \<inter> T) \<subseteq> closure T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1566  | 
by (simp add: closure_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1567  | 
also have "... \<subseteq> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1568  | 
by (simp add: affine_closed assms)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1569  | 
finally show "closure(S \<inter> T) \<subseteq> closure S \<inter> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1570  | 
by (simp add: closure_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1571  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1572  | 
obtain a where "a \<in> rel_interior S" "a \<in> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1573  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1574  | 
then have ssT: "subspace ((\<lambda>x. (-a)+x) ` T)" and "a \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1575  | 
using affine_diffs_subspace rel_interior_subset assms by blast+  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1576  | 
show "closure S \<inter> T \<subseteq> closure (S \<inter> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1577  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1578  | 
fix x assume "x \<in> closure S \<inter> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1579  | 
show "x \<in> closure (S \<inter> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1580  | 
proof (cases "x = a")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1581  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1582  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1583  | 
using \<open>a \<in> S\<close> \<open>a \<in> T\<close> closure_subset by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1584  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1585  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1586  | 
then have "x \<in> closure(open_segment a x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1587  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1588  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1589  | 
using \<open>x \<in> closure S \<inter> T\<close> assms convex_affine_closure_Int by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1590  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1591  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1592  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1593  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1594  | 
lemma subset_rel_interior_convex:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1595  | 
fixes S T :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1596  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1597  | 
and "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1598  | 
and "S \<le> closure T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1599  | 
and "\<not> S \<subseteq> rel_frontier T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1600  | 
shows "rel_interior S \<subseteq> rel_interior T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1601  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1602  | 
have *: "S \<inter> closure T = S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1603  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1604  | 
have "\<not> rel_interior S \<subseteq> rel_frontier T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1605  | 
using closure_mono[of "rel_interior S" "rel_frontier T"] closed_rel_frontier[of T]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1606  | 
closure_closed[of S] convex_closure_rel_interior[of S] closure_subset[of S] assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1607  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1608  | 
  then have "rel_interior S \<inter> rel_interior (closure T) \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1609  | 
using assms rel_frontier_def[of T] rel_interior_subset convex_rel_interior_closure[of T]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1610  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1611  | 
then have "rel_interior S \<inter> rel_interior T = rel_interior (S \<inter> closure T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1612  | 
using assms convex_closure convex_rel_interior_inter_two[of S "closure T"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1613  | 
convex_rel_interior_closure[of T]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1614  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1615  | 
also have "\<dots> = rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1616  | 
using * by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1617  | 
finally show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1618  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1619  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1620  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1621  | 
lemma rel_interior_convex_linear_image:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1622  | 
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1623  | 
assumes "linear f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1624  | 
and "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1625  | 
shows "f ` (rel_interior S) = rel_interior (f ` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1626  | 
proof (cases "S = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1627  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1628  | 
then show ?thesis  | 
| 71176 | 1629  | 
using assms by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1630  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1631  | 
case False  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
1632  | 
interpret linear f by fact  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1633  | 
have *: "f ` (rel_interior S) \<subseteq> f ` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1634  | 
unfolding image_mono using rel_interior_subset by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1635  | 
have "f ` S \<subseteq> f ` (closure S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1636  | 
unfolding image_mono using closure_subset by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1637  | 
also have "\<dots> = f ` (closure (rel_interior S))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1638  | 
using convex_closure_rel_interior assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1639  | 
also have "\<dots> \<subseteq> closure (f ` (rel_interior S))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1640  | 
using closure_linear_image_subset assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1641  | 
finally have "closure (f ` S) = closure (f ` rel_interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1642  | 
using closure_mono[of "f ` S" "closure (f ` rel_interior S)"] closure_closure  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1643  | 
closure_mono[of "f ` rel_interior S" "f ` S"] *  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1644  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1645  | 
then have "rel_interior (f ` S) = rel_interior (f ` rel_interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1646  | 
using assms convex_rel_interior  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1647  | 
linear_conv_bounded_linear[of f] convex_linear_image[of _ S]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1648  | 
convex_linear_image[of _ "rel_interior S"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1649  | 
closure_eq_rel_interior_eq[of "f ` S" "f ` rel_interior S"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1650  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1651  | 
then have "rel_interior (f ` S) \<subseteq> f ` rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1652  | 
using rel_interior_subset by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1653  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1654  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1655  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1656  | 
assume "z \<in> f ` rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1657  | 
then obtain z1 where z1: "z1 \<in> rel_interior S" "f z1 = z" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1658  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1659  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1660  | 
assume "x \<in> f ` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1661  | 
then obtain x1 where x1: "x1 \<in> S" "f x1 = x" by auto  | 
| 67613 | 1662  | 
then obtain e where e: "e > 1" "(1 - e) *\<^sub>R x1 + e *\<^sub>R z1 \<in> S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1663  | 
using convex_rel_interior_iff[of S z1] \<open>convex S\<close> x1 z1 by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1664  | 
moreover have "f ((1 - e) *\<^sub>R x1 + e *\<^sub>R z1) = (1 - e) *\<^sub>R x + e *\<^sub>R z"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
1665  | 
using x1 z1 by (simp add: linear_add linear_scale \<open>linear f\<close>)  | 
| 67613 | 1666  | 
ultimately have "(1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1667  | 
using imageI[of "(1 - e) *\<^sub>R x1 + e *\<^sub>R z1" S f] by auto  | 
| 67613 | 1668  | 
then have "\<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f ` S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1669  | 
using e by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1670  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1671  | 
then have "z \<in> rel_interior (f ` S)"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
1672  | 
using convex_rel_interior_iff[of "f ` S" z] \<open>convex S\<close> \<open>linear f\<close>  | 
| 
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
1673  | 
        \<open>S \<noteq> {}\<close> convex_linear_image[of f S]  linear_conv_bounded_linear[of f]
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1674  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1675  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1676  | 
ultimately show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1677  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1678  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1679  | 
lemma rel_interior_convex_linear_preimage:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1680  | 
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1681  | 
assumes "linear f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1682  | 
and "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1683  | 
    and "f -` (rel_interior S) \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1684  | 
shows "rel_interior (f -` S) = f -` (rel_interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1685  | 
proof -  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
1686  | 
interpret linear f by fact  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1687  | 
  have "S \<noteq> {}"
 | 
| 71176 | 1688  | 
using assms by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1689  | 
  have nonemp: "f -` S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1690  | 
by (metis assms(3) rel_interior_subset subset_empty vimage_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1691  | 
  then have "S \<inter> (range f) \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1692  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1693  | 
have conv: "convex (f -` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1694  | 
using convex_linear_vimage assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1695  | 
then have "convex (S \<inter> range f)"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
1696  | 
by (simp add: assms(2) convex_Int convex_linear_image linear_axioms)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1697  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1698  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1699  | 
assume "z \<in> f -` (rel_interior S)"  | 
| 67613 | 1700  | 
then have z: "f z \<in> rel_interior S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1701  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1702  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1703  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1704  | 
assume "x \<in> f -` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1705  | 
then have "f x \<in> S" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1706  | 
then obtain e where e: "e > 1" "(1 - e) *\<^sub>R f x + e *\<^sub>R f z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1707  | 
        using convex_rel_interior_iff[of S "f z"] z assms \<open>S \<noteq> {}\<close> by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1708  | 
moreover have "(1 - e) *\<^sub>R f x + e *\<^sub>R f z = f ((1 - e) *\<^sub>R x + e *\<^sub>R z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1709  | 
using \<open>linear f\<close> by (simp add: linear_iff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1710  | 
ultimately have "\<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R z \<in> f -` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1711  | 
using e by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1712  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1713  | 
then have "z \<in> rel_interior (f -` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1714  | 
using convex_rel_interior_iff[of "f -` S" z] conv nonemp by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1715  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1716  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1717  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1718  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1719  | 
assume z: "z \<in> rel_interior (f -` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1720  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1721  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1722  | 
assume "x \<in> S \<inter> range f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1723  | 
then obtain y where y: "f y = x" "y \<in> f -` S" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1724  | 
then obtain e where e: "e > 1" "(1 - e) *\<^sub>R y + e *\<^sub>R z \<in> f -` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1725  | 
using convex_rel_interior_iff[of "f -` S" z] z conv by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1726  | 
moreover have "(1 - e) *\<^sub>R x + e *\<^sub>R f z = f ((1 - e) *\<^sub>R y + e *\<^sub>R z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1727  | 
using \<open>linear f\<close> y by (simp add: linear_iff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1728  | 
ultimately have "\<exists>e. e > 1 \<and> (1 - e) *\<^sub>R x + e *\<^sub>R f z \<in> S \<inter> range f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1729  | 
using e by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1730  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1731  | 
then have "f z \<in> rel_interior (S \<inter> range f)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1732  | 
      using \<open>convex (S \<inter> (range f))\<close> \<open>S \<inter> range f \<noteq> {}\<close>
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1733  | 
convex_rel_interior_iff[of "S \<inter> (range f)" "f z"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1734  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1735  | 
moreover have "affine (range f)"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
1736  | 
by (simp add: linear_axioms linear_subspace_image subspace_imp_affine)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1737  | 
ultimately have "f z \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1738  | 
using convex_affine_rel_interior_Int[of S "range f"] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1739  | 
then have "z \<in> f -` (rel_interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1740  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1741  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1742  | 
ultimately show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1743  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1744  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1745  | 
lemma rel_interior_Times:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1746  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1747  | 
and T :: "'m::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1748  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1749  | 
and "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1750  | 
shows "rel_interior (S \<times> T) = rel_interior S \<times> rel_interior T"  | 
| 72238 | 1751  | 
proof (cases "S = {} \<or> T = {}")
 | 
1752  | 
case True  | 
|
1753  | 
then show ?thesis  | 
|
1754  | 
by auto  | 
|
1755  | 
next  | 
|
1756  | 
case False  | 
|
1757  | 
  then have "S \<noteq> {}" "T \<noteq> {}"
 | 
|
1758  | 
by auto  | 
|
1759  | 
  then have ri: "rel_interior S \<noteq> {}" "rel_interior T \<noteq> {}"
 | 
|
1760  | 
using rel_interior_eq_empty assms by auto  | 
|
1761  | 
  then have "fst -` rel_interior S \<noteq> {}"
 | 
|
1762  | 
using fst_vimage_eq_Times[of "rel_interior S"] by auto  | 
|
1763  | 
then have "rel_interior ((fst :: 'n * 'm \<Rightarrow> 'n) -` S) = fst -` rel_interior S"  | 
|
1764  | 
using linear_fst \<open>convex S\<close> rel_interior_convex_linear_preimage[of fst S] by auto  | 
|
1765  | 
then have s: "rel_interior (S \<times> (UNIV :: 'm set)) = rel_interior S \<times> UNIV"  | 
|
1766  | 
by (simp add: fst_vimage_eq_Times)  | 
|
1767  | 
  from ri have "snd -` rel_interior T \<noteq> {}"
 | 
|
1768  | 
using snd_vimage_eq_Times[of "rel_interior T"] by auto  | 
|
1769  | 
then have "rel_interior ((snd :: 'n * 'm \<Rightarrow> 'm) -` T) = snd -` rel_interior T"  | 
|
1770  | 
using linear_snd \<open>convex T\<close> rel_interior_convex_linear_preimage[of snd T] by auto  | 
|
1771  | 
then have t: "rel_interior ((UNIV :: 'n set) \<times> T) = UNIV \<times> rel_interior T"  | 
|
1772  | 
by (simp add: snd_vimage_eq_Times)  | 
|
1773  | 
from s t have *: "rel_interior (S \<times> (UNIV :: 'm set)) \<inter> rel_interior ((UNIV :: 'n set) \<times> T) =  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1774  | 
rel_interior S \<times> rel_interior T" by auto  | 
| 72238 | 1775  | 
have "S \<times> T = S \<times> (UNIV :: 'm set) \<inter> (UNIV :: 'n set) \<times> T"  | 
1776  | 
by auto  | 
|
1777  | 
then have "rel_interior (S \<times> T) = rel_interior ((S \<times> (UNIV :: 'm set)) \<inter> ((UNIV :: 'n set) \<times> T))"  | 
|
1778  | 
by auto  | 
|
1779  | 
also have "\<dots> = rel_interior (S \<times> (UNIV :: 'm set)) \<inter> rel_interior ((UNIV :: 'n set) \<times> T)"  | 
|
1780  | 
using * ri assms convex_Times  | 
|
1781  | 
by (subst convex_rel_interior_inter_two) auto  | 
|
1782  | 
finally show ?thesis using * by auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1783  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1784  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1785  | 
lemma rel_interior_scaleR:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1786  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1787  | 
assumes "c \<noteq> 0"  | 
| 
69064
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
1788  | 
shows "((*\<^sub>R) c) ` (rel_interior S) = rel_interior (((*\<^sub>R) c) ` S)"  | 
| 
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
1789  | 
using rel_interior_injective_linear_image[of "((*\<^sub>R) c)" S]  | 
| 
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
1790  | 
linear_conv_bounded_linear[of "(*\<^sub>R) c"] linear_scaleR injective_scaleR[of c] assms  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1791  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1792  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1793  | 
lemma rel_interior_convex_scaleR:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1794  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1795  | 
assumes "convex S"  | 
| 
69064
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
1796  | 
shows "((*\<^sub>R) c) ` (rel_interior S) = rel_interior (((*\<^sub>R) c) ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1797  | 
by (metis assms linear_scaleR rel_interior_convex_linear_image)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1798  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1799  | 
lemma convex_rel_open_scaleR:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1800  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1801  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1802  | 
and "rel_open S"  | 
| 
69064
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
1803  | 
shows "convex (((*\<^sub>R) c) ` S) \<and> rel_open (((*\<^sub>R) c) ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1804  | 
by (metis assms convex_scaling rel_interior_convex_scaleR rel_open_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1805  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1806  | 
lemma convex_rel_open_finite_inter:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1807  | 
assumes "\<forall>S\<in>I. convex (S :: 'n::euclidean_space set) \<and> rel_open S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1808  | 
and "finite I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1809  | 
shows "convex (\<Inter>I) \<and> rel_open (\<Inter>I)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1810  | 
proof (cases "\<Inter>{rel_interior S |S. S \<in> I} = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1811  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1812  | 
  then have "\<Inter>I = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1813  | 
using assms unfolding rel_open_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1814  | 
then show ?thesis  | 
| 71176 | 1815  | 
unfolding rel_open_def by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1816  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1817  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1818  | 
then have "rel_open (\<Inter>I)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1819  | 
using assms unfolding rel_open_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1820  | 
using convex_rel_interior_finite_inter[of I]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1821  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1822  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1823  | 
using convex_Inter assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1824  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1825  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1826  | 
lemma convex_rel_open_linear_image:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1827  | 
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1828  | 
assumes "linear f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1829  | 
and "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1830  | 
and "rel_open S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1831  | 
shows "convex (f ` S) \<and> rel_open (f ` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1832  | 
by (metis assms convex_linear_image rel_interior_convex_linear_image rel_open_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1833  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1834  | 
lemma convex_rel_open_linear_preimage:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1835  | 
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1836  | 
assumes "linear f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1837  | 
and "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1838  | 
and "rel_open S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1839  | 
shows "convex (f -` S) \<and> rel_open (f -` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1840  | 
proof (cases "f -` (rel_interior S) = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1841  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1842  | 
  then have "f -` S = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1843  | 
using assms unfolding rel_open_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1844  | 
then show ?thesis  | 
| 71176 | 1845  | 
unfolding rel_open_def by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1846  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1847  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1848  | 
then have "rel_open (f -` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1849  | 
using assms unfolding rel_open_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1850  | 
using rel_interior_convex_linear_preimage[of f S]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1851  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1852  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1853  | 
using convex_linear_vimage assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1854  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1855  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1856  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1857  | 
lemma rel_interior_projection:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1858  | 
  fixes S :: "('m::euclidean_space \<times> 'n::euclidean_space) set"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1859  | 
and f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1860  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1861  | 
    and "f = (\<lambda>y. {z. (y, z) \<in> S})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1862  | 
  shows "(y, z) \<in> rel_interior S \<longleftrightarrow> (y \<in> rel_interior {y. (f y \<noteq> {})} \<and> z \<in> rel_interior (f y))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1863  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1864  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1865  | 
fix y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1866  | 
    assume "y \<in> {y. f y \<noteq> {}}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1867  | 
then obtain z where "(y, z) \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1868  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1869  | 
then have "\<exists>x. x \<in> S \<and> y = fst x"  | 
| 72238 | 1870  | 
by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1871  | 
then obtain x where "x \<in> S" "y = fst x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1872  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1873  | 
then have "y \<in> fst ` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1874  | 
unfolding image_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1875  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1876  | 
  then have "fst ` S = {y. f y \<noteq> {}}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1877  | 
unfolding fst_def using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1878  | 
  then have h1: "fst ` rel_interior S = rel_interior {y. f y \<noteq> {}}"
 | 
| 71244 | 1879  | 
using rel_interior_convex_linear_image[of fst S] assms linear_fst by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1880  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1881  | 
fix y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1882  | 
    assume "y \<in> rel_interior {y. f y \<noteq> {}}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1883  | 
then have "y \<in> fst ` rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1884  | 
using h1 by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1885  | 
    then have *: "rel_interior S \<inter> fst -` {y} \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1886  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1887  | 
    moreover have aff: "affine (fst -` {y})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1888  | 
unfolding affine_alt by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1889  | 
    ultimately have **: "rel_interior (S \<inter> fst -` {y}) = rel_interior S \<inter> fst -` {y}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1890  | 
      using convex_affine_rel_interior_Int[of S "fst -` {y}"] assms by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1891  | 
    have conv: "convex (S \<inter> fst -` {y})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1892  | 
using convex_Int assms aff affine_imp_convex by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1893  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1894  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1895  | 
assume "x \<in> f y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1896  | 
      then have "(y, x) \<in> S \<inter> (fst -` {y})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1897  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1898  | 
moreover have "x = snd (y, x)" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1899  | 
      ultimately have "x \<in> snd ` (S \<inter> fst -` {y})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1900  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1901  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1902  | 
    then have "snd ` (S \<inter> fst -` {y}) = f y"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1903  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1904  | 
    then have ***: "rel_interior (f y) = snd ` rel_interior (S \<inter> fst -` {y})"
 | 
| 71244 | 1905  | 
      using rel_interior_convex_linear_image[of snd "S \<inter> fst -` {y}"] linear_snd conv
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1906  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1907  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1908  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1909  | 
assume "z \<in> rel_interior (f y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1910  | 
      then have "z \<in> snd ` rel_interior (S \<inter> fst -` {y})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1911  | 
using *** by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1912  | 
      moreover have "{y} = fst ` rel_interior (S \<inter> fst -` {y})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1913  | 
using * ** rel_interior_subset by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1914  | 
      ultimately have "(y, z) \<in> rel_interior (S \<inter> fst -` {y})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1915  | 
by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1916  | 
then have "(y,z) \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1917  | 
using ** by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1918  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1919  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1920  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1921  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1922  | 
assume "(y, z) \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1923  | 
      then have "(y, z) \<in> rel_interior (S \<inter> fst -` {y})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1924  | 
using ** by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1925  | 
      then have "z \<in> snd ` rel_interior (S \<inter> fst -` {y})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1926  | 
by (metis Range_iff snd_eq_Range)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1927  | 
then have "z \<in> rel_interior (f y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1928  | 
using *** by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1929  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1930  | 
ultimately have "\<And>z. (y, z) \<in> rel_interior S \<longleftrightarrow> z \<in> rel_interior (f y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1931  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1932  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1933  | 
  then have h2: "\<And>y z. y \<in> rel_interior {t. f t \<noteq> {}} \<Longrightarrow>
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1934  | 
(y, z) \<in> rel_interior S \<longleftrightarrow> z \<in> rel_interior (f y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1935  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1936  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1937  | 
fix y z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1938  | 
assume asm: "(y, z) \<in> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1939  | 
then have "y \<in> fst ` rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1940  | 
by (metis Domain_iff fst_eq_Domain)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1941  | 
    then have "y \<in> rel_interior {t. f t \<noteq> {}}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1942  | 
using h1 by auto  | 
| 67613 | 1943  | 
    then have "y \<in> rel_interior {t. f t \<noteq> {}}" and "(z \<in> rel_interior (f y))"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1944  | 
using h2 asm by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1945  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1946  | 
then show ?thesis using h2 by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1947  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1948  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1949  | 
lemma rel_frontier_Times:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1950  | 
fixes S :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1951  | 
and T :: "'m::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1952  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1953  | 
and "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1954  | 
shows "rel_frontier S \<times> rel_frontier T \<subseteq> rel_frontier (S \<times> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1955  | 
by (force simp: rel_frontier_def rel_interior_Times assms closure_Times)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1956  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1957  | 
|
| 70136 | 1958  | 
subsubsection\<^marker>\<open>tag unimportant\<close> \<open>Relative interior of convex cone\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1959  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1960  | 
lemma cone_rel_interior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1961  | 
fixes S :: "'m::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1962  | 
assumes "cone S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1963  | 
  shows "cone ({0} \<union> rel_interior S)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1964  | 
proof (cases "S = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1965  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1966  | 
then show ?thesis  | 
| 71176 | 1967  | 
by (simp add: cone_0)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1968  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1969  | 
case False  | 
| 
69064
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
1970  | 
then have *: "0 \<in> S \<and> (\<forall>c. c > 0 \<longrightarrow> (*\<^sub>R) c ` S = S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1971  | 
using cone_iff[of S] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1972  | 
  then have *: "0 \<in> ({0} \<union> rel_interior S)"
 | 
| 
69064
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
1973  | 
    and "\<forall>c. c > 0 \<longrightarrow> (*\<^sub>R) c ` ({0} \<union> rel_interior S) = ({0} \<union> rel_interior S)"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1974  | 
by (auto simp add: rel_interior_scaleR)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1975  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1976  | 
    using cone_iff[of "{0} \<union> rel_interior S"] by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1977  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1978  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1979  | 
lemma rel_interior_convex_cone_aux:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1980  | 
fixes S :: "'m::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1981  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1982  | 
  shows "(c, x) \<in> rel_interior (cone hull ({(1 :: real)} \<times> S)) \<longleftrightarrow>
 | 
| 
69064
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
1983  | 
c > 0 \<and> x \<in> (((*\<^sub>R) c) ` (rel_interior S))"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1984  | 
proof (cases "S = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1985  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1986  | 
then show ?thesis  | 
| 71176 | 1987  | 
by (simp add: cone_hull_empty)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1988  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1989  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1990  | 
then obtain s where "s \<in> S" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1991  | 
  have conv: "convex ({(1 :: real)} \<times> S)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1992  | 
    using convex_Times[of "{(1 :: real)}" S] assms convex_singleton[of "1 :: real"]
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1993  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1994  | 
  define f where "f y = {z. (y, z) \<in> cone hull ({1 :: real} \<times> S)}" for y
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1995  | 
  then have *: "(c, x) \<in> rel_interior (cone hull ({(1 :: real)} \<times> S)) =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1996  | 
    (c \<in> rel_interior {y. f y \<noteq> {}} \<and> x \<in> rel_interior (f c))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1997  | 
    using convex_cone_hull[of "{(1 :: real)} \<times> S"] conv
 | 
| 72238 | 1998  | 
by (subst rel_interior_projection) auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
1999  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2000  | 
fix y :: real  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2001  | 
assume "y \<ge> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2002  | 
    then have "y *\<^sub>R (1,s) \<in> cone hull ({1 :: real} \<times> S)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2003  | 
      using cone_hull_expl[of "{(1 :: real)} \<times> S"] \<open>s \<in> S\<close> by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2004  | 
    then have "f y \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2005  | 
using f_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2006  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2007  | 
  then have "{y. f y \<noteq> {}} = {0..}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2008  | 
    using f_def cone_hull_expl[of "{1 :: real} \<times> S"] by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2009  | 
  then have **: "rel_interior {y. f y \<noteq> {}} = {0<..}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2010  | 
using rel_interior_real_semiline by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2011  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2012  | 
fix c :: real  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2013  | 
assume "c > 0"  | 
| 
69064
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
2014  | 
then have "f c = ((*\<^sub>R) c ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2015  | 
      using f_def cone_hull_expl[of "{1 :: real} \<times> S"] by auto
 | 
| 
69064
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
2016  | 
then have "rel_interior (f c) = (*\<^sub>R) c ` rel_interior S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2017  | 
using rel_interior_convex_scaleR[of S c] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2018  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2019  | 
then show ?thesis using * ** by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2020  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2021  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2022  | 
lemma rel_interior_convex_cone:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2023  | 
fixes S :: "'m::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2024  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2025  | 
  shows "rel_interior (cone hull ({1 :: real} \<times> S)) =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2026  | 
    {(c, c *\<^sub>R x) | c x. c > 0 \<and> x \<in> rel_interior S}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2027  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2028  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2029  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2030  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2031  | 
assume "z \<in> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2032  | 
have *: "z = (fst z, snd z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2033  | 
by auto  | 
| 71004 | 2034  | 
then have "z \<in> ?rhs"  | 
2035  | 
using rel_interior_convex_cone_aux[of S "fst z" "snd z"] assms \<open>z \<in> ?lhs\<close> by fastforce  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2036  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2037  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2038  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2039  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2040  | 
assume "z \<in> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2041  | 
then have "z \<in> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2042  | 
using rel_interior_convex_cone_aux[of S "fst z" "snd z"] assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2043  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2044  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2045  | 
ultimately show ?thesis by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2046  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2047  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2048  | 
lemma convex_hull_finite_union:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2049  | 
assumes "finite I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2050  | 
  assumes "\<forall>i\<in>I. convex (S i) \<and> (S i) \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2051  | 
shows "convex hull (\<Union>(S ` I)) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2052  | 
    {sum (\<lambda>i. c i *\<^sub>R s i) I | c s. (\<forall>i\<in>I. c i \<ge> 0) \<and> sum c I = 1 \<and> (\<forall>i\<in>I. s i \<in> S i)}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2053  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2054  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2055  | 
have "?lhs \<supseteq> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2056  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2057  | 
fix x  | 
| 67613 | 2058  | 
assume "x \<in> ?rhs"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2059  | 
then obtain c s where *: "sum (\<lambda>i. c i *\<^sub>R s i) I = x" "sum c I = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2060  | 
"(\<forall>i\<in>I. c i \<ge> 0) \<and> (\<forall>i\<in>I. s i \<in> S i)" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2061  | 
then have "\<forall>i\<in>I. s i \<in> convex hull (\<Union>(S ` I))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2062  | 
using hull_subset[of "\<Union>(S ` I)" convex] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2063  | 
then show "x \<in> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2064  | 
unfolding *(1)[symmetric]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2065  | 
using * assms convex_convex_hull  | 
| 72238 | 2066  | 
by (subst convex_sum) auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2067  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2068  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2069  | 
fix i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2070  | 
assume "i \<in> I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2071  | 
with assms have "\<exists>p. p \<in> S i" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2072  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2073  | 
then obtain p where p: "\<forall>i\<in>I. p i \<in> S i" by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2074  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2075  | 
fix i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2076  | 
assume "i \<in> I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2077  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2078  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2079  | 
assume "x \<in> S i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2080  | 
define c where "c j = (if j = i then 1::real else 0)" for j  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2081  | 
then have *: "sum c I = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2082  | 
using \<open>finite I\<close> \<open>i \<in> I\<close> sum.delta[of I i "\<lambda>j::'a. 1::real"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2083  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2084  | 
define s where "s j = (if j = i then x else p j)" for j  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2085  | 
then have "\<forall>j. c j *\<^sub>R s j = (if j = i then x else 0)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2086  | 
using c_def by (auto simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2087  | 
then have "x = sum (\<lambda>i. c i *\<^sub>R s i) I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2088  | 
using s_def c_def \<open>finite I\<close> \<open>i \<in> I\<close> sum.delta[of I i "\<lambda>j::'a. x"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2089  | 
by auto  | 
| 72567 | 2090  | 
moreover have "(\<forall>i\<in>I. 0 \<le> c i) \<and> sum c I = 1 \<and> (\<forall>i\<in>I. s i \<in> S i)"  | 
2091  | 
using * c_def s_def p \<open>x \<in> S i\<close> by auto  | 
|
2092  | 
ultimately have "x \<in> ?rhs"  | 
|
2093  | 
by force  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2094  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2095  | 
then have "?rhs \<supseteq> S i" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2096  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2097  | 
then have *: "?rhs \<supseteq> \<Union>(S ` I)" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2098  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2099  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2100  | 
fix u v :: real  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2101  | 
assume uv: "u \<ge> 0 \<and> v \<ge> 0 \<and> u + v = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2102  | 
fix x y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2103  | 
assume xy: "x \<in> ?rhs \<and> y \<in> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2104  | 
from xy obtain c s where  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2105  | 
xc: "x = sum (\<lambda>i. c i *\<^sub>R s i) I \<and> (\<forall>i\<in>I. c i \<ge> 0) \<and> sum c I = 1 \<and> (\<forall>i\<in>I. s i \<in> S i)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2106  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2107  | 
from xy obtain d t where  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2108  | 
yc: "y = sum (\<lambda>i. d i *\<^sub>R t i) I \<and> (\<forall>i\<in>I. d i \<ge> 0) \<and> sum d I = 1 \<and> (\<forall>i\<in>I. t i \<in> S i)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2109  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2110  | 
define e where "e i = u * c i + v * d i" for i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2111  | 
have ge0: "\<forall>i\<in>I. e i \<ge> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2112  | 
using e_def xc yc uv by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2113  | 
have "sum (\<lambda>i. u * c i) I = u * sum c I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2114  | 
by (simp add: sum_distrib_left)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2115  | 
moreover have "sum (\<lambda>i. v * d i) I = v * sum d I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2116  | 
by (simp add: sum_distrib_left)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2117  | 
ultimately have sum1: "sum e I = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2118  | 
using e_def xc yc uv by (simp add: sum.distrib)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2119  | 
define q where "q i = (if e i = 0 then p i else (u * c i / e i) *\<^sub>R s i + (v * d i / e i) *\<^sub>R t i)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2120  | 
for i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2121  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2122  | 
fix i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2123  | 
assume i: "i \<in> I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2124  | 
have "q i \<in> S i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2125  | 
proof (cases "e i = 0")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2126  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2127  | 
then show ?thesis using i p q_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2128  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2129  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2130  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2131  | 
using mem_convex_alt[of "S i" "s i" "t i" "u * (c i)" "v * (d i)"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2132  | 
mult_nonneg_nonneg[of u "c i"] mult_nonneg_nonneg[of v "d i"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2133  | 
assms q_def e_def i False xc yc uv  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2134  | 
by (auto simp del: mult_nonneg_nonneg)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2135  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2136  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2137  | 
then have qs: "\<forall>i\<in>I. q i \<in> S i" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2138  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2139  | 
fix i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2140  | 
assume i: "i \<in> I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2141  | 
have "(u * c i) *\<^sub>R s i + (v * d i) *\<^sub>R t i = e i *\<^sub>R q i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2142  | 
proof (cases "e i = 0")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2143  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2144  | 
have ge: "u * (c i) \<ge> 0 \<and> v * d i \<ge> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2145  | 
using xc yc uv i by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2146  | 
moreover from ge have "u * c i \<le> 0 \<and> v * d i \<le> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2147  | 
using True e_def i by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2148  | 
ultimately have "u * c i = 0 \<and> v * d i = 0" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2149  | 
with True show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2150  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2151  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2152  | 
then have "(u * (c i)/(e i))*\<^sub>R (s i)+(v * (d i)/(e i))*\<^sub>R (t i) = q i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2153  | 
using q_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2154  | 
then have "e i *\<^sub>R ((u * (c i)/(e i))*\<^sub>R (s i)+(v * (d i)/(e i))*\<^sub>R (t i))  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2155  | 
= (e i) *\<^sub>R (q i)" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2156  | 
with False show ?thesis by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2157  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2158  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2159  | 
then have *: "\<forall>i\<in>I. (u * c i) *\<^sub>R s i + (v * d i) *\<^sub>R t i = e i *\<^sub>R q i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2160  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2161  | 
have "u *\<^sub>R x + v *\<^sub>R y = sum (\<lambda>i. (u * c i) *\<^sub>R s i + (v * d i) *\<^sub>R t i) I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2162  | 
using xc yc by (simp add: algebra_simps scaleR_right.sum sum.distrib)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2163  | 
also have "\<dots> = sum (\<lambda>i. e i *\<^sub>R q i) I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2164  | 
using * by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2165  | 
finally have "u *\<^sub>R x + v *\<^sub>R y = sum (\<lambda>i. (e i) *\<^sub>R (q i)) I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2166  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2167  | 
then have "u *\<^sub>R x + v *\<^sub>R y \<in> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2168  | 
using ge0 sum1 qs by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2169  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2170  | 
then have "convex ?rhs" unfolding convex_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2171  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2172  | 
using \<open>?lhs \<supseteq> ?rhs\<close> * hull_minimal[of "\<Union>(S ` I)" ?rhs convex]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2173  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2174  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2175  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2176  | 
lemma convex_hull_union_two:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2177  | 
fixes S T :: "'m::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2178  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2179  | 
    and "S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2180  | 
and "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2181  | 
    and "T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2182  | 
shows "convex hull (S \<union> T) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2183  | 
    {u *\<^sub>R s + v *\<^sub>R t | u v s t. u \<ge> 0 \<and> v \<ge> 0 \<and> u + v = 1 \<and> s \<in> S \<and> t \<in> T}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2184  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2185  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2186  | 
  define I :: "nat set" where "I = {1, 2}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2187  | 
define s where "s i = (if i = (1::nat) then S else T)" for i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2188  | 
have "\<Union>(s ` I) = S \<union> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2189  | 
using s_def I_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2190  | 
then have "convex hull (\<Union>(s ` I)) = convex hull (S \<union> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2191  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2192  | 
moreover have "convex hull \<Union>(s ` I) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2193  | 
    {\<Sum> i\<in>I. c i *\<^sub>R sa i | c sa. (\<forall>i\<in>I. 0 \<le> c i) \<and> sum c I = 1 \<and> (\<forall>i\<in>I. sa i \<in> s i)}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2194  | 
using assms s_def I_def  | 
| 72238 | 2195  | 
by (subst convex_hull_finite_union) auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2196  | 
moreover have  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2197  | 
    "{\<Sum>i\<in>I. c i *\<^sub>R sa i | c sa. (\<forall>i\<in>I. 0 \<le> c i) \<and> sum c I = 1 \<and> (\<forall>i\<in>I. sa i \<in> s i)} \<le> ?rhs"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2198  | 
using s_def I_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2199  | 
ultimately show "?lhs \<subseteq> ?rhs" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2200  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2201  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2202  | 
assume "x \<in> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2203  | 
then obtain u v s t where *: "x = u *\<^sub>R s + v *\<^sub>R t \<and> u \<ge> 0 \<and> v \<ge> 0 \<and> u + v = 1 \<and> s \<in> S \<and> t \<in> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2204  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2205  | 
    then have "x \<in> convex hull {s, t}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2206  | 
using convex_hull_2[of s t] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2207  | 
then have "x \<in> convex hull (S \<union> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2208  | 
      using * hull_mono[of "{s, t}" "S \<union> T"] by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2209  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2210  | 
then show "?lhs \<supseteq> ?rhs" by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2211  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2212  | 
|
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2213  | 
proposition ray_to_rel_frontier:  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2214  | 
fixes a :: "'a::real_inner"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2215  | 
assumes "bounded S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2216  | 
and a: "a \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2217  | 
and aff: "(a + l) \<in> affine hull S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2218  | 
and "l \<noteq> 0"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2219  | 
obtains d where "0 < d" "(a + d *\<^sub>R l) \<in> rel_frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2220  | 
"\<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> (a + e *\<^sub>R l) \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2221  | 
proof -  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2222  | 
have aaff: "a \<in> affine hull S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2223  | 
by (meson a hull_subset rel_interior_subset rev_subsetD)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2224  | 
  let ?D = "{d. 0 < d \<and> a + d *\<^sub>R l \<notin> rel_interior S}"
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2225  | 
obtain B where "B > 0" and B: "S \<subseteq> ball a B"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2226  | 
using bounded_subset_ballD [OF \<open>bounded S\<close>] by blast  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2227  | 
have "a + (B / norm l) *\<^sub>R l \<notin> ball a B"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2228  | 
by (simp add: dist_norm \<open>l \<noteq> 0\<close>)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2229  | 
with B have "a + (B / norm l) *\<^sub>R l \<notin> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2230  | 
using rel_interior_subset subsetCE by blast  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2231  | 
  with \<open>B > 0\<close> \<open>l \<noteq> 0\<close> have nonMT: "?D \<noteq> {}"
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2232  | 
using divide_pos_pos zero_less_norm_iff by fastforce  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2233  | 
have bdd: "bdd_below ?D"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2234  | 
by (metis (no_types, lifting) bdd_belowI le_less mem_Collect_eq)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2235  | 
have relin_Ex: "\<And>x. x \<in> rel_interior S \<Longrightarrow>  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2236  | 
\<exists>e>0. \<forall>x'\<in>affine hull S. dist x' x < e \<longrightarrow> x' \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2237  | 
using openin_rel_interior [of S] by (simp add: openin_euclidean_subtopology_iff)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2238  | 
define d where "d = Inf ?D"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2239  | 
obtain \<epsilon> where "0 < \<epsilon>" and \<epsilon>: "\<And>\<eta>. \<lbrakk>0 \<le> \<eta>; \<eta> < \<epsilon>\<rbrakk> \<Longrightarrow> (a + \<eta> *\<^sub>R l) \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2240  | 
proof -  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2241  | 
obtain e where "e>0"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2242  | 
and e: "\<And>x'. x' \<in> affine hull S \<Longrightarrow> dist x' a < e \<Longrightarrow> x' \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2243  | 
using relin_Ex a by blast  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2244  | 
show thesis  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2245  | 
proof (rule_tac \<epsilon> = "e / norm l" in that)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2246  | 
show "0 < e / norm l" by (simp add: \<open>0 < e\<close> \<open>l \<noteq> 0\<close>)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2247  | 
next  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2248  | 
show "a + \<eta> *\<^sub>R l \<in> rel_interior S" if "0 \<le> \<eta>" "\<eta> < e / norm l" for \<eta>  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2249  | 
proof (rule e)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2250  | 
show "a + \<eta> *\<^sub>R l \<in> affine hull S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2251  | 
by (metis (no_types) add_diff_cancel_left' aff affine_affine_hull mem_affine_3_minus aaff)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2252  | 
show "dist (a + \<eta> *\<^sub>R l) a < e"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2253  | 
using that by (simp add: \<open>l \<noteq> 0\<close> dist_norm pos_less_divide_eq)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2254  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2255  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2256  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2257  | 
have inint: "\<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> a + e *\<^sub>R l \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2258  | 
unfolding d_def using cInf_lower [OF _ bdd]  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2259  | 
by (metis (no_types, lifting) a add.right_neutral le_less mem_Collect_eq not_less real_vector.scale_zero_left)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2260  | 
have "\<epsilon> \<le> d"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2261  | 
unfolding d_def  | 
| 72238 | 2262  | 
using \<epsilon> dual_order.strict_implies_order le_less_linear  | 
2263  | 
by (blast intro: cInf_greatest [OF nonMT])  | 
|
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2264  | 
with \<open>0 < \<epsilon>\<close> have "0 < d" by simp  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2265  | 
have "a + d *\<^sub>R l \<notin> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2266  | 
proof  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2267  | 
assume adl: "a + d *\<^sub>R l \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2268  | 
obtain e where "e > 0"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2269  | 
and e: "\<And>x'. x' \<in> affine hull S \<Longrightarrow> dist x' (a + d *\<^sub>R l) < e \<Longrightarrow> x' \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2270  | 
using relin_Ex adl by blast  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2271  | 
    have "d + e / norm l \<le> Inf {d. 0 < d \<and> a + d *\<^sub>R l \<notin> rel_interior S}"
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2272  | 
proof (rule cInf_greatest [OF nonMT], clarsimp)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2273  | 
fix x::real  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2274  | 
assume "0 < x" and nonrel: "a + x *\<^sub>R l \<notin> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2275  | 
show "d + e / norm l \<le> x"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2276  | 
proof (cases "x < d")  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2277  | 
case True with inint nonrel \<open>0 < x\<close>  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2278  | 
show ?thesis by auto  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2279  | 
next  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2280  | 
case False  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2281  | 
then have dle: "x < d + e / norm l \<Longrightarrow> dist (a + x *\<^sub>R l) (a + d *\<^sub>R l) < e"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2282  | 
by (simp add: field_simps \<open>l \<noteq> 0\<close>)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2283  | 
have ain: "a + x *\<^sub>R l \<in> affine hull S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2284  | 
by (metis add_diff_cancel_left' aff affine_affine_hull mem_affine_3_minus aaff)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2285  | 
show ?thesis  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2286  | 
using e [OF ain] nonrel dle by force  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2287  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2288  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2289  | 
then show False  | 
| 
70817
 
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
 
haftmann 
parents: 
70802 
diff
changeset
 | 
2290  | 
using \<open>0 < e\<close> \<open>l \<noteq> 0\<close> by (simp add: d_def [symmetric] field_simps)  | 
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2291  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2292  | 
moreover have "a + d *\<^sub>R l \<in> closure S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2293  | 
proof (clarsimp simp: closure_approachable)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2294  | 
fix \<eta>::real assume "0 < \<eta>"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2295  | 
have 1: "a + (d - min d (\<eta> / 2 / norm l)) *\<^sub>R l \<in> S"  | 
| 72567 | 2296  | 
proof (rule subsetD [OF rel_interior_subset inint])  | 
2297  | 
show "d - min d (\<eta> / 2 / norm l) < d"  | 
|
2298  | 
using \<open>l \<noteq> 0\<close> \<open>0 < d\<close> \<open>0 < \<eta>\<close> by auto  | 
|
2299  | 
qed auto  | 
|
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2300  | 
have "norm l * min d (\<eta> / (norm l * 2)) \<le> norm l * (\<eta> / (norm l * 2))"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2301  | 
by (metis min_def mult_left_mono norm_ge_zero order_refl)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2302  | 
also have "... < \<eta>"  | 
| 
70817
 
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
 
haftmann 
parents: 
70802 
diff
changeset
 | 
2303  | 
using \<open>l \<noteq> 0\<close> \<open>0 < \<eta>\<close> by (simp add: field_simps)  | 
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2304  | 
finally have 2: "norm l * min d (\<eta> / (norm l * 2)) < \<eta>" .  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2305  | 
show "\<exists>y\<in>S. dist y (a + d *\<^sub>R l) < \<eta>"  | 
| 72567 | 2306  | 
using 1 2 \<open>0 < d\<close> \<open>0 < \<eta>\<close>  | 
2307  | 
by (rule_tac x="a + (d - min d (\<eta> / 2 / norm l)) *\<^sub>R l" in bexI) (auto simp: algebra_simps)  | 
|
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2308  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2309  | 
ultimately have infront: "a + d *\<^sub>R l \<in> rel_frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2310  | 
by (simp add: rel_frontier_def)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2311  | 
show ?thesis  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2312  | 
by (rule that [OF \<open>0 < d\<close> infront inint])  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2313  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2314  | 
|
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2315  | 
corollary ray_to_frontier:  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2316  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2317  | 
assumes "bounded S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2318  | 
and a: "a \<in> interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2319  | 
and "l \<noteq> 0"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2320  | 
obtains d where "0 < d" "(a + d *\<^sub>R l) \<in> frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2321  | 
"\<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> (a + e *\<^sub>R l) \<in> interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2322  | 
proof -  | 
| 72567 | 2323  | 
have \<section>: "interior S = rel_interior S"  | 
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2324  | 
using a rel_interior_nonempty_interior by auto  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2325  | 
then have "a \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2326  | 
using a by simp  | 
| 72567 | 2327  | 
moreover have "a + l \<in> affine hull S"  | 
2328  | 
using a affine_hull_nonempty_interior by blast  | 
|
2329  | 
ultimately show thesis  | 
|
2330  | 
by (metis \<section> \<open>bounded S\<close> \<open>l \<noteq> 0\<close> frontier_def ray_to_rel_frontier rel_frontier_def that)  | 
|
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2331  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2332  | 
|
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2333  | 
|
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2334  | 
lemma segment_to_rel_frontier_aux:  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2335  | 
fixes x :: "'a::euclidean_space"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2336  | 
assumes "convex S" "bounded S" and x: "x \<in> rel_interior S" and y: "y \<in> S" and xy: "x \<noteq> y"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2337  | 
obtains z where "z \<in> rel_frontier S" "y \<in> closed_segment x z"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2338  | 
"open_segment x z \<subseteq> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2339  | 
proof -  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2340  | 
have "x + (y - x) \<in> affine hull S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2341  | 
using hull_inc [OF y] by auto  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2342  | 
then obtain d where "0 < d" and df: "(x + d *\<^sub>R (y-x)) \<in> rel_frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2343  | 
and di: "\<And>e. \<lbrakk>0 \<le> e; e < d\<rbrakk> \<Longrightarrow> (x + e *\<^sub>R (y-x)) \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2344  | 
by (rule ray_to_rel_frontier [OF \<open>bounded S\<close> x]) (use xy in auto)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2345  | 
show ?thesis  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2346  | 
proof  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2347  | 
show "x + d *\<^sub>R (y - x) \<in> rel_frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2348  | 
by (simp add: df)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2349  | 
next  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2350  | 
have "open_segment x y \<subseteq> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2351  | 
using rel_interior_closure_convex_segment [OF \<open>convex S\<close> x] closure_subset y by blast  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2352  | 
moreover have "x + d *\<^sub>R (y - x) \<in> open_segment x y" if "d < 1"  | 
| 72238 | 2353  | 
using xy \<open>0 < d\<close> that by (force simp: in_segment algebra_simps)  | 
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2354  | 
ultimately have "1 \<le> d"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2355  | 
using df rel_frontier_def by fastforce  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2356  | 
moreover have "x = (1 / d) *\<^sub>R x + ((d - 1) / d) *\<^sub>R x"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2357  | 
by (metis \<open>0 < d\<close> add.commute add_divide_distrib diff_add_cancel divide_self_if less_irrefl scaleR_add_left scaleR_one)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2358  | 
ultimately show "y \<in> closed_segment x (x + d *\<^sub>R (y - x))"  | 
| 72567 | 2359  | 
unfolding in_segment  | 
2360  | 
by (rule_tac x="1/d" in exI) (auto simp: algebra_simps)  | 
|
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2361  | 
next  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2362  | 
show "open_segment x (x + d *\<^sub>R (y - x)) \<subseteq> rel_interior S"  | 
| 72238 | 2363  | 
proof (rule rel_interior_closure_convex_segment [OF \<open>convex S\<close> x])  | 
2364  | 
show "x + d *\<^sub>R (y - x) \<in> closure S"  | 
|
2365  | 
using df rel_frontier_def by auto  | 
|
2366  | 
qed  | 
|
| 
70620
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2367  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2368  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2369  | 
|
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2370  | 
lemma segment_to_rel_frontier:  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2371  | 
fixes x :: "'a::euclidean_space"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2372  | 
assumes S: "convex S" "bounded S" and x: "x \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2373  | 
      and y: "y \<in> S" and xy: "\<not>(x = y \<and> S = {x})"
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2374  | 
obtains z where "z \<in> rel_frontier S" "y \<in> closed_segment x z"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2375  | 
"open_segment x z \<subseteq> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2376  | 
proof (cases "x=y")  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2377  | 
case True  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2378  | 
  with xy have "S \<noteq> {x}"
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2379  | 
by blast  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2380  | 
with True show ?thesis  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2381  | 
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)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2382  | 
next  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2383  | 
case False  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2384  | 
then show ?thesis  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2385  | 
using segment_to_rel_frontier_aux [OF S x y] that by blast  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2386  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2387  | 
|
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2388  | 
proposition rel_frontier_not_sing:  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2389  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2390  | 
assumes "bounded S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2391  | 
    shows "rel_frontier S \<noteq> {a}"
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2392  | 
proof (cases "S = {}")
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2393  | 
case True then show ?thesis by simp  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2394  | 
next  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2395  | 
case False  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2396  | 
then obtain z where "z \<in> S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2397  | 
by blast  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2398  | 
then show ?thesis  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2399  | 
  proof (cases "S = {z}")
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2400  | 
case True then show ?thesis by simp  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2401  | 
next  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2402  | 
case False  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2403  | 
then obtain w where "w \<in> S" "w \<noteq> z"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2404  | 
using \<open>z \<in> S\<close> by blast  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2405  | 
show ?thesis  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2406  | 
proof  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2407  | 
      assume "rel_frontier S = {a}"
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2408  | 
then consider "w \<notin> rel_frontier S" | "z \<notin> rel_frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2409  | 
using \<open>w \<noteq> z\<close> by auto  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2410  | 
then show False  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2411  | 
proof cases  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2412  | 
case 1  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2413  | 
then have w: "w \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2414  | 
using \<open>w \<in> S\<close> closure_subset rel_frontier_def by fastforce  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2415  | 
have "w + (w - z) \<in> affine hull S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2416  | 
by (metis \<open>w \<in> S\<close> \<open>z \<in> S\<close> affine_affine_hull hull_inc mem_affine_3_minus scaleR_one)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2417  | 
then obtain e where "0 < e" "(w + e *\<^sub>R (w - z)) \<in> rel_frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2418  | 
using \<open>w \<noteq> z\<close> \<open>z \<in> S\<close> by (metis assms ray_to_rel_frontier right_minus_eq w)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2419  | 
moreover obtain d where "0 < d" "(w + d *\<^sub>R (z - w)) \<in> rel_frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2420  | 
using ray_to_rel_frontier [OF \<open>bounded S\<close> w, of "1 *\<^sub>R (z - w)"] \<open>w \<noteq> z\<close> \<open>z \<in> S\<close>  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2421  | 
by (metis add.commute add.right_neutral diff_add_cancel hull_inc scaleR_one)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2422  | 
ultimately have "d *\<^sub>R (z - w) = e *\<^sub>R (w - z)"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2423  | 
          using \<open>rel_frontier S = {a}\<close> by force
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2424  | 
moreover have "e \<noteq> -d "  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2425  | 
using \<open>0 < e\<close> \<open>0 < d\<close> by force  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2426  | 
ultimately show False  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2427  | 
by (metis (no_types, lifting) \<open>w \<noteq> z\<close> eq_iff_diff_eq_0 minus_diff_eq real_vector.scale_cancel_right real_vector.scale_minus_right scaleR_left.minus)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2428  | 
next  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2429  | 
case 2  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2430  | 
then have z: "z \<in> rel_interior S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2431  | 
using \<open>z \<in> S\<close> closure_subset rel_frontier_def by fastforce  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2432  | 
have "z + (z - w) \<in> affine hull S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2433  | 
by (metis \<open>z \<in> S\<close> \<open>w \<in> S\<close> affine_affine_hull hull_inc mem_affine_3_minus scaleR_one)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2434  | 
then obtain e where "0 < e" "(z + e *\<^sub>R (z - w)) \<in> rel_frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2435  | 
using \<open>w \<noteq> z\<close> \<open>w \<in> S\<close> by (metis assms ray_to_rel_frontier right_minus_eq z)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2436  | 
moreover obtain d where "0 < d" "(z + d *\<^sub>R (w - z)) \<in> rel_frontier S"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2437  | 
using ray_to_rel_frontier [OF \<open>bounded S\<close> z, of "1 *\<^sub>R (w - z)"] \<open>w \<noteq> z\<close> \<open>w \<in> S\<close>  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2438  | 
by (metis add.commute add.right_neutral diff_add_cancel hull_inc scaleR_one)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2439  | 
ultimately have "d *\<^sub>R (w - z) = e *\<^sub>R (z - w)"  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2440  | 
          using \<open>rel_frontier S = {a}\<close> by force
 | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2441  | 
moreover have "e \<noteq> -d "  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2442  | 
using \<open>0 < e\<close> \<open>0 < d\<close> by force  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2443  | 
ultimately show False  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2444  | 
by (metis (no_types, lifting) \<open>w \<noteq> z\<close> eq_iff_diff_eq_0 minus_diff_eq real_vector.scale_cancel_right real_vector.scale_minus_right scaleR_left.minus)  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2445  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2446  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2447  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2448  | 
qed  | 
| 
 
f95193669ad7
removed Brouwer_Fixpoint from imports of Derivative
 
immler 
parents: 
70138 
diff
changeset
 | 
2449  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2450  | 
|
| 70136 | 2451  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>Convexity on direct sums\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2452  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2453  | 
lemma closure_sum:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2454  | 
fixes S T :: "'a::real_normed_vector set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2455  | 
shows "closure S + closure T \<subseteq> closure (S + T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2456  | 
unfolding set_plus_image closure_Times [symmetric] split_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2457  | 
by (intro closure_bounded_linear_image_subset bounded_linear_add  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2458  | 
bounded_linear_fst bounded_linear_snd)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2459  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2460  | 
lemma rel_interior_sum:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2461  | 
fixes S T :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2462  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2463  | 
and "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2464  | 
shows "rel_interior (S + T) = rel_interior S + rel_interior T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2465  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2466  | 
have "rel_interior S + rel_interior T = (\<lambda>(x,y). x + y) ` (rel_interior S \<times> rel_interior T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2467  | 
by (simp add: set_plus_image)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2468  | 
also have "\<dots> = (\<lambda>(x,y). x + y) ` rel_interior (S \<times> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2469  | 
using rel_interior_Times assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2470  | 
also have "\<dots> = rel_interior (S + T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2471  | 
using fst_snd_linear convex_Times assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2472  | 
rel_interior_convex_linear_image[of "(\<lambda>(x,y). x + y)" "S \<times> T"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2473  | 
by (auto simp add: set_plus_image)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2474  | 
finally show ?thesis ..  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2475  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2476  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2477  | 
lemma rel_interior_sum_gen:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2478  | 
fixes S :: "'a \<Rightarrow> 'n::euclidean_space set"  | 
| 72238 | 2479  | 
assumes "\<And>i. i\<in>I \<Longrightarrow> convex (S i)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2480  | 
shows "rel_interior (sum S I) = sum (\<lambda>i. rel_interior (S i)) I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2481  | 
using rel_interior_sum rel_interior_sing[of "0"] assms  | 
| 72238 | 2482  | 
by (subst sum_set_cond_linear[of convex], auto simp add: convex_set_plus)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2483  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2484  | 
lemma convex_rel_open_direct_sum:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2485  | 
fixes S T :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2486  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2487  | 
and "rel_open S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2488  | 
and "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2489  | 
and "rel_open T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2490  | 
shows "convex (S \<times> T) \<and> rel_open (S \<times> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2491  | 
by (metis assms convex_Times rel_interior_Times rel_open_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2492  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2493  | 
lemma convex_rel_open_sum:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2494  | 
fixes S T :: "'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2495  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2496  | 
and "rel_open S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2497  | 
and "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2498  | 
and "rel_open T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2499  | 
shows "convex (S + T) \<and> rel_open (S + T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2500  | 
by (metis assms convex_set_plus rel_interior_sum rel_open_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2501  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2502  | 
lemma convex_hull_finite_union_cones:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2503  | 
assumes "finite I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2504  | 
    and "I \<noteq> {}"
 | 
| 72238 | 2505  | 
  assumes "\<And>i. i\<in>I \<Longrightarrow> convex (S i) \<and> cone (S i) \<and> S i \<noteq> {}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2506  | 
shows "convex hull (\<Union>(S ` I)) = sum S I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2507  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2508  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2509  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2510  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2511  | 
assume "x \<in> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2512  | 
then obtain c xs where  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2513  | 
x: "x = sum (\<lambda>i. c i *\<^sub>R xs i) I \<and> (\<forall>i\<in>I. c i \<ge> 0) \<and> sum c I = 1 \<and> (\<forall>i\<in>I. xs i \<in> S i)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2514  | 
using convex_hull_finite_union[of I S] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2515  | 
define s where "s i = c i *\<^sub>R xs i" for i  | 
| 72238 | 2516  | 
have "\<forall>i\<in>I. s i \<in> S i"  | 
2517  | 
using s_def x assms by (simp add: mem_cone)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2518  | 
moreover have "x = sum s I" using x s_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2519  | 
ultimately have "x \<in> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2520  | 
using set_sum_alt[of I S] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2521  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2522  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2523  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2524  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2525  | 
assume "x \<in> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2526  | 
then obtain s where x: "x = sum s I \<and> (\<forall>i\<in>I. s i \<in> S i)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2527  | 
using set_sum_alt[of I S] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2528  | 
define xs where "xs i = of_nat(card I) *\<^sub>R s i" for i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2529  | 
then have "x = sum (\<lambda>i. ((1 :: real) / of_nat(card I)) *\<^sub>R xs i) I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2530  | 
using x assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2531  | 
moreover have "\<forall>i\<in>I. xs i \<in> S i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2532  | 
using x xs_def assms by (simp add: cone_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2533  | 
moreover have "\<forall>i\<in>I. (1 :: real) / of_nat (card I) \<ge> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2534  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2535  | 
moreover have "sum (\<lambda>i. (1 :: real) / of_nat (card I)) I = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2536  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2537  | 
ultimately have "x \<in> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2538  | 
using assms  | 
| 72238 | 2539  | 
apply (simp add: convex_hull_finite_union[of I S])  | 
2540  | 
by (rule_tac x = "(\<lambda>i. 1 / (card I))" in exI) auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2541  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2542  | 
ultimately show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2543  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2544  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2545  | 
lemma convex_hull_union_cones_two:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2546  | 
fixes S T :: "'m::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2547  | 
assumes "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2548  | 
and "cone S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2549  | 
    and "S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2550  | 
assumes "convex T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2551  | 
and "cone T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2552  | 
    and "T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2553  | 
shows "convex hull (S \<union> T) = S + T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2554  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2555  | 
  define I :: "nat set" where "I = {1, 2}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2556  | 
define A where "A i = (if i = (1::nat) then S else T)" for i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2557  | 
have "\<Union>(A ` I) = S \<union> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2558  | 
using A_def I_def by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2559  | 
then have "convex hull (\<Union>(A ` I)) = convex hull (S \<union> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2560  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2561  | 
moreover have "convex hull \<Union>(A ` I) = sum A I"  | 
| 72238 | 2562  | 
using A_def I_def  | 
2563  | 
by (metis assms convex_hull_finite_union_cones empty_iff finite.emptyI finite.insertI insertI1)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2564  | 
moreover have "sum A I = S + T"  | 
| 72238 | 2565  | 
using A_def I_def by (force simp add: set_plus_def)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2566  | 
ultimately show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2567  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2568  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2569  | 
lemma rel_interior_convex_hull_union:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2570  | 
fixes S :: "'a \<Rightarrow> 'n::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2571  | 
assumes "finite I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2572  | 
    and "\<forall>i\<in>I. convex (S i) \<and> S i \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2573  | 
shows "rel_interior (convex hull (\<Union>(S ` I))) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2574  | 
    {sum (\<lambda>i. c i *\<^sub>R s i) I | c s. (\<forall>i\<in>I. c i > 0) \<and> sum c I = 1 \<and>
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2575  | 
(\<forall>i\<in>I. s i \<in> rel_interior(S i))}"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2576  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2577  | 
proof (cases "I = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2578  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2579  | 
then show ?thesis  | 
| 71176 | 2580  | 
using convex_hull_empty by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2581  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2582  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2583  | 
define C0 where "C0 = convex hull (\<Union>(S ` I))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2584  | 
have "\<forall>i\<in>I. C0 \<ge> S i"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2585  | 
unfolding C0_def using hull_subset[of "\<Union>(S ` I)"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2586  | 
  define K0 where "K0 = cone hull ({1 :: real} \<times> C0)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2587  | 
  define K where "K i = cone hull ({1 :: real} \<times> S i)" for i
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2588  | 
  have "\<forall>i\<in>I. K i \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2589  | 
unfolding K_def using assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2590  | 
by (simp add: cone_hull_empty_iff[symmetric])  | 
| 72238 | 2591  | 
have convK: "\<forall>i\<in>I. convex (K i)"  | 
2592  | 
unfolding K_def  | 
|
2593  | 
by (simp add: assms(2) convex_Times convex_cone_hull)  | 
|
2594  | 
have "K0 \<supseteq> K i" if "i \<in> I" for i  | 
|
2595  | 
unfolding K0_def K_def  | 
|
2596  | 
by (simp add: Sigma_mono \<open>\<forall>i\<in>I. S i \<subseteq> C0\<close> hull_mono that)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2597  | 
then have "K0 \<supseteq> \<Union>(K ` I)" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2598  | 
moreover have "convex K0"  | 
| 72238 | 2599  | 
unfolding K0_def by (simp add: C0_def convex_Times convex_cone_hull)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2600  | 
ultimately have geq: "K0 \<supseteq> convex hull (\<Union>(K ` I))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2601  | 
using hull_minimal[of _ "K0" "convex"] by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2602  | 
  have "\<forall>i\<in>I. K i \<supseteq> {1 :: real} \<times> S i"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2603  | 
using K_def by (simp add: hull_subset)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2604  | 
  then have "\<Union>(K ` I) \<supseteq> {1 :: real} \<times> \<Union>(S ` I)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2605  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2606  | 
  then have "convex hull \<Union>(K ` I) \<supseteq> convex hull ({1 :: real} \<times> \<Union>(S ` I))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2607  | 
by (simp add: hull_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2608  | 
  then have "convex hull \<Union>(K ` I) \<supseteq> {1 :: real} \<times> C0"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2609  | 
unfolding C0_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2610  | 
    using convex_hull_Times[of "{(1 :: real)}" "\<Union>(S ` I)"] convex_hull_singleton
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2611  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2612  | 
moreover have "cone (convex hull (\<Union>(K ` I)))"  | 
| 72238 | 2613  | 
by (simp add: K_def cone_Union cone_cone_hull cone_convex_hull)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2614  | 
ultimately have "convex hull (\<Union>(K ` I)) \<supseteq> K0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2615  | 
unfolding K0_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2616  | 
using hull_minimal[of _ "convex hull (\<Union>(K ` I))" "cone"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2617  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2618  | 
then have "K0 = convex hull (\<Union>(K ` I))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2619  | 
using geq by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2620  | 
also have "\<dots> = sum K I"  | 
| 72238 | 2621  | 
    using assms False \<open>\<forall>i\<in>I. K i \<noteq> {}\<close> cone_hull_eq convK 
 | 
2622  | 
by (intro convex_hull_finite_union_cones; fastforce simp: K_def)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2623  | 
finally have "K0 = sum K I" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2624  | 
then have *: "rel_interior K0 = sum (\<lambda>i. (rel_interior (K i))) I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2625  | 
using rel_interior_sum_gen[of I K] convK by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2626  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2627  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2628  | 
assume "x \<in> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2629  | 
then have "(1::real, x) \<in> rel_interior K0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2630  | 
using K0_def C0_def rel_interior_convex_cone_aux[of C0 "1::real" x] convex_convex_hull  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2631  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2632  | 
then obtain k where k: "(1::real, x) = sum k I \<and> (\<forall>i\<in>I. k i \<in> rel_interior (K i))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2633  | 
using \<open>finite I\<close> * set_sum_alt[of I "\<lambda>i. rel_interior (K i)"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2634  | 
    {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2635  | 
fix i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2636  | 
assume "i \<in> I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2637  | 
      then have "convex (S i) \<and> k i \<in> rel_interior (cone hull {1} \<times> S i)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2638  | 
using k K_def assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2639  | 
then have "\<exists>ci si. k i = (ci, ci *\<^sub>R si) \<and> 0 < ci \<and> si \<in> rel_interior (S i)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2640  | 
using rel_interior_convex_cone[of "S i"] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2641  | 
}  | 
| 72238 | 2642  | 
then obtain c s where cs: "\<forall>i\<in>I. k i = (c i, c i *\<^sub>R s i) \<and> 0 < c i \<and> s i \<in> rel_interior (S i)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2643  | 
by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2644  | 
then have "x = (\<Sum>i\<in>I. c i *\<^sub>R s i) \<and> sum c I = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2645  | 
using k by (simp add: sum_prod)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2646  | 
then have "x \<in> ?rhs"  | 
| 68056 | 2647  | 
using k cs by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2648  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2649  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2650  | 
  {
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2651  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2652  | 
assume "x \<in> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2653  | 
then obtain c s where cs: "x = sum (\<lambda>i. c i *\<^sub>R s i) I \<and>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2654  | 
(\<forall>i\<in>I. c i > 0) \<and> sum c I = 1 \<and> (\<forall>i\<in>I. s i \<in> rel_interior (S i))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2655  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2656  | 
define k where "k i = (c i, c i *\<^sub>R s i)" for i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2657  | 
    {
 | 
| 67613 | 2658  | 
fix i assume "i \<in> I"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2659  | 
then have "k i \<in> rel_interior (K i)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2660  | 
using k_def K_def assms cs rel_interior_convex_cone[of "S i"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2661  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2662  | 
}  | 
| 72238 | 2663  | 
then have "(1, x) \<in> rel_interior K0"  | 
| 72567 | 2664  | 
using * set_sum_alt[of I "(\<lambda>i. rel_interior (K i))"] assms cs  | 
2665  | 
by (simp add: k_def) (metis (mono_tags, lifting) sum_prod)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2666  | 
then have "x \<in> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2667  | 
using K0_def C0_def rel_interior_convex_cone_aux[of C0 1 x]  | 
| 68056 | 2668  | 
by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2669  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2670  | 
ultimately show ?thesis by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2671  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2672  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2673  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2674  | 
lemma convex_le_Inf_differential:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2675  | 
fixes f :: "real \<Rightarrow> real"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2676  | 
assumes "convex_on I f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2677  | 
and "x \<in> interior I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2678  | 
and "y \<in> I"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2679  | 
  shows "f y \<ge> f x + Inf ((\<lambda>t. (f x - f t) / (x - t)) ` ({x<..} \<inter> I)) * (y - x)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2680  | 
(is "_ \<ge> _ + Inf (?F x) * (y - x)")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2681  | 
proof (cases rule: linorder_cases)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2682  | 
assume "x < y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2683  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2684  | 
have "open (interior I)" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2685  | 
from openE[OF this \<open>x \<in> interior I\<close>]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2686  | 
obtain e where e: "0 < e" "ball x e \<subseteq> interior I" .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2687  | 
moreover define t where "t = min (x + e / 2) ((x + y) / 2)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2688  | 
ultimately have "x < t" "t < y" "t \<in> ball x e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2689  | 
by (auto simp: dist_real_def field_simps split: split_min)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2690  | 
with \<open>x \<in> interior I\<close> e interior_subset[of I] have "t \<in> I" "x \<in> I" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2691  | 
|
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2692  | 
define K where "K = x - e / 2"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2693  | 
with \<open>0 < e\<close> have "K \<in> ball x e" "K < x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2694  | 
by (auto simp: dist_real_def)  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2695  | 
then have "K \<in> I"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2696  | 
using \<open>interior I \<subseteq> I\<close> e(2) by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2697  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2698  | 
have "Inf (?F x) \<le> (f x - f y) / (x - y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2699  | 
proof (intro bdd_belowI cInf_lower2)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2700  | 
show "(f x - f t) / (x - t) \<in> ?F x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2701  | 
using \<open>t \<in> I\<close> \<open>x < t\<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2702  | 
show "(f x - f t) / (x - t) \<le> (f x - f y) / (x - y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2703  | 
using \<open>convex_on I f\<close> \<open>x \<in> I\<close> \<open>y \<in> I\<close> \<open>x < t\<close> \<open>t < y\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2704  | 
by (rule convex_on_diff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2705  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2706  | 
fix y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2707  | 
assume "y \<in> ?F x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2708  | 
with order_trans[OF convex_on_diff[OF \<open>convex_on I f\<close> \<open>K \<in> I\<close> _ \<open>K < x\<close> _]]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2709  | 
show "(f K - f x) / (K - x) \<le> y" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2710  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2711  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2712  | 
using \<open>x < y\<close> by (simp add: field_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2713  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2714  | 
assume "y < x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2715  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2716  | 
have "open (interior I)" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2717  | 
from openE[OF this \<open>x \<in> interior I\<close>]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2718  | 
obtain e where e: "0 < e" "ball x e \<subseteq> interior I" .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2719  | 
moreover define t where "t = x + e / 2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2720  | 
ultimately have "x < t" "t \<in> ball x e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2721  | 
by (auto simp: dist_real_def field_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2722  | 
with \<open>x \<in> interior I\<close> e interior_subset[of I] have "t \<in> I" "x \<in> I" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2723  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2724  | 
have "(f x - f y) / (x - y) \<le> Inf (?F x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2725  | 
proof (rule cInf_greatest)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2726  | 
have "(f x - f y) / (x - y) = (f y - f x) / (y - x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2727  | 
using \<open>y < x\<close> by (auto simp: field_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2728  | 
also  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2729  | 
fix z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2730  | 
assume "z \<in> ?F x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2731  | 
with order_trans[OF convex_on_diff[OF \<open>convex_on I f\<close> \<open>y \<in> I\<close> _ \<open>y < x\<close>]]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2732  | 
have "(f y - f x) / (y - x) \<le> z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2733  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2734  | 
finally show "(f x - f y) / (x - y) \<le> z" .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2735  | 
next  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2736  | 
have "x + e / 2 \<in> ball x e"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2737  | 
using e by (auto simp: dist_real_def)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2738  | 
    with e interior_subset[of I] have "x + e / 2 \<in> {x<..} \<inter> I"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2739  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2740  | 
    then show "?F x \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2741  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2742  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2743  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2744  | 
using \<open>y < x\<close> by (simp add: field_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2745  | 
qed simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2746  | 
|
| 70136 | 2747  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>Explicit formulas for interior and relative interior of convex hull\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2748  | 
|
| 
66765
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2749  | 
lemma at_within_cbox_finite:  | 
| 
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2750  | 
assumes "x \<in> box a b" "x \<notin> S" "finite S"  | 
| 
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2751  | 
shows "(at x within cbox a b - S) = at x"  | 
| 
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2752  | 
proof -  | 
| 
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2753  | 
have "interior (cbox a b - S) = box a b - S"  | 
| 
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2754  | 
using \<open>finite S\<close> by (simp add: interior_diff finite_imp_closed)  | 
| 
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2755  | 
then show ?thesis  | 
| 
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2756  | 
using at_within_interior assms by fastforce  | 
| 
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2757  | 
qed  | 
| 
 
c1dfa973b269
new theorem at_within_cbox_finite
 
paulson <lp15@cam.ac.uk> 
parents: 
66641 
diff
changeset
 | 
2758  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2759  | 
lemma affine_independent_convex_affine_hull:  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2760  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2761  | 
assumes "\<not> affine_dependent S" "T \<subseteq> S"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2762  | 
shows "convex hull T = affine hull T \<inter> convex hull S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2763  | 
proof -  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2764  | 
have fin: "finite S" "finite T" using assms aff_independent_finite finite_subset by auto  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2765  | 
have "convex hull T \<subseteq> affine hull T"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2766  | 
using convex_hull_subset_affine_hull by blast  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2767  | 
moreover have "convex hull T \<subseteq> convex hull S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2768  | 
using assms hull_mono by blast  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2769  | 
moreover have "affine hull T \<inter> convex hull S \<subseteq> convex hull T"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2770  | 
proof -  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2771  | 
have 0: "\<And>u. sum u S = 0 \<Longrightarrow> (\<forall>v\<in>S. u v = 0) \<or> (\<Sum>v\<in>S. u v *\<^sub>R v) \<noteq> 0"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2772  | 
using affine_dependent_explicit_finite assms(1) fin(1) by auto  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2773  | 
show ?thesis  | 
| 72567 | 2774  | 
proof (clarsimp simp add: affine_hull_finite fin)  | 
2775  | 
fix u  | 
|
2776  | 
assume S: "(\<Sum>v\<in>T. u v *\<^sub>R v) \<in> convex hull S"  | 
|
2777  | 
and T1: "sum u T = 1"  | 
|
2778  | 
then obtain v where v: "\<forall>x\<in>S. 0 \<le> v x" "sum v S = 1" "(\<Sum>x\<in>S. v x *\<^sub>R x) = (\<Sum>v\<in>T. u v *\<^sub>R v)"  | 
|
2779  | 
by (auto simp add: convex_hull_finite fin)  | 
|
2780  | 
      { fix x
 | 
|
2781  | 
assume"x \<in> T"  | 
|
2782  | 
then have S: "S = (S - T) \<union> T" \<comment> \<open>split into separate cases\<close>  | 
|
2783  | 
using assms by auto  | 
|
2784  | 
have [simp]: "(\<Sum>x\<in>T. v x *\<^sub>R x) + (\<Sum>x\<in>S - T. v x *\<^sub>R x) = (\<Sum>x\<in>T. u x *\<^sub>R x)"  | 
|
2785  | 
"sum v T + sum v (S - T) = 1"  | 
|
2786  | 
using v fin S  | 
|
2787  | 
by (auto simp: sum.union_disjoint [symmetric] Un_commute)  | 
|
2788  | 
have "(\<Sum>x\<in>S. if x \<in> T then v x - u x else v x) = 0"  | 
|
2789  | 
"(\<Sum>x\<in>S. (if x \<in> T then v x - u x else v x) *\<^sub>R x) = 0"  | 
|
2790  | 
using v fin T1  | 
|
2791  | 
by (subst S, subst sum.union_disjoint, auto simp: algebra_simps sum_subtractf)+  | 
|
2792  | 
} note [simp] = this  | 
|
2793  | 
have "(\<forall>x\<in>T. 0 \<le> u x)"  | 
|
2794  | 
using 0 [of "\<lambda>x. if x \<in> T then v x - u x else v x"] \<open>T \<subseteq> S\<close> v(1) by fastforce  | 
|
2795  | 
then show "(\<Sum>v\<in>T. u v *\<^sub>R v) \<in> convex hull T"  | 
|
2796  | 
using 0 [of "\<lambda>x. if x \<in> T then v x - u x else v x"] \<open>T \<subseteq> S\<close> T1  | 
|
2797  | 
by (fastforce simp add: convex_hull_finite fin)  | 
|
2798  | 
qed  | 
|
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2799  | 
qed  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2800  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2801  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2802  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2803  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2804  | 
lemma affine_independent_span_eq:  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2805  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2806  | 
  assumes "\<not> affine_dependent S" "card S = Suc (DIM ('a))"
 | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2807  | 
shows "affine hull S = UNIV"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2808  | 
proof (cases "S = {}")
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2809  | 
case True then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2810  | 
using assms by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2811  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2812  | 
case False  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2813  | 
then obtain a T where T: "a \<notin> T" "S = insert a T"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2814  | 
by blast  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2815  | 
then have fin: "finite T" using assms  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2816  | 
by (metis finite_insert aff_independent_finite)  | 
| 72567 | 2817  | 
have "UNIV \<subseteq> (+) a ` span ((\<lambda>x. x - a) ` T)"  | 
2818  | 
proof (intro card_ge_dim_independent Fun.vimage_subsetD)  | 
|
2819  | 
show "independent ((\<lambda>x. x - a) ` T)"  | 
|
2820  | 
using T affine_dependent_iff_dependent assms(1) by auto  | 
|
2821  | 
show "dim ((+) a -` UNIV) \<le> card ((\<lambda>x. x - a) ` T)"  | 
|
2822  | 
using assms T fin by (auto simp: card_image inj_on_def)  | 
|
2823  | 
qed (use surj_plus in auto)  | 
|
| 72238 | 2824  | 
then show ?thesis  | 
2825  | 
using T(2) affine_hull_insert_span_gen equalityI by fastforce  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2826  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2827  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2828  | 
lemma affine_independent_span_gt:  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2829  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2830  | 
  assumes ind: "\<not> affine_dependent S" and dim: "DIM ('a) < card S"
 | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2831  | 
shows "affine hull S = UNIV"  | 
| 72238 | 2832  | 
proof (intro affine_independent_span_eq [OF ind] antisym)  | 
2833  | 
  show "card S \<le> Suc DIM('a)"
 | 
|
2834  | 
using aff_independent_finite affine_dependent_biggerset ind by fastforce  | 
|
2835  | 
  show "Suc DIM('a) \<le> card S"
 | 
|
2836  | 
using Suc_leI dim by blast  | 
|
2837  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2838  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2839  | 
lemma empty_interior_affine_hull:  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2840  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2841  | 
  assumes "finite S" and dim: "card S \<le> DIM ('a)"
 | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2842  | 
    shows "interior(affine hull S) = {}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2843  | 
using assms  | 
| 72238 | 2844  | 
proof (induct S rule: finite_induct)  | 
2845  | 
case (insert x S)  | 
|
2846  | 
  then have "dim (span ((\<lambda>y. y - x) ` S)) < DIM('a)"
 | 
|
2847  | 
by (auto simp: Suc_le_lessD card_image_le dual_order.trans intro!: dim_le_card'[THEN le_less_trans])  | 
|
2848  | 
then show ?case  | 
|
2849  | 
by (simp add: empty_interior_lowdim affine_hull_insert_span_gen interior_translation)  | 
|
2850  | 
qed auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2851  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2852  | 
lemma empty_interior_convex_hull:  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2853  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2854  | 
  assumes "finite S" and dim: "card S \<le> DIM ('a)"
 | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2855  | 
    shows "interior(convex hull S) = {}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2856  | 
by (metis Diff_empty Diff_eq_empty_iff convex_hull_subset_affine_hull  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2857  | 
interior_mono empty_interior_affine_hull [OF assms])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2858  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2859  | 
lemma explicit_subset_rel_interior_convex_hull:  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2860  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2861  | 
shows "finite S  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2862  | 
         \<Longrightarrow> {y. \<exists>u. (\<forall>x \<in> S. 0 < u x \<and> u x < 1) \<and> sum u S = 1 \<and> sum (\<lambda>x. u x *\<^sub>R x) S = y}
 | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2863  | 
\<subseteq> rel_interior (convex hull S)"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2864  | 
  by (force simp add:  rel_interior_convex_hull_union [where S="\<lambda>x. {x}" and I=S, simplified])
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2865  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2866  | 
lemma explicit_subset_rel_interior_convex_hull_minimal:  | 
| 
72228
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2867  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2868  | 
shows "finite S  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2869  | 
         \<Longrightarrow> {y. \<exists>u. (\<forall>x \<in> S. 0 < u x) \<and> sum u S = 1 \<and> sum (\<lambda>x. u x *\<^sub>R x) S = y}
 | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2870  | 
\<subseteq> rel_interior (convex hull S)"  | 
| 
 
aa7cb84983e9
minor tidying, also s->S and t->T
 
paulson <lp15@cam.ac.uk> 
parents: 
72211 
diff
changeset
 | 
2871  | 
  by (force simp add:  rel_interior_convex_hull_union [where S="\<lambda>x. {x}" and I=S, simplified])
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2872  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2873  | 
lemma rel_interior_convex_hull_explicit:  | 
| 72567 | 2874  | 
fixes S :: "'a::euclidean_space set"  | 
2875  | 
assumes "\<not> affine_dependent S"  | 
|
2876  | 
shows "rel_interior(convex hull S) =  | 
|
2877  | 
         {y. \<exists>u. (\<forall>x \<in> S. 0 < u x) \<and> sum u S = 1 \<and> sum (\<lambda>x. u x *\<^sub>R x) S = y}"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2878  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2879  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2880  | 
show "?rhs \<le> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2881  | 
by (simp add: aff_independent_finite explicit_subset_rel_interior_convex_hull_minimal assms)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2882  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2883  | 
show "?lhs \<le> ?rhs"  | 
| 72567 | 2884  | 
  proof (cases "\<exists>a. S = {a}")
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2885  | 
case True then show "?lhs \<le> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2886  | 
by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2887  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2888  | 
case False  | 
| 72567 | 2889  | 
have fs: "finite S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2890  | 
using assms by (simp add: aff_independent_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2891  | 
    { fix a b and d::real
 | 
| 72567 | 2892  | 
assume ab: "a \<in> S" "b \<in> S" "a \<noteq> b"  | 
2893  | 
      then have S: "S = (S - {a,b}) \<union> {a,b}" \<comment> \<open>split into separate cases\<close>
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2894  | 
by auto  | 
| 72567 | 2895  | 
have "(\<Sum>x\<in>S. if x = a then - d else if x = b then d else 0) = 0"  | 
2896  | 
"(\<Sum>x\<in>S. (if x = a then - d else if x = b then d else 0) *\<^sub>R x) = d *\<^sub>R b - d *\<^sub>R a"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2897  | 
using ab fs  | 
| 72567 | 2898  | 
by (subst S, subst sum.union_disjoint, auto)+  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2899  | 
} note [simp] = this  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2900  | 
    { fix y
 | 
| 72567 | 2901  | 
assume y: "y \<in> convex hull S" "y \<notin> ?rhs"  | 
2902  | 
have *: False if  | 
|
2903  | 
ua: "\<forall>x\<in>S. 0 \<le> u x" "sum u S = 1" "\<not> 0 < u a" "a \<in> S"  | 
|
2904  | 
and yT: "y = (\<Sum>x\<in>S. u x *\<^sub>R x)" "y \<in> T" "open T"  | 
|
2905  | 
        and sb: "T \<inter> affine hull S \<subseteq> {w. \<exists>u. (\<forall>x\<in>S. 0 \<le> u x) \<and> sum u S = 1 \<and> (\<Sum>x\<in>S. u x *\<^sub>R x) = w}"
 | 
|
2906  | 
for u T a  | 
|
2907  | 
proof -  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2908  | 
have ua0: "u a = 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2909  | 
using ua by auto  | 
| 72567 | 2910  | 
obtain b where b: "b\<in>S" "a \<noteq> b"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2911  | 
using ua False by auto  | 
| 72567 | 2912  | 
obtain e where e: "0 < e" "ball (\<Sum>x\<in>S. u x *\<^sub>R x) e \<subseteq> T"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2913  | 
using yT by (auto elim: openE)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2914  | 
with b obtain d where d: "0 < d" "norm(d *\<^sub>R (a-b)) < e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2915  | 
by (auto intro: that [of "e / 2 / norm(a-b)"])  | 
| 72567 | 2916  | 
have "(\<Sum>x\<in>S. u x *\<^sub>R x) \<in> affine hull S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2917  | 
using yT y by (metis affine_hull_convex_hull hull_redundant_eq)  | 
| 72567 | 2918  | 
then have "(\<Sum>x\<in>S. u x *\<^sub>R x) - d *\<^sub>R (a - b) \<in> affine hull S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2919  | 
using ua b by (auto simp: hull_inc intro: mem_affine_3_minus2)  | 
| 72567 | 2920  | 
then have "y - d *\<^sub>R (a - b) \<in> T \<inter> affine hull S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2921  | 
using d e yT by auto  | 
| 72567 | 2922  | 
then obtain v where v: "\<forall>x\<in>S. 0 \<le> v x"  | 
2923  | 
"sum v S = 1"  | 
|
2924  | 
"(\<Sum>x\<in>S. v x *\<^sub>R x) = (\<Sum>x\<in>S. u x *\<^sub>R x) - d *\<^sub>R (a - b)"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2925  | 
using subsetD [OF sb] yT  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2926  | 
by auto  | 
| 72567 | 2927  | 
have aff: "\<And>u. sum u S = 0 \<Longrightarrow> (\<forall>v\<in>S. u v = 0) \<or> (\<Sum>v\<in>S. u v *\<^sub>R v) \<noteq> 0"  | 
2928  | 
using assms by (simp add: affine_dependent_explicit_finite fs)  | 
|
2929  | 
show False  | 
|
2930  | 
using ua b d v aff [of "\<lambda>x. (v x - u x) - (if x = a then -d else if x = b then d else 0)"]  | 
|
2931  | 
by (auto simp: algebra_simps sum_subtractf sum.distrib)  | 
|
2932  | 
qed  | 
|
2933  | 
have "y \<notin> rel_interior (convex hull S)"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2934  | 
using y  | 
| 71176 | 2935  | 
apply (simp add: mem_rel_interior)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2936  | 
apply (auto simp: convex_hull_finite [OF fs])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2937  | 
apply (drule_tac x=u in spec)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2938  | 
apply (auto intro: *)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2939  | 
done  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2940  | 
} with rel_interior_subset show "?lhs \<le> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2941  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2942  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2943  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2944  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2945  | 
lemma interior_convex_hull_explicit_minimal:  | 
| 72567 | 2946  | 
fixes S :: "'a::euclidean_space set"  | 
2947  | 
assumes "\<not> affine_dependent S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2948  | 
shows  | 
| 72567 | 2949  | 
"interior(convex hull S) =  | 
2950  | 
             (if card(S) \<le> DIM('a) then {}
 | 
|
2951  | 
              else {y. \<exists>u. (\<forall>x \<in> S. 0 < u x) \<and> sum u S = 1 \<and> (\<Sum>x\<in>S. u x *\<^sub>R x) = y})"  
 | 
|
2952  | 
(is "_ = (if _ then _ else ?rhs)")  | 
|
2953  | 
proof (clarsimp simp: aff_independent_finite empty_interior_convex_hull assms)  | 
|
2954  | 
  assume S: "\<not> card S \<le> DIM('a)"
 | 
|
2955  | 
have "interior (convex hull S) = rel_interior(convex hull S)"  | 
|
2956  | 
using assms S by (simp add: affine_independent_span_gt rel_interior_interior)  | 
|
2957  | 
then show "interior(convex hull S) = ?rhs"  | 
|
2958  | 
by (simp add: assms S rel_interior_convex_hull_explicit)  | 
|
2959  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2960  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2961  | 
lemma interior_convex_hull_explicit:  | 
| 72567 | 2962  | 
fixes S :: "'a::euclidean_space set"  | 
2963  | 
assumes "\<not> affine_dependent S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2964  | 
shows  | 
| 72567 | 2965  | 
"interior(convex hull S) =  | 
2966  | 
             (if card(S) \<le> DIM('a) then {}
 | 
|
2967  | 
              else {y. \<exists>u. (\<forall>x \<in> S. 0 < u x \<and> u x < 1) \<and> sum u S = 1 \<and> (\<Sum>x\<in>S. u x *\<^sub>R x) = y})"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2968  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2969  | 
  { fix u :: "'a \<Rightarrow> real" and a
 | 
| 72567 | 2970  | 
assume "card Basis < card S" and u: "\<And>x. x\<in>S \<Longrightarrow> 0 < u x" "sum u S = 1" and a: "a \<in> S"  | 
2971  | 
then have cs: "Suc 0 < card S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2972  | 
by (metis DIM_positive less_trans_Suc)  | 
| 72567 | 2973  | 
obtain b where b: "b \<in> S" "a \<noteq> b"  | 
2974  | 
    proof (cases "S \<le> {a}")
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2975  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2976  | 
then show thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2977  | 
using cs subset_singletonD by fastforce  | 
| 72238 | 2978  | 
qed blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2979  | 
    have "u a + u b \<le> sum u {a,b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2980  | 
using a b by simp  | 
| 72567 | 2981  | 
also have "... \<le> sum u S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2982  | 
using a b u  | 
| 72238 | 2983  | 
by (intro Groups_Big.sum_mono2) (auto simp: less_imp_le aff_independent_finite assms)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2984  | 
finally have "u a < 1"  | 
| 72567 | 2985  | 
using \<open>b \<in> S\<close> u by fastforce  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2986  | 
} note [simp] = this  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2987  | 
show ?thesis  | 
| 72238 | 2988  | 
using assms by (force simp add: not_le interior_convex_hull_explicit_minimal)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2989  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2990  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2991  | 
lemma interior_closed_segment_ge2:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2992  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2993  | 
  assumes "2 \<le> DIM('a)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2994  | 
    shows  "interior(closed_segment a b) = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2995  | 
using assms unfolding segment_convex_hull  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2996  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2997  | 
  have "card {a, b} \<le> DIM('a)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2998  | 
using assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
2999  | 
by (simp add: card_insert_if linear not_less_eq_eq numeral_2_eq_2)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3000  | 
  then show "interior (convex hull {a, b}) = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3001  | 
by (metis empty_interior_convex_hull finite.insertI finite.emptyI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3002  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3003  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3004  | 
lemma interior_open_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3005  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3006  | 
shows "interior(open_segment a b) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3007  | 
                 (if 2 \<le> DIM('a) then {} else open_segment a b)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3008  | 
proof (simp add: not_le, intro conjI impI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3009  | 
  assume "2 \<le> DIM('a)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3010  | 
  then show "interior (open_segment a b) = {}"
 | 
| 72238 | 3011  | 
using interior_closed_segment_ge2 interior_mono segment_open_subset_closed by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3012  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3013  | 
  assume le2: "DIM('a) < 2"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3014  | 
show "interior (open_segment a b) = open_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3015  | 
proof (cases "a = b")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3016  | 
case True then show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3017  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3018  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3019  | 
with le2 have "affine hull (open_segment a b) = UNIV"  | 
| 72238 | 3020  | 
by (simp add: False affine_independent_span_gt)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3021  | 
then show "interior (open_segment a b) = open_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3022  | 
using rel_interior_interior rel_interior_open_segment by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3023  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3024  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3025  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3026  | 
lemma interior_closed_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3027  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3028  | 
shows "interior(closed_segment a b) =  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3029  | 
                 (if 2 \<le> DIM('a) then {} else open_segment a b)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3030  | 
proof (cases "a = b")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3031  | 
case True then show ?thesis by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3032  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3033  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3034  | 
then have "closure (open_segment a b) = closed_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3035  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3036  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3037  | 
by (metis (no_types) convex_interior_closure convex_open_segment interior_open_segment)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3038  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3039  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3040  | 
lemmas interior_segment = interior_closed_segment interior_open_segment  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3041  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3042  | 
lemma closed_segment_eq [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3043  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3044  | 
  shows "closed_segment a b = closed_segment c d \<longleftrightarrow> {a,b} = {c,d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3045  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3046  | 
assume abcd: "closed_segment a b = closed_segment c d"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3047  | 
  show "{a,b} = {c,d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3048  | 
proof (cases "a=b \<or> c=d")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3049  | 
case True with abcd show ?thesis by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3050  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3051  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3052  | 
then have neq: "a \<noteq> b \<and> c \<noteq> d" by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3053  | 
    have *: "closed_segment c d - {a, b} = rel_interior (closed_segment c d)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3054  | 
using neq abcd by (metis (no_types) open_segment_def rel_interior_closed_segment)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3055  | 
    have "b \<in> {c, d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3056  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3057  | 
have "insert b (closed_segment c d) = closed_segment c d"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3058  | 
using abcd by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3059  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3060  | 
by (metis DiffD2 Diff_insert2 False * insertI1 insert_Diff_if open_segment_def rel_interior_closed_segment)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3061  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3062  | 
    moreover have "a \<in> {c, d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3063  | 
by (metis Diff_iff False * abcd ends_in_segment(1) insertI1 open_segment_def rel_interior_closed_segment)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3064  | 
    ultimately show "{a, b} = {c, d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3065  | 
using neq by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3066  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3067  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3068  | 
  assume "{a,b} = {c,d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3069  | 
then show "closed_segment a b = closed_segment c d"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3070  | 
by (simp add: segment_convex_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3071  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3072  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3073  | 
lemma closed_open_segment_eq [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3074  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3075  | 
shows "closed_segment a b \<noteq> open_segment c d"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3076  | 
by (metis DiffE closed_segment_neq_empty closure_closed_segment closure_open_segment ends_in_segment(1) insertI1 open_segment_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3077  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3078  | 
lemma open_closed_segment_eq [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3079  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3080  | 
shows "open_segment a b \<noteq> closed_segment c d"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3081  | 
using closed_open_segment_eq by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3082  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3083  | 
lemma open_segment_eq [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3084  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3085  | 
  shows "open_segment a b = open_segment c d \<longleftrightarrow> a = b \<and> c = d \<or> {a,b} = {c,d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3086  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3087  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3088  | 
assume abcd: ?lhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3089  | 
show ?rhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3090  | 
proof (cases "a=b \<or> c=d")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3091  | 
case True with abcd show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3092  | 
using finite_open_segment by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3093  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3094  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3095  | 
then have a2: "a \<noteq> b \<and> c \<noteq> d" by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3096  | 
with abcd show ?rhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3097  | 
unfolding open_segment_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3098  | 
by (metis (no_types) abcd closed_segment_eq closure_open_segment)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3099  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3100  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3101  | 
assume ?rhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3102  | 
then show ?lhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3103  | 
by (metis Diff_cancel convex_hull_singleton insert_absorb2 open_segment_def segment_convex_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3104  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3105  | 
|
| 70136 | 3106  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>Similar results for closure and (relative or absolute) frontier\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3107  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3108  | 
lemma closure_convex_hull [simp]:  | 
| 72238 | 3109  | 
fixes S :: "'a::euclidean_space set"  | 
3110  | 
shows "compact S ==> closure(convex hull S) = convex hull S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3111  | 
by (simp add: compact_imp_closed compact_convex_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3112  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3113  | 
lemma rel_frontier_convex_hull_explicit:  | 
| 72238 | 3114  | 
fixes S :: "'a::euclidean_space set"  | 
3115  | 
assumes "\<not> affine_dependent S"  | 
|
3116  | 
shows "rel_frontier(convex hull S) =  | 
|
3117  | 
         {y. \<exists>u. (\<forall>x \<in> S. 0 \<le> u x) \<and> (\<exists>x \<in> S. u x = 0) \<and> sum u S = 1 \<and> sum (\<lambda>x. u x *\<^sub>R x) S = y}"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3118  | 
proof -  | 
| 72238 | 3119  | 
have fs: "finite S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3120  | 
using assms by (simp add: aff_independent_finite)  | 
| 72567 | 3121  | 
have "\<And>u y v.  | 
3122  | 
\<lbrakk>y \<in> S; u y = 0; sum u S = 1; \<forall>x\<in>S. 0 < v x;  | 
|
3123  | 
sum v S = 1; (\<Sum>x\<in>S. v x *\<^sub>R x) = (\<Sum>x\<in>S. u x *\<^sub>R x)\<rbrakk>  | 
|
| 72238 | 3124  | 
\<Longrightarrow> \<exists>u. sum u S = 0 \<and> (\<exists>v\<in>S. u v \<noteq> 0) \<and> (\<Sum>v\<in>S. u v *\<^sub>R v) = 0"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3125  | 
apply (rule_tac x = "\<lambda>x. u x - v x" in exI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3126  | 
apply (force simp: sum_subtractf scaleR_diff_left)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3127  | 
done  | 
| 72238 | 3128  | 
then show ?thesis  | 
3129  | 
using fs assms  | 
|
3130  | 
apply (simp add: rel_frontier_def finite_imp_compact rel_interior_convex_hull_explicit)  | 
|
3131  | 
apply (auto simp: convex_hull_finite)  | 
|
| 72567 | 3132  | 
apply (metis less_eq_real_def)  | 
3133  | 
by (simp add: affine_dependent_explicit_finite)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3134  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3135  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3136  | 
lemma frontier_convex_hull_explicit:  | 
| 72238 | 3137  | 
fixes S :: "'a::euclidean_space set"  | 
3138  | 
assumes "\<not> affine_dependent S"  | 
|
3139  | 
shows "frontier(convex hull S) =  | 
|
3140  | 
         {y. \<exists>u. (\<forall>x \<in> S. 0 \<le> u x) \<and> (DIM ('a) < card S \<longrightarrow> (\<exists>x \<in> S. u x = 0)) \<and>
 | 
|
3141  | 
sum u S = 1 \<and> sum (\<lambda>x. u x *\<^sub>R x) S = y}"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3142  | 
proof -  | 
| 72238 | 3143  | 
have fs: "finite S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3144  | 
using assms by (simp add: aff_independent_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3145  | 
show ?thesis  | 
| 72238 | 3146  | 
  proof (cases "DIM ('a) < card S")
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3147  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3148  | 
with assms fs show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3149  | 
by (simp add: rel_frontier_def frontier_def rel_frontier_convex_hull_explicit [symmetric]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3150  | 
interior_convex_hull_explicit_minimal rel_interior_convex_hull_explicit)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3151  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3152  | 
case False  | 
| 72238 | 3153  | 
    then have "card S \<le> DIM ('a)"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3154  | 
by linarith  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3155  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3156  | 
using assms fs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3157  | 
apply (simp add: frontier_def interior_convex_hull_explicit finite_imp_compact)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3158  | 
apply (simp add: convex_hull_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3159  | 
done  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3160  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3161  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3162  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3163  | 
lemma rel_frontier_convex_hull_cases:  | 
| 72238 | 3164  | 
fixes S :: "'a::euclidean_space set"  | 
3165  | 
assumes "\<not> affine_dependent S"  | 
|
3166  | 
  shows "rel_frontier(convex hull S) = \<Union>{convex hull (S - {x}) |x. x \<in> S}"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3167  | 
proof -  | 
| 72238 | 3168  | 
have fs: "finite S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3169  | 
using assms by (simp add: aff_independent_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3170  | 
  { fix u a
 | 
| 72238 | 3171  | 
have "\<forall>x\<in>S. 0 \<le> u x \<Longrightarrow> a \<in> S \<Longrightarrow> u a = 0 \<Longrightarrow> sum u S = 1 \<Longrightarrow>  | 
3172  | 
\<exists>x v. x \<in> S \<and>  | 
|
3173  | 
                  (\<forall>x\<in>S - {x}. 0 \<le> v x) \<and>
 | 
|
3174  | 
                      sum v (S - {x}) = 1 \<and> (\<Sum>x\<in>S - {x}. v x *\<^sub>R x) = (\<Sum>x\<in>S. u x *\<^sub>R x)"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3175  | 
apply (rule_tac x=a in exI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3176  | 
apply (rule_tac x=u in exI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3177  | 
apply (simp add: Groups_Big.sum_diff1 fs)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3178  | 
done }  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3179  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3180  | 
  { fix a u
 | 
| 72238 | 3181  | 
    have "a \<in> S \<Longrightarrow> \<forall>x\<in>S - {a}. 0 \<le> u x \<Longrightarrow> sum u (S - {a}) = 1 \<Longrightarrow>
 | 
3182  | 
\<exists>v. (\<forall>x\<in>S. 0 \<le> v x) \<and>  | 
|
3183  | 
                 (\<exists>x\<in>S. v x = 0) \<and> sum v S = 1 \<and> (\<Sum>x\<in>S. v x *\<^sub>R x) = (\<Sum>x\<in>S - {a}. u x *\<^sub>R x)"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3184  | 
apply (rule_tac x="\<lambda>x. if x = a then 0 else u x" in exI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3185  | 
apply (auto simp: sum.If_cases Diff_eq if_smult fs)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3186  | 
done }  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3187  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3188  | 
using assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3189  | 
apply (simp add: rel_frontier_convex_hull_explicit)  | 
| 72567 | 3190  | 
apply (auto simp add: convex_hull_finite fs Union_SetCompr_eq)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3191  | 
done  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3192  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3193  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3194  | 
lemma frontier_convex_hull_eq_rel_frontier:  | 
| 72238 | 3195  | 
fixes S :: "'a::euclidean_space set"  | 
3196  | 
assumes "\<not> affine_dependent S"  | 
|
3197  | 
shows "frontier(convex hull S) =  | 
|
3198  | 
           (if card S \<le> DIM ('a) then convex hull S else rel_frontier(convex hull S))"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3199  | 
using assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3200  | 
unfolding rel_frontier_def frontier_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3201  | 
by (simp add: affine_independent_span_gt rel_interior_interior  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3202  | 
finite_imp_compact empty_interior_convex_hull aff_independent_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3203  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3204  | 
lemma frontier_convex_hull_cases:  | 
| 72238 | 3205  | 
fixes S :: "'a::euclidean_space set"  | 
3206  | 
assumes "\<not> affine_dependent S"  | 
|
3207  | 
shows "frontier(convex hull S) =  | 
|
3208  | 
           (if card S \<le> DIM ('a) then convex hull S else \<Union>{convex hull (S - {x}) |x. x \<in> S})"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3209  | 
by (simp add: assms frontier_convex_hull_eq_rel_frontier rel_frontier_convex_hull_cases)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3210  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3211  | 
lemma in_frontier_convex_hull:  | 
| 72238 | 3212  | 
fixes S :: "'a::euclidean_space set"  | 
3213  | 
  assumes "finite S" "card S \<le> Suc (DIM ('a))" "x \<in> S"
 | 
|
3214  | 
shows "x \<in> frontier(convex hull S)"  | 
|
3215  | 
proof (cases "affine_dependent S")  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3216  | 
case True  | 
| 72567 | 3217  | 
  with assms obtain y where "y \<in> S" and y: "y \<in> affine hull (S - {y})"
 | 
3218  | 
by (auto simp: affine_dependent_def)  | 
|
3219  | 
moreover have "x \<in> closure (convex hull S)"  | 
|
3220  | 
by (meson closure_subset hull_inc subset_eq \<open>x \<in> S\<close>)  | 
|
3221  | 
moreover have "x \<notin> interior (convex hull S)"  | 
|
3222  | 
using assms  | 
|
3223  | 
by (metis Suc_mono affine_hull_convex_hull affine_hull_nonempty_interior \<open>y \<in> S\<close> y card.remove empty_iff empty_interior_affine_hull finite_Diff hull_redundant insert_Diff interior_UNIV not_less)  | 
|
3224  | 
ultimately show ?thesis  | 
|
3225  | 
unfolding frontier_def by blast  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3226  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3227  | 
case False  | 
| 72238 | 3228  | 
  { assume "card S = Suc (card Basis)"
 | 
3229  | 
then have cs: "Suc 0 < card S"  | 
|
| 71172 | 3230  | 
by (simp)  | 
| 72238 | 3231  | 
with subset_singletonD have "\<exists>y \<in> S. y \<noteq> x"  | 
3232  | 
      by (cases "S \<le> {x}") fastforce+
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3233  | 
} note [dest!] = this  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3234  | 
show ?thesis using assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3235  | 
unfolding frontier_convex_hull_cases [OF False] Union_SetCompr_eq  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3236  | 
by (auto simp: le_Suc_eq hull_inc)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3237  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3238  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3239  | 
lemma not_in_interior_convex_hull:  | 
| 72238 | 3240  | 
fixes S :: "'a::euclidean_space set"  | 
3241  | 
  assumes "finite S" "card S \<le> Suc (DIM ('a))" "x \<in> S"
 | 
|
3242  | 
shows "x \<notin> interior(convex hull S)"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3243  | 
using in_frontier_convex_hull [OF assms]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3244  | 
by (metis Diff_iff frontier_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3245  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3246  | 
lemma interior_convex_hull_eq_empty:  | 
| 72238 | 3247  | 
fixes S :: "'a::euclidean_space set"  | 
3248  | 
  assumes "card S = Suc (DIM ('a))"
 | 
|
3249  | 
  shows   "interior(convex hull S) = {} \<longleftrightarrow> affine_dependent S"
 | 
|
3250  | 
proof  | 
|
3251  | 
  show "affine_dependent S \<Longrightarrow> interior (convex hull S) = {}"
 | 
|
3252  | 
proof (clarsimp simp: affine_dependent_def)  | 
|
3253  | 
fix a b  | 
|
3254  | 
    assume "b \<in> S" "b \<in> affine hull (S - {b})"
 | 
|
3255  | 
    then have "interior(affine hull S) = {}" using assms
 | 
|
| 
72302
 
d7d90ed4c74e
fixed some remarkably ugly proofs
 
paulson <lp15@cam.ac.uk> 
parents: 
72238 
diff
changeset
 | 
3256  | 
by (metis DIM_positive One_nat_def Suc_mono card.remove card.infinite empty_interior_affine_hull eq_iff hull_redundant insert_Diff not_less zero_le_one)  | 
| 72238 | 3257  | 
    then show "interior (convex hull S) = {}" 
 | 
3258  | 
using affine_hull_nonempty_interior by fastforce  | 
|
3259  | 
qed  | 
|
3260  | 
next  | 
|
3261  | 
  show "interior (convex hull S) = {} \<Longrightarrow> affine_dependent S"
 | 
|
3262  | 
by (metis affine_hull_convex_hull affine_hull_empty affine_independent_span_eq assms convex_convex_hull empty_not_UNIV rel_interior_eq_empty rel_interior_interior)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3263  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3264  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3265  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3266  | 
subsection \<open>Coplanarity, and collinearity in terms of affine hull\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3267  | 
|
| 70136 | 3268  | 
definition\<^marker>\<open>tag important\<close> coplanar where  | 
| 72238 | 3269  | 
   "coplanar S \<equiv> \<exists>u v w. S \<subseteq> affine hull {u,v,w}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3270  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3271  | 
lemma collinear_affine_hull:  | 
| 72238 | 3272  | 
  "collinear S \<longleftrightarrow> (\<exists>u v. S \<subseteq> affine hull {u,v})"
 | 
3273  | 
proof (cases "S={}")
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3274  | 
case True then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3275  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3276  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3277  | 
case False  | 
| 72238 | 3278  | 
then obtain x where x: "x \<in> S" by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3279  | 
  { fix u
 | 
| 72238 | 3280  | 
assume *: "\<And>x y. \<lbrakk>x\<in>S; y\<in>S\<rbrakk> \<Longrightarrow> \<exists>c. x - y = c *\<^sub>R u"  | 
3281  | 
have "\<And>y c. x - y = c *\<^sub>R u \<Longrightarrow> \<exists>a b. y = a *\<^sub>R x + b *\<^sub>R (x + u) \<and> a + b = 1"  | 
|
3282  | 
by (rule_tac x="1+c" in exI, rule_tac x="-c" in exI, simp add: algebra_simps)  | 
|
3283  | 
    then have "\<exists>u v. S \<subseteq> {a *\<^sub>R u + b *\<^sub>R v |a b. a + b = 1}"
 | 
|
3284  | 
using * [OF x] by (rule_tac x=x in exI, rule_tac x="x+u" in exI, force)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3285  | 
} moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3286  | 
  { fix u v x y
 | 
| 72238 | 3287  | 
    assume *: "S \<subseteq> {a *\<^sub>R u + b *\<^sub>R v |a b. a + b = 1}"
 | 
3288  | 
have "\<exists>c. x - y = c *\<^sub>R (v-u)" if "x\<in>S" "y\<in>S"  | 
|
3289  | 
proof -  | 
|
3290  | 
obtain a r where "a + r = 1" "x = a *\<^sub>R u + r *\<^sub>R v"  | 
|
3291  | 
using "*" \<open>x \<in> S\<close> by blast  | 
|
3292  | 
moreover  | 
|
3293  | 
obtain b s where "b + s = 1" "y = b *\<^sub>R u + s *\<^sub>R v"  | 
|
3294  | 
using "*" \<open>y \<in> S\<close> by blast  | 
|
3295  | 
ultimately have "x - y = (r-s) *\<^sub>R (v-u)"  | 
|
3296  | 
by (simp add: algebra_simps) (metis scaleR_left.add)  | 
|
3297  | 
then show ?thesis  | 
|
3298  | 
by blast  | 
|
3299  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3300  | 
} ultimately  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3301  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3302  | 
unfolding collinear_def affine_hull_2  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3303  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3304  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3305  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3306  | 
lemma collinear_closed_segment [simp]: "collinear (closed_segment a b)"  | 
| 72238 | 3307  | 
by (metis affine_hull_convex_hull collinear_affine_hull hull_subset segment_convex_hull)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3308  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3309  | 
lemma collinear_open_segment [simp]: "collinear (open_segment a b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3310  | 
unfolding open_segment_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3311  | 
by (metis convex_hull_subset_affine_hull segment_convex_hull dual_order.trans  | 
| 72238 | 3312  | 
convex_hull_subset_affine_hull Diff_subset collinear_affine_hull)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3313  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3314  | 
lemma collinear_between_cases:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3315  | 
fixes c :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3316  | 
  shows "collinear {a,b,c} \<longleftrightarrow> between (b,c) a \<or> between (c,a) b \<or> between (a,b) c"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3317  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3318  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3319  | 
assume ?lhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3320  | 
  then obtain u v where uv: "\<And>x. x \<in> {a, b, c} \<Longrightarrow> \<exists>c. x = u + c *\<^sub>R v"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3321  | 
by (auto simp: collinear_alt)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3322  | 
show ?rhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3323  | 
using uv [of a] uv [of b] uv [of c] by (auto simp: between_1)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3324  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3325  | 
assume ?rhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3326  | 
then show ?lhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3327  | 
unfolding between_mem_convex_hull  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3328  | 
by (metis (no_types, hide_lams) collinear_closed_segment collinear_subset hull_redundant hull_subset insert_commute segment_convex_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3329  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3330  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3331  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3332  | 
lemma subset_continuous_image_segment_1:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3333  | 
fixes f :: "'a::euclidean_space \<Rightarrow> real"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3334  | 
assumes "continuous_on (closed_segment a b) f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3335  | 
shows "closed_segment (f a) (f b) \<subseteq> image f (closed_segment a b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3336  | 
by (metis connected_segment convex_contains_segment ends_in_segment imageI  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3337  | 
is_interval_connected_1 is_interval_convex connected_continuous_image [OF assms])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3338  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3339  | 
lemma continuous_injective_image_segment_1:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3340  | 
fixes f :: "'a::euclidean_space \<Rightarrow> real"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3341  | 
assumes contf: "continuous_on (closed_segment a b) f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3342  | 
and injf: "inj_on f (closed_segment a b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3343  | 
shows "f ` (closed_segment a b) = closed_segment (f a) (f b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3344  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3345  | 
show "closed_segment (f a) (f b) \<subseteq> f ` closed_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3346  | 
by (metis subset_continuous_image_segment_1 contf)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3347  | 
show "f ` closed_segment a b \<subseteq> closed_segment (f a) (f b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3348  | 
proof (cases "a = b")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3349  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3350  | 
then show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3351  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3352  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3353  | 
then have fnot: "f a \<noteq> f b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3354  | 
using inj_onD injf by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3355  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3356  | 
have "f a \<notin> open_segment (f c) (f b)" if c: "c \<in> closed_segment a b" for c  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3357  | 
proof (clarsimp simp add: open_segment_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3358  | 
assume fa: "f a \<in> closed_segment (f c) (f b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3359  | 
moreover have "closed_segment (f c) (f b) \<subseteq> f ` closed_segment c b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3360  | 
by (meson closed_segment_subset contf continuous_on_subset convex_closed_segment ends_in_segment(2) subset_continuous_image_segment_1 that)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3361  | 
ultimately have "f a \<in> f ` closed_segment c b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3362  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3363  | 
then have a: "a \<in> closed_segment c b"  | 
| 
71857
 
d73955442df5
a few new lemmas about functions
 
paulson <lp15@cam.ac.uk> 
parents: 
71633 
diff
changeset
 | 
3364  | 
by (meson ends_in_segment inj_on_image_mem_iff injf subset_closed_segment that)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3365  | 
have cb: "closed_segment c b \<subseteq> closed_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3366  | 
by (simp add: closed_segment_subset that)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3367  | 
show "f a = f c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3368  | 
proof (rule between_antisym)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3369  | 
show "between (f c, f b) (f a)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3370  | 
by (simp add: between_mem_segment fa)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3371  | 
show "between (f a, f b) (f c)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3372  | 
by (metis a cb between_antisym between_mem_segment between_triv1 subset_iff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3373  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3374  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3375  | 
moreover  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3376  | 
have "f b \<notin> open_segment (f a) (f c)" if c: "c \<in> closed_segment a b" for c  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3377  | 
proof (clarsimp simp add: open_segment_def fnot eq_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3378  | 
assume fb: "f b \<in> closed_segment (f a) (f c)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3379  | 
moreover have "closed_segment (f a) (f c) \<subseteq> f ` closed_segment a c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3380  | 
by (meson contf continuous_on_subset ends_in_segment(1) subset_closed_segment subset_continuous_image_segment_1 that)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3381  | 
ultimately have "f b \<in> f ` closed_segment a c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3382  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3383  | 
then have b: "b \<in> closed_segment a c"  | 
| 
71857
 
d73955442df5
a few new lemmas about functions
 
paulson <lp15@cam.ac.uk> 
parents: 
71633 
diff
changeset
 | 
3384  | 
by (meson ends_in_segment inj_on_image_mem_iff injf subset_closed_segment that)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3385  | 
have ca: "closed_segment a c \<subseteq> closed_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3386  | 
by (simp add: closed_segment_subset that)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3387  | 
show "f b = f c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3388  | 
proof (rule between_antisym)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3389  | 
show "between (f c, f a) (f b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3390  | 
by (simp add: between_commute between_mem_segment fb)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3391  | 
show "between (f b, f a) (f c)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3392  | 
by (metis b between_antisym between_commute between_mem_segment between_triv2 that)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3393  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3394  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3395  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3396  | 
by (force simp: closed_segment_eq_real_ivl open_segment_eq_real_ivl split: if_split_asm)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3397  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3398  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3399  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3400  | 
lemma continuous_injective_image_open_segment_1:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3401  | 
fixes f :: "'a::euclidean_space \<Rightarrow> real"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3402  | 
assumes contf: "continuous_on (closed_segment a b) f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3403  | 
and injf: "inj_on f (closed_segment a b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3404  | 
shows "f ` (open_segment a b) = open_segment (f a) (f b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3405  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3406  | 
  have "f ` (open_segment a b) = f ` (closed_segment a b) - {f a, f b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3407  | 
by (metis (no_types, hide_lams) empty_subsetI ends_in_segment image_insert image_is_empty inj_on_image_set_diff injf insert_subset open_segment_def segment_open_subset_closed)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3408  | 
also have "... = open_segment (f a) (f b)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3409  | 
using continuous_injective_image_segment_1 [OF assms]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3410  | 
by (simp add: open_segment_def inj_on_image_set_diff [OF injf])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3411  | 
finally show ?thesis .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3412  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3413  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3414  | 
lemma collinear_imp_coplanar:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3415  | 
"collinear s ==> coplanar s"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3416  | 
by (metis collinear_affine_hull coplanar_def insert_absorb2)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3417  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3418  | 
lemma collinear_small:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3419  | 
assumes "finite s" "card s \<le> 2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3420  | 
shows "collinear s"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3421  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3422  | 
have "card s = 0 \<or> card s = 1 \<or> card s = 2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3423  | 
using assms by linarith  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3424  | 
then show ?thesis using assms  | 
| 
71258
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3425  | 
using card_eq_SucD numeral_2_eq_2 by (force simp: card_1_singleton_iff)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3426  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3427  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3428  | 
lemma coplanar_small:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3429  | 
assumes "finite s" "card s \<le> 3"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3430  | 
shows "coplanar s"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3431  | 
proof -  | 
| 
71258
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3432  | 
consider "card s \<le> 2" | "card s = Suc (Suc (Suc 0))"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3433  | 
using assms by linarith  | 
| 
71258
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3434  | 
then show ?thesis  | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3435  | 
proof cases  | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3436  | 
case 1  | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3437  | 
then show ?thesis  | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3438  | 
by (simp add: \<open>finite s\<close> collinear_imp_coplanar collinear_small)  | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3439  | 
next  | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3440  | 
case 2  | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3441  | 
then show ?thesis  | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3442  | 
      using hull_subset [of "{_,_,_}"]
 | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3443  | 
by (fastforce simp: coplanar_def dest!: card_eq_SucD)  | 
| 
 
d67924987c34
a few new and tidier proofs (mostly about finite sets)
 
paulson <lp15@cam.ac.uk> 
parents: 
71244 
diff
changeset
 | 
3444  | 
qed  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3445  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3446  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3447  | 
lemma coplanar_empty: "coplanar {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3448  | 
by (simp add: coplanar_small)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3449  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3450  | 
lemma coplanar_sing: "coplanar {a}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3451  | 
by (simp add: coplanar_small)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3452  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3453  | 
lemma coplanar_2: "coplanar {a,b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3454  | 
by (auto simp: card_insert_if coplanar_small)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3455  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3456  | 
lemma coplanar_3: "coplanar {a,b,c}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3457  | 
by (auto simp: card_insert_if coplanar_small)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3458  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3459  | 
lemma collinear_affine_hull_collinear: "collinear(affine hull s) \<longleftrightarrow> collinear s"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3460  | 
unfolding collinear_affine_hull  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3461  | 
by (metis affine_affine_hull subset_hull hull_hull hull_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3462  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3463  | 
lemma coplanar_affine_hull_coplanar: "coplanar(affine hull s) \<longleftrightarrow> coplanar s"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3464  | 
unfolding coplanar_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3465  | 
by (metis affine_affine_hull subset_hull hull_hull hull_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3466  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3467  | 
lemma coplanar_linear_image:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3468  | 
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::real_normed_vector"  | 
| 72567 | 3469  | 
assumes "coplanar S" "linear f" shows "coplanar(f ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3470  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3471  | 
  { fix u v w
 | 
| 72567 | 3472  | 
    assume "S \<subseteq> affine hull {u, v, w}"
 | 
3473  | 
    then have "f ` S \<subseteq> f ` (affine hull {u, v, w})"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3474  | 
by (simp add: image_mono)  | 
| 72567 | 3475  | 
    then have "f ` S \<subseteq> affine hull (f ` {u, v, w})"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3476  | 
by (metis assms(2) linear_conv_bounded_linear affine_hull_linear_image)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3477  | 
} then  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3478  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3479  | 
by auto (meson assms(1) coplanar_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3480  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3481  | 
|
| 72567 | 3482  | 
lemma coplanar_translation_imp:  | 
3483  | 
assumes "coplanar S" shows "coplanar ((\<lambda>x. a + x) ` S)"  | 
|
3484  | 
proof -  | 
|
3485  | 
  obtain u v w where "S \<subseteq> affine hull {u,v,w}"
 | 
|
3486  | 
by (meson assms coplanar_def)  | 
|
3487  | 
  then have "(+) a ` S \<subseteq> affine hull {u + a, v + a, w + a}"
 | 
|
3488  | 
    using affine_hull_translation [of a "{u,v,w}" for u v w]
 | 
|
3489  | 
by (force simp: add.commute)  | 
|
3490  | 
then show ?thesis  | 
|
3491  | 
unfolding coplanar_def by blast  | 
|
3492  | 
qed  | 
|
3493  | 
||
3494  | 
lemma coplanar_translation_eq: "coplanar((\<lambda>x. a + x) ` S) \<longleftrightarrow> coplanar S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3495  | 
by (metis (no_types) coplanar_translation_imp translation_galois)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3496  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3497  | 
lemma coplanar_linear_image_eq:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3498  | 
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"  | 
| 72567 | 3499  | 
assumes "linear f" "inj f" shows "coplanar(f ` S) = coplanar S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3500  | 
proof  | 
| 72567 | 3501  | 
assume "coplanar S"  | 
3502  | 
then show "coplanar (f ` S)"  | 
|
3503  | 
using assms(1) coplanar_linear_image by blast  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3504  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3505  | 
obtain g where g: "linear g" "g \<circ> f = id"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3506  | 
using linear_injective_left_inverse [OF assms]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3507  | 
by blast  | 
| 72567 | 3508  | 
assume "coplanar (f ` S)"  | 
3509  | 
then show "coplanar S"  | 
|
3510  | 
by (metis coplanar_linear_image g(1) g(2) id_apply image_comp image_id)  | 
|
3511  | 
qed  | 
|
3512  | 
||
3513  | 
lemma coplanar_subset: "\<lbrakk>coplanar t; S \<subseteq> t\<rbrakk> \<Longrightarrow> coplanar S"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3514  | 
by (meson coplanar_def order_trans)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3515  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3516  | 
lemma affine_hull_3_imp_collinear: "c \<in> affine hull {a,b} \<Longrightarrow> collinear {a,b,c}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3517  | 
by (metis collinear_2 collinear_affine_hull_collinear hull_redundant insert_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3518  | 
|
| 72238 | 3519  | 
lemma collinear_3_imp_in_affine_hull:  | 
3520  | 
  assumes "collinear {a,b,c}" "a \<noteq> b" shows "c \<in> affine hull {a,b}"
 | 
|
3521  | 
proof -  | 
|
3522  | 
obtain u x y where "b - a = y *\<^sub>R u" "c - a = x *\<^sub>R u"  | 
|
3523  | 
using assms unfolding collinear_def by auto  | 
|
| 72567 | 3524  | 
with \<open>a \<noteq> b\<close> have "\<exists>v. c = (1 - x / y) *\<^sub>R a + v *\<^sub>R b \<and> 1 - x / y + v = 1"  | 
3525  | 
by (simp add: algebra_simps)  | 
|
3526  | 
then show ?thesis  | 
|
3527  | 
by (simp add: hull_inc mem_affine)  | 
|
| 72238 | 3528  | 
qed  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3529  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3530  | 
lemma collinear_3_affine_hull:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3531  | 
assumes "a \<noteq> b"  | 
| 72238 | 3532  | 
  shows "collinear {a,b,c} \<longleftrightarrow> c \<in> affine hull {a,b}"
 | 
3533  | 
using affine_hull_3_imp_collinear assms collinear_3_imp_in_affine_hull by blast  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3534  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3535  | 
lemma collinear_3_eq_affine_dependent:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3536  | 
  "collinear{a,b,c} \<longleftrightarrow> a = b \<or> a = c \<or> b = c \<or> affine_dependent {a,b,c}"
 | 
| 72238 | 3537  | 
proof (cases "a = b \<or> a = c \<or> b = c")  | 
3538  | 
case True  | 
|
3539  | 
then show ?thesis  | 
|
3540  | 
by (auto simp: insert_commute)  | 
|
3541  | 
next  | 
|
3542  | 
case False  | 
|
| 72567 | 3543  | 
  then have "collinear{a,b,c}" if "affine_dependent {a,b,c}"
 | 
3544  | 
using that unfolding affine_dependent_def  | 
|
3545  | 
by (auto simp: insert_Diff_if; metis affine_hull_3_imp_collinear insert_commute)  | 
|
3546  | 
moreover  | 
|
3547  | 
  have "affine_dependent {a,b,c}" if "collinear{a,b,c}"
 | 
|
3548  | 
using False that by (auto simp: affine_dependent_def collinear_3_affine_hull insert_Diff_if)  | 
|
3549  | 
ultimately  | 
|
3550  | 
show ?thesis  | 
|
3551  | 
using False by blast  | 
|
| 72238 | 3552  | 
qed  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3553  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3554  | 
lemma affine_dependent_imp_collinear_3:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3555  | 
  "affine_dependent {a,b,c} \<Longrightarrow> collinear{a,b,c}"
 | 
| 72238 | 3556  | 
by (simp add: collinear_3_eq_affine_dependent)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3557  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3558  | 
lemma collinear_3: "NO_MATCH 0 x \<Longrightarrow> collinear {x,y,z} \<longleftrightarrow> collinear {0, x-y, z-y}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3559  | 
by (auto simp add: collinear_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3560  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3561  | 
lemma collinear_3_expand:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3562  | 
   "collinear{a,b,c} \<longleftrightarrow> a = c \<or> (\<exists>u. b = u *\<^sub>R a + (1 - u) *\<^sub>R c)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3563  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3564  | 
  have "collinear{a,b,c} = collinear{a,c,b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3565  | 
by (simp add: insert_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3566  | 
  also have "... = collinear {0, a - c, b - c}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3567  | 
by (simp add: collinear_3)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3568  | 
also have "... \<longleftrightarrow> (a = c \<or> b = c \<or> (\<exists>ca. b - c = ca *\<^sub>R (a - c)))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3569  | 
by (simp add: collinear_lemma)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3570  | 
also have "... \<longleftrightarrow> a = c \<or> (\<exists>u. b = u *\<^sub>R a + (1 - u) *\<^sub>R c)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3571  | 
by (cases "a = c \<or> b = c") (auto simp: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3572  | 
finally show ?thesis .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3573  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3574  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3575  | 
lemma collinear_aff_dim: "collinear S \<longleftrightarrow> aff_dim S \<le> 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3576  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3577  | 
assume "collinear S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3578  | 
  then obtain u and v :: "'a" where "aff_dim S \<le> aff_dim {u,v}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3579  | 
by (metis \<open>collinear S\<close> aff_dim_affine_hull aff_dim_subset collinear_affine_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3580  | 
then show "aff_dim S \<le> 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3581  | 
using order_trans by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3582  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3583  | 
assume "aff_dim S \<le> 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3584  | 
then have le1: "aff_dim (affine hull S) \<le> 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3585  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3586  | 
obtain B where "B \<subseteq> S" and B: "\<not> affine_dependent B" "affine hull S = affine hull B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3587  | 
using affine_basis_exists [of S] by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3588  | 
then have "finite B" "card B \<le> 2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3589  | 
using B le1 by (auto simp: affine_independent_iff_card)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3590  | 
then have "collinear B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3591  | 
by (rule collinear_small)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3592  | 
then show "collinear S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3593  | 
by (metis \<open>affine hull S = affine hull B\<close> collinear_affine_hull_collinear)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3594  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3595  | 
|
| 72567 | 3596  | 
lemma collinear_midpoint: "collinear{a, midpoint a b, b}"
 | 
3597  | 
proof -  | 
|
3598  | 
have \<section>: "\<lbrakk>a \<noteq> midpoint a b; b - midpoint a b \<noteq> - 1 *\<^sub>R (a - midpoint a b)\<rbrakk> \<Longrightarrow> b = midpoint a b"  | 
|
3599  | 
by (simp add: algebra_simps)  | 
|
3600  | 
show ?thesis  | 
|
3601  | 
by (auto simp: collinear_3 collinear_lemma intro: \<section>)  | 
|
3602  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3603  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3604  | 
lemma midpoint_collinear:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3605  | 
fixes a b c :: "'a::real_normed_vector"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3606  | 
assumes "a \<noteq> c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3607  | 
    shows "b = midpoint a c \<longleftrightarrow> collinear{a,b,c} \<and> dist a b = dist b c"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3608  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3609  | 
have *: "a - (u *\<^sub>R a + (1 - u) *\<^sub>R c) = (1 - u) *\<^sub>R (a - c)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3610  | 
"u *\<^sub>R a + (1 - u) *\<^sub>R c - c = u *\<^sub>R (a - c)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3611  | 
"\<bar>1 - u\<bar> = \<bar>u\<bar> \<longleftrightarrow> u = 1/2" for u::real  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3612  | 
by (auto simp: algebra_simps)  | 
| 72567 | 3613  | 
  have "b = midpoint a c \<Longrightarrow> collinear{a,b,c}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3614  | 
using collinear_midpoint by blast  | 
| 72567 | 3615  | 
  moreover have "b = midpoint a c \<longleftrightarrow> dist a b = dist b c" if "collinear{a,b,c}"
 | 
3616  | 
proof -  | 
|
3617  | 
consider "a = c" | u where "b = u *\<^sub>R a + (1 - u) *\<^sub>R c"  | 
|
3618  | 
      using \<open>collinear {a,b,c}\<close> unfolding collinear_3_expand by blast
 | 
|
3619  | 
then show ?thesis  | 
|
3620  | 
proof cases  | 
|
3621  | 
case 2  | 
|
3622  | 
with assms have "dist a b = dist b c \<Longrightarrow> b = midpoint a c"  | 
|
3623  | 
by (simp add: dist_norm * midpoint_def scaleR_add_right del: divide_const_simps)  | 
|
3624  | 
then show ?thesis  | 
|
3625  | 
by (auto simp: dist_midpoint)  | 
|
3626  | 
qed (use assms in auto)  | 
|
3627  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3628  | 
ultimately show ?thesis by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3629  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3630  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3631  | 
lemma between_imp_collinear:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3632  | 
fixes x :: "'a :: euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3633  | 
assumes "between (a,b) x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3634  | 
    shows "collinear {a,x,b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3635  | 
proof (cases "x = a \<or> x = b \<or> a = b")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3636  | 
case True with assms show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3637  | 
by (auto simp: dist_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3638  | 
next  | 
| 72567 | 3639  | 
case False  | 
3640  | 
then have False if "\<And>c. b - x \<noteq> c *\<^sub>R (a - x)"  | 
|
3641  | 
using that [of "-(norm(b - x) / norm(x - a))"] assms  | 
|
3642  | 
by (simp add: between_norm vector_add_divide_simps flip: real_vector.scale_minus_right)  | 
|
3643  | 
then show ?thesis  | 
|
3644  | 
by (auto simp: collinear_3 collinear_lemma)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3645  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3646  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3647  | 
lemma midpoint_between:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3648  | 
fixes a b :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3649  | 
shows "b = midpoint a c \<longleftrightarrow> between (a,c) b \<and> dist a b = dist b c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3650  | 
proof (cases "a = c")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3651  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3652  | 
show ?thesis  | 
| 72238 | 3653  | 
using False between_imp_collinear between_midpoint(1) midpoint_collinear by blast  | 
| 72567 | 3654  | 
qed (auto simp: dist_commute)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3655  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3656  | 
lemma collinear_triples:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3657  | 
assumes "a \<noteq> b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3658  | 
    shows "collinear(insert a (insert b S)) \<longleftrightarrow> (\<forall>x \<in> S. collinear{a,b,x})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3659  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3660  | 
proof safe  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3661  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3662  | 
assume ?lhs and "x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3663  | 
  then show "collinear {a, b, x}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3664  | 
using collinear_subset by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3665  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3666  | 
assume ?rhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3667  | 
  then have "\<forall>x \<in> S. collinear{a,x,b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3668  | 
by (simp add: insert_commute)  | 
| 72567 | 3669  | 
then have *: "\<exists>u. x = u *\<^sub>R a + (1 - u) *\<^sub>R b" if "x \<in> insert a (insert b S)" for x  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3670  | 
using that assms collinear_3_expand by fastforce+  | 
| 72567 | 3671  | 
have "\<exists>c. x - y = c *\<^sub>R (b - a)"  | 
3672  | 
if x: "x \<in> insert a (insert b S)" and y: "y \<in> insert a (insert b S)" for x y  | 
|
3673  | 
proof -  | 
|
3674  | 
obtain u v where "x = u *\<^sub>R a + (1 - u) *\<^sub>R b" "y = v *\<^sub>R a + (1 - v) *\<^sub>R b"  | 
|
3675  | 
using "*" x y by presburger  | 
|
3676  | 
then have "x - y = (v - u) *\<^sub>R (b - a)"  | 
|
3677  | 
by (simp add: scale_left_diff_distrib scale_right_diff_distrib)  | 
|
3678  | 
then show ?thesis ..  | 
|
3679  | 
qed  | 
|
3680  | 
then show ?lhs  | 
|
3681  | 
unfolding collinear_def by metis  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3682  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3683  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3684  | 
lemma collinear_4_3:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3685  | 
assumes "a \<noteq> b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3686  | 
    shows "collinear {a,b,c,d} \<longleftrightarrow> collinear{a,b,c} \<and> collinear{a,b,d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3687  | 
  using collinear_triples [OF assms, of "{c,d}"] by (force simp:)
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3688  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3689  | 
lemma collinear_3_trans:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3690  | 
  assumes "collinear{a,b,c}" "collinear{b,c,d}" "b \<noteq> c"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3691  | 
    shows "collinear{a,b,d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3692  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3693  | 
  have "collinear{b,c,a,d}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3694  | 
by (metis (full_types) assms collinear_4_3 insert_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3695  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3696  | 
by (simp add: collinear_subset)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3697  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3698  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3699  | 
lemma affine_hull_2_alt:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3700  | 
fixes a b :: "'a::real_vector"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3701  | 
  shows "affine hull {a,b} = range (\<lambda>u. a + u *\<^sub>R (b - a))"
 | 
| 72567 | 3702  | 
proof -  | 
3703  | 
have 1: "u *\<^sub>R a + v *\<^sub>R b = a + v *\<^sub>R (b - a)" if "u + v = 1" for u v  | 
|
3704  | 
using that  | 
|
3705  | 
by (simp add: algebra_simps flip: scaleR_add_left)  | 
|
3706  | 
have 2: "a + u *\<^sub>R (b - a) = (1 - u) *\<^sub>R a + u *\<^sub>R b" for u  | 
|
3707  | 
by (auto simp: algebra_simps)  | 
|
3708  | 
show ?thesis  | 
|
3709  | 
by (force simp add: affine_hull_2 dest: 1 intro!: 2)  | 
|
3710  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3711  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3712  | 
lemma interior_convex_hull_3_minimal:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3713  | 
fixes a :: "'a::euclidean_space"  | 
| 72567 | 3714  | 
  assumes "\<not> collinear{a,b,c}" and 2: "DIM('a) = 2"
 | 
3715  | 
  shows "interior(convex hull {a,b,c}) =
 | 
|
3716  | 
         {v. \<exists>x y z. 0 < x \<and> 0 < y \<and> 0 < z \<and> x + y + z = 1 \<and> x *\<^sub>R a + y *\<^sub>R b + z *\<^sub>R c = v}"
 | 
|
3717  | 
(is "?lhs = ?rhs")  | 
|
3718  | 
proof  | 
|
3719  | 
  have abc: "a \<noteq> b" "a \<noteq> c" "b \<noteq> c" "\<not> affine_dependent {a, b, c}"
 | 
|
3720  | 
using assms by (auto simp: collinear_3_eq_affine_dependent)  | 
|
3721  | 
with 2 show "?lhs \<subseteq> ?rhs"  | 
|
3722  | 
by (fastforce simp add: interior_convex_hull_explicit_minimal)  | 
|
3723  | 
show "?rhs \<subseteq> ?lhs"  | 
|
3724  | 
using abc 2  | 
|
3725  | 
apply (clarsimp simp add: interior_convex_hull_explicit_minimal)  | 
|
3726  | 
subgoal for x y z  | 
|
3727  | 
by (rule_tac x="\<lambda>r. (if r=a then x else if r=b then y else if r=c then z else 0)" in exI) auto  | 
|
3728  | 
done  | 
|
3729  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3730  | 
|
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
3731  | 
|
| 70136 | 3732  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>Basic lemmas about hyperplanes and halfspaces\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3733  | 
|
| 
69516
 
09bb8f470959
most of Topology_Euclidean_Space (now Elementary_Topology) requires fewer dependencies
 
immler 
parents: 
69508 
diff
changeset
 | 
3734  | 
lemma halfspace_Int_eq:  | 
| 
 
09bb8f470959
most of Topology_Euclidean_Space (now Elementary_Topology) requires fewer dependencies
 
immler 
parents: 
69508 
diff
changeset
 | 
3735  | 
     "{x. a \<bullet> x \<le> b} \<inter> {x. b \<le> a \<bullet> x} = {x. a \<bullet> x = b}"
 | 
| 
 
09bb8f470959
most of Topology_Euclidean_Space (now Elementary_Topology) requires fewer dependencies
 
immler 
parents: 
69508 
diff
changeset
 | 
3736  | 
     "{x. b \<le> a \<bullet> x} \<inter> {x. a \<bullet> x \<le> b} = {x. a \<bullet> x = b}"
 | 
| 
 
09bb8f470959
most of Topology_Euclidean_Space (now Elementary_Topology) requires fewer dependencies
 
immler 
parents: 
69508 
diff
changeset
 | 
3737  | 
by auto  | 
| 
 
09bb8f470959
most of Topology_Euclidean_Space (now Elementary_Topology) requires fewer dependencies
 
immler 
parents: 
69508 
diff
changeset
 | 
3738  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3739  | 
lemma hyperplane_eq_Ex:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3740  | 
assumes "a \<noteq> 0" obtains x where "a \<bullet> x = b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3741  | 
by (rule_tac x = "(b / (a \<bullet> a)) *\<^sub>R a" in that) (simp add: assms)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3742  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3743  | 
lemma hyperplane_eq_empty:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3744  | 
     "{x. a \<bullet> x = b} = {} \<longleftrightarrow> a = 0 \<and> b \<noteq> 0"
 | 
| 72238 | 3745  | 
using hyperplane_eq_Ex  | 
3746  | 
by (metis (mono_tags, lifting) empty_Collect_eq inner_zero_left)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3747  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3748  | 
lemma hyperplane_eq_UNIV:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3749  | 
   "{x. a \<bullet> x = b} = UNIV \<longleftrightarrow> a = 0 \<and> b = 0"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3750  | 
proof -  | 
| 72238 | 3751  | 
  have "a = 0 \<and> b = 0" if "UNIV \<subseteq> {x. a \<bullet> x = b}"
 | 
3752  | 
using subsetD [OF that, where c = "((b+1) / (a \<bullet> a)) *\<^sub>R a"]  | 
|
3753  | 
by (simp add: field_split_simps split: if_split_asm)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3754  | 
then show ?thesis by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3755  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3756  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3757  | 
lemma halfspace_eq_empty_lt:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3758  | 
   "{x. a \<bullet> x < b} = {} \<longleftrightarrow> a = 0 \<and> b \<le> 0"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3759  | 
proof -  | 
| 72238 | 3760  | 
  have "a = 0 \<and> b \<le> 0" if "{x. a \<bullet> x < b} \<subseteq> {}"
 | 
3761  | 
using subsetD [OF that, where c = "((b-1) / (a \<bullet> a)) *\<^sub>R a"]  | 
|
3762  | 
by (force simp add: field_split_simps split: if_split_asm)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3763  | 
then show ?thesis by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3764  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3765  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3766  | 
lemma halfspace_eq_empty_gt:  | 
| 72238 | 3767  | 
  "{x. a \<bullet> x > b} = {} \<longleftrightarrow> a = 0 \<and> b \<ge> 0"
 | 
3768  | 
using halfspace_eq_empty_lt [of "-a" "-b"]  | 
|
3769  | 
by simp  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3770  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3771  | 
lemma halfspace_eq_empty_le:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3772  | 
   "{x. a \<bullet> x \<le> b} = {} \<longleftrightarrow> a = 0 \<and> b < 0"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3773  | 
proof -  | 
| 72238 | 3774  | 
  have "a = 0 \<and> b < 0" if "{x. a \<bullet> x \<le> b} \<subseteq> {}"
 | 
3775  | 
using subsetD [OF that, where c = "((b-1) / (a \<bullet> a)) *\<^sub>R a"]  | 
|
3776  | 
by (force simp add: field_split_simps split: if_split_asm)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3777  | 
then show ?thesis by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3778  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3779  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3780  | 
lemma halfspace_eq_empty_ge:  | 
| 72238 | 3781  | 
  "{x. a \<bullet> x \<ge> b} = {} \<longleftrightarrow> a = 0 \<and> b > 0"
 | 
3782  | 
using halfspace_eq_empty_le [of "-a" "-b"] by simp  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3783  | 
|
| 70136 | 3784  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>Use set distance for an easy proof of separation properties\<close>  | 
3785  | 
||
3786  | 
proposition\<^marker>\<open>tag unimportant\<close> separation_closures:  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3787  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3788  | 
  assumes "S \<inter> closure T = {}" "T \<inter> closure S = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3789  | 
  obtains U V where "U \<inter> V = {}" "open U" "open V" "S \<subseteq> U" "T \<subseteq> V"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3790  | 
proof (cases "S = {} \<or> T = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3791  | 
case True with that show ?thesis by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3792  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3793  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3794  | 
  define f where "f \<equiv> \<lambda>x. setdist {x} T - setdist {x} S"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3795  | 
have contf: "continuous_on UNIV f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3796  | 
unfolding f_def by (intro continuous_intros continuous_on_setdist)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3797  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3798  | 
  proof (rule_tac U = "{x. f x > 0}" and V = "{x. f x < 0}" in that)
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3799  | 
    show "{x. 0 < f x} \<inter> {x. f x < 0} = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3800  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3801  | 
    show "open {x. 0 < f x}"
 | 
| 71172 | 3802  | 
by (simp add: open_Collect_less contf)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3803  | 
    show "open {x. f x < 0}"
 | 
| 71172 | 3804  | 
by (simp add: open_Collect_less contf)  | 
| 72238 | 3805  | 
    have "\<And>x. x \<in> S \<Longrightarrow> setdist {x} T \<noteq> 0" "\<And>x. x \<in> T \<Longrightarrow> setdist {x} S \<noteq> 0"
 | 
3806  | 
by (meson False assms disjoint_iff setdist_eq_0_sing_1)+  | 
|
3807  | 
    then show "S \<subseteq> {x. 0 < f x}" "T \<subseteq> {x. f x < 0}"
 | 
|
3808  | 
using less_eq_real_def by (fastforce simp add: f_def setdist_sing_in_set)+  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3809  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3810  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3811  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3812  | 
lemma separation_normal:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3813  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3814  | 
  assumes "closed S" "closed T" "S \<inter> T = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3815  | 
  obtains U V where "open U" "open V" "S \<subseteq> U" "T \<subseteq> V" "U \<inter> V = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3816  | 
using separation_closures [of S T]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3817  | 
by (metis assms closure_closed disjnt_def inf_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3818  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3819  | 
lemma separation_normal_local:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3820  | 
fixes S :: "'a::euclidean_space set"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
3821  | 
assumes US: "closedin (top_of_set U) S"  | 
| 
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
3822  | 
and UT: "closedin (top_of_set U) T"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3823  | 
      and "S \<inter> T = {}"
 | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
3824  | 
obtains S' T' where "openin (top_of_set U) S'"  | 
| 
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
3825  | 
"openin (top_of_set U) T'"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3826  | 
                      "S \<subseteq> S'"  "T \<subseteq> T'"  "S' \<inter> T' = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3827  | 
proof (cases "S = {} \<or> T = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3828  | 
case True with that show ?thesis  | 
| 68056 | 3829  | 
using UT US by (blast dest: closedin_subset)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3830  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3831  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3832  | 
  define f where "f \<equiv> \<lambda>x. setdist {x} T - setdist {x} S"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3833  | 
have contf: "continuous_on U f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3834  | 
unfolding f_def by (intro continuous_intros)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3835  | 
show ?thesis  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
3836  | 
  proof (rule_tac S' = "(U \<inter> f -` {0<..})" and T' = "(U \<inter> f -` {..<0})" in that)
 | 
| 
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
3837  | 
    show "(U \<inter> f -` {0<..}) \<inter> (U \<inter> f -` {..<0}) = {}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3838  | 
by auto  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
3839  | 
    show "openin (top_of_set U) (U \<inter> f -` {0<..})"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3840  | 
by (rule continuous_openin_preimage [where T=UNIV]) (simp_all add: contf)  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
3841  | 
next  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
3842  | 
    show "openin (top_of_set U) (U \<inter> f -` {..<0})"
 | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
3843  | 
by (rule continuous_openin_preimage [where T=UNIV]) (simp_all add: contf)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3844  | 
next  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
3845  | 
have "S \<subseteq> U" "T \<subseteq> U"  | 
| 
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
3846  | 
using closedin_imp_subset assms by blast+  | 
| 
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
3847  | 
    then show "S \<subseteq> U \<inter> f -` {0<..}" "T \<subseteq> U \<inter> f -` {..<0}"
 | 
| 
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
3848  | 
using assms False by (force simp add: f_def setdist_sing_in_set intro!: setdist_gt_0_closedin)+  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3849  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3850  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3851  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3852  | 
lemma separation_normal_compact:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3853  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3854  | 
  assumes "compact S" "closed T" "S \<inter> T = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3855  | 
  obtains U V where "open U" "compact(closure U)" "open V" "S \<subseteq> U" "T \<subseteq> V" "U \<inter> V = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3856  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3857  | 
have "closed S" "bounded S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3858  | 
using assms by (auto simp: compact_eq_bounded_closed)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3859  | 
then obtain r where "r>0" and r: "S \<subseteq> ball 0 r"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3860  | 
by (auto dest!: bounded_subset_ballD)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3861  | 
  have **: "closed (T \<union> - ball 0 r)" "S \<inter> (T \<union> - ball 0 r) = {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3862  | 
using assms r by blast+  | 
| 72238 | 3863  | 
  then obtain U V where UV: "open U" "open V" "S \<subseteq> U" "T \<union> - ball 0 r \<subseteq> V" "U \<inter> V = {}"
 | 
3864  | 
by (meson \<open>closed S\<close> separation_normal)  | 
|
3865  | 
then have "compact(closure U)"  | 
|
3866  | 
by (meson bounded_ball bounded_subset compact_closure compl_le_swap2 disjoint_eq_subset_Compl le_sup_iff)  | 
|
3867  | 
with UV show thesis  | 
|
3868  | 
using that by auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3869  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
3870  | 
|
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3871  | 
subsection\<open>Connectedness of the intersection of a chain\<close>  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3872  | 
|
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
3873  | 
proposition connected_chain:  | 
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3874  | 
fixes \<F> :: "'a :: euclidean_space set set"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3875  | 
assumes cc: "\<And>S. S \<in> \<F> \<Longrightarrow> compact S \<and> connected S"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3876  | 
and linear: "\<And>S T. S \<in> \<F> \<and> T \<in> \<F> \<Longrightarrow> S \<subseteq> T \<or> T \<subseteq> S"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3877  | 
shows "connected(\<Inter>\<F>)"  | 
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
3878  | 
proof (cases "\<F> = {}")
 | 
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3879  | 
case True then show ?thesis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3880  | 
by auto  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3881  | 
next  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3882  | 
case False  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3883  | 
then have cf: "compact(\<Inter>\<F>)"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3884  | 
by (simp add: cc compact_Inter)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3885  | 
  have False if AB: "closed A" "closed B" "A \<inter> B = {}"
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3886  | 
                and ABeq: "A \<union> B = \<Inter>\<F>" and "A \<noteq> {}" "B \<noteq> {}" for A B
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3887  | 
proof -  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3888  | 
    obtain U V where "open U" "open V" "A \<subseteq> U" "B \<subseteq> V" "U \<inter> V = {}"
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3889  | 
using separation_normal [OF AB] by metis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3890  | 
obtain K where "K \<in> \<F>" "compact K"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3891  | 
using cc False by blast  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3892  | 
then obtain N where "open N" and "K \<subseteq> N"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3893  | 
by blast  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3894  | 
let ?\<C> = "insert (U \<union> V) ((\<lambda>S. N - S) ` \<F>)"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3895  | 
obtain \<D> where "\<D> \<subseteq> ?\<C>" "finite \<D>" "K \<subseteq> \<Union>\<D>"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3896  | 
proof (rule compactE [OF \<open>compact K\<close>])  | 
| 69745 | 3897  | 
show "K \<subseteq> \<Union>(insert (U \<union> V) ((-) N ` \<F>))"  | 
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3898  | 
using \<open>K \<subseteq> N\<close> ABeq \<open>A \<subseteq> U\<close> \<open>B \<subseteq> V\<close> by auto  | 
| 67399 | 3899  | 
show "\<And>B. B \<in> insert (U \<union> V) ((-) N ` \<F>) \<Longrightarrow> open B"  | 
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3900  | 
by (auto simp: \<open>open U\<close> \<open>open V\<close> open_Un \<open>open N\<close> cc compact_imp_closed open_Diff)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3901  | 
qed  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3902  | 
    then have "finite(\<D> - {U \<union> V})"
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3903  | 
by blast  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3904  | 
    moreover have "\<D> - {U \<union> V} \<subseteq> (\<lambda>S. N - S) ` \<F>"
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3905  | 
using \<open>\<D> \<subseteq> ?\<C>\<close> by blast  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3906  | 
    ultimately obtain \<G> where "\<G> \<subseteq> \<F>" "finite \<G>" and Deq: "\<D> - {U \<union> V} = (\<lambda>S. N-S) ` \<G>"
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3907  | 
using finite_subset_image by metis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3908  | 
obtain J where "J \<in> \<F>" and J: "(\<Union>S\<in>\<G>. N - S) \<subseteq> N - J"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3909  | 
    proof (cases "\<G> = {}")
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3910  | 
case True  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3911  | 
      with \<open>\<F> \<noteq> {}\<close> that show ?thesis
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3912  | 
by auto  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3913  | 
next  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3914  | 
case False  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3915  | 
have "\<And>S T. \<lbrakk>S \<in> \<G>; T \<in> \<G>\<rbrakk> \<Longrightarrow> S \<subseteq> T \<or> T \<subseteq> S"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3916  | 
by (meson \<open>\<G> \<subseteq> \<F>\<close> in_mono local.linear)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3917  | 
      with \<open>finite \<G>\<close> \<open>\<G> \<noteq> {}\<close>
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3918  | 
have "\<exists>J \<in> \<G>. (\<Union>S\<in>\<G>. N - S) \<subseteq> N - J"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3919  | 
proof induction  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3920  | 
case (insert X \<H>)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3921  | 
show ?case  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3922  | 
        proof (cases "\<H> = {}")
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3923  | 
case True then show ?thesis by auto  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3924  | 
next  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3925  | 
case False  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3926  | 
then have "\<And>S T. \<lbrakk>S \<in> \<H>; T \<in> \<H>\<rbrakk> \<Longrightarrow> S \<subseteq> T \<or> T \<subseteq> S"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3927  | 
by (simp add: insert.prems)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3928  | 
with insert.IH False obtain J where "J \<in> \<H>" and J: "(\<Union>Y\<in>\<H>. N - Y) \<subseteq> N - J"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3929  | 
by metis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3930  | 
have "N - J \<subseteq> N - X \<or> N - X \<subseteq> N - J"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3931  | 
by (meson Diff_mono \<open>J \<in> \<H>\<close> insert.prems(2) insert_iff order_refl)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3932  | 
then show ?thesis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3933  | 
proof  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3934  | 
assume "N - J \<subseteq> N - X" with J show ?thesis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3935  | 
by auto  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3936  | 
next  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3937  | 
assume "N - X \<subseteq> N - J"  | 
| 69325 | 3938  | 
with J have "N - X \<union> \<Union> ((-) N ` \<H>) \<subseteq> N - J"  | 
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3939  | 
by auto  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3940  | 
with \<open>J \<in> \<H>\<close> show ?thesis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3941  | 
by blast  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3942  | 
qed  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3943  | 
qed  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3944  | 
qed simp  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3945  | 
with \<open>\<G> \<subseteq> \<F>\<close> show ?thesis by (blast intro: that)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3946  | 
qed  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3947  | 
    have "K \<subseteq> \<Union>(insert (U \<union> V) (\<D> - {U \<union> V}))"
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3948  | 
using \<open>K \<subseteq> \<Union>\<D>\<close> by auto  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3949  | 
also have "... \<subseteq> (U \<union> V) \<union> (N - J)"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3950  | 
by (metis (no_types, hide_lams) Deq Un_subset_iff Un_upper2 J Union_insert order_trans sup_ge1)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3951  | 
finally have "J \<inter> K \<subseteq> U \<union> V"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3952  | 
by blast  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3953  | 
moreover have "connected(J \<inter> K)"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3954  | 
by (metis Int_absorb1 \<open>J \<in> \<F>\<close> \<open>K \<in> \<F>\<close> cc inf.orderE local.linear)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3955  | 
    moreover have "U \<inter> (J \<inter> K) \<noteq> {}"
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3956  | 
      using ABeq \<open>J \<in> \<F>\<close> \<open>K \<in> \<F>\<close> \<open>A \<noteq> {}\<close> \<open>A \<subseteq> U\<close> by blast
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3957  | 
    moreover have "V \<inter> (J \<inter> K) \<noteq> {}"
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3958  | 
      using ABeq \<open>J \<in> \<F>\<close> \<open>K \<in> \<F>\<close> \<open>B \<noteq> {}\<close> \<open>B \<subseteq> V\<close> by blast
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3959  | 
ultimately show False  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3960  | 
        using connectedD [of "J \<inter> K" U V] \<open>open U\<close> \<open>open V\<close> \<open>U \<inter> V = {}\<close>  by auto
 | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3961  | 
qed  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3962  | 
with cf show ?thesis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3963  | 
by (auto simp: connected_closed_set compact_imp_closed)  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3964  | 
qed  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3965  | 
|
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3966  | 
lemma connected_chain_gen:  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3967  | 
fixes \<F> :: "'a :: euclidean_space set set"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3968  | 
assumes X: "X \<in> \<F>" "compact X"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3969  | 
and cc: "\<And>T. T \<in> \<F> \<Longrightarrow> closed T \<and> connected T"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3970  | 
and linear: "\<And>S T. S \<in> \<F> \<and> T \<in> \<F> \<Longrightarrow> S \<subseteq> T \<or> T \<subseteq> S"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3971  | 
shows "connected(\<Inter>\<F>)"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3972  | 
proof -  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3973  | 
have "\<Inter>\<F> = (\<Inter>T\<in>\<F>. X \<inter> T)"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3974  | 
using X by blast  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3975  | 
moreover have "connected (\<Inter>T\<in>\<F>. X \<inter> T)"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3976  | 
proof (rule connected_chain)  | 
| 67399 | 3977  | 
show "\<And>T. T \<in> (\<inter>) X ` \<F> \<Longrightarrow> compact T \<and> connected T"  | 
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3978  | 
using cc X by auto (metis inf.absorb2 inf.orderE local.linear)  | 
| 67399 | 3979  | 
show "\<And>S T. S \<in> (\<inter>) X ` \<F> \<and> T \<in> (\<inter>) X ` \<F> \<Longrightarrow> S \<subseteq> T \<or> T \<subseteq> S"  | 
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3980  | 
using local.linear by blast  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3981  | 
qed  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3982  | 
ultimately show ?thesis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3983  | 
by metis  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3984  | 
qed  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3985  | 
|
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3986  | 
lemma connected_nest:  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3987  | 
fixes S :: "'a::linorder \<Rightarrow> 'b::euclidean_space set"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3988  | 
assumes S: "\<And>n. compact(S n)" "\<And>n. connected(S n)"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3989  | 
and nest: "\<And>m n. m \<le> n \<Longrightarrow> S n \<subseteq> S m"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3990  | 
shows "connected(\<Inter> (range S))"  | 
| 72567 | 3991  | 
proof (rule connected_chain)  | 
3992  | 
show "\<And>A T. A \<in> range S \<and> T \<in> range S \<Longrightarrow> A \<subseteq> T \<or> T \<subseteq> A"  | 
|
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3993  | 
by (metis image_iff le_cases nest)  | 
| 72567 | 3994  | 
qed (use S in blast)  | 
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3995  | 
|
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3996  | 
lemma connected_nest_gen:  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3997  | 
fixes S :: "'a::linorder \<Rightarrow> 'b::euclidean_space set"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3998  | 
assumes S: "\<And>n. closed(S n)" "\<And>n. connected(S n)" "compact(S k)"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
3999  | 
and nest: "\<And>m n. m \<le> n \<Longrightarrow> S n \<subseteq> S m"  | 
| 
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
4000  | 
shows "connected(\<Inter> (range S))"  | 
| 72567 | 4001  | 
proof (rule connected_chain_gen [of "S k"])  | 
4002  | 
show "\<And>A T. A \<in> range S \<and> T \<in> range S \<Longrightarrow> A \<subseteq> T \<or> T \<subseteq> A"  | 
|
4003  | 
by (metis imageE le_cases nest)  | 
|
4004  | 
qed (use S in auto)  | 
|
| 
66793
 
deabce3ccf1f
new material about connectedness, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66765 
diff
changeset
 | 
4005  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4006  | 
subsection\<open>Proper maps, including projections out of compact sets\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4007  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4008  | 
lemma finite_indexed_bound:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4009  | 
assumes A: "finite A" "\<And>x. x \<in> A \<Longrightarrow> \<exists>n::'a::linorder. P x n"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4010  | 
shows "\<exists>m. \<forall>x \<in> A. \<exists>k\<le>m. P x k"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4011  | 
using A  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4012  | 
proof (induction A)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4013  | 
case empty then show ?case by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4014  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4015  | 
case (insert a A)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4016  | 
then obtain m n where "\<forall>x \<in> A. \<exists>k\<le>m. P x k" "P a n"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4017  | 
by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4018  | 
then show ?case  | 
| 72238 | 4019  | 
by (metis dual_order.trans insert_iff le_cases)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4020  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4021  | 
|
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
4022  | 
proposition proper_map:  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4023  | 
fixes f :: "'a::heine_borel \<Rightarrow> 'b::heine_borel"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4024  | 
assumes "closedin (top_of_set S) K"  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4025  | 
and com: "\<And>U. \<lbrakk>U \<subseteq> T; compact U\<rbrakk> \<Longrightarrow> compact (S \<inter> f -` U)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4026  | 
and "f ` S \<subseteq> T"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4027  | 
shows "closedin (top_of_set T) (f ` K)"  | 
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
4028  | 
proof -  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4029  | 
have "K \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4030  | 
using assms closedin_imp_subset by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4031  | 
obtain C where "closed C" and Keq: "K = S \<inter> C"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4032  | 
using assms by (auto simp: closedin_closed)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4033  | 
have *: "y \<in> f ` K" if "y \<in> T" and y: "y islimpt f ` K" for y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4034  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4035  | 
obtain h where "\<forall>n. (\<exists>x\<in>K. h n = f x) \<and> h n \<noteq> y" "inj h" and hlim: "(h \<longlongrightarrow> y) sequentially"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4036  | 
using \<open>y \<in> T\<close> y by (force simp: limpt_sequential_inj)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4037  | 
then obtain X where X: "\<And>n. X n \<in> K \<and> h n = f (X n) \<and> h n \<noteq> y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4038  | 
by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4039  | 
then have fX: "\<And>n. f (X n) = h n"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4040  | 
by metis  | 
| 72567 | 4041  | 
    define \<Psi> where "\<Psi> \<equiv> \<lambda>n. {a \<in> K. f a \<in> insert y (range (\<lambda>i. f (X (n + i))))}"
 | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4042  | 
have "compact (C \<inter> (S \<inter> f -` insert y (range (\<lambda>i. f(X(n + i))))))" for n  | 
| 72238 | 4043  | 
proof (intro closed_Int_compact [OF \<open>closed C\<close> com] compact_sequence_with_limit)  | 
4044  | 
show "insert y (range (\<lambda>i. f (X (n + i)))) \<subseteq> T"  | 
|
4045  | 
using X \<open>K \<subseteq> S\<close> \<open>f ` S \<subseteq> T\<close> \<open>y \<in> T\<close> by blast  | 
|
4046  | 
show "(\<lambda>i. f (X (n + i))) \<longlonglongrightarrow> y"  | 
|
4047  | 
by (simp add: fX add.commute [of n] LIMSEQ_ignore_initial_segment [OF hlim])  | 
|
4048  | 
qed  | 
|
| 72567 | 4049  | 
then have comf: "compact (\<Psi> n)" for n  | 
4050  | 
by (simp add: Keq Int_def \<Psi>_def conj_commute)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4051  | 
    have ne: "\<Inter>\<F> \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4052  | 
if "finite \<F>"  | 
| 72567 | 4053  | 
and \<F>: "\<And>t. t \<in> \<F> \<Longrightarrow> (\<exists>n. t = \<Psi> n)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4054  | 
for \<F>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4055  | 
proof -  | 
| 72567 | 4056  | 
obtain m where m: "\<And>t. t \<in> \<F> \<Longrightarrow> \<exists>k\<le>m. t = \<Psi> k"  | 
| 72238 | 4057  | 
by (rule exE [OF finite_indexed_bound [OF \<open>finite \<F>\<close> \<F>]], force+)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4058  | 
have "X m \<in> \<Inter>\<F>"  | 
| 72567 | 4059  | 
using X le_Suc_ex by (fastforce simp: \<Psi>_def dest: m)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4060  | 
then show ?thesis by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4061  | 
qed  | 
| 72567 | 4062  | 
    have "(\<Inter>n. \<Psi> n) \<noteq> {}"
 | 
4063  | 
proof (rule compact_fip_Heine_Borel)  | 
|
4064  | 
      show "\<And>\<F>'. \<lbrakk>finite \<F>'; \<F>' \<subseteq> range \<Psi>\<rbrakk> \<Longrightarrow> \<Inter> \<F>' \<noteq> {}"
 | 
|
4065  | 
by (meson ne rangeE subset_eq)  | 
|
4066  | 
qed (use comf in blast)  | 
|
4067  | 
then obtain x where "x \<in> K" "\<And>n. (f x = y \<or> (\<exists>u. f x = h (n + u)))"  | 
|
4068  | 
by (force simp add: \<Psi>_def fX)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4069  | 
then show ?thesis  | 
| 72567 | 4070  | 
unfolding image_iff by (metis \<open>inj h\<close> le_add1 not_less_eq_eq rangeI range_ex1_eq)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4071  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4072  | 
with assms closedin_subset show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4073  | 
by (force simp: closedin_limpt)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4074  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4075  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4076  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4077  | 
lemma compact_continuous_image_eq:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4078  | 
fixes f :: "'a::heine_borel \<Rightarrow> 'b::heine_borel"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4079  | 
assumes f: "inj_on f S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4080  | 
shows "continuous_on S f \<longleftrightarrow> (\<forall>T. compact T \<and> T \<subseteq> S \<longrightarrow> compact(f ` T))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4081  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4082  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4083  | 
assume ?lhs then show ?rhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4084  | 
by (metis continuous_on_subset compact_continuous_image)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4085  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4086  | 
assume RHS: ?rhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4087  | 
obtain g where gf: "\<And>x. x \<in> S \<Longrightarrow> g (f x) = x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4088  | 
by (metis inv_into_f_f f)  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4089  | 
then have *: "(S \<inter> f -` U) = g ` U" if "U \<subseteq> f ` S" for U  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4090  | 
using that by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4091  | 
have gfim: "g ` f ` S \<subseteq> S" using gf by auto  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4092  | 
have **: "compact (f ` S \<inter> g -` C)" if C: "C \<subseteq> S" "compact C" for C  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4093  | 
proof -  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4094  | 
obtain h where "h C \<in> C \<and> h C \<notin> S \<or> compact (f ` C)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4095  | 
by (force simp: C RHS)  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4096  | 
moreover have "f ` C = (f ` S \<inter> g -` C)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4097  | 
using C gf by auto  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4098  | 
ultimately show ?thesis  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4099  | 
using C by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4100  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4101  | 
show ?lhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4102  | 
using proper_map [OF _ _ gfim] **  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4103  | 
by (simp add: continuous_on_closed * closedin_imp_subset)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4104  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4105  | 
|
| 70136 | 4106  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>Trivial fact: convexity equals connectedness for collinear sets\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4107  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4108  | 
lemma convex_connected_collinear:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4109  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4110  | 
assumes "collinear S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4111  | 
shows "convex S \<longleftrightarrow> connected S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4112  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4113  | 
assume "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4114  | 
then show "connected S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4115  | 
using convex_connected by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4116  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4117  | 
assume S: "connected S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4118  | 
show "convex S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4119  | 
  proof (cases "S = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4120  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4121  | 
then show ?thesis by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4122  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4123  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4124  | 
then obtain a where "a \<in> S" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4125  | 
have "collinear (affine hull S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4126  | 
by (simp add: assms collinear_affine_hull_collinear)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4127  | 
then obtain z where "z \<noteq> 0" "\<And>x. x \<in> affine hull S \<Longrightarrow> \<exists>c. x - a = c *\<^sub>R z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4128  | 
by (meson \<open>a \<in> S\<close> collinear hull_inc)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4129  | 
then obtain f where f: "\<And>x. x \<in> affine hull S \<Longrightarrow> x - a = f x *\<^sub>R z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4130  | 
by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4131  | 
then have inj_f: "inj_on f (affine hull S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4132  | 
by (metis diff_add_cancel inj_onI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4133  | 
have diff: "x - y = (f x - f y) *\<^sub>R z" if x: "x \<in> affine hull S" and y: "y \<in> affine hull S" for x y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4134  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4135  | 
have "f x *\<^sub>R z = x - a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4136  | 
by (simp add: f hull_inc x)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4137  | 
moreover have "f y *\<^sub>R z = y - a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4138  | 
by (simp add: f hull_inc y)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4139  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4140  | 
by (simp add: scaleR_left.diff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4141  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4142  | 
have cont_f: "continuous_on (affine hull S) f"  | 
| 72567 | 4143  | 
proof (clarsimp simp: dist_norm continuous_on_iff diff)  | 
4144  | 
show "\<And>x e. 0 < e \<Longrightarrow> \<exists>d>0. \<forall>y \<in> affine hull S. \<bar>f y - f x\<bar> * norm z < d \<longrightarrow> \<bar>f y - f x\<bar> < e"  | 
|
| 
72569
 
d56e4eeae967
mult_le_cancel_iff1, mult_le_cancel_iff2, mult_less_iff1 generalised from the real_ versions
 
paulson <lp15@cam.ac.uk> 
parents: 
72567 
diff
changeset
 | 
4145  | 
by (metis \<open>z \<noteq> 0\<close> mult_pos_pos mult_less_iff1 zero_less_norm_iff)  | 
| 72567 | 4146  | 
qed  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4147  | 
then have conn_fS: "connected (f ` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4148  | 
by (meson S connected_continuous_image continuous_on_subset hull_subset)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4149  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4150  | 
proof (clarsimp simp: convex_contains_segment)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4151  | 
fix x y z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4152  | 
assume "x \<in> S" "y \<in> S" "z \<in> closed_segment x y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4153  | 
have False if "z \<notin> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4154  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4155  | 
have "f ` (closed_segment x y) = closed_segment (f x) (f y)"  | 
| 72238 | 4156  | 
proof (rule continuous_injective_image_segment_1)  | 
4157  | 
show "continuous_on (closed_segment x y) f"  | 
|
4158  | 
by (meson \<open>x \<in> S\<close> \<open>y \<in> S\<close> convex_affine_hull convex_contains_segment hull_inc continuous_on_subset [OF cont_f])  | 
|
4159  | 
show "inj_on f (closed_segment x y)"  | 
|
4160  | 
by (meson \<open>x \<in> S\<close> \<open>y \<in> S\<close> convex_affine_hull convex_contains_segment hull_inc inj_on_subset [OF inj_f])  | 
|
4161  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4162  | 
then have fz: "f z \<in> closed_segment (f x) (f y)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4163  | 
using \<open>z \<in> closed_segment x y\<close> by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4164  | 
have "z \<in> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4165  | 
by (meson \<open>x \<in> S\<close> \<open>y \<in> S\<close> \<open>z \<in> closed_segment x y\<close> convex_affine_hull convex_contains_segment hull_inc subset_eq)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4166  | 
then have fz_notin: "f z \<notin> f ` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4167  | 
using hull_subset inj_f inj_onD that by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4168  | 
        moreover have "{..<f z} \<inter> f ` S \<noteq> {}" "{f z<..} \<inter> f ` S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4169  | 
proof -  | 
| 72567 | 4170  | 
consider "f x \<le> f z \<and> f z \<le> f y" | "f y \<le> f z \<and> f z \<le> f x"  | 
4171  | 
using fz  | 
|
4172  | 
by (auto simp add: closed_segment_eq_real_ivl split: if_split_asm)  | 
|
4173  | 
          then have "{..<f z} \<inter> f ` {x,y} \<noteq> {} \<and> {f z<..} \<inter> f ` {x,y} \<noteq> {}"
 | 
|
4174  | 
by cases (use fz_notin \<open>x \<in> S\<close> \<open>y \<in> S\<close> in \<open>auto simp: image_iff\<close>)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4175  | 
          then show "{..<f z} \<inter> f ` S \<noteq> {}" "{f z<..} \<inter> f ` S \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4176  | 
using \<open>x \<in> S\<close> \<open>y \<in> S\<close> by blast+  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4177  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4178  | 
ultimately show False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4179  | 
          using connectedD [OF conn_fS, of "{..<f z}" "{f z<..}"] by force
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4180  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4181  | 
then show "z \<in> S" by meson  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4182  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4183  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4184  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4185  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4186  | 
lemma compact_convex_collinear_segment_alt:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4187  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4188  | 
  assumes "S \<noteq> {}" "compact S" "connected S" "collinear S"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4189  | 
obtains a b where "S = closed_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4190  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4191  | 
  obtain \<xi> where "\<xi> \<in> S" using \<open>S \<noteq> {}\<close> by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4192  | 
have "collinear (affine hull S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4193  | 
by (simp add: assms collinear_affine_hull_collinear)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4194  | 
then obtain z where "z \<noteq> 0" "\<And>x. x \<in> affine hull S \<Longrightarrow> \<exists>c. x - \<xi> = c *\<^sub>R z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4195  | 
by (meson \<open>\<xi> \<in> S\<close> collinear hull_inc)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4196  | 
then obtain f where f: "\<And>x. x \<in> affine hull S \<Longrightarrow> x - \<xi> = f x *\<^sub>R z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4197  | 
by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4198  | 
let ?g = "\<lambda>r. r *\<^sub>R z + \<xi>"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4199  | 
have gf: "?g (f x) = x" if "x \<in> affine hull S" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4200  | 
by (metis diff_add_cancel f that)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4201  | 
then have inj_f: "inj_on f (affine hull S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4202  | 
by (metis inj_onI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4203  | 
have diff: "x - y = (f x - f y) *\<^sub>R z" if x: "x \<in> affine hull S" and y: "y \<in> affine hull S" for x y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4204  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4205  | 
have "f x *\<^sub>R z = x - \<xi>"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4206  | 
by (simp add: f hull_inc x)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4207  | 
moreover have "f y *\<^sub>R z = y - \<xi>"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4208  | 
by (simp add: f hull_inc y)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4209  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4210  | 
by (simp add: scaleR_left.diff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4211  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4212  | 
have cont_f: "continuous_on (affine hull S) f"  | 
| 72567 | 4213  | 
proof (clarsimp simp: dist_norm continuous_on_iff diff)  | 
4214  | 
show "\<And>x e. 0 < e \<Longrightarrow> \<exists>d>0. \<forall>y \<in> affine hull S. \<bar>f y - f x\<bar> * norm z < d \<longrightarrow> \<bar>f y - f x\<bar> < e"  | 
|
| 
72569
 
d56e4eeae967
mult_le_cancel_iff1, mult_le_cancel_iff2, mult_less_iff1 generalised from the real_ versions
 
paulson <lp15@cam.ac.uk> 
parents: 
72567 
diff
changeset
 | 
4215  | 
by (metis \<open>z \<noteq> 0\<close> mult_pos_pos mult_less_iff1 zero_less_norm_iff)  | 
| 72567 | 4216  | 
qed  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4217  | 
then have "connected (f ` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4218  | 
by (meson \<open>connected S\<close> connected_continuous_image continuous_on_subset hull_subset)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4219  | 
moreover have "compact (f ` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4220  | 
by (meson \<open>compact S\<close> compact_continuous_image_eq cont_f hull_subset inj_f)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4221  | 
  ultimately obtain x y where "f ` S = {x..y}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4222  | 
by (meson connected_compact_interval_1)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4223  | 
then have fS_eq: "f ` S = closed_segment x y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4224  | 
    using \<open>S \<noteq> {}\<close> closed_segment_eq_real_ivl by auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4225  | 
obtain a b where "a \<in> S" "f a = x" "b \<in> S" "f b = y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4226  | 
by (metis (full_types) ends_in_segment fS_eq imageE)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4227  | 
have "f ` (closed_segment a b) = closed_segment (f a) (f b)"  | 
| 72238 | 4228  | 
proof (rule continuous_injective_image_segment_1)  | 
4229  | 
show "continuous_on (closed_segment a b) f"  | 
|
4230  | 
by (meson \<open>a \<in> S\<close> \<open>b \<in> S\<close> convex_affine_hull convex_contains_segment hull_inc continuous_on_subset [OF cont_f])  | 
|
4231  | 
show "inj_on f (closed_segment a b)"  | 
|
4232  | 
by (meson \<open>a \<in> S\<close> \<open>b \<in> S\<close> convex_affine_hull convex_contains_segment hull_inc inj_on_subset [OF inj_f])  | 
|
4233  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4234  | 
then have "f ` (closed_segment a b) = f ` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4235  | 
by (simp add: \<open>f a = x\<close> \<open>f b = y\<close> fS_eq)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4236  | 
then have "?g ` f ` (closed_segment a b) = ?g ` f ` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4237  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4238  | 
moreover have "(\<lambda>x. f x *\<^sub>R z + \<xi>) ` closed_segment a b = closed_segment a b"  | 
| 72567 | 4239  | 
unfolding image_def using \<open>a \<in> S\<close> \<open>b \<in> S\<close>  | 
4240  | 
by (safe; metis (mono_tags, lifting) convex_affine_hull convex_contains_segment gf hull_subset subsetCE)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4241  | 
ultimately have "closed_segment a b = S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4242  | 
using gf by (simp add: image_comp o_def hull_inc cong: image_cong)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4243  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4244  | 
using that by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4245  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4246  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4247  | 
lemma compact_convex_collinear_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4248  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4249  | 
  assumes "S \<noteq> {}" "compact S" "convex S" "collinear S"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4250  | 
obtains a b where "S = closed_segment a b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4251  | 
using assms convex_connected_collinear compact_convex_collinear_segment_alt by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4252  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4253  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4254  | 
lemma proper_map_from_compact:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4255  | 
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4256  | 
assumes contf: "continuous_on S f" and imf: "f ` S \<subseteq> T" and "compact S"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4257  | 
"closedin (top_of_set T) K"  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4258  | 
shows "compact (S \<inter> f -` K)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4259  | 
by (rule closedin_compact [OF \<open>compact S\<close>] continuous_closedin_preimage_gen assms)+  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4260  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4261  | 
lemma proper_map_fst:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4262  | 
assumes "compact T" "K \<subseteq> S" "compact K"  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4263  | 
shows "compact (S \<times> T \<inter> fst -` K)"  | 
| 
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4264  | 
proof -  | 
| 
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4265  | 
have "(S \<times> T \<inter> fst -` K) = K \<times> T"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4266  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4267  | 
then show ?thesis by (simp add: assms compact_Times)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4268  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4269  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4270  | 
lemma closed_map_fst:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4271  | 
fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4272  | 
assumes "compact T" "closedin (top_of_set (S \<times> T)) c"  | 
| 
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4273  | 
shows "closedin (top_of_set S) (fst ` c)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4274  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4275  | 
have *: "fst ` (S \<times> T) \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4276  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4277  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4278  | 
using proper_map [OF _ _ *] by (simp add: proper_map_fst assms)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4279  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4280  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4281  | 
lemma proper_map_snd:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4282  | 
assumes "compact S" "K \<subseteq> T" "compact K"  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4283  | 
shows "compact (S \<times> T \<inter> snd -` K)"  | 
| 
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4284  | 
proof -  | 
| 
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
4285  | 
have "(S \<times> T \<inter> snd -` K) = S \<times> K"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4286  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4287  | 
then show ?thesis by (simp add: assms compact_Times)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4288  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4289  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4290  | 
lemma closed_map_snd:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4291  | 
fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4292  | 
assumes "compact S" "closedin (top_of_set (S \<times> T)) c"  | 
| 
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4293  | 
shows "closedin (top_of_set T) (snd ` c)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4294  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4295  | 
have *: "snd ` (S \<times> T) \<subseteq> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4296  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4297  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4298  | 
using proper_map [OF _ _ *] by (simp add: proper_map_snd assms)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4299  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4300  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4301  | 
lemma closedin_compact_projection:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4302  | 
fixes S :: "'a::euclidean_space set" and T :: "'b::euclidean_space set"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4303  | 
assumes "compact S" and clo: "closedin (top_of_set (S \<times> T)) U"  | 
| 
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4304  | 
    shows "closedin (top_of_set T) {y. \<exists>x. x \<in> S \<and> (x, y) \<in> U}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4305  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4306  | 
have "U \<subseteq> S \<times> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4307  | 
by (metis clo closedin_imp_subset)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4308  | 
  then have "{y. \<exists>x. x \<in> S \<and> (x, y) \<in> U} = snd ` U"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4309  | 
by force  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4310  | 
moreover have "closedin (top_of_set T) (snd ` U)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4311  | 
by (rule closed_map_snd [OF assms])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4312  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4313  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4314  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4315  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4316  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4317  | 
lemma closed_compact_projection:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4318  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4319  | 
    and T :: "('a * 'b::euclidean_space) set"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4320  | 
assumes "compact S" and clo: "closed T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4321  | 
    shows "closed {y. \<exists>x. x \<in> S \<and> (x, y) \<in> T}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4322  | 
proof -  | 
| 72238 | 4323  | 
  have *: "{y. \<exists>x. x \<in> S \<and> Pair x y \<in> T} = {y. \<exists>x. x \<in> S \<and> Pair x y \<in> ((S \<times> UNIV) \<inter> T)}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4324  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4325  | 
show ?thesis  | 
| 72238 | 4326  | 
unfolding *  | 
4327  | 
by (intro clo closedin_closed_Int closedin_closed_trans [OF _ closed_UNIV] closedin_compact_projection [OF \<open>compact S\<close>])  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4328  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4329  | 
|
| 70136 | 4330  | 
subsubsection\<^marker>\<open>tag unimportant\<close>\<open>Representing affine hull as a finite intersection of hyperplanes\<close>  | 
4331  | 
||
4332  | 
proposition\<^marker>\<open>tag unimportant\<close> affine_hull_convex_Int_nonempty_interior:  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4333  | 
fixes S :: "'a::real_normed_vector set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4334  | 
  assumes "convex S" "S \<inter> interior T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4335  | 
shows "affine hull (S \<inter> T) = affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4336  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4337  | 
show "affine hull (S \<inter> T) \<subseteq> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4338  | 
by (simp add: hull_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4339  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4340  | 
obtain a where "a \<in> S" "a \<in> T" and at: "a \<in> interior T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4341  | 
using assms interior_subset by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4342  | 
then obtain e where "e > 0" and e: "cball a e \<subseteq> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4343  | 
using mem_interior_cball by blast  | 
| 67399 | 4344  | 
have *: "x \<in> (+) a ` span ((\<lambda>x. x - a) ` (S \<inter> T))" if "x \<in> S" for x  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4345  | 
proof (cases "x = a")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4346  | 
case True with that span_0 eq_add_iff image_def mem_Collect_eq show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4347  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4348  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4349  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4350  | 
define k where "k = min (1/2) (e / norm (x-a))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4351  | 
have k: "0 < k" "k < 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4352  | 
using \<open>e > 0\<close> False by (auto simp: k_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4353  | 
then have xa: "(x-a) = inverse k *\<^sub>R k *\<^sub>R (x-a)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4354  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4355  | 
have "e / norm (x - a) \<ge> k"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4356  | 
using k_def by linarith  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4357  | 
then have "a + k *\<^sub>R (x - a) \<in> cball a e"  | 
| 
70802
 
160eaf566bcb
formally augmented corresponding rules for field_simps
 
haftmann 
parents: 
70620 
diff
changeset
 | 
4358  | 
using \<open>0 < k\<close> False  | 
| 
 
160eaf566bcb
formally augmented corresponding rules for field_simps
 
haftmann 
parents: 
70620 
diff
changeset
 | 
4359  | 
by (simp add: dist_norm) (simp add: field_simps)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4360  | 
then have T: "a + k *\<^sub>R (x - a) \<in> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4361  | 
using e by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4362  | 
have S: "a + k *\<^sub>R (x - a) \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4363  | 
using k \<open>a \<in> S\<close> convexD [OF \<open>convex S\<close> \<open>a \<in> S\<close> \<open>x \<in> S\<close>, of "1-k" k]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4364  | 
by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4365  | 
have "inverse k *\<^sub>R k *\<^sub>R (x-a) \<in> span ((\<lambda>x. x - a) ` (S \<inter> T))"  | 
| 72238 | 4366  | 
by (intro span_mul [OF span_base] image_eqI [where x = "a + k *\<^sub>R (x - a)"]) (auto simp: S T)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4367  | 
with xa image_iff show ?thesis by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4368  | 
qed  | 
| 72238 | 4369  | 
have "S \<subseteq> affine hull (S \<inter> T)"  | 
4370  | 
by (force simp: * \<open>a \<in> S\<close> \<open>a \<in> T\<close> hull_inc affine_hull_span_gen [of a])  | 
|
4371  | 
then show "affine hull S \<subseteq> affine hull (S \<inter> T)"  | 
|
4372  | 
by (simp add: subset_hull)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4373  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4374  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4375  | 
corollary affine_hull_convex_Int_open:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4376  | 
fixes S :: "'a::real_normed_vector set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4377  | 
  assumes "convex S" "open T" "S \<inter> T \<noteq> {}"
 | 
| 72238 | 4378  | 
shows "affine hull (S \<inter> T) = affine hull S"  | 
4379  | 
using affine_hull_convex_Int_nonempty_interior assms interior_eq by blast  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4380  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4381  | 
corollary affine_hull_affine_Int_nonempty_interior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4382  | 
fixes S :: "'a::real_normed_vector set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4383  | 
  assumes "affine S" "S \<inter> interior T \<noteq> {}"
 | 
| 72238 | 4384  | 
shows "affine hull (S \<inter> T) = affine hull S"  | 
4385  | 
by (simp add: affine_hull_convex_Int_nonempty_interior affine_imp_convex assms)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4386  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4387  | 
corollary affine_hull_affine_Int_open:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4388  | 
fixes S :: "'a::real_normed_vector set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4389  | 
  assumes "affine S" "open T" "S \<inter> T \<noteq> {}"
 | 
| 72238 | 4390  | 
shows "affine hull (S \<inter> T) = affine hull S"  | 
4391  | 
by (simp add: affine_hull_convex_Int_open affine_imp_convex assms)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4392  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4393  | 
corollary affine_hull_convex_Int_openin:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4394  | 
fixes S :: "'a::real_normed_vector set"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4395  | 
  assumes "convex S" "openin (top_of_set (affine hull S)) T" "S \<inter> T \<noteq> {}"
 | 
| 72238 | 4396  | 
shows "affine hull (S \<inter> T) = affine hull S"  | 
4397  | 
using assms unfolding openin_open  | 
|
4398  | 
by (metis affine_hull_convex_Int_open hull_subset inf.orderE inf_assoc)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4399  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4400  | 
corollary affine_hull_openin:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4401  | 
fixes S :: "'a::real_normed_vector set"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4402  | 
  assumes "openin (top_of_set (affine hull T)) S" "S \<noteq> {}"
 | 
| 72238 | 4403  | 
shows "affine hull S = affine hull T"  | 
4404  | 
using assms unfolding openin_open  | 
|
4405  | 
by (metis affine_affine_hull affine_hull_affine_Int_open hull_hull)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4406  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4407  | 
corollary affine_hull_open:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4408  | 
fixes S :: "'a::real_normed_vector set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4409  | 
  assumes "open S" "S \<noteq> {}"
 | 
| 72238 | 4410  | 
shows "affine hull S = UNIV"  | 
4411  | 
by (metis affine_hull_convex_Int_nonempty_interior assms convex_UNIV hull_UNIV inf_top.left_neutral interior_open)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4412  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4413  | 
lemma aff_dim_convex_Int_nonempty_interior:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4414  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4415  | 
  shows "\<lbrakk>convex S; S \<inter> interior T \<noteq> {}\<rbrakk> \<Longrightarrow> aff_dim(S \<inter> T) = aff_dim S"
 | 
| 72238 | 4416  | 
using aff_dim_affine_hull2 affine_hull_convex_Int_nonempty_interior by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4417  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4418  | 
lemma aff_dim_convex_Int_open:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4419  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4420  | 
  shows "\<lbrakk>convex S; open T; S \<inter> T \<noteq> {}\<rbrakk> \<Longrightarrow>  aff_dim(S \<inter> T) = aff_dim S"
 | 
| 72238 | 4421  | 
using aff_dim_convex_Int_nonempty_interior interior_eq by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4422  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4423  | 
lemma affine_hull_Diff:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4424  | 
fixes S:: "'a::real_normed_vector set"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4425  | 
assumes ope: "openin (top_of_set (affine hull S)) S" and "finite F" "F \<subset> S"  | 
| 72238 | 4426  | 
shows "affine hull (S - F) = affine hull S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4427  | 
proof -  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
4428  | 
have clo: "closedin (top_of_set S) F"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4429  | 
using assms finite_imp_closedin by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4430  | 
  moreover have "S - F \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4431  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4432  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4433  | 
by (metis ope closedin_def topspace_euclidean_subtopology affine_hull_openin openin_trans)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4434  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4435  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4436  | 
lemma affine_hull_halfspace_lt:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4437  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4438  | 
  shows "affine hull {x. a \<bullet> x < r} = (if a = 0 \<and> r \<le> 0 then {} else UNIV)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4439  | 
using halfspace_eq_empty_lt [of a r]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4440  | 
by (simp add: open_halfspace_lt affine_hull_open)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4441  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4442  | 
lemma affine_hull_halfspace_le:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4443  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4444  | 
  shows "affine hull {x. a \<bullet> x \<le> r} = (if a = 0 \<and> r < 0 then {} else UNIV)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4445  | 
proof (cases "a = 0")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4446  | 
case True then show ?thesis by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4447  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4448  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4449  | 
  then have "affine hull closure {x. a \<bullet> x < r} = UNIV"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4450  | 
using affine_hull_halfspace_lt closure_same_affine_hull by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4451  | 
  moreover have "{x. a \<bullet> x < r} \<subseteq> {x. a \<bullet> x \<le> r}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4452  | 
by (simp add: Collect_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4453  | 
ultimately show ?thesis using False antisym_conv hull_mono top_greatest  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4454  | 
by (metis affine_hull_halfspace_lt)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4455  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4456  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4457  | 
lemma affine_hull_halfspace_gt:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4458  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4459  | 
  shows "affine hull {x. a \<bullet> x > r} = (if a = 0 \<and> r \<ge> 0 then {} else UNIV)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4460  | 
using halfspace_eq_empty_gt [of r a]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4461  | 
by (simp add: open_halfspace_gt affine_hull_open)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4462  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4463  | 
lemma affine_hull_halfspace_ge:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4464  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4465  | 
  shows "affine hull {x. a \<bullet> x \<ge> r} = (if a = 0 \<and> r > 0 then {} else UNIV)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4466  | 
using affine_hull_halfspace_le [of "-a" "-r"] by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4467  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4468  | 
lemma aff_dim_halfspace_lt:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4469  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4470  | 
  shows "aff_dim {x. a \<bullet> x < r} =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4471  | 
        (if a = 0 \<and> r \<le> 0 then -1 else DIM('a))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4472  | 
by simp (metis aff_dim_open halfspace_eq_empty_lt open_halfspace_lt)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4473  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4474  | 
lemma aff_dim_halfspace_le:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4475  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4476  | 
  shows "aff_dim {x. a \<bullet> x \<le> r} =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4477  | 
        (if a = 0 \<and> r < 0 then -1 else DIM('a))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4478  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4479  | 
  have "int (DIM('a)) = aff_dim (UNIV::'a set)"
 | 
| 71176 | 4480  | 
by (simp)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4481  | 
  then have "aff_dim (affine hull {x. a \<bullet> x \<le> r}) = DIM('a)" if "(a = 0 \<longrightarrow> r \<ge> 0)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4482  | 
using that by (simp add: affine_hull_halfspace_le not_less)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4483  | 
then show ?thesis  | 
| 71176 | 4484  | 
by (force)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4485  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4486  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4487  | 
lemma aff_dim_halfspace_gt:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4488  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4489  | 
  shows "aff_dim {x. a \<bullet> x > r} =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4490  | 
        (if a = 0 \<and> r \<ge> 0 then -1 else DIM('a))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4491  | 
by simp (metis aff_dim_open halfspace_eq_empty_gt open_halfspace_gt)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4492  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4493  | 
lemma aff_dim_halfspace_ge:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4494  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4495  | 
  shows "aff_dim {x. a \<bullet> x \<ge> r} =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4496  | 
        (if a = 0 \<and> r > 0 then -1 else DIM('a))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4497  | 
using aff_dim_halfspace_le [of "-a" "-r"] by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4498  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4499  | 
proposition aff_dim_eq_hyperplane:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4500  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4501  | 
  shows "aff_dim S = DIM('a) - 1 \<longleftrightarrow> (\<exists>a b. a \<noteq> 0 \<and> affine hull S = {x. a \<bullet> x = b})"
 | 
| 72567 | 4502  | 
(is "?lhs = ?rhs")  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4503  | 
proof (cases "S = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4504  | 
case True then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4505  | 
by (auto simp: dest: hyperplane_eq_Ex)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4506  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4507  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4508  | 
then obtain c where "c \<in> S" by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4509  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4510  | 
proof (cases "c = 0")  | 
| 72567 | 4511  | 
case True  | 
4512  | 
    have "?lhs \<longleftrightarrow> (\<exists>a. a \<noteq> 0 \<and> span ((\<lambda>x. x - c) ` S) = {x. a \<bullet> x = 0})"
 | 
|
4513  | 
by (simp add: aff_dim_eq_dim [of c] \<open>c \<in> S\<close> hull_inc dim_eq_hyperplane del: One_nat_def)  | 
|
4514  | 
also have "... \<longleftrightarrow> ?rhs"  | 
|
4515  | 
using span_zero [of S] True \<open>c \<in> S\<close> affine_hull_span_0 hull_inc  | 
|
4516  | 
by (fastforce simp add: affine_hull_span_gen [of c] \<open>c = 0\<close>)  | 
|
4517  | 
finally show ?thesis .  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4518  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4519  | 
case False  | 
| 67399 | 4520  | 
    have xc_im: "x \<in> (+) c ` {y. a \<bullet> y = 0}" if "a \<bullet> x = a \<bullet> c" for a x
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4521  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4522  | 
have "\<exists>y. a \<bullet> y = 0 \<and> c + y = x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4523  | 
by (metis that add.commute diff_add_cancel inner_commute inner_diff_left right_minus_eq)  | 
| 67399 | 4524  | 
      then show "x \<in> (+) c ` {y. a \<bullet> y = 0}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4525  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4526  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4527  | 
    have 2: "span ((\<lambda>x. x - c) ` S) = {x. a \<bullet> x = 0}"
 | 
| 67399 | 4528  | 
         if "(+) c ` span ((\<lambda>x. x - c) ` S) = {x. a \<bullet> x = b}" for a b
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4529  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4530  | 
have "b = a \<bullet> c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4531  | 
using span_0 that by fastforce  | 
| 67399 | 4532  | 
      with that have "(+) c ` span ((\<lambda>x. x - c) ` S) = {x. a \<bullet> x = a \<bullet> c}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4533  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4534  | 
      then have "span ((\<lambda>x. x - c) ` S) = (\<lambda>x. x - c) ` {x. a \<bullet> x = a \<bullet> c}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4535  | 
by (metis (no_types) image_cong translation_galois uminus_add_conv_diff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4536  | 
      also have "... = {x. a \<bullet> x = 0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4537  | 
by (force simp: inner_distrib inner_diff_right  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4538  | 
intro: image_eqI [where x="x+c" for x])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4539  | 
finally show ?thesis .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4540  | 
qed  | 
| 72567 | 4541  | 
    have "?lhs = (\<exists>a. a \<noteq> 0 \<and> span ((\<lambda>x. x - c) ` S) = {x. a \<bullet> x = 0})"
 | 
4542  | 
by (simp add: aff_dim_eq_dim [of c] \<open>c \<in> S\<close> hull_inc dim_eq_hyperplane del: One_nat_def)  | 
|
4543  | 
also have "... = ?rhs"  | 
|
4544  | 
by (fastforce simp add: affine_hull_span_gen [of c] \<open>c \<in> S\<close> hull_inc inner_distrib intro: xc_im intro!: 2)  | 
|
4545  | 
finally show ?thesis .  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4546  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4547  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4548  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4549  | 
corollary aff_dim_hyperplane [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4550  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4551  | 
  shows "a \<noteq> 0 \<Longrightarrow> aff_dim {x. a \<bullet> x = r} = DIM('a) - 1"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4552  | 
by (metis aff_dim_eq_hyperplane affine_hull_eq affine_hyperplane)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4553  | 
|
| 70136 | 4554  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>Some stepping theorems\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4555  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4556  | 
lemma aff_dim_insert:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4557  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4558  | 
shows "aff_dim (insert a S) = (if a \<in> affine hull S then aff_dim S else aff_dim S + 1)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4559  | 
proof (cases "S = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4560  | 
case True then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4561  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4562  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4563  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4564  | 
then obtain x s' where S: "S = insert x s'" "x \<notin> s'"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4565  | 
by (meson Set.set_insert all_not_in_conv)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4566  | 
show ?thesis using S  | 
| 72238 | 4567  | 
by (force simp add: affine_hull_insert_span_gen span_zero insert_commute [of a] aff_dim_eq_dim [of x] dim_insert)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4568  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4569  | 
|
| 
66297
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4570  | 
lemma affine_dependent_choose:  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4571  | 
fixes a :: "'a :: euclidean_space"  | 
| 69508 | 4572  | 
assumes "\<not>(affine_dependent S)"  | 
| 
66297
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4573  | 
shows "affine_dependent(insert a S) \<longleftrightarrow> a \<notin> S \<and> a \<in> affine hull S"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4574  | 
(is "?lhs = ?rhs")  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4575  | 
proof safe  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4576  | 
assume "affine_dependent (insert a S)" and "a \<in> S"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4577  | 
then show "False"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4578  | 
using \<open>a \<in> S\<close> assms insert_absorb by fastforce  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4579  | 
next  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4580  | 
assume lhs: "affine_dependent (insert a S)"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4581  | 
then have "a \<notin> S"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4582  | 
by (metis (no_types) assms insert_absorb)  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4583  | 
moreover have "finite S"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4584  | 
using affine_independent_iff_card assms by blast  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4585  | 
moreover have "aff_dim (insert a S) \<noteq> int (card S)"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4586  | 
using \<open>finite S\<close> affine_independent_iff_card \<open>a \<notin> S\<close> lhs by fastforce  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4587  | 
ultimately show "a \<in> affine hull S"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4588  | 
by (metis aff_dim_affine_independent aff_dim_insert assms)  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4589  | 
next  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4590  | 
assume "a \<notin> S" and "a \<in> affine hull S"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4591  | 
show "affine_dependent (insert a S)"  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4592  | 
by (simp add: \<open>a \<in> affine hull S\<close> \<open>a \<notin> S\<close> affine_dependent_def)  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4593  | 
qed  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4594  | 
|
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4595  | 
lemma affine_independent_insert:  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4596  | 
fixes a :: "'a :: euclidean_space"  | 
| 69508 | 4597  | 
shows "\<lbrakk>\<not> affine_dependent S; a \<notin> affine hull S\<rbrakk> \<Longrightarrow> \<not> affine_dependent(insert a S)"  | 
| 
66297
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4598  | 
by (simp add: affine_dependent_choose)  | 
| 
 
d425bdf419f5
polytopes: simplical subdivisions, etc.
 
paulson <lp15@cam.ac.uk> 
parents: 
66289 
diff
changeset
 | 
4599  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4600  | 
lemma subspace_bounded_eq_trivial:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4601  | 
fixes S :: "'a::real_normed_vector set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4602  | 
assumes "subspace S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4603  | 
    shows "bounded S \<longleftrightarrow> S = {0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4604  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4605  | 
have "False" if "bounded S" "x \<in> S" "x \<noteq> 0" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4606  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4607  | 
obtain B where B: "\<And>y. y \<in> S \<Longrightarrow> norm y < B" "B > 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4608  | 
using \<open>bounded S\<close> by (force simp: bounded_pos_less)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4609  | 
have "(B / norm x) *\<^sub>R x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4610  | 
using assms subspace_mul \<open>x \<in> S\<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4611  | 
moreover have "norm ((B / norm x) *\<^sub>R x) = B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4612  | 
using that B by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4613  | 
ultimately show False using B by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4614  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4615  | 
  then have "bounded S \<Longrightarrow> S = {0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4616  | 
using assms subspace_0 by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4617  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4618  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4619  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4620  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4621  | 
lemma affine_bounded_eq_trivial:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4622  | 
fixes S :: "'a::real_normed_vector set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4623  | 
assumes "affine S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4624  | 
    shows "bounded S \<longleftrightarrow> S = {} \<or> (\<exists>a. S = {a})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4625  | 
proof (cases "S = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4626  | 
case True then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4627  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4628  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4629  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4630  | 
then obtain b where "b \<in> S" by blast  | 
| 72238 | 4631  | 
with False assms  | 
4632  | 
  have "bounded S \<Longrightarrow> S = {b}"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4633  | 
using affine_diffs_subspace [OF assms \<open>b \<in> S\<close>]  | 
| 72238 | 4634  | 
by (metis (no_types, lifting) ab_group_add_class.ab_left_minus bounded_translation image_empty image_insert subspace_bounded_eq_trivial translation_invert)  | 
4635  | 
then show ?thesis by auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4636  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4637  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4638  | 
lemma affine_bounded_eq_lowdim:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4639  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4640  | 
assumes "affine S"  | 
| 72238 | 4641  | 
shows "bounded S \<longleftrightarrow> aff_dim S \<le> 0"  | 
4642  | 
proof  | 
|
4643  | 
show "aff_dim S \<le> 0 \<Longrightarrow> bounded S"  | 
|
4644  | 
by (metis aff_dim_sing aff_dim_subset affine_dim_equal affine_sing all_not_in_conv assms bounded_empty bounded_insert dual_order.antisym empty_subsetI insert_subset)  | 
|
4645  | 
qed (use affine_bounded_eq_trivial assms in fastforce)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4646  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4647  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4648  | 
lemma bounded_hyperplane_eq_trivial_0:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4649  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4650  | 
assumes "a \<noteq> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4651  | 
  shows "bounded {x. a \<bullet> x = 0} \<longleftrightarrow> DIM('a) = 1"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4652  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4653  | 
  assume "bounded {x. a \<bullet> x = 0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4654  | 
  then have "aff_dim {x. a \<bullet> x = 0} \<le> 0"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4655  | 
by (simp add: affine_bounded_eq_lowdim affine_hyperplane)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4656  | 
  with assms show "DIM('a) = 1"
 | 
| 71176 | 4657  | 
by (simp add: le_Suc_eq)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4658  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4659  | 
  assume "DIM('a) = 1"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4660  | 
  then show "bounded {x. a \<bullet> x = 0}"
 | 
| 71176 | 4661  | 
by (simp add: affine_bounded_eq_lowdim affine_hyperplane assms)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4662  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4663  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4664  | 
lemma bounded_hyperplane_eq_trivial:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4665  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4666  | 
  shows "bounded {x. a \<bullet> x = r} \<longleftrightarrow> (if a = 0 then r \<noteq> 0 else DIM('a) = 1)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4667  | 
proof (simp add: bounded_hyperplane_eq_trivial_0, clarify)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4668  | 
assume "r \<noteq> 0" "a \<noteq> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4669  | 
  have "aff_dim {x. y \<bullet> x = 0} = aff_dim {x. a \<bullet> x = r}" if "y \<noteq> 0" for y::'a
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4670  | 
by (metis that \<open>a \<noteq> 0\<close> aff_dim_hyperplane)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4671  | 
  then show "bounded {x. a \<bullet> x = r} = (DIM('a) = Suc 0)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4672  | 
by (metis One_nat_def \<open>a \<noteq> 0\<close> affine_bounded_eq_lowdim affine_hyperplane bounded_hyperplane_eq_trivial_0)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4673  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4674  | 
|
| 70136 | 4675  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>General case without assuming closure and getting non-strict separation\<close>  | 
4676  | 
||
4677  | 
proposition\<^marker>\<open>tag unimportant\<close> separating_hyperplane_closed_point_inset:  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4678  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4679  | 
  assumes "convex S" "closed S" "S \<noteq> {}" "z \<notin> S"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4680  | 
obtains a b where "a \<in> S" "(a - z) \<bullet> z < b" "\<And>x. x \<in> S \<Longrightarrow> b < (a - z) \<bullet> x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4681  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4682  | 
obtain y where "y \<in> S" and y: "\<And>u. u \<in> S \<Longrightarrow> dist z y \<le> dist z u"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4683  | 
using distance_attains_inf [of S z] assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4684  | 
then have *: "(y - z) \<bullet> z < (y - z) \<bullet> z + (norm (y - z))\<^sup>2 / 2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4685  | 
using \<open>y \<in> S\<close> \<open>z \<notin> S\<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4686  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4687  | 
proof (rule that [OF \<open>y \<in> S\<close> *])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4688  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4689  | 
assume "x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4690  | 
have yz: "0 < (y - z) \<bullet> (y - z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4691  | 
using \<open>y \<in> S\<close> \<open>z \<notin> S\<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4692  | 
    { assume 0: "0 < ((z - y) \<bullet> (x - y))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4693  | 
with any_closest_point_dot [OF \<open>convex S\<close> \<open>closed S\<close>]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4694  | 
have False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4695  | 
using y \<open>x \<in> S\<close> \<open>y \<in> S\<close> not_less by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4696  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4697  | 
then have "0 \<le> ((y - z) \<bullet> (x - y))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4698  | 
by (force simp: not_less inner_diff_left)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4699  | 
with yz have "0 < 2 * ((y - z) \<bullet> (x - y)) + (y - z) \<bullet> (y - z)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4700  | 
by (simp add: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4701  | 
then show "(y - z) \<bullet> z + (norm (y - z))\<^sup>2 / 2 < (y - z) \<bullet> x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4702  | 
by (simp add: field_simps inner_diff_left inner_diff_right dot_square_norm [symmetric])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4703  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4704  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4705  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4706  | 
lemma separating_hyperplane_closed_0_inset:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4707  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4708  | 
  assumes "convex S" "closed S" "S \<noteq> {}" "0 \<notin> S"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4709  | 
obtains a b where "a \<in> S" "a \<noteq> 0" "0 < b" "\<And>x. x \<in> S \<Longrightarrow> a \<bullet> x > b"  | 
| 72238 | 4710  | 
using separating_hyperplane_closed_point_inset [OF assms] by simp (metis \<open>0 \<notin> S\<close>)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4711  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4712  | 
|
| 70136 | 4713  | 
proposition\<^marker>\<open>tag unimportant\<close> separating_hyperplane_set_0_inspan:  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4714  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4715  | 
  assumes "convex S" "S \<noteq> {}" "0 \<notin> S"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4716  | 
obtains a where "a \<in> span S" "a \<noteq> 0" "\<And>x. x \<in> S \<Longrightarrow> 0 \<le> a \<bullet> x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4717  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4718  | 
  define k where [abs_def]: "k c = {x. 0 \<le> c \<bullet> x}" for c :: 'a
 | 
| 72238 | 4719  | 
  have "span S \<inter> frontier (cball 0 1) \<inter> \<Inter>f' \<noteq> {}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4720  | 
if f': "finite f'" "f' \<subseteq> k ` S" for f'  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4721  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4722  | 
obtain C where "C \<subseteq> S" "finite C" and C: "f' = k ` C"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4723  | 
using finite_subset_image [OF f'] by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4724  | 
obtain a where "a \<in> S" "a \<noteq> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4725  | 
      using \<open>S \<noteq> {}\<close> \<open>0 \<notin> S\<close> ex_in_conv by blast
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4726  | 
then have "norm (a /\<^sub>R (norm a)) = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4727  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4728  | 
moreover have "a /\<^sub>R (norm a) \<in> span S"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
4729  | 
by (simp add: \<open>a \<in> S\<close> span_scale span_base)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4730  | 
ultimately have ass: "a /\<^sub>R (norm a) \<in> span S \<inter> sphere 0 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4731  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4732  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4733  | 
    proof (cases "C = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4734  | 
case True with C ass show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4735  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4736  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4737  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4738  | 
have "closed (convex hull C)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4739  | 
using \<open>finite C\<close> compact_eq_bounded_closed finite_imp_compact_convex_hull by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4740  | 
      moreover have "convex hull C \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4741  | 
by (simp add: False)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4742  | 
moreover have "0 \<notin> convex hull C"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4743  | 
by (metis \<open>C \<subseteq> S\<close> \<open>convex S\<close> \<open>0 \<notin> S\<close> convex_hull_subset hull_same insert_absorb insert_subset)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4744  | 
ultimately obtain a b  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4745  | 
where "a \<in> convex hull C" "a \<noteq> 0" "0 < b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4746  | 
and ab: "\<And>x. x \<in> convex hull C \<Longrightarrow> a \<bullet> x > b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4747  | 
using separating_hyperplane_closed_0_inset by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4748  | 
then have "a \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4749  | 
by (metis \<open>C \<subseteq> S\<close> assms(1) subsetCE subset_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4750  | 
moreover have "norm (a /\<^sub>R (norm a)) = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4751  | 
using \<open>a \<noteq> 0\<close> by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4752  | 
moreover have "a /\<^sub>R (norm a) \<in> span S"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
4753  | 
by (simp add: \<open>a \<in> S\<close> span_scale span_base)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4754  | 
ultimately have ass: "a /\<^sub>R (norm a) \<in> span S \<inter> sphere 0 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4755  | 
by simp  | 
| 72238 | 4756  | 
have "\<And>x. \<lbrakk>a \<noteq> 0; x \<in> C\<rbrakk> \<Longrightarrow> 0 \<le> x \<bullet> a"  | 
4757  | 
using ab \<open>0 < b\<close> by (metis hull_inc inner_commute less_eq_real_def less_trans)  | 
|
4758  | 
      then have aa: "a /\<^sub>R (norm a) \<in> (\<Inter>c\<in>C. {x. 0 \<le> c \<bullet> x})"
 | 
|
4759  | 
by (auto simp add: field_split_simps)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4760  | 
show ?thesis  | 
| 72238 | 4761  | 
unfolding C k_def  | 
4762  | 
using ass aa Int_iff empty_iff by force  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4763  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4764  | 
qed  | 
| 72238 | 4765  | 
moreover have "\<And>T. T \<in> k ` S \<Longrightarrow> closed T"  | 
4766  | 
using closed_halfspace_ge k_def by blast  | 
|
4767  | 
  ultimately have "(span S \<inter> frontier(cball 0 1)) \<inter> (\<Inter> (k ` S)) \<noteq> {}"
 | 
|
4768  | 
by (metis compact_imp_fip closed_Int_compact closed_span compact_cball compact_frontier)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4769  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4770  | 
unfolding set_eq_iff k_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4771  | 
by simp (metis inner_commute norm_eq_zero that zero_neq_one)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4772  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4773  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4774  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4775  | 
lemma separating_hyperplane_set_point_inaff:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4776  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4777  | 
  assumes "convex S" "S \<noteq> {}" and zno: "z \<notin> S"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4778  | 
obtains a b where "(z + a) \<in> affine hull (insert z S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4779  | 
and "a \<noteq> 0" and "a \<bullet> z \<le> b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4780  | 
and "\<And>x. x \<in> S \<Longrightarrow> a \<bullet> x \<ge> b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4781  | 
proof -  | 
| 69661 | 4782  | 
from separating_hyperplane_set_0_inspan [of "image (\<lambda>x. -z + x) S"]  | 
| 67399 | 4783  | 
have "convex ((+) (- z) ` S)"  | 
| 69661 | 4784  | 
using \<open>convex S\<close> by simp  | 
| 67399 | 4785  | 
  moreover have "(+) (- z) ` S \<noteq> {}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4786  | 
    by (simp add: \<open>S \<noteq> {}\<close>)
 | 
| 67399 | 4787  | 
moreover have "0 \<notin> (+) (- z) ` S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4788  | 
using zno by auto  | 
| 67399 | 4789  | 
ultimately obtain a where "a \<in> span ((+) (- z) ` S)" "a \<noteq> 0"  | 
4790  | 
and a: "\<And>x. x \<in> ((+) (- z) ` S) \<Longrightarrow> 0 \<le> a \<bullet> x"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4791  | 
using separating_hyperplane_set_0_inspan [of "image (\<lambda>x. -z + x) S"]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4792  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4793  | 
then have szx: "\<And>x. x \<in> S \<Longrightarrow> a \<bullet> z \<le> a \<bullet> x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4794  | 
by (metis (no_types, lifting) imageI inner_minus_right inner_right_distrib minus_add neg_le_0_iff_le neg_le_iff_le real_add_le_0_iff)  | 
| 72238 | 4795  | 
moreover  | 
4796  | 
have "z + a \<in> affine hull insert z S"  | 
|
4797  | 
using \<open>a \<in> span ((+) (- z) ` S)\<close> affine_hull_insert_span_gen by blast  | 
|
4798  | 
ultimately show ?thesis  | 
|
4799  | 
using \<open>a \<noteq> 0\<close> szx that by auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4800  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4801  | 
|
| 70136 | 4802  | 
proposition\<^marker>\<open>tag unimportant\<close> supporting_hyperplane_rel_boundary:  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4803  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4804  | 
assumes "convex S" "x \<in> S" and xno: "x \<notin> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4805  | 
obtains a where "a \<noteq> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4806  | 
and "\<And>y. y \<in> S \<Longrightarrow> a \<bullet> x \<le> a \<bullet> y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4807  | 
and "\<And>y. y \<in> rel_interior S \<Longrightarrow> a \<bullet> x < a \<bullet> y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4808  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4809  | 
obtain a b where aff: "(x + a) \<in> affine hull (insert x (rel_interior S))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4810  | 
and "a \<noteq> 0" and "a \<bullet> x \<le> b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4811  | 
and ageb: "\<And>u. u \<in> (rel_interior S) \<Longrightarrow> a \<bullet> u \<ge> b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4812  | 
using separating_hyperplane_set_point_inaff [of "rel_interior S" x] assms  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4813  | 
by (auto simp: rel_interior_eq_empty convex_rel_interior)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4814  | 
have le_ay: "a \<bullet> x \<le> a \<bullet> y" if "y \<in> S" for y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4815  | 
proof -  | 
| 67399 | 4816  | 
have con: "continuous_on (closure (rel_interior S)) ((\<bullet>) a)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4817  | 
by (rule continuous_intros continuous_on_subset | blast)+  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4818  | 
have y: "y \<in> closure (rel_interior S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4819  | 
using \<open>convex S\<close> closure_def convex_closure_rel_interior \<open>y \<in> S\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4820  | 
by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4821  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4822  | 
using continuous_ge_on_closure [OF con y] ageb \<open>a \<bullet> x \<le> b\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4823  | 
by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4824  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4825  | 
have 3: "a \<bullet> x < a \<bullet> y" if "y \<in> rel_interior S" for y  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4826  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4827  | 
obtain e where "0 < e" "y \<in> S" and e: "cball y e \<inter> affine hull S \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4828  | 
using \<open>y \<in> rel_interior S\<close> by (force simp: rel_interior_cball)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4829  | 
define y' where "y' = y - (e / norm a) *\<^sub>R ((x + a) - x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4830  | 
have "y' \<in> cball y e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4831  | 
unfolding y'_def using \<open>0 < e\<close> by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4832  | 
moreover have "y' \<in> affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4833  | 
unfolding y'_def  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4834  | 
by (metis \<open>x \<in> S\<close> \<open>y \<in> S\<close> \<open>convex S\<close> aff affine_affine_hull hull_redundant  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4835  | 
rel_interior_same_affine_hull hull_inc mem_affine_3_minus2)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4836  | 
ultimately have "y' \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4837  | 
using e by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4838  | 
have "a \<bullet> x \<le> a \<bullet> y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4839  | 
using le_ay \<open>a \<noteq> 0\<close> \<open>y \<in> S\<close> by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4840  | 
moreover have "a \<bullet> x \<noteq> a \<bullet> y"  | 
| 72238 | 4841  | 
using le_ay [OF \<open>y' \<in> S\<close>] \<open>a \<noteq> 0\<close> \<open>0 < e\<close> not_le  | 
4842  | 
by (fastforce simp add: y'_def inner_diff dot_square_norm power2_eq_square)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4843  | 
ultimately show ?thesis by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4844  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4845  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4846  | 
by (rule that [OF \<open>a \<noteq> 0\<close> le_ay 3])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4847  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4848  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4849  | 
lemma supporting_hyperplane_relative_frontier:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4850  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4851  | 
assumes "convex S" "x \<in> closure S" "x \<notin> rel_interior S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4852  | 
obtains a where "a \<noteq> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4853  | 
and "\<And>y. y \<in> closure S \<Longrightarrow> a \<bullet> x \<le> a \<bullet> y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4854  | 
and "\<And>y. y \<in> rel_interior S \<Longrightarrow> a \<bullet> x < a \<bullet> y"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4855  | 
using supporting_hyperplane_rel_boundary [of "closure S" x]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4856  | 
by (metis assms convex_closure convex_rel_interior_closure)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4857  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4858  | 
|
| 70136 | 4859  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open> Some results on decomposing convex hulls: intersections, simplicial subdivision\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4860  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4861  | 
lemma  | 
| 72567 | 4862  | 
fixes S :: "'a::euclidean_space set"  | 
4863  | 
assumes "\<not> affine_dependent(S \<union> T)"  | 
|
4864  | 
shows convex_hull_Int_subset: "convex hull S \<inter> convex hull T \<subseteq> convex hull (S \<inter> T)" (is ?C)  | 
|
4865  | 
and affine_hull_Int_subset: "affine hull S \<inter> affine hull T \<subseteq> affine hull (S \<inter> T)" (is ?A)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4866  | 
proof -  | 
| 72567 | 4867  | 
have [simp]: "finite S" "finite T"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4868  | 
using aff_independent_finite assms by blast+  | 
| 72567 | 4869  | 
have "sum u (S \<inter> T) = 1 \<and>  | 
4870  | 
(\<Sum>v\<in>S \<inter> T. u v *\<^sub>R v) = (\<Sum>v\<in>S. u v *\<^sub>R v)"  | 
|
4871  | 
if [simp]: "sum u S = 1"  | 
|
4872  | 
"sum v T = 1"  | 
|
4873  | 
and eq: "(\<Sum>x\<in>T. v x *\<^sub>R x) = (\<Sum>x\<in>S. u x *\<^sub>R x)" for u v  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4874  | 
proof -  | 
| 72567 | 4875  | 
define f where "f x = (if x \<in> S then u x else 0) - (if x \<in> T then v x else 0)" for x  | 
4876  | 
have "sum f (S \<union> T) = 0"  | 
|
4877  | 
by (simp add: f_def sum_Un sum_subtractf flip: sum.inter_restrict)  | 
|
4878  | 
moreover have "(\<Sum>x\<in>(S \<union> T). f x *\<^sub>R x) = 0"  | 
|
4879  | 
by (simp add: eq f_def sum_Un scaleR_left_diff_distrib sum_subtractf if_smult flip: sum.inter_restrict cong: if_cong)  | 
|
4880  | 
ultimately have "\<And>v. v \<in> S \<union> T \<Longrightarrow> f v = 0"  | 
|
4881  | 
using aff_independent_finite assms unfolding affine_dependent_explicit  | 
|
4882  | 
by blast  | 
|
4883  | 
then have u [simp]: "\<And>x. x \<in> S \<Longrightarrow> u x = (if x \<in> T then v x else 0)"  | 
|
4884  | 
by (simp add: f_def) presburger  | 
|
4885  | 
have "sum u (S \<inter> T) = sum u S"  | 
|
4886  | 
by (simp add: sum.inter_restrict)  | 
|
4887  | 
then have "sum u (S \<inter> T) = 1"  | 
|
4888  | 
using that by linarith  | 
|
4889  | 
moreover have "(\<Sum>v\<in>S \<inter> T. u v *\<^sub>R v) = (\<Sum>v\<in>S. u v *\<^sub>R v)"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4890  | 
by (auto simp: if_smult sum.inter_restrict intro: sum.cong)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4891  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4892  | 
by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4893  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4894  | 
then show ?A ?C  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4895  | 
by (auto simp: convex_hull_finite affine_hull_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4896  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4897  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4898  | 
|
| 70136 | 4899  | 
proposition\<^marker>\<open>tag unimportant\<close> affine_hull_Int:  | 
| 72567 | 4900  | 
fixes S :: "'a::euclidean_space set"  | 
4901  | 
assumes "\<not> affine_dependent(S \<union> T)"  | 
|
4902  | 
shows "affine hull (S \<inter> T) = affine hull S \<inter> affine hull T"  | 
|
| 72238 | 4903  | 
by (simp add: affine_hull_Int_subset assms hull_mono subset_antisym)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4904  | 
|
| 70136 | 4905  | 
proposition\<^marker>\<open>tag unimportant\<close> convex_hull_Int:  | 
| 72567 | 4906  | 
fixes S :: "'a::euclidean_space set"  | 
4907  | 
assumes "\<not> affine_dependent(S \<union> T)"  | 
|
4908  | 
shows "convex hull (S \<inter> T) = convex hull S \<inter> convex hull T"  | 
|
| 72238 | 4909  | 
by (simp add: convex_hull_Int_subset assms hull_mono subset_antisym)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4910  | 
|
| 70136 | 4911  | 
proposition\<^marker>\<open>tag unimportant\<close>  | 
| 72567 | 4912  | 
fixes S :: "'a::euclidean_space set set"  | 
4913  | 
assumes "\<not> affine_dependent (\<Union>S)"  | 
|
4914  | 
shows affine_hull_Inter: "affine hull (\<Inter>S) = (\<Inter>T\<in>S. affine hull T)" (is "?A")  | 
|
4915  | 
and convex_hull_Inter: "convex hull (\<Inter>S) = (\<Inter>T\<in>S. convex hull T)" (is "?C")  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4916  | 
proof -  | 
| 72567 | 4917  | 
have "finite S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4918  | 
using aff_independent_finite assms finite_UnionD by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4919  | 
then have "?A \<and> ?C" using assms  | 
| 72567 | 4920  | 
proof (induction S rule: finite_induct)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4921  | 
case empty then show ?case by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4922  | 
next  | 
| 72567 | 4923  | 
case (insert T F)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4924  | 
then show ?case  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4925  | 
    proof (cases "F={}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4926  | 
case True then show ?thesis by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4927  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4928  | 
case False  | 
| 72567 | 4929  | 
with "insert.prems" have [simp]: "\<not> affine_dependent (T \<union> \<Inter>F)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4930  | 
by (auto intro: affine_dependent_subset)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4931  | 
have [simp]: "\<not> affine_dependent (\<Union>F)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4932  | 
using affine_independent_subset insert.prems by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4933  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4934  | 
by (simp add: affine_hull_Int convex_hull_Int insert.IH)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4935  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4936  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4937  | 
then show "?A" "?C"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4938  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4939  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4940  | 
|
| 70136 | 4941  | 
proposition\<^marker>\<open>tag unimportant\<close> in_convex_hull_exchange_unique:  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4942  | 
fixes S :: "'a::euclidean_space set"  | 
| 69508 | 4943  | 
assumes naff: "\<not> affine_dependent S" and a: "a \<in> convex hull S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4944  | 
and S: "T \<subseteq> S" "T' \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4945  | 
and x: "x \<in> convex hull (insert a T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4946  | 
and x': "x \<in> convex hull (insert a T')"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4947  | 
shows "x \<in> convex hull (insert a (T \<inter> T'))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4948  | 
proof (cases "a \<in> S")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4949  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4950  | 
then have "\<not> affine_dependent (insert a T \<union> insert a T')"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4951  | 
using affine_dependent_subset assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4952  | 
then have "x \<in> convex hull (insert a T \<inter> insert a T')"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4953  | 
by (metis IntI convex_hull_Int x x')  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4954  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4955  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4956  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4957  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4958  | 
then have anot: "a \<notin> T" "a \<notin> T'"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4959  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4960  | 
have [simp]: "finite S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4961  | 
by (simp add: aff_independent_finite assms)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4962  | 
then obtain b where b0: "\<And>s. s \<in> S \<Longrightarrow> 0 \<le> b s"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4963  | 
and b1: "sum b S = 1" and aeq: "a = (\<Sum>s\<in>S. b s *\<^sub>R s)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4964  | 
using a by (auto simp: convex_hull_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4965  | 
have fin [simp]: "finite T" "finite T'"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4966  | 
using assms infinite_super \<open>finite S\<close> by blast+  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4967  | 
then obtain c c' where c0: "\<And>t. t \<in> insert a T \<Longrightarrow> 0 \<le> c t"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4968  | 
and c1: "sum c (insert a T) = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4969  | 
and xeq: "x = (\<Sum>t \<in> insert a T. c t *\<^sub>R t)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4970  | 
and c'0: "\<And>t. t \<in> insert a T' \<Longrightarrow> 0 \<le> c' t"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4971  | 
and c'1: "sum c' (insert a T') = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4972  | 
and x'eq: "x = (\<Sum>t \<in> insert a T'. c' t *\<^sub>R t)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4973  | 
using x x' by (auto simp: convex_hull_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4974  | 
with fin anot  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4975  | 
have sumTT': "sum c T = 1 - c a" "sum c' T' = 1 - c' a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4976  | 
and wsumT: "(\<Sum>t \<in> T. c t *\<^sub>R t) = x - c a *\<^sub>R a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4977  | 
by simp_all  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4978  | 
have wsumT': "(\<Sum>t \<in> T'. c' t *\<^sub>R t) = x - c' a *\<^sub>R a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4979  | 
using x'eq fin anot by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4980  | 
define cc where "cc \<equiv> \<lambda>x. if x \<in> T then c x else 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4981  | 
define cc' where "cc' \<equiv> \<lambda>x. if x \<in> T' then c' x else 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4982  | 
define dd where "dd \<equiv> \<lambda>x. cc x - cc' x + (c a - c' a) * b x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4983  | 
have sumSS': "sum cc S = 1 - c a" "sum cc' S = 1 - c' a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4984  | 
unfolding cc_def cc'_def using S  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4985  | 
by (simp_all add: Int_absorb1 Int_absorb2 sum_subtractf sum.inter_restrict [symmetric] sumTT')  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4986  | 
have wsumSS: "(\<Sum>t \<in> S. cc t *\<^sub>R t) = x - c a *\<^sub>R a" "(\<Sum>t \<in> S. cc' t *\<^sub>R t) = x - c' a *\<^sub>R a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4987  | 
unfolding cc_def cc'_def using S  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4988  | 
by (simp_all add: Int_absorb1 Int_absorb2 if_smult sum.inter_restrict [symmetric] wsumT wsumT' cong: if_cong)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4989  | 
have sum_dd0: "sum dd S = 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4990  | 
unfolding dd_def using S  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4991  | 
by (simp add: sumSS' comm_monoid_add_class.sum.distrib sum_subtractf  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4992  | 
algebra_simps sum_distrib_right [symmetric] b1)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4993  | 
have "(\<Sum>v\<in>S. (b v * x) *\<^sub>R v) = x *\<^sub>R (\<Sum>v\<in>S. b v *\<^sub>R v)" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4994  | 
by (simp add: pth_5 real_vector.scale_sum_right mult.commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4995  | 
then have *: "(\<Sum>v\<in>S. (b v * x) *\<^sub>R v) = x *\<^sub>R a" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4996  | 
using aeq by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4997  | 
have "(\<Sum>v \<in> S. dd v *\<^sub>R v) = 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4998  | 
unfolding dd_def using S  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
4999  | 
by (simp add: * wsumSS sum.distrib sum_subtractf algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5000  | 
then have dd0: "dd v = 0" if "v \<in> S" for v  | 
| 72238 | 5001  | 
using naff [unfolded affine_dependent_explicit not_ex, rule_format, of S dd]  | 
5002  | 
using that sum_dd0 by force  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5003  | 
consider "c' a \<le> c a" | "c a \<le> c' a" by linarith  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5004  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5005  | 
proof cases  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5006  | 
case 1  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5007  | 
then have "sum cc S \<le> sum cc' S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5008  | 
by (simp add: sumSS')  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5009  | 
then have le: "cc x \<le> cc' x" if "x \<in> S" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5010  | 
using dd0 [OF that] 1 b0 mult_left_mono that  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5011  | 
by (fastforce simp add: dd_def algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5012  | 
have cc0: "cc x = 0" if "x \<in> S" "x \<notin> T \<inter> T'" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5013  | 
using le [OF \<open>x \<in> S\<close>] that c0  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5014  | 
by (force simp: cc_def cc'_def split: if_split_asm)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5015  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5016  | 
proof (simp add: convex_hull_finite, intro exI conjI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5017  | 
show "\<forall>x\<in>T \<inter> T'. 0 \<le> (cc(a := c a)) x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5018  | 
by (simp add: c0 cc_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5019  | 
show "0 \<le> (cc(a := c a)) a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5020  | 
by (simp add: c0)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5021  | 
have "sum (cc(a := c a)) (insert a (T \<inter> T')) = c a + sum (cc(a := c a)) (T \<inter> T')"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5022  | 
by (simp add: anot)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5023  | 
also have "... = c a + sum (cc(a := c a)) S"  | 
| 72238 | 5024  | 
using \<open>T \<subseteq> S\<close> False cc0 cc_def \<open>a \<notin> S\<close> by (fastforce intro!: sum.mono_neutral_left split: if_split_asm)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5025  | 
also have "... = c a + (1 - c a)"  | 
| 71633 | 5026  | 
by (metis \<open>a \<notin> S\<close> fun_upd_other sum.cong sumSS'(1))  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5027  | 
finally show "sum (cc(a := c a)) (insert a (T \<inter> T')) = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5028  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5029  | 
have "(\<Sum>x\<in>insert a (T \<inter> T'). (cc(a := c a)) x *\<^sub>R x) = c a *\<^sub>R a + (\<Sum>x \<in> T \<inter> T'. (cc(a := c a)) x *\<^sub>R x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5030  | 
by (simp add: anot)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5031  | 
also have "... = c a *\<^sub>R a + (\<Sum>x \<in> S. (cc(a := c a)) x *\<^sub>R x)"  | 
| 72238 | 5032  | 
using \<open>T \<subseteq> S\<close> False cc0 by (fastforce intro!: sum.mono_neutral_left split: if_split_asm)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5033  | 
also have "... = c a *\<^sub>R a + x - c a *\<^sub>R a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5034  | 
by (simp add: wsumSS \<open>a \<notin> S\<close> if_smult sum_delta_notmem)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5035  | 
finally show "(\<Sum>x\<in>insert a (T \<inter> T'). (cc(a := c a)) x *\<^sub>R x) = x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5036  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5037  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5038  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5039  | 
case 2  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5040  | 
then have "sum cc' S \<le> sum cc S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5041  | 
by (simp add: sumSS')  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5042  | 
then have le: "cc' x \<le> cc x" if "x \<in> S" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5043  | 
using dd0 [OF that] 2 b0 mult_left_mono that  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5044  | 
by (fastforce simp add: dd_def algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5045  | 
have cc0: "cc' x = 0" if "x \<in> S" "x \<notin> T \<inter> T'" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5046  | 
using le [OF \<open>x \<in> S\<close>] that c'0  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5047  | 
by (force simp: cc_def cc'_def split: if_split_asm)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5048  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5049  | 
proof (simp add: convex_hull_finite, intro exI conjI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5050  | 
show "\<forall>x\<in>T \<inter> T'. 0 \<le> (cc'(a := c' a)) x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5051  | 
by (simp add: c'0 cc'_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5052  | 
show "0 \<le> (cc'(a := c' a)) a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5053  | 
by (simp add: c'0)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5054  | 
have "sum (cc'(a := c' a)) (insert a (T \<inter> T')) = c' a + sum (cc'(a := c' a)) (T \<inter> T')"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5055  | 
by (simp add: anot)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5056  | 
also have "... = c' a + sum (cc'(a := c' a)) S"  | 
| 72238 | 5057  | 
using \<open>T \<subseteq> S\<close> False cc0 by (fastforce intro!: sum.mono_neutral_left split: if_split_asm)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5058  | 
also have "... = c' a + (1 - c' a)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5059  | 
by (metis \<open>a \<notin> S\<close> fun_upd_other sum.cong sumSS')  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5060  | 
finally show "sum (cc'(a := c' a)) (insert a (T \<inter> T')) = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5061  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5062  | 
have "(\<Sum>x\<in>insert a (T \<inter> T'). (cc'(a := c' a)) x *\<^sub>R x) = c' a *\<^sub>R a + (\<Sum>x \<in> T \<inter> T'. (cc'(a := c' a)) x *\<^sub>R x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5063  | 
by (simp add: anot)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5064  | 
also have "... = c' a *\<^sub>R a + (\<Sum>x \<in> S. (cc'(a := c' a)) x *\<^sub>R x)"  | 
| 72238 | 5065  | 
using \<open>T \<subseteq> S\<close> False cc0 by (fastforce intro!: sum.mono_neutral_left split: if_split_asm)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5066  | 
also have "... = c a *\<^sub>R a + x - c a *\<^sub>R a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5067  | 
by (simp add: wsumSS \<open>a \<notin> S\<close> if_smult sum_delta_notmem)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5068  | 
finally show "(\<Sum>x\<in>insert a (T \<inter> T'). (cc'(a := c' a)) x *\<^sub>R x) = x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5069  | 
by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5070  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5071  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5072  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5073  | 
|
| 70136 | 5074  | 
corollary\<^marker>\<open>tag unimportant\<close> convex_hull_exchange_Int:  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5075  | 
fixes a :: "'a::euclidean_space"  | 
| 69508 | 5076  | 
assumes "\<not> affine_dependent S" "a \<in> convex hull S" "T \<subseteq> S" "T' \<subseteq> S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5077  | 
shows "(convex hull (insert a T)) \<inter> (convex hull (insert a T')) =  | 
| 72238 | 5078  | 
convex hull (insert a (T \<inter> T'))" (is "?lhs = ?rhs")  | 
5079  | 
proof (rule subset_antisym)  | 
|
5080  | 
show "?lhs \<subseteq> ?rhs"  | 
|
5081  | 
using in_convex_hull_exchange_unique assms by blast  | 
|
5082  | 
show "?rhs \<subseteq> ?lhs"  | 
|
5083  | 
by (metis hull_mono inf_le1 inf_le2 insert_inter_insert le_inf_iff)  | 
|
5084  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5085  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5086  | 
lemma Int_closed_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5087  | 
fixes b :: "'a::euclidean_space"  | 
| 69508 | 5088  | 
  assumes "b \<in> closed_segment a c \<or> \<not> collinear{a,b,c}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5089  | 
    shows "closed_segment a b \<inter> closed_segment b c = {b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5090  | 
proof (cases "c = a")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5091  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5092  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5093  | 
using assms collinear_3_eq_affine_dependent by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5094  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5095  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5096  | 
from assms show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5097  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5098  | 
assume "b \<in> closed_segment a c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5099  | 
    moreover have "\<not> affine_dependent {a, c}"
 | 
| 71176 | 5100  | 
by (simp)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5101  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5102  | 
      using False convex_hull_exchange_Int [of "{a,c}" b "{a}" "{c}"]
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5103  | 
by (simp add: segment_convex_hull insert_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5104  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5105  | 
    assume ncoll: "\<not> collinear {a, b, c}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5106  | 
    have False if "closed_segment a b \<inter> closed_segment b c \<noteq> {b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5107  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5108  | 
have "b \<in> closed_segment a b" and "b \<in> closed_segment b c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5109  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5110  | 
with that obtain d where "b \<noteq> d" "d \<in> closed_segment a b" "d \<in> closed_segment b c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5111  | 
by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5112  | 
      then have d: "collinear {a, d, b}"  "collinear {b, d, c}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5113  | 
by (auto simp: between_mem_segment between_imp_collinear)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5114  | 
      have "collinear {a, b, c}"
 | 
| 72238 | 5115  | 
by (metis (full_types) \<open>b \<noteq> d\<close> collinear_3_trans d insert_commute)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5116  | 
with ncoll show False ..  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5117  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5118  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5119  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5120  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5121  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5122  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5123  | 
lemma affine_hull_finite_intersection_hyperplanes:  | 
| 72238 | 5124  | 
fixes S :: "'a::euclidean_space set"  | 
5125  | 
obtains \<F> where  | 
|
5126  | 
"finite \<F>"  | 
|
5127  | 
     "of_nat (card \<F>) + aff_dim S = DIM('a)"
 | 
|
5128  | 
"affine hull S = \<Inter>\<F>"  | 
|
5129  | 
     "\<And>h. h \<in> \<F> \<Longrightarrow> \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x = b}"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5130  | 
proof -  | 
| 72238 | 5131  | 
obtain b where "b \<subseteq> S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5132  | 
and indb: "\<not> affine_dependent b"  | 
| 72238 | 5133  | 
and eq: "affine hull S = affine hull b"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5134  | 
using affine_basis_exists by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5135  | 
obtain c where indc: "\<not> affine_dependent c" and "b \<subseteq> c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5136  | 
and affc: "affine hull c = UNIV"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5137  | 
by (metis extend_to_affine_basis affine_UNIV hull_same indb subset_UNIV)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5138  | 
then have "finite c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5139  | 
by (simp add: aff_independent_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5140  | 
then have fbc: "finite b" "card b \<le> card c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5141  | 
using \<open>b \<subseteq> c\<close> infinite_super by (auto simp: card_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5142  | 
  have imeq: "(\<lambda>x. affine hull x) ` ((\<lambda>a. c - {a}) ` (c - b)) = ((\<lambda>a. affine hull (c - {a})) ` (c - b))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5143  | 
by blast  | 
| 72238 | 5144  | 
  have card_cb: "(card (c - b)) + aff_dim S = DIM('a)"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5145  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5146  | 
have aff: "aff_dim (UNIV::'a set) = aff_dim c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5147  | 
by (metis aff_dim_affine_hull affc)  | 
| 72238 | 5148  | 
have "aff_dim b = aff_dim S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5149  | 
by (metis (no_types) aff_dim_affine_hull eq)  | 
| 72238 | 5150  | 
then have "int (card b) = 1 + aff_dim S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5151  | 
by (simp add: aff_dim_affine_independent indb)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5152  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5153  | 
using fbc aff  | 
| 71176 | 5154  | 
by (simp add: \<open>\<not> affine_dependent c\<close> \<open>b \<subseteq> c\<close> aff_dim_affine_independent card_Diff_subset of_nat_diff)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5155  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5156  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5157  | 
proof (cases "c = b")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5158  | 
case True show ?thesis  | 
| 72238 | 5159  | 
proof  | 
5160  | 
      show "int (card {}) + aff_dim S = int DIM('a)"
 | 
|
5161  | 
using True card_cb by auto  | 
|
5162  | 
      show "affine hull S = \<Inter> {}"
 | 
|
5163  | 
using True affc eq by blast  | 
|
5164  | 
qed auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5165  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5166  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5167  | 
    have ind: "\<not> affine_dependent (\<Union>a\<in>c - b. c - {a})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5168  | 
by (rule affine_independent_subset [OF indc]) auto  | 
| 72238 | 5169  | 
    have *: "1 + aff_dim (c - {t}) = int (DIM('a))" if t: "t \<in> c" for t
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5170  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5171  | 
have "insert t c = c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5172  | 
using t by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5173  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5174  | 
by (metis (full_types) add.commute aff_dim_affine_hull aff_dim_insert aff_dim_UNIV affc affine_dependent_def indc insert_Diff_single t)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5175  | 
qed  | 
| 72238 | 5176  | 
    let ?\<F> = "(\<lambda>x. affine hull x) ` ((\<lambda>a. c - {a}) ` (c - b))"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5177  | 
show ?thesis  | 
| 72238 | 5178  | 
proof  | 
5179  | 
      have "card ((\<lambda>a. affine hull (c - {a})) ` (c - b)) = card (c - b)"
 | 
|
| 72567 | 5180  | 
proof (rule card_image)  | 
5181  | 
        show "inj_on (\<lambda>a. affine hull (c - {a})) (c - b)"
 | 
|
5182  | 
unfolding inj_on_def  | 
|
5183  | 
by (metis Diff_eq_empty_iff Diff_iff indc affine_dependent_def hull_subset insert_iff)  | 
|
5184  | 
qed  | 
|
| 72238 | 5185  | 
      then show "int (card ?\<F>) + aff_dim S = int DIM('a)"
 | 
5186  | 
by (simp add: imeq card_cb)  | 
|
5187  | 
show "affine hull S = \<Inter> ?\<F>"  | 
|
| 72567 | 5188  | 
by (metis Diff_eq_empty_iff INT_simps(4) UN_singleton order_refl \<open>b \<subseteq> c\<close> False eq double_diff affine_hull_Inter [OF ind])  | 
5189  | 
      have "\<And>a. \<lbrakk>a \<in> c; a \<notin> b\<rbrakk> \<Longrightarrow> aff_dim (c - {a}) = int (DIM('a) - Suc 0)"
 | 
|
5190  | 
by (metis "*" DIM_ge_Suc0 One_nat_def add_diff_cancel_left' int_ops(2) of_nat_diff)  | 
|
5191  | 
      then show "\<And>h. h \<in> ?\<F> \<Longrightarrow> \<exists>a b. a \<noteq> 0 \<and> h = {x. a \<bullet> x = b}"
 | 
|
5192  | 
by (auto simp only: One_nat_def aff_dim_eq_hyperplane [symmetric])  | 
|
| 72238 | 5193  | 
qed (use \<open>finite c\<close> in auto)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5194  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5195  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5196  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5197  | 
lemma affine_hyperplane_sums_eq_UNIV_0:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5198  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5199  | 
assumes "affine S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5200  | 
and "0 \<in> S" and "w \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5201  | 
and "a \<bullet> w \<noteq> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5202  | 
   shows "{x + y| x y. x \<in> S \<and> a \<bullet> y = 0} = UNIV"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5203  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5204  | 
have "subspace S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5205  | 
by (simp add: assms subspace_affine)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5206  | 
  have span1: "span {y. a \<bullet> y = 0} \<subseteq> span {x + y |x y. x \<in> S \<and> a \<bullet> y = 0}"
 | 
| 72238 | 5207  | 
using \<open>0 \<in> S\<close> add.left_neutral by (intro span_mono) force  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5208  | 
  have "w \<notin> span {y. a \<bullet> y = 0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5209  | 
using \<open>a \<bullet> w \<noteq> 0\<close> span_induct subspace_hyperplane by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5210  | 
  moreover have "w \<in> span {x + y |x y. x \<in> S \<and> a \<bullet> y = 0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5211  | 
using \<open>w \<in> S\<close>  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
5212  | 
by (metis (mono_tags, lifting) inner_zero_right mem_Collect_eq pth_d span_base)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5213  | 
  ultimately have span2: "span {y. a \<bullet> y = 0} \<noteq> span {x + y |x y. x \<in> S \<and> a \<bullet> y = 0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5214  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5215  | 
have "a \<noteq> 0" using assms inner_zero_left by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5216  | 
  then have "DIM('a) - 1 = dim {y. a \<bullet> y = 0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5217  | 
by (simp add: dim_hyperplane)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5218  | 
  also have "... < dim {x + y |x y. x \<in> S \<and> a \<bullet> y = 0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5219  | 
using span1 span2 by (blast intro: dim_psubset)  | 
| 72238 | 5220  | 
  finally have "DIM('a) - 1 < dim {x + y |x y. x \<in> S \<and> a \<bullet> y = 0}" .
 | 
5221  | 
  then have DD: "dim {x + y |x y. x \<in> S \<and> a \<bullet> y = 0} = DIM('a)"
 | 
|
5222  | 
using antisym dim_subset_UNIV lowdim_subset_hyperplane not_le by fastforce  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5223  | 
  have subs: "subspace {x + y| x y. x \<in> S \<and> a \<bullet> y = 0}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5224  | 
using subspace_sums [OF \<open>subspace S\<close> subspace_hyperplane] by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5225  | 
  moreover have "span {x + y| x y. x \<in> S \<and> a \<bullet> y = 0} = UNIV"
 | 
| 72238 | 5226  | 
using DD dim_eq_full by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5227  | 
ultimately show ?thesis  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
5228  | 
by (simp add: subs) (metis (lifting) span_eq_iff subs)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5229  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5230  | 
|
| 70136 | 5231  | 
proposition\<^marker>\<open>tag unimportant\<close> affine_hyperplane_sums_eq_UNIV:  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5232  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5233  | 
assumes "affine S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5234  | 
      and "S \<inter> {v. a \<bullet> v = b} \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5235  | 
      and "S - {v. a \<bullet> v = b} \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5236  | 
    shows "{x + y| x y. x \<in> S \<and> a \<bullet> y = b} = UNIV"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5237  | 
proof (cases "a = 0")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5238  | 
case True with assms show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5239  | 
by (auto simp: if_splits)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5240  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5241  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5242  | 
obtain c where "c \<in> S" and c: "a \<bullet> c = b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5243  | 
using assms by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5244  | 
with affine_diffs_subspace [OF \<open>affine S\<close>]  | 
| 67399 | 5245  | 
have "subspace ((+) (- c) ` S)" by blast  | 
5246  | 
then have aff: "affine ((+) (- c) ` S)"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5247  | 
by (simp add: subspace_imp_affine)  | 
| 67399 | 5248  | 
have 0: "0 \<in> (+) (- c) ` S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5249  | 
by (simp add: \<open>c \<in> S\<close>)  | 
| 67399 | 5250  | 
obtain d where "d \<in> S" and "a \<bullet> d \<noteq> b" and dc: "d-c \<in> (+) (- c) ` S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5251  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5252  | 
then have adc: "a \<bullet> (d - c) \<noteq> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5253  | 
by (simp add: c inner_diff_right)  | 
| 72567 | 5254  | 
  define U where "U \<equiv> {x + y |x y. x \<in> (+) (- c) ` S \<and> a \<bullet> y = 0}"
 | 
5255  | 
have "u + v \<in> (+) (c+c) ` U"  | 
|
5256  | 
if "u \<in> S" "b = a \<bullet> v" for u v  | 
|
5257  | 
proof  | 
|
5258  | 
show "u + v = c + c + (u + v - c - c)"  | 
|
5259  | 
by (simp add: algebra_simps)  | 
|
5260  | 
have "\<exists>x y. u + v - c - c = x + y \<and> (\<exists>xa\<in>S. x = xa - c) \<and> a \<bullet> y = 0"  | 
|
5261  | 
proof (intro exI conjI)  | 
|
5262  | 
show "u + v - c - c = (u-c) + (v-c)" "a \<bullet> (v - c) = 0"  | 
|
5263  | 
by (simp_all add: algebra_simps c that)  | 
|
5264  | 
qed (use that in auto)  | 
|
5265  | 
then show "u + v - c - c \<in> U"  | 
|
5266  | 
by (auto simp: U_def image_def)  | 
|
5267  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5268  | 
moreover have "\<lbrakk>a \<bullet> v = 0; u \<in> S\<rbrakk>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5269  | 
\<Longrightarrow> \<exists>x ya. v + (u + c) = x + ya \<and> x \<in> S \<and> a \<bullet> ya = b" for v u  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5270  | 
by (metis add.left_commute c inner_right_distrib pth_d)  | 
| 72567 | 5271  | 
  ultimately have "{x + y |x y. x \<in> S \<and> a \<bullet> y = b} = (+) (c+c) ` U"
 | 
5272  | 
by (fastforce simp: algebra_simps U_def)  | 
|
| 69661 | 5273  | 
also have "... = range ((+) (c + c))"  | 
| 72567 | 5274  | 
by (simp only: U_def affine_hyperplane_sums_eq_UNIV_0 [OF aff 0 dc adc])  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5275  | 
also have "... = UNIV"  | 
| 69661 | 5276  | 
by simp  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5277  | 
finally show ?thesis .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5278  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5279  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5280  | 
lemma aff_dim_sums_Int_0:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5281  | 
assumes "affine S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5282  | 
and "affine T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5283  | 
and "0 \<in> S" "0 \<in> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5284  | 
    shows "aff_dim {x + y| x y. x \<in> S \<and> y \<in> T} = (aff_dim S + aff_dim T) - aff_dim(S \<inter> T)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5285  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5286  | 
  have "0 \<in> {x + y |x y. x \<in> S \<and> y \<in> T}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5287  | 
using assms by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5288  | 
  then have 0: "0 \<in> affine hull {x + y |x y. x \<in> S \<and> y \<in> T}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5289  | 
by (metis (lifting) hull_inc)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5290  | 
have sub: "subspace S" "subspace T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5291  | 
using assms by (auto simp: subspace_affine)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5292  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5293  | 
using dim_sums_Int [OF sub] by (simp add: aff_dim_zero assms 0 hull_inc)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5294  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5295  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5296  | 
proposition aff_dim_sums_Int:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5297  | 
assumes "affine S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5298  | 
and "affine T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5299  | 
      and "S \<inter> T \<noteq> {}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5300  | 
    shows "aff_dim {x + y| x y. x \<in> S \<and> y \<in> T} = (aff_dim S + aff_dim T) - aff_dim(S \<inter> T)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5301  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5302  | 
obtain a where a: "a \<in> S" "a \<in> T" using assms by force  | 
| 67399 | 5303  | 
have aff: "affine ((+) (-a) ` S)" "affine ((+) (-a) ` T)"  | 
| 69661 | 5304  | 
using affine_translation [symmetric, of "- a"] assms by (simp_all cong: image_cong_simp)  | 
| 67399 | 5305  | 
have zero: "0 \<in> ((+) (-a) ` S)" "0 \<in> ((+) (-a) ` T)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5306  | 
using a assms by auto  | 
| 69661 | 5307  | 
  have "{x + y |x y. x \<in> (+) (- a) ` S \<and> y \<in> (+) (- a) ` T} =
 | 
5308  | 
      (+) (- 2 *\<^sub>R a) ` {x + y| x y. x \<in> S \<and> y \<in> T}"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5309  | 
by (force simp: algebra_simps scaleR_2)  | 
| 69661 | 5310  | 
moreover have "(+) (- a) ` S \<inter> (+) (- a) ` T = (+) (- a) ` (S \<inter> T)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5311  | 
by auto  | 
| 69661 | 5312  | 
ultimately show ?thesis  | 
5313  | 
using aff_dim_sums_Int_0 [OF aff zero] aff_dim_translation_eq  | 
|
5314  | 
by (metis (lifting))  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5315  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5316  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5317  | 
lemma aff_dim_affine_Int_hyperplane:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5318  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5319  | 
assumes "affine S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5320  | 
    shows "aff_dim(S \<inter> {x. a \<bullet> x = b}) =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5321  | 
             (if S \<inter> {v. a \<bullet> v = b} = {} then - 1
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5322  | 
              else if S \<subseteq> {v. a \<bullet> v = b} then aff_dim S
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5323  | 
else aff_dim S - 1)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5324  | 
proof (cases "a = 0")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5325  | 
case True with assms show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5326  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5327  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5328  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5329  | 
  then have "aff_dim (S \<inter> {x. a \<bullet> x = b}) = aff_dim S - 1"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5330  | 
            if "x \<in> S" "a \<bullet> x \<noteq> b" and non: "S \<inter> {v. a \<bullet> v = b} \<noteq> {}" for x
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5331  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5332  | 
    have [simp]: "{x + y| x y. x \<in> S \<and> a \<bullet> y = b} = UNIV"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5333  | 
using affine_hyperplane_sums_eq_UNIV [OF assms non] that by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5334  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5335  | 
using aff_dim_sums_Int [OF assms affine_hyperplane non]  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5336  | 
by (simp add: of_nat_diff False)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5337  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5338  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5339  | 
by (metis (mono_tags, lifting) inf.orderE aff_dim_empty_eq mem_Collect_eq subsetI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5340  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5341  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5342  | 
lemma aff_dim_lt_full:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5343  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5344  | 
  shows "aff_dim S < DIM('a) \<longleftrightarrow> (affine hull S \<noteq> UNIV)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5345  | 
by (metis (no_types) aff_dim_affine_hull aff_dim_le_DIM aff_dim_UNIV affine_hull_UNIV less_le)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5346  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5347  | 
lemma aff_dim_openin:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5348  | 
fixes S :: "'a::euclidean_space set"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5349  | 
  assumes ope: "openin (top_of_set T) S" and "affine T" "S \<noteq> {}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5350  | 
shows "aff_dim S = aff_dim T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5351  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5352  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5353  | 
proof (rule order_antisym)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5354  | 
show "aff_dim S \<le> aff_dim T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5355  | 
by (blast intro: aff_dim_subset [OF openin_imp_subset] ope)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5356  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5357  | 
obtain a where "a \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5358  | 
      using \<open>S \<noteq> {}\<close> by blast
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5359  | 
have "S \<subseteq> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5360  | 
using ope openin_imp_subset by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5361  | 
then have "a \<in> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5362  | 
using \<open>a \<in> S\<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5363  | 
then have subT': "subspace ((\<lambda>x. - a + x) ` T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5364  | 
using affine_diffs_subspace \<open>affine T\<close> by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5365  | 
then obtain B where Bsub: "B \<subseteq> ((\<lambda>x. - a + x) ` T)" and po: "pairwise orthogonal B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5366  | 
and eq1: "\<And>x. x \<in> B \<Longrightarrow> norm x = 1" and "independent B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5367  | 
and cardB: "card B = dim ((\<lambda>x. - a + x) ` T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5368  | 
and spanB: "span B = ((\<lambda>x. - a + x) ` T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5369  | 
by (rule orthonormal_basis_subspace) auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5370  | 
obtain e where "0 < e" and e: "cball a e \<inter> T \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5371  | 
by (meson \<open>a \<in> S\<close> openin_contains_cball ope)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5372  | 
have "aff_dim T = aff_dim ((\<lambda>x. - a + x) ` T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5373  | 
by (metis aff_dim_translation_eq)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5374  | 
also have "... = dim ((\<lambda>x. - a + x) ` T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5375  | 
using aff_dim_subspace subT' by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5376  | 
also have "... = card B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5377  | 
by (simp add: cardB)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5378  | 
also have "... = card ((\<lambda>x. e *\<^sub>R x) ` B)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5379  | 
using \<open>0 < e\<close> by (force simp: inj_on_def card_image)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5380  | 
also have "... \<le> dim ((\<lambda>x. - a + x) ` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5381  | 
proof (simp, rule independent_card_le_dim)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5382  | 
have e': "cball 0 e \<inter> (\<lambda>x. x - a) ` T \<subseteq> (\<lambda>x. x - a) ` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5383  | 
using e by (auto simp: dist_norm norm_minus_commute subset_eq)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5384  | 
have "(\<lambda>x. e *\<^sub>R x) ` B \<subseteq> cball 0 e \<inter> (\<lambda>x. x - a) ` T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5385  | 
using Bsub \<open>0 < e\<close> eq1 subT' \<open>a \<in> T\<close> by (auto simp: subspace_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5386  | 
then show "(\<lambda>x. e *\<^sub>R x) ` B \<subseteq> (\<lambda>x. x - a) ` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5387  | 
using e' by blast  | 
| 72238 | 5388  | 
have "inj_on ((*\<^sub>R) e) (span B)"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
5389  | 
using \<open>0 < e\<close> inj_on_def by fastforce  | 
| 72238 | 5390  | 
then show "independent ((\<lambda>x. e *\<^sub>R x) ` B)"  | 
5391  | 
using linear_scale_self \<open>independent B\<close> linear_dependent_inj_imageD by blast  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5392  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5393  | 
also have "... = aff_dim S"  | 
| 69661 | 5394  | 
using \<open>a \<in> S\<close> aff_dim_eq_dim hull_inc by (force cong: image_cong_simp)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5395  | 
finally show "aff_dim T \<le> aff_dim S" .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5396  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5397  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5398  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5399  | 
lemma dim_openin:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5400  | 
fixes S :: "'a::euclidean_space set"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5401  | 
  assumes ope: "openin (top_of_set T) S" and "subspace T" "S \<noteq> {}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5402  | 
shows "dim S = dim T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5403  | 
proof (rule order_antisym)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5404  | 
show "dim S \<le> dim T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5405  | 
by (metis ope dim_subset openin_subset topspace_euclidean_subtopology)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5406  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5407  | 
have "dim T = aff_dim S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5408  | 
using aff_dim_openin  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5409  | 
    by (metis aff_dim_subspace \<open>subspace T\<close> \<open>S \<noteq> {}\<close> ope subspace_affine)
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5410  | 
also have "... \<le> dim S"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
5411  | 
by (metis aff_dim_subset aff_dim_subspace dim_span span_superset  | 
| 
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
5412  | 
subspace_span)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5413  | 
finally show "dim T \<le> dim S" by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5414  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5415  | 
|
| 67968 | 5416  | 
subsection\<open>Lower-dimensional affine subsets are nowhere dense\<close>  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5417  | 
|
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
5418  | 
proposition dense_complement_subspace:  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5419  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5420  | 
assumes dim_less: "dim T < dim S" and "subspace S" shows "closure(S - T) = S"  | 
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
5421  | 
proof -  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5422  | 
have "closure(S - U) = S" if "dim U < dim S" "U \<subseteq> S" for U  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5423  | 
proof -  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5424  | 
have "span U \<subset> span S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5425  | 
by (metis neq_iff psubsetI span_eq_dim span_mono that)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5426  | 
then obtain a where "a \<noteq> 0" "a \<in> span S" and a: "\<And>y. y \<in> span U \<Longrightarrow> orthogonal a y"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5427  | 
using orthogonal_to_subspace_exists_gen by metis  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5428  | 
show ?thesis  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5429  | 
proof  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5430  | 
have "closed S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5431  | 
by (simp add: \<open>subspace S\<close> closed_subspace)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5432  | 
then show "closure (S - U) \<subseteq> S"  | 
| 69286 | 5433  | 
by (simp add: closure_minimal)  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5434  | 
show "S \<subseteq> closure (S - U)"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5435  | 
proof (clarsimp simp: closure_approachable)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5436  | 
fix x and e::real  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5437  | 
assume "x \<in> S" "0 < e"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5438  | 
show "\<exists>y\<in>S - U. dist y x < e"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5439  | 
proof (cases "x \<in> U")  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5440  | 
case True  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5441  | 
let ?y = "x + (e/2 / norm a) *\<^sub>R a"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5442  | 
show ?thesis  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5443  | 
proof  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5444  | 
show "dist ?y x < e"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5445  | 
using \<open>0 < e\<close> by (simp add: dist_norm)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5446  | 
next  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5447  | 
have "?y \<in> S"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
5448  | 
by (metis \<open>a \<in> span S\<close> \<open>x \<in> S\<close> assms(2) span_eq_iff subspace_add subspace_scale)  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5449  | 
moreover have "?y \<notin> U"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5450  | 
proof -  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5451  | 
have "e/2 / norm a \<noteq> 0"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5452  | 
using \<open>0 < e\<close> \<open>a \<noteq> 0\<close> by auto  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5453  | 
then show ?thesis  | 
| 68074 | 5454  | 
by (metis True \<open>a \<noteq> 0\<close> a orthogonal_scaleR orthogonal_self real_vector.scale_eq_0_iff span_add_eq span_base)  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5455  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5456  | 
ultimately show "?y \<in> S - U" by blast  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5457  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5458  | 
next  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5459  | 
case False  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5460  | 
with \<open>0 < e\<close> \<open>x \<in> S\<close> show ?thesis by force  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5461  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5462  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5463  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5464  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5465  | 
moreover have "S - S \<inter> T = S-T"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5466  | 
by blast  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5467  | 
moreover have "dim (S \<inter> T) < dim S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5468  | 
by (metis dim_less dim_subset inf.cobounded2 inf.orderE inf.strict_boundedE not_le)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5469  | 
ultimately show ?thesis  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5470  | 
by force  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5471  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5472  | 
|
| 70136 | 5473  | 
corollary\<^marker>\<open>tag unimportant\<close> dense_complement_affine:  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5474  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5475  | 
assumes less: "aff_dim T < aff_dim S" and "affine S" shows "closure(S - T) = S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5476  | 
proof (cases "S \<inter> T = {}")
 | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5477  | 
case True  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5478  | 
then show ?thesis  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5479  | 
by (metis Diff_triv affine_hull_eq \<open>affine S\<close> closure_same_affine_hull closure_subset hull_subset subset_antisym)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5480  | 
next  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5481  | 
case False  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5482  | 
then obtain z where z: "z \<in> S \<inter> T" by blast  | 
| 67399 | 5483  | 
then have "subspace ((+) (- z) ` S)"  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5484  | 
by (meson IntD1 affine_diffs_subspace \<open>affine S\<close>)  | 
| 67399 | 5485  | 
moreover have "int (dim ((+) (- z) ` T)) < int (dim ((+) (- z) ` S))"  | 
| 69661 | 5486  | 
thm aff_dim_eq_dim  | 
5487  | 
using z less by (simp add: aff_dim_eq_dim_subtract [of z] hull_inc cong: image_cong_simp)  | 
|
| 67399 | 5488  | 
ultimately have "closure(((+) (- z) ` S) - ((+) (- z) ` T)) = ((+) (- z) ` S)"  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5489  | 
by (simp add: dense_complement_subspace)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5490  | 
then show ?thesis  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5491  | 
by (metis closure_translation translation_diff translation_invert)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5492  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5493  | 
|
| 70136 | 5494  | 
corollary\<^marker>\<open>tag unimportant\<close> dense_complement_openin_affine_hull:  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5495  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5496  | 
assumes less: "aff_dim T < aff_dim S"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5497  | 
and ope: "openin (top_of_set (affine hull S)) S"  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5498  | 
shows "closure(S - T) = closure S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5499  | 
proof -  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5500  | 
have "affine hull S - T \<subseteq> affine hull S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5501  | 
by blast  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5502  | 
then have "closure (S \<inter> closure (affine hull S - T)) = closure (S \<inter> (affine hull S - T))"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5503  | 
by (rule closure_openin_Int_closure [OF ope])  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5504  | 
then show ?thesis  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5505  | 
by (metis Int_Diff aff_dim_affine_hull affine_affine_hull dense_complement_affine hull_subset inf.orderE less)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5506  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5507  | 
|
| 70136 | 5508  | 
corollary\<^marker>\<open>tag unimportant\<close> dense_complement_convex:  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5509  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5510  | 
assumes "aff_dim T < aff_dim S" "convex S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5511  | 
shows "closure(S - T) = closure S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5512  | 
proof  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5513  | 
show "closure (S - T) \<subseteq> closure S"  | 
| 69286 | 5514  | 
by (simp add: closure_mono)  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5515  | 
have "closure (rel_interior S - T) = closure (rel_interior S)"  | 
| 72238 | 5516  | 
by (simp add: assms dense_complement_openin_affine_hull openin_rel_interior rel_interior_aff_dim rel_interior_same_affine_hull)  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5517  | 
then show "closure S \<subseteq> closure (S - T)"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5518  | 
by (metis Diff_mono \<open>convex S\<close> closure_mono convex_closure_rel_interior order_refl rel_interior_subset)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5519  | 
qed  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5520  | 
|
| 70136 | 5521  | 
corollary\<^marker>\<open>tag unimportant\<close> dense_complement_convex_closed:  | 
| 
66641
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5522  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5523  | 
assumes "aff_dim T < aff_dim S" "convex S" "closed S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5524  | 
shows "closure(S - T) = S"  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5525  | 
by (simp add: assms dense_complement_convex)  | 
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5526  | 
|
| 
 
ff2e0115fea4
Simplicial complexes and triangulations; Baire Category Theorem
 
paulson <lp15@cam.ac.uk> 
parents: 
66297 
diff
changeset
 | 
5527  | 
|
| 70136 | 5528  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>Parallel slices, etc\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5529  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5530  | 
text\<open> If we take a slice out of a set, we can do it perpendicularly,  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5531  | 
with the normal vector to the slice parallel to the affine hull.\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5532  | 
|
| 70136 | 5533  | 
proposition\<^marker>\<open>tag unimportant\<close> affine_parallel_slice:  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5534  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5535  | 
assumes "affine S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5536  | 
      and "S \<inter> {x. a \<bullet> x \<le> b} \<noteq> {}"
 | 
| 69508 | 5537  | 
      and "\<not> (S \<subseteq> {x. a \<bullet> x \<le> b})"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5538  | 
obtains a' b' where "a' \<noteq> 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5539  | 
                   "S \<inter> {x. a' \<bullet> x \<le> b'} = S \<inter> {x. a \<bullet> x \<le> b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5540  | 
                   "S \<inter> {x. a' \<bullet> x = b'} = S \<inter> {x. a \<bullet> x = b}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5541  | 
"\<And>w. w \<in> S \<Longrightarrow> (w + a') \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5542  | 
proof (cases "S \<inter> {x. a \<bullet> x = b} = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5543  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5544  | 
then obtain u v where "u \<in> S" "v \<in> S" "a \<bullet> u \<le> b" "a \<bullet> v > b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5545  | 
using assms by (auto simp: not_le)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5546  | 
define \<eta> where "\<eta> = u + ((b - a \<bullet> u) / (a \<bullet> v - a \<bullet> u)) *\<^sub>R (v - u)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5547  | 
have "\<eta> \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5548  | 
by (simp add: \<eta>_def \<open>u \<in> S\<close> \<open>v \<in> S\<close> \<open>affine S\<close> mem_affine_3_minus)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5549  | 
moreover have "a \<bullet> \<eta> = b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5550  | 
using \<open>a \<bullet> u \<le> b\<close> \<open>b < a \<bullet> v\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5551  | 
by (simp add: \<eta>_def algebra_simps) (simp add: field_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5552  | 
ultimately have False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5553  | 
using True by force  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5554  | 
then show ?thesis ..  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5555  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5556  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5557  | 
then obtain z where "z \<in> S" and z: "a \<bullet> z = b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5558  | 
using assms by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5559  | 
with affine_diffs_subspace [OF \<open>affine S\<close>]  | 
| 67399 | 5560  | 
have sub: "subspace ((+) (- z) ` S)" by blast  | 
5561  | 
then have aff: "affine ((+) (- z) ` S)" and span: "span ((+) (- z) ` S) = ((+) (- z) ` S)"  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5562  | 
by (auto simp: subspace_imp_affine)  | 
| 67399 | 5563  | 
obtain a' a'' where a': "a' \<in> span ((+) (- z) ` S)" and a: "a = a' + a''"  | 
5564  | 
and "\<And>w. w \<in> span ((+) (- z) ` S) \<Longrightarrow> orthogonal a'' w"  | 
|
| 69661 | 5565  | 
using orthogonal_subspace_decomp_exists [of "(+) (- z) ` S" "a"] by metis  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5566  | 
then have "\<And>w. w \<in> S \<Longrightarrow> a'' \<bullet> (w-z) = 0"  | 
| 69661 | 5567  | 
by (simp add: span_base orthogonal_def)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5568  | 
then have a'': "\<And>w. w \<in> S \<Longrightarrow> a'' \<bullet> w = (a - a') \<bullet> z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5569  | 
by (simp add: a inner_diff_right)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5570  | 
then have ba'': "\<And>w. w \<in> S \<Longrightarrow> a'' \<bullet> w = b - a' \<bullet> z"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5571  | 
by (simp add: inner_diff_left z)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5572  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5573  | 
proof (cases "a' = 0")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5574  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5575  | 
with a assms True a'' diff_zero less_irrefl show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5576  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5577  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5578  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5579  | 
show ?thesis  | 
| 72567 | 5580  | 
proof  | 
5581  | 
      show "S \<inter> {x. a' \<bullet> x \<le> a' \<bullet> z} = S \<inter> {x. a \<bullet> x \<le> b}"
 | 
|
5582  | 
        "S \<inter> {x. a' \<bullet> x = a' \<bullet> z} = S \<inter> {x. a \<bullet> x = b}"
 | 
|
5583  | 
by (auto simp: a ba'' inner_left_distrib)  | 
|
5584  | 
have "\<And>w. w \<in> (+) (- z) ` S \<Longrightarrow> (w + a') \<in> (+) (- z) ` S"  | 
|
5585  | 
by (metis subspace_add a' span_eq_iff sub)  | 
|
5586  | 
then show "\<And>w. w \<in> S \<Longrightarrow> (w + a') \<in> S"  | 
|
5587  | 
by fastforce  | 
|
5588  | 
qed (use False in auto)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5589  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5590  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5591  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5592  | 
lemma diffs_affine_hull_span:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5593  | 
assumes "a \<in> S"  | 
| 72567 | 5594  | 
shows "(\<lambda>x. x - a) ` (affine hull S) = span ((\<lambda>x. x - a) ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5595  | 
proof -  | 
| 72567 | 5596  | 
  have *: "((\<lambda>x. x - a) ` (S - {a})) = ((\<lambda>x. x - a) ` S) - {0}"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5597  | 
by (auto simp: algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5598  | 
show ?thesis  | 
| 72238 | 5599  | 
by (auto simp add: algebra_simps affine_hull_span2 [OF assms] *)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5600  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5601  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5602  | 
lemma aff_dim_dim_affine_diffs:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5603  | 
fixes S :: "'a :: euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5604  | 
assumes "affine S" "a \<in> S"  | 
| 72567 | 5605  | 
shows "aff_dim S = dim ((\<lambda>x. x - a) ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5606  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5607  | 
obtain B where aff: "affine hull B = affine hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5608  | 
and ind: "\<not> affine_dependent B"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5609  | 
and card: "of_nat (card B) = aff_dim S + 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5610  | 
using aff_dim_basis_exists by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5611  | 
  then have "B \<noteq> {}" using assms
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5612  | 
by (metis affine_hull_eq_empty ex_in_conv)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5613  | 
then obtain c where "c \<in> B" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5614  | 
then have "c \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5615  | 
by (metis aff affine_hull_eq \<open>affine S\<close> hull_inc)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5616  | 
have xy: "x - c = y - a \<longleftrightarrow> y = x + 1 *\<^sub>R (a - c)" for x y c and a::'a  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5617  | 
by (auto simp: algebra_simps)  | 
| 72567 | 5618  | 
have *: "(\<lambda>x. x - c) ` S = (\<lambda>x. x - a) ` S"  | 
5619  | 
using assms \<open>c \<in> S\<close>  | 
|
5620  | 
by (auto simp: image_iff xy; metis mem_affine_3_minus pth_1)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5621  | 
have affS: "affine hull S = S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5622  | 
by (simp add: \<open>affine S\<close>)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5623  | 
have "aff_dim S = of_nat (card B) - 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5624  | 
using card by simp  | 
| 72567 | 5625  | 
also have "... = dim ((\<lambda>x. x - c) ` B)"  | 
5626  | 
using affine_independent_card_dim_diffs [OF ind \<open>c \<in> B\<close>]  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5627  | 
by (simp add: affine_independent_card_dim_diffs [OF ind \<open>c \<in> B\<close>])  | 
| 72567 | 5628  | 
also have "... = dim ((\<lambda>x. x - c) ` (affine hull B))"  | 
5629  | 
by (simp add: diffs_affine_hull_span \<open>c \<in> B\<close>)  | 
|
5630  | 
also have "... = dim ((\<lambda>x. x - a) ` S)"  | 
|
5631  | 
by (simp add: affS aff *)  | 
|
5632  | 
finally show ?thesis .  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5633  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5634  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5635  | 
lemma aff_dim_linear_image_le:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5636  | 
assumes "linear f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5637  | 
shows "aff_dim(f ` S) \<le> aff_dim S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5638  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5639  | 
have "aff_dim (f ` T) \<le> aff_dim T" if "affine T" for T  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5640  | 
  proof (cases "T = {}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5641  | 
case True then show ?thesis by (simp add: aff_dim_geq)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5642  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5643  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5644  | 
then obtain a where "a \<in> T" by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5645  | 
    have 1: "((\<lambda>x. x - f a) ` f ` T) = {x - f a |x. x \<in> f ` T}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5646  | 
by auto  | 
| 72567 | 5647  | 
    have 2: "{x - f a| x. x \<in> f ` T} = f ` ((\<lambda>x. x - a) ` T)"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5648  | 
by (force simp: linear_diff [OF assms])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5649  | 
    have "aff_dim (f ` T) = int (dim {x - f a |x. x \<in> f ` T})"
 | 
| 69661 | 5650  | 
by (simp add: \<open>a \<in> T\<close> hull_inc aff_dim_eq_dim [of "f a"] 1 cong: image_cong_simp)  | 
| 72567 | 5651  | 
also have "... = int (dim (f ` ((\<lambda>x. x - a) ` T)))"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5652  | 
by (force simp: linear_diff [OF assms] 2)  | 
| 72567 | 5653  | 
also have "... \<le> int (dim ((\<lambda>x. x - a) ` T))"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5654  | 
by (simp add: dim_image_le [OF assms])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5655  | 
also have "... \<le> aff_dim T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5656  | 
by (simp add: aff_dim_dim_affine_diffs [symmetric] \<open>a \<in> T\<close> \<open>affine T\<close>)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5657  | 
finally show ?thesis .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5658  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5659  | 
then  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5660  | 
have "aff_dim (f ` (affine hull S)) \<le> aff_dim (affine hull S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5661  | 
using affine_affine_hull [of S] by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5662  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5663  | 
using affine_hull_linear_image assms linear_conv_bounded_linear by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5664  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5665  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5666  | 
lemma aff_dim_injective_linear_image [simp]:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5667  | 
assumes "linear f" "inj f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5668  | 
shows "aff_dim (f ` S) = aff_dim S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5669  | 
proof (rule antisym)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5670  | 
show "aff_dim (f ` S) \<le> aff_dim S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5671  | 
by (simp add: aff_dim_linear_image_le assms(1))  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5672  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5673  | 
obtain g where "linear g" "g \<circ> f = id"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
5674  | 
using assms(1) assms(2) linear_injective_left_inverse by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5675  | 
then have "aff_dim S \<le> aff_dim(g ` f ` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5676  | 
by (simp add: image_comp)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5677  | 
also have "... \<le> aff_dim (f ` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5678  | 
by (simp add: \<open>linear g\<close> aff_dim_linear_image_le)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5679  | 
finally show "aff_dim S \<le> aff_dim (f ` S)" .  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5680  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5681  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5682  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5683  | 
lemma choose_affine_subset:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5684  | 
assumes "affine S" "-1 \<le> d" and dle: "d \<le> aff_dim S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5685  | 
obtains T where "affine T" "T \<subseteq> S" "aff_dim T = d"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5686  | 
proof (cases "d = -1 \<or> S={}")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5687  | 
case True with assms show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5688  | 
by (metis aff_dim_empty affine_empty bot.extremum that eq_iff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5689  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5690  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5691  | 
with assms obtain a where "a \<in> S" "0 \<le> d" by auto  | 
| 67399 | 5692  | 
with assms have ss: "subspace ((+) (- a) ` S)"  | 
| 69661 | 5693  | 
by (simp add: affine_diffs_subspace_subtract cong: image_cong_simp)  | 
| 67399 | 5694  | 
have "nat d \<le> dim ((+) (- a) ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5695  | 
by (metis aff_dim_subspace aff_dim_translation_eq dle nat_int nat_mono ss)  | 
| 67399 | 5696  | 
then obtain T where "subspace T" and Tsb: "T \<subseteq> span ((+) (- a) ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5697  | 
and Tdim: "dim T = nat d"  | 
| 67399 | 5698  | 
using choose_subspace_of_subspace [of "nat d" "(+) (- a) ` S"] by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5699  | 
then have "affine T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5700  | 
using subspace_affine by blast  | 
| 67399 | 5701  | 
then have "affine ((+) a ` T)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5702  | 
by (metis affine_hull_eq affine_hull_translation)  | 
| 67399 | 5703  | 
moreover have "(+) a ` T \<subseteq> S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5704  | 
proof -  | 
| 67399 | 5705  | 
have "T \<subseteq> (+) (- a) ` S"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
5706  | 
by (metis (no_types) span_eq_iff Tsb ss)  | 
| 67399 | 5707  | 
then show "(+) a ` T \<subseteq> S"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5708  | 
using add_ac by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5709  | 
qed  | 
| 67399 | 5710  | 
moreover have "aff_dim ((+) a ` T) = d"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5711  | 
by (simp add: aff_dim_subspace Tdim \<open>0 \<le> d\<close> \<open>subspace T\<close> aff_dim_translation_eq)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5712  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5713  | 
by (rule that)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5714  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5715  | 
|
| 69541 | 5716  | 
subsection\<open>Paracompactness\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5717  | 
|
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
5718  | 
proposition paracompact:  | 
| 
69918
 
eddcc7c726f3
new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
 
paulson <lp15@cam.ac.uk> 
parents: 
69745 
diff
changeset
 | 
5719  | 
  fixes S :: "'a :: {metric_space,second_countable_topology} set"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5720  | 
assumes "S \<subseteq> \<Union>\<C>" and opC: "\<And>T. T \<in> \<C> \<Longrightarrow> open T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5721  | 
obtains \<C>' where "S \<subseteq> \<Union> \<C>'"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5722  | 
and "\<And>U. U \<in> \<C>' \<Longrightarrow> open U \<and> (\<exists>T. T \<in> \<C> \<and> U \<subseteq> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5723  | 
and "\<And>x. x \<in> S  | 
| 
69918
 
eddcc7c726f3
new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
 
paulson <lp15@cam.ac.uk> 
parents: 
69745 
diff
changeset
 | 
5724  | 
                       \<Longrightarrow> \<exists>V. open V \<and> x \<in> V \<and> finite {U. U \<in> \<C>' \<and> (U \<inter> V \<noteq> {})}"
 | 
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
5725  | 
proof (cases "S = {}")
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5726  | 
case True with that show ?thesis by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5727  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5728  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5729  | 
have "\<exists>T U. x \<in> U \<and> open U \<and> closure U \<subseteq> T \<and> T \<in> \<C>" if "x \<in> S" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5730  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5731  | 
obtain T where "x \<in> T" "T \<in> \<C>" "open T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5732  | 
using assms \<open>x \<in> S\<close> by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5733  | 
then obtain e where "e > 0" "cball x e \<subseteq> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5734  | 
by (force simp: open_contains_cball)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5735  | 
then show ?thesis  | 
| 72238 | 5736  | 
by (meson open_ball \<open>T \<in> \<C>\<close> ball_subset_cball centre_in_ball closed_cball closure_minimal dual_order.trans)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5737  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5738  | 
then obtain F G where Gin: "x \<in> G x" and oG: "open (G x)"  | 
| 72238 | 5739  | 
and clos: "closure (G x) \<subseteq> F x" and Fin: "F x \<in> \<C>"  | 
5740  | 
if "x \<in> S" for x  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5741  | 
by metis  | 
| 69313 | 5742  | 
then obtain \<F> where "\<F> \<subseteq> G ` S" "countable \<F>" "\<Union>\<F> = \<Union>(G ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5743  | 
using Lindelof [of "G ` S"] by (metis image_iff)  | 
| 69313 | 5744  | 
then obtain K where K: "K \<subseteq> S" "countable K" and eq: "\<Union>(G ` K) = \<Union>(G ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5745  | 
by (metis countable_subset_image)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5746  | 
  with False Gin have "K \<noteq> {}" by force
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5747  | 
then obtain a :: "nat \<Rightarrow> 'a" where "range a = K"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5748  | 
by (metis range_from_nat_into \<open>countable K\<close>)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5749  | 
  then have odif: "\<And>n. open (F (a n) - \<Union>{closure (G (a m)) |m. m < n})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5750  | 
using \<open>K \<subseteq> S\<close> Fin opC by (fastforce simp add:)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5751  | 
  let ?C = "range (\<lambda>n. F(a n) - \<Union>{closure(G(a m)) |m. m < n})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5752  | 
have enum_S: "\<exists>n. x \<in> F(a n) \<and> x \<in> G(a n)" if "x \<in> S" for x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5753  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5754  | 
have "\<exists>y \<in> K. x \<in> G y" using eq that Gin by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5755  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5756  | 
using clos K \<open>range a = K\<close> closure_subset by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5757  | 
qed  | 
| 72238 | 5758  | 
show ?thesis  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5759  | 
proof  | 
| 72238 | 5760  | 
show "S \<subseteq> Union ?C"  | 
5761  | 
proof  | 
|
5762  | 
fix x assume "x \<in> S"  | 
|
5763  | 
define n where "n \<equiv> LEAST n. x \<in> F(a n)"  | 
|
5764  | 
have n: "x \<in> F(a n)"  | 
|
5765  | 
using enum_S [OF \<open>x \<in> S\<close>] by (force simp: n_def intro: LeastI)  | 
|
5766  | 
have notn: "x \<notin> F(a m)" if "m < n" for m  | 
|
5767  | 
using that not_less_Least by (force simp: n_def)  | 
|
5768  | 
      then have "x \<notin> \<Union>{closure (G (a m)) |m. m < n}"
 | 
|
5769  | 
using n \<open>K \<subseteq> S\<close> \<open>range a = K\<close> clos notn by fastforce  | 
|
5770  | 
with n show "x \<in> Union ?C"  | 
|
5771  | 
by blast  | 
|
5772  | 
qed  | 
|
5773  | 
show "\<And>U. U \<in> ?C \<Longrightarrow> open U \<and> (\<exists>T. T \<in> \<C> \<and> U \<subseteq> T)"  | 
|
5774  | 
using Fin \<open>K \<subseteq> S\<close> \<open>range a = K\<close> by (auto simp: odif)  | 
|
5775  | 
    show "\<exists>V. open V \<and> x \<in> V \<and> finite {U. U \<in> ?C \<and> (U \<inter> V \<noteq> {})}" if "x \<in> S" for x
 | 
|
5776  | 
proof -  | 
|
5777  | 
obtain n where n: "x \<in> F(a n)" "x \<in> G(a n)"  | 
|
5778  | 
using \<open>x \<in> S\<close> enum_S by auto  | 
|
5779  | 
      have "{U \<in> ?C. U \<inter> G (a n) \<noteq> {}} \<subseteq> (\<lambda>n. F(a n) - \<Union>{closure(G(a m)) |m. m < n}) ` atMost n"
 | 
|
5780  | 
proof clarsimp  | 
|
5781  | 
        fix k  assume "(F (a k) - \<Union>{closure (G (a m)) |m. m < k}) \<inter> G (a n) \<noteq> {}"
 | 
|
5782  | 
then have "k \<le> n"  | 
|
5783  | 
by auto (metis closure_subset not_le subsetCE)  | 
|
5784  | 
        then show "F (a k) - \<Union>{closure (G (a m)) |m. m < k}
 | 
|
5785  | 
                 \<in> (\<lambda>n. F (a n) - \<Union>{closure (G (a m)) |m. m < n}) ` {..n}"
 | 
|
5786  | 
by force  | 
|
5787  | 
qed  | 
|
5788  | 
      moreover have "finite ((\<lambda>n. F(a n) - \<Union>{closure(G(a m)) |m. m < n}) ` atMost n)"
 | 
|
5789  | 
by force  | 
|
5790  | 
      ultimately have *: "finite {U \<in> ?C. U \<inter> G (a n) \<noteq> {}}"
 | 
|
5791  | 
using finite_subset by blast  | 
|
5792  | 
have "a n \<in> S"  | 
|
5793  | 
using \<open>K \<subseteq> S\<close> \<open>range a = K\<close> by blast  | 
|
5794  | 
then show ?thesis  | 
|
5795  | 
by (blast intro: oG n *)  | 
|
5796  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5797  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5798  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5799  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5800  | 
corollary paracompact_closedin:  | 
| 
69918
 
eddcc7c726f3
new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
 
paulson <lp15@cam.ac.uk> 
parents: 
69745 
diff
changeset
 | 
5801  | 
  fixes S :: "'a :: {metric_space,second_countable_topology} set"
 | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5802  | 
assumes cin: "closedin (top_of_set U) S"  | 
| 
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5803  | 
and oin: "\<And>T. T \<in> \<C> \<Longrightarrow> openin (top_of_set U) T"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5804  | 
and "S \<subseteq> \<Union>\<C>"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5805  | 
obtains \<C>' where "S \<subseteq> \<Union> \<C>'"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5806  | 
and "\<And>V. V \<in> \<C>' \<Longrightarrow> openin (top_of_set U) V \<and> (\<exists>T. T \<in> \<C> \<and> V \<subseteq> T)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5807  | 
and "\<And>x. x \<in> U  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5808  | 
\<Longrightarrow> \<exists>V. openin (top_of_set U) V \<and> x \<in> V \<and>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5809  | 
                               finite {X. X \<in> \<C>' \<and> (X \<inter> V \<noteq> {})}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5810  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5811  | 
have "\<exists>Z. open Z \<and> (T = U \<inter> Z)" if "T \<in> \<C>" for T  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5812  | 
using oin [OF that] by (auto simp: openin_open)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5813  | 
then obtain F where opF: "open (F T)" and intF: "U \<inter> F T = T" if "T \<in> \<C>" for T  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5814  | 
by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5815  | 
obtain K where K: "closed K" "U \<inter> K = S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5816  | 
using cin by (auto simp: closedin_closed)  | 
| 69745 | 5817  | 
have 1: "U \<subseteq> \<Union>(insert (- K) (F ` \<C>))"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5818  | 
by clarsimp (metis Int_iff Union_iff \<open>U \<inter> K = S\<close> \<open>S \<subseteq> \<Union>\<C>\<close> subsetD intF)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5819  | 
have 2: "\<And>T. T \<in> insert (- K) (F ` \<C>) \<Longrightarrow> open T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5820  | 
using \<open>closed K\<close> by (auto simp: opF)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5821  | 
obtain \<D> where "U \<subseteq> \<Union>\<D>"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5822  | 
and D1: "\<And>U. U \<in> \<D> \<Longrightarrow> open U \<and> (\<exists>T. T \<in> insert (- K) (F ` \<C>) \<and> U \<subseteq> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5823  | 
             and D2: "\<And>x. x \<in> U \<Longrightarrow> \<exists>V. open V \<and> x \<in> V \<and> finite {U \<in> \<D>. U \<inter> V \<noteq> {}}"
 | 
| 
69918
 
eddcc7c726f3
new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
 
paulson <lp15@cam.ac.uk> 
parents: 
69745 
diff
changeset
 | 
5824  | 
by (blast intro: paracompact [OF 1 2])  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5825  | 
  let ?C = "{U \<inter> V |V. V \<in> \<D> \<and> (V \<inter> K \<noteq> {})}"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5826  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5827  | 
  proof (rule_tac \<C>' = "{U \<inter> V |V. V \<in> \<D> \<and> (V \<inter> K \<noteq> {})}" in that)
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5828  | 
show "S \<subseteq> \<Union>?C"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5829  | 
using \<open>U \<inter> K = S\<close> \<open>U \<subseteq> \<Union>\<D>\<close> K by (blast dest!: subsetD)  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5830  | 
show "\<And>V. V \<in> ?C \<Longrightarrow> openin (top_of_set U) V \<and> (\<exists>T. T \<in> \<C> \<and> V \<subseteq> T)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5831  | 
using D1 intF by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5832  | 
    have *: "{X. (\<exists>V. X = U \<inter> V \<and> V \<in> \<D> \<and> V \<inter> K \<noteq> {}) \<and> X \<inter> (U \<inter> V) \<noteq> {}} \<subseteq>
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5833  | 
             (\<lambda>x. U \<inter> x) ` {U \<in> \<D>. U \<inter> V \<noteq> {}}" for V
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5834  | 
by blast  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5835  | 
    show "\<exists>V. openin (top_of_set U) V \<and> x \<in> V \<and> finite {X \<in> ?C. X \<inter> V \<noteq> {}}"
 | 
| 72238 | 5836  | 
if "x \<in> U" for x  | 
5837  | 
proof -  | 
|
5838  | 
      from D2 [OF that] obtain V where "open V" "x \<in> V" "finite {U \<in> \<D>. U \<inter> V \<noteq> {}}"
 | 
|
5839  | 
by auto  | 
|
5840  | 
with * show ?thesis  | 
|
5841  | 
by (rule_tac x="U \<inter> V" in exI) (auto intro: that finite_subset [OF *])  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5842  | 
qed  | 
| 72238 | 5843  | 
qed  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5844  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5845  | 
|
| 70136 | 5846  | 
corollary\<^marker>\<open>tag unimportant\<close> paracompact_closed:  | 
| 
69918
 
eddcc7c726f3
new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
 
paulson <lp15@cam.ac.uk> 
parents: 
69745 
diff
changeset
 | 
5847  | 
  fixes S :: "'a :: {metric_space,second_countable_topology} set"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5848  | 
assumes "closed S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5849  | 
and opC: "\<And>T. T \<in> \<C> \<Longrightarrow> open T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5850  | 
and "S \<subseteq> \<Union>\<C>"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5851  | 
obtains \<C>' where "S \<subseteq> \<Union>\<C>'"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5852  | 
and "\<And>U. U \<in> \<C>' \<Longrightarrow> open U \<and> (\<exists>T. T \<in> \<C> \<and> U \<subseteq> T)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5853  | 
and "\<And>x. \<exists>V. open V \<and> x \<in> V \<and>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5854  | 
                               finite {U. U \<in> \<C>' \<and> (U \<inter> V \<noteq> {})}"
 | 
| 
69918
 
eddcc7c726f3
new material;' strengthened material; moved proofs out of Function_Topology in order to lessen its dependencies
 
paulson <lp15@cam.ac.uk> 
parents: 
69745 
diff
changeset
 | 
5855  | 
by (rule paracompact_closedin [of UNIV S \<C>]) (auto simp: assms)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5856  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5857  | 
|
| 70136 | 5858  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>Closed-graph characterization of continuity\<close>  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5859  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5860  | 
lemma continuous_closed_graph_gen:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5861  | 
fixes T :: "'b::real_normed_vector set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5862  | 
assumes contf: "continuous_on S f" and fim: "f ` S \<subseteq> T"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5863  | 
shows "closedin (top_of_set (S \<times> T)) ((\<lambda>x. Pair x (f x)) ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5864  | 
proof -  | 
| 72238 | 5865  | 
  have eq: "((\<lambda>x. Pair x (f x)) ` S) = (S \<times> T \<inter> (\<lambda>z. (f \<circ> fst)z - snd z) -` {0})"
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5866  | 
using fim by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5867  | 
show ?thesis  | 
| 72567 | 5868  | 
unfolding eq  | 
5869  | 
by (intro continuous_intros continuous_closedin_preimage continuous_on_subset [OF contf]) auto  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5870  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5871  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5872  | 
lemma continuous_closed_graph_eq:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5873  | 
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5874  | 
assumes "compact T" and fim: "f ` S \<subseteq> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5875  | 
shows "continuous_on S f \<longleftrightarrow>  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5876  | 
closedin (top_of_set (S \<times> T)) ((\<lambda>x. Pair x (f x)) ` S)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5877  | 
(is "?lhs = ?rhs")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5878  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5879  | 
have "?lhs" if ?rhs  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5880  | 
proof (clarsimp simp add: continuous_on_closed_gen [OF fim])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5881  | 
fix U  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5882  | 
assume U: "closedin (top_of_set T) U"  | 
| 
66884
 
c2128ab11f61
Switching to inverse image and constant_on, plus some new material
 
paulson <lp15@cam.ac.uk> 
parents: 
66793 
diff
changeset
 | 
5883  | 
have eq: "(S \<inter> f -` U) = fst ` (((\<lambda>x. Pair x (f x)) ` S) \<inter> (S \<times> U))"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5884  | 
by (force simp: image_iff)  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5885  | 
show "closedin (top_of_set S) (S \<inter> f -` U)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5886  | 
by (simp add: U closedin_Int closedin_Times closed_map_fst [OF \<open>compact T\<close>] that eq)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5887  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5888  | 
with continuous_closed_graph_gen assms show ?thesis by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5889  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5890  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5891  | 
lemma continuous_closed_graph:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5892  | 
fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_vector"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5893  | 
assumes "closed S" and contf: "continuous_on S f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5894  | 
shows "closed ((\<lambda>x. Pair x (f x)) ` S)"  | 
| 72238 | 5895  | 
proof (rule closedin_closed_trans)  | 
5896  | 
show "closedin (top_of_set (S \<times> UNIV)) ((\<lambda>x. (x, f x)) ` S)"  | 
|
5897  | 
by (rule continuous_closed_graph_gen [OF contf subset_UNIV])  | 
|
5898  | 
qed (simp add: \<open>closed S\<close> closed_Times)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5899  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5900  | 
lemma continuous_from_closed_graph:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5901  | 
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5902  | 
assumes "compact T" and fim: "f ` S \<subseteq> T" and clo: "closed ((\<lambda>x. Pair x (f x)) ` S)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5903  | 
shows "continuous_on S f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5904  | 
using fim clo  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5905  | 
by (auto intro: closed_subset simp: continuous_closed_graph_eq [OF \<open>compact T\<close> fim])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5906  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5907  | 
lemma continuous_on_Un_local_open:  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5908  | 
assumes opS: "openin (top_of_set (S \<union> T)) S"  | 
| 
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5909  | 
and opT: "openin (top_of_set (S \<union> T)) T"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5910  | 
and contf: "continuous_on S f" and contg: "continuous_on T f"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5911  | 
shows "continuous_on (S \<union> T) f"  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5912  | 
  using pasting_lemma [of "{S,T}" "top_of_set (S \<union> T)" id euclidean "\<lambda>i. f" f] contf contg opS opT
 | 
| 
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5913  | 
by (simp add: subtopology_subtopology) (metis inf.absorb2 openin_imp_subset)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5914  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5915  | 
lemma continuous_on_cases_local_open:  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5916  | 
assumes opS: "openin (top_of_set (S \<union> T)) S"  | 
| 
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5917  | 
and opT: "openin (top_of_set (S \<union> T)) T"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5918  | 
and contf: "continuous_on S f" and contg: "continuous_on T g"  | 
| 69508 | 5919  | 
and fg: "\<And>x. x \<in> S \<and> \<not>P x \<or> x \<in> T \<and> P x \<Longrightarrow> f x = g x"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5920  | 
shows "continuous_on (S \<union> T) (\<lambda>x. if P x then f x else g x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5921  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5922  | 
have "\<And>x. x \<in> S \<Longrightarrow> (if P x then f x else g x) = f x" "\<And>x. x \<in> T \<Longrightarrow> (if P x then f x else g x) = g x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5923  | 
by (simp_all add: fg)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5924  | 
then have "continuous_on S (\<lambda>x. if P x then f x else g x)" "continuous_on T (\<lambda>x. if P x then f x else g x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5925  | 
by (simp_all add: contf contg cong: continuous_on_cong)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5926  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5927  | 
by (rule continuous_on_Un_local_open [OF opS opT])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5928  | 
qed  | 
| 
69922
 
4a9167f377b0
new material about topology, etc.; also fixes for yesterday's
 
paulson <lp15@cam.ac.uk> 
parents: 
69918 
diff
changeset
 | 
5929  | 
|
| 70136 | 5930  | 
subsection\<^marker>\<open>tag unimportant\<close>\<open>The union of two collinear segments is another segment\<close>  | 
5931  | 
||
5932  | 
proposition\<^marker>\<open>tag unimportant\<close> in_convex_hull_exchange:  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5933  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5934  | 
assumes a: "a \<in> convex hull S" and xS: "x \<in> convex hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5935  | 
  obtains b where "b \<in> S" "x \<in> convex hull (insert a (S - {b}))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5936  | 
proof (cases "a \<in> S")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5937  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5938  | 
with xS insert_Diff that show ?thesis by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5939  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5940  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5941  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5942  | 
  proof (cases "finite S \<and> card S \<le> Suc (DIM('a))")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5943  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5944  | 
then obtain u where u0: "\<And>i. i \<in> S \<Longrightarrow> 0 \<le> u i" and u1: "sum u S = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5945  | 
and ua: "(\<Sum>i\<in>S. u i *\<^sub>R i) = a"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5946  | 
using a by (auto simp: convex_hull_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5947  | 
obtain v where v0: "\<And>i. i \<in> S \<Longrightarrow> 0 \<le> v i" and v1: "sum v S = 1"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5948  | 
and vx: "(\<Sum>i\<in>S. v i *\<^sub>R i) = x"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5949  | 
using True xS by (auto simp: convex_hull_finite)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5950  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5951  | 
proof (cases "\<exists>b. b \<in> S \<and> v b = 0")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5952  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5953  | 
then obtain b where b: "b \<in> S" "v b = 0"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5954  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5955  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5956  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5957  | 
        have fin: "finite (insert a (S - {b}))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5958  | 
using sum.infinite v1 by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5959  | 
        show "x \<in> convex hull insert a (S - {b})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5960  | 
unfolding convex_hull_finite [OF fin] mem_Collect_eq  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5961  | 
proof (intro conjI exI ballI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5962  | 
          have "(\<Sum>x \<in> insert a (S - {b}). if x = a then 0 else v x) =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5963  | 
                (\<Sum>x \<in> S - {b}. if x = a then 0 else v x)"
 | 
| 72238 | 5964  | 
using fin by (force intro: sum.mono_neutral_right)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5965  | 
          also have "... = (\<Sum>x \<in> S - {b}. v x)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5966  | 
using b False by (auto intro!: sum.cong split: if_split_asm)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5967  | 
also have "... = (\<Sum>x\<in>S. v x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5968  | 
by (metis \<open>v b = 0\<close> diff_zero sum.infinite sum_diff1 u1 zero_neq_one)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5969  | 
          finally show "(\<Sum>x\<in>insert a (S - {b}). if x = a then 0 else v x) = 1"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5970  | 
by (simp add: v1)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5971  | 
          show "\<And>x. x \<in> insert a (S - {b}) \<Longrightarrow> 0 \<le> (if x = a then 0 else v x)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5972  | 
by (auto simp: v0)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5973  | 
          have "(\<Sum>x \<in> insert a (S - {b}). (if x = a then 0 else v x) *\<^sub>R x) =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5974  | 
                (\<Sum>x \<in> S - {b}. (if x = a then 0 else v x) *\<^sub>R x)"
 | 
| 72238 | 5975  | 
using fin by (force intro: sum.mono_neutral_right)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5976  | 
          also have "... = (\<Sum>x \<in> S - {b}. v x *\<^sub>R x)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5977  | 
using b False by (auto intro!: sum.cong split: if_split_asm)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5978  | 
also have "... = (\<Sum>x\<in>S. v x *\<^sub>R x)"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
5979  | 
by (metis (no_types, lifting) b(2) diff_zero fin finite.emptyI finite_Diff2 finite_insert scale_eq_0_iff sum_diff1)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5980  | 
          finally show "(\<Sum>x\<in>insert a (S - {b}). (if x = a then 0 else v x) *\<^sub>R x) = x"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5981  | 
by (simp add: vx)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5982  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5983  | 
qed (rule \<open>b \<in> S\<close>)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5984  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5985  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5986  | 
have le_Max: "u i / v i \<le> Max ((\<lambda>i. u i / v i) ` S)" if "i \<in> S" for i  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5987  | 
by (simp add: True that)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5988  | 
have "Max ((\<lambda>i. u i / v i) ` S) \<in> (\<lambda>i. u i / v i) ` S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5989  | 
using True v1 by (auto intro: Max_in)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5990  | 
then obtain b where "b \<in> S" and beq: "Max ((\<lambda>b. u b / v b) ` S) = u b / v b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5991  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5992  | 
then have "0 \<noteq> u b / v b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5993  | 
using le_Max beq divide_le_0_iff le_numeral_extra(2) sum_nonpos u1  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5994  | 
by (metis False eq_iff v0)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5995  | 
then have "0 < u b" "0 < v b"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5996  | 
using False \<open>b \<in> S\<close> u0 v0 by force+  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5997  | 
      have fin: "finite (insert a (S - {b}))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5998  | 
using sum.infinite v1 by fastforce  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
5999  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6000  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6001  | 
        show "x \<in> convex hull insert a (S - {b})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6002  | 
unfolding convex_hull_finite [OF fin] mem_Collect_eq  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6003  | 
proof (intro conjI exI ballI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6004  | 
          have "(\<Sum>x \<in> insert a (S - {b}). if x=a then v b / u b else v x - (v b / u b) * u x) =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6005  | 
                v b / u b + (\<Sum>x \<in> S - {b}. v x - (v b / u b) * u x)"
 | 
| 72238 | 6006  | 
using \<open>a \<notin> S\<close> \<open>b \<in> S\<close> True  | 
6007  | 
by (auto intro!: sum.cong split: if_split_asm)  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6008  | 
          also have "... = v b / u b + (\<Sum>x \<in> S - {b}. v x) - (v b / u b) * (\<Sum>x \<in> S - {b}. u x)"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6009  | 
by (simp add: Groups_Big.sum_subtractf sum_distrib_left)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6010  | 
also have "... = (\<Sum>x\<in>S. v x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6011  | 
using \<open>0 < u b\<close> True by (simp add: Groups_Big.sum_diff1 u1 field_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6012  | 
          finally show "sum (\<lambda>x. if x=a then v b / u b else v x - (v b / u b) * u x) (insert a (S - {b})) = 1"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6013  | 
by (simp add: v1)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6014  | 
show "0 \<le> (if i = a then v b / u b else v i - v b / u b * u i)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6015  | 
            if "i \<in> insert a (S - {b})" for i
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6016  | 
using \<open>0 < u b\<close> \<open>0 < v b\<close> v0 [of i] le_Max [of i] beq that False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6017  | 
by (auto simp: field_simps split: if_split_asm)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6018  | 
          have "(\<Sum>x\<in>insert a (S - {b}). (if x=a then v b / u b else v x - v b / u b * u x) *\<^sub>R x) =
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6019  | 
                (v b / u b) *\<^sub>R a + (\<Sum>x\<in>S - {b}. (v x - v b / u b * u x) *\<^sub>R x)"
 | 
| 72238 | 6020  | 
using \<open>a \<notin> S\<close> \<open>b \<in> S\<close> True by (auto intro!: sum.cong split: if_split_asm)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6021  | 
          also have "... = (v b / u b) *\<^sub>R a + (\<Sum>x \<in> S - {b}. v x *\<^sub>R x) - (v b / u b) *\<^sub>R (\<Sum>x \<in> S - {b}. u x *\<^sub>R x)"
 | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
6022  | 
by (simp add: Groups_Big.sum_subtractf scaleR_left_diff_distrib sum_distrib_left scale_sum_right)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6023  | 
also have "... = (\<Sum>x\<in>S. v x *\<^sub>R x)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6024  | 
using \<open>0 < u b\<close> True by (simp add: ua vx Groups_Big.sum_diff1 algebra_simps)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6025  | 
finally  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6026  | 
          show "(\<Sum>x\<in>insert a (S - {b}). (if x=a then v b / u b else v x - v b / u b * u x) *\<^sub>R x) = x"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6027  | 
by (simp add: vx)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6028  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6029  | 
qed (rule \<open>b \<in> S\<close>)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6030  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6031  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6032  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6033  | 
    obtain T where "finite T" "T \<subseteq> S" and caT: "card T \<le> Suc (DIM('a))" and xT: "x \<in> convex hull T"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6034  | 
using xS by (auto simp: caratheodory [of S])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6035  | 
with False obtain b where b: "b \<in> S" "b \<notin> T"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6036  | 
by (metis antisym subsetI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6037  | 
show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6038  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6039  | 
      show "x \<in> convex hull insert a (S - {b})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6040  | 
using \<open>T \<subseteq> S\<close> b by (blast intro: subsetD [OF hull_mono xT])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6041  | 
qed (rule \<open>b \<in> S\<close>)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6042  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6043  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6044  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6045  | 
lemma convex_hull_exchange_Union:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6046  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6047  | 
assumes "a \<in> convex hull S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6048  | 
  shows "convex hull S = (\<Union>b \<in> S. convex hull (insert a (S - {b})))" (is "?lhs = ?rhs")
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6049  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6050  | 
show "?lhs \<subseteq> ?rhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6051  | 
by (blast intro: in_convex_hull_exchange [OF assms])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6052  | 
show "?rhs \<subseteq> ?lhs"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6053  | 
proof clarify  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6054  | 
fix x b  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6055  | 
    assume"b \<in> S" "x \<in> convex hull insert a (S - {b})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6056  | 
then show "x \<in> convex hull S" if "b \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6057  | 
by (metis (no_types) that assms order_refl hull_mono hull_redundant insert_Diff_single insert_subset subsetCE)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6058  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6059  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6060  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6061  | 
lemma Un_closed_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6062  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6063  | 
assumes "b \<in> closed_segment a c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6064  | 
shows "closed_segment a b \<union> closed_segment b c = closed_segment a c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6065  | 
proof (cases "c = a")  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6066  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6067  | 
with assms show ?thesis by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6068  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6069  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6070  | 
  with assms have "convex hull {a, b} \<union> convex hull {b, c} = (\<Union>ba\<in>{a, c}. convex hull insert b ({a, c} - {ba}))"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6071  | 
by (auto simp: insert_Diff_if insert_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6072  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6073  | 
using convex_hull_exchange_Union  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6074  | 
by (metis assms segment_convex_hull)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6075  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6076  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6077  | 
lemma Un_open_segment:  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6078  | 
fixes a :: "'a::euclidean_space"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6079  | 
assumes "b \<in> open_segment a c"  | 
| 72567 | 6080  | 
  shows "open_segment a b \<union> {b} \<union> open_segment b c = open_segment a c" (is "?lhs = ?rhs")
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6081  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6082  | 
have b: "b \<in> closed_segment a c"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6083  | 
by (simp add: assms open_closed_segment)  | 
| 72567 | 6084  | 
have *: "?rhs \<subseteq> insert b (open_segment a b \<union> open_segment b c)"  | 
6085  | 
          if "{b,c,a} \<union> open_segment a b \<union> open_segment b c = {c,a} \<union> ?rhs"
 | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6086  | 
proof -  | 
| 72567 | 6087  | 
have "insert a (insert c (insert b (open_segment a b \<union> open_segment b c))) = insert a (insert c (?rhs))"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6088  | 
using that by (simp add: insert_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6089  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6090  | 
by (metis (no_types) Diff_cancel Diff_eq_empty_iff Diff_insert2 open_segment_def)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6091  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6092  | 
show ?thesis  | 
| 72567 | 6093  | 
proof  | 
6094  | 
show "?lhs \<subseteq> ?rhs"  | 
|
6095  | 
by (simp add: assms b subset_open_segment)  | 
|
6096  | 
show "?rhs \<subseteq> ?lhs"  | 
|
6097  | 
using Un_closed_segment [OF b] *  | 
|
6098  | 
by (simp add: closed_segment_eq_open insert_commute)  | 
|
6099  | 
qed  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6100  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6101  | 
|
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6102  | 
subsection\<open>Covering an open set by a countable chain of compact sets\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6103  | 
|
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
6104  | 
proposition open_Union_compact_subsets:  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6105  | 
fixes S :: "'a::euclidean_space set"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6106  | 
assumes "open S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6107  | 
obtains C where "\<And>n. compact(C n)" "\<And>n. C n \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6108  | 
"\<And>n. C n \<subseteq> interior(C(Suc n))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6109  | 
"\<Union>(range C) = S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6110  | 
"\<And>K. \<lbrakk>compact K; K \<subseteq> S\<rbrakk> \<Longrightarrow> \<exists>N. \<forall>n\<ge>N. K \<subseteq> (C n)"  | 
| 
68607
 
67bb59e49834
make theorem, corollary, and proposition %important for HOL-Analysis manual
 
immler 
parents: 
68527 
diff
changeset
 | 
6111  | 
proof (cases "S = {}")
 | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6112  | 
case True  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6113  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6114  | 
    by (rule_tac C = "\<lambda>n. {}" in that) auto
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6115  | 
next  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6116  | 
case False  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6117  | 
then obtain a where "a \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6118  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6119  | 
  let ?C = "\<lambda>n. cball a (real n) - (\<Union>x \<in> -S. \<Union>e \<in> ball 0 (1 / real(Suc n)). {x + e})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6120  | 
have "\<exists>N. \<forall>n\<ge>N. K \<subseteq> (f n)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6121  | 
if "\<And>n. compact(f n)" and sub_int: "\<And>n. f n \<subseteq> interior (f(Suc n))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6122  | 
and eq: "\<Union>(range f) = S" and "compact K" "K \<subseteq> S" for f K  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6123  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6124  | 
have *: "\<forall>n. f n \<subseteq> (\<Union>n. interior (f n))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6125  | 
by (meson Sup_upper2 UNIV_I \<open>\<And>n. f n \<subseteq> interior (f (Suc n))\<close> image_iff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6126  | 
have mono: "\<And>m n. m \<le> n \<Longrightarrow>f m \<subseteq> f n"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6127  | 
by (meson dual_order.trans interior_subset lift_Suc_mono_le sub_int)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6128  | 
obtain I where "finite I" and I: "K \<subseteq> (\<Union>i\<in>I. interior (f i))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6129  | 
proof (rule compactE_image [OF \<open>compact K\<close>])  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6130  | 
show "K \<subseteq> (\<Union>n. interior (f n))"  | 
| 69313 | 6131  | 
using \<open>K \<subseteq> S\<close> \<open>\<Union>(f ` UNIV) = S\<close> * by blast  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6132  | 
qed auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6133  | 
    { fix n
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6134  | 
assume n: "Max I \<le> n"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6135  | 
have "(\<Union>i\<in>I. interior (f i)) \<subseteq> f n"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6136  | 
by (rule UN_least) (meson dual_order.trans interior_subset mono I Max_ge [OF \<open>finite I\<close>] n)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6137  | 
then have "K \<subseteq> f n"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6138  | 
using I by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6139  | 
}  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6140  | 
then show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6141  | 
by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6142  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6143  | 
moreover have "\<exists>f. (\<forall>n. compact(f n)) \<and> (\<forall>n. (f n) \<subseteq> S) \<and> (\<forall>n. (f n) \<subseteq> interior(f(Suc n))) \<and>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6144  | 
((\<Union>(range f) = S))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6145  | 
proof (intro exI conjI allI)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6146  | 
show "\<And>n. compact (?C n)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6147  | 
by (auto simp: compact_diff open_sums)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6148  | 
show "\<And>n. ?C n \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6149  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6150  | 
show "?C n \<subseteq> interior (?C (Suc n))" for n  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6151  | 
proof (simp add: interior_diff, rule Diff_mono)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6152  | 
show "cball a (real n) \<subseteq> ball a (1 + real n)"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6153  | 
by (simp add: cball_subset_ball_iff)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6154  | 
      have cl: "closed (\<Union>x\<in>- S. \<Union>e\<in>cball 0 (1 / (2 + real n)). {x + e})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6155  | 
using assms by (auto intro: closed_compact_sums)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6156  | 
      have "closure (\<Union>x\<in>- S. \<Union>y\<in>ball 0 (1 / (2 + real n)). {x + y})
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6157  | 
            \<subseteq> (\<Union>x \<in> -S. \<Union>e \<in> cball 0 (1 / (2 + real n)). {x + e})"
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6158  | 
by (intro closure_minimal UN_mono ball_subset_cball order_refl cl)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6159  | 
      also have "... \<subseteq> (\<Union>x \<in> -S. \<Union>y\<in>ball 0 (1 / (1 + real n)). {x + y})"
 | 
| 72567 | 6160  | 
by (simp add: cball_subset_ball_iff field_split_simps UN_mono)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6161  | 
      finally show "closure (\<Union>x\<in>- S. \<Union>y\<in>ball 0 (1 / (2 + real n)). {x + y})
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6162  | 
                    \<subseteq> (\<Union>x \<in> -S. \<Union>y\<in>ball 0 (1 / (1 + real n)). {x + y})" .
 | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6163  | 
qed  | 
| 69325 | 6164  | 
have "S \<subseteq> \<Union> (range ?C)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6165  | 
proof  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6166  | 
fix x  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6167  | 
assume x: "x \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6168  | 
then obtain e where "e > 0" and e: "ball x e \<subseteq> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6169  | 
using assms open_contains_ball by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6170  | 
then obtain N1 where "N1 > 0" and N1: "real N1 > 1/e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6171  | 
using reals_Archimedean2  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6172  | 
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)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6173  | 
obtain N2 where N2: "norm(x - a) \<le> real N2"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6174  | 
by (meson real_arch_simple)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6175  | 
have N12: "inverse((N1 + N2) + 1) \<le> inverse(N1)"  | 
| 
70817
 
dd675800469d
dedicated fact collections for algebraic simplification rules potentially splitting goals
 
haftmann 
parents: 
70802 
diff
changeset
 | 
6176  | 
using \<open>N1 > 0\<close> by (auto simp: field_split_simps)  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6177  | 
have "x \<noteq> y + z" if "y \<notin> S" "norm z < 1 / (1 + (real N1 + real N2))" for y z  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6178  | 
proof -  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6179  | 
have "e * real N1 < e * (1 + (real N1 + real N2))"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6180  | 
by (simp add: \<open>0 < e\<close>)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6181  | 
then have "1 / (1 + (real N1 + real N2)) < e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6182  | 
using N1 \<open>e > 0\<close>  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6183  | 
by (metis divide_less_eq less_trans mult.commute of_nat_add of_nat_less_0_iff of_nat_Suc)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6184  | 
then have "x - z \<in> ball x e"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6185  | 
using that by simp  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6186  | 
then have "x - z \<in> S"  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6187  | 
using e by blast  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6188  | 
with that show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6189  | 
by auto  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6190  | 
qed  | 
| 69325 | 6191  | 
with N2 show "x \<in> \<Union> (range ?C)"  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6192  | 
by (rule_tac a = "N1+N2" in UN_I) (auto simp: dist_norm norm_minus_commute)  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6193  | 
qed  | 
| 69325 | 6194  | 
then show "\<Union> (range ?C) = S" by auto  | 
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6195  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6196  | 
ultimately show ?thesis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6197  | 
using that by metis  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6198  | 
qed  | 
| 
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6199  | 
|
| 
67986
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6200  | 
|
| 69272 | 6201  | 
subsection\<open>Orthogonal complement\<close>  | 
| 
67986
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6202  | 
|
| 70136 | 6203  | 
definition\<^marker>\<open>tag important\<close> orthogonal_comp ("_\<^sup>\<bottom>" [80] 80)
 | 
| 
67986
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6204  | 
  where "orthogonal_comp W \<equiv> {x. \<forall>y \<in> W. orthogonal y x}"
 | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6205  | 
|
| 69541 | 6206  | 
proposition subspace_orthogonal_comp: "subspace (W\<^sup>\<bottom>)"  | 
| 
67986
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6207  | 
unfolding subspace_def orthogonal_comp_def orthogonal_def  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6208  | 
by (auto simp: inner_right_distrib)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6209  | 
|
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6210  | 
lemma orthogonal_comp_anti_mono:  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6211  | 
assumes "A \<subseteq> B"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6212  | 
shows "B\<^sup>\<bottom> \<subseteq> A\<^sup>\<bottom>"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6213  | 
proof  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6214  | 
fix x assume x: "x \<in> B\<^sup>\<bottom>"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6215  | 
show "x \<in> orthogonal_comp A" using x unfolding orthogonal_comp_def  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6216  | 
by (simp add: orthogonal_def, metis assms in_mono)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6217  | 
qed  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6218  | 
|
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6219  | 
lemma orthogonal_comp_null [simp]: "{0}\<^sup>\<bottom> = UNIV"
 | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6220  | 
by (auto simp: orthogonal_comp_def orthogonal_def)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6221  | 
|
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6222  | 
lemma orthogonal_comp_UNIV [simp]: "UNIV\<^sup>\<bottom> = {0}"
 | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6223  | 
unfolding orthogonal_comp_def orthogonal_def  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6224  | 
by auto (use inner_eq_zero_iff in blast)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6225  | 
|
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6226  | 
lemma orthogonal_comp_subset: "U \<subseteq> U\<^sup>\<bottom>\<^sup>\<bottom>"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6227  | 
by (auto simp: orthogonal_comp_def orthogonal_def inner_commute)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6228  | 
|
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6229  | 
lemma subspace_sum_minimal:  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6230  | 
assumes "S \<subseteq> U" "T \<subseteq> U" "subspace U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6231  | 
shows "S + T \<subseteq> U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6232  | 
proof  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6233  | 
fix x  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6234  | 
assume "x \<in> S + T"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6235  | 
then obtain xs xt where "xs \<in> S" "xt \<in> T" "x = xs+xt"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6236  | 
by (meson set_plus_elim)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6237  | 
then show "x \<in> U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6238  | 
by (meson assms subsetCE subspace_add)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6239  | 
qed  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6240  | 
|
| 69541 | 6241  | 
proposition subspace_sum_orthogonal_comp:  | 
| 
67986
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6242  | 
fixes U :: "'a :: euclidean_space set"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6243  | 
assumes "subspace U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6244  | 
shows "U + U\<^sup>\<bottom> = UNIV"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6245  | 
proof -  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6246  | 
obtain B where "B \<subseteq> U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6247  | 
and ortho: "pairwise orthogonal B" "\<And>x. x \<in> B \<Longrightarrow> norm x = 1"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6248  | 
and "independent B" "card B = dim U" "span B = U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6249  | 
using orthonormal_basis_subspace [OF assms] by metis  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6250  | 
then have "finite B"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6251  | 
by (simp add: indep_card_eq_dim_span)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6252  | 
have *: "\<forall>x\<in>B. \<forall>y\<in>B. x \<bullet> y = (if x=y then 1 else 0)"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6253  | 
using ortho norm_eq_1 by (auto simp: orthogonal_def pairwise_def)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6254  | 
  { fix v
 | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6255  | 
let ?u = "\<Sum>b\<in>B. (v \<bullet> b) *\<^sub>R b"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6256  | 
have "v = ?u + (v - ?u)"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6257  | 
by simp  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6258  | 
moreover have "?u \<in> U"  | 
| 68074 | 6259  | 
by (metis (no_types, lifting) \<open>span B = U\<close> assms subspace_sum span_base span_mul)  | 
| 
67986
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6260  | 
moreover have "(v - ?u) \<in> U\<^sup>\<bottom>"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6261  | 
proof (clarsimp simp: orthogonal_comp_def orthogonal_def)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6262  | 
fix y  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6263  | 
assume "y \<in> U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6264  | 
with \<open>span B = U\<close> span_finite [OF \<open>finite B\<close>]  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6265  | 
obtain u where u: "y = (\<Sum>b\<in>B. u b *\<^sub>R b)"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6266  | 
by auto  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6267  | 
have "b \<bullet> (v - ?u) = 0" if "b \<in> B" for b  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6268  | 
using that \<open>finite B\<close>  | 
| 
69064
 
5840724b1d71
Prefix form of infix with * on either side no longer needs special treatment
 
nipkow 
parents: 
68796 
diff
changeset
 | 
6269  | 
by (simp add: * algebra_simps inner_sum_right if_distrib [of "(*)v" for v] inner_commute cong: if_cong)  | 
| 
67986
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6270  | 
then show "y \<bullet> (v - ?u) = 0"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6271  | 
by (simp add: u inner_sum_left)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6272  | 
qed  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6273  | 
ultimately have "v \<in> U + U\<^sup>\<bottom>"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6274  | 
using set_plus_intro by fastforce  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6275  | 
} then show ?thesis  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6276  | 
by auto  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6277  | 
qed  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6278  | 
|
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6279  | 
lemma orthogonal_Int_0:  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6280  | 
assumes "subspace U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6281  | 
  shows "U \<inter> U\<^sup>\<bottom> = {0}"
 | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6282  | 
using orthogonal_comp_def orthogonal_self  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6283  | 
by (force simp: assms subspace_0 subspace_orthogonal_comp)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6284  | 
|
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6285  | 
lemma orthogonal_comp_self:  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6286  | 
fixes U :: "'a :: euclidean_space set"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6287  | 
assumes "subspace U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6288  | 
shows "U\<^sup>\<bottom>\<^sup>\<bottom> = U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6289  | 
proof  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6290  | 
have ssU': "subspace (U\<^sup>\<bottom>)"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6291  | 
by (simp add: subspace_orthogonal_comp)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6292  | 
have "u \<in> U" if "u \<in> U\<^sup>\<bottom>\<^sup>\<bottom>" for u  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6293  | 
proof -  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6294  | 
obtain v w where "u = v+w" "v \<in> U" "w \<in> U\<^sup>\<bottom>"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6295  | 
using subspace_sum_orthogonal_comp [OF assms] set_plus_elim by blast  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6296  | 
then have "u-v \<in> U\<^sup>\<bottom>"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6297  | 
by simp  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6298  | 
moreover have "v \<in> U\<^sup>\<bottom>\<^sup>\<bottom>"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6299  | 
using \<open>v \<in> U\<close> orthogonal_comp_subset by blast  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6300  | 
then have "u-v \<in> U\<^sup>\<bottom>\<^sup>\<bottom>"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6301  | 
by (simp add: subspace_diff subspace_orthogonal_comp that)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6302  | 
ultimately have "u-v = 0"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6303  | 
using orthogonal_Int_0 ssU' by blast  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6304  | 
with \<open>v \<in> U\<close> show ?thesis  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6305  | 
by auto  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6306  | 
qed  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6307  | 
then show "U\<^sup>\<bottom>\<^sup>\<bottom> \<subseteq> U"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6308  | 
by auto  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6309  | 
qed (use orthogonal_comp_subset in auto)  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6310  | 
|
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6311  | 
lemma ker_orthogonal_comp_adjoint:  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6312  | 
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"  | 
| 
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6313  | 
assumes "linear f"  | 
| 72238 | 6314  | 
  shows "f -` {0} = (range (adjoint f))\<^sup>\<bottom>"
 | 
| 72567 | 6315  | 
proof -  | 
6316  | 
have "\<And>x. \<lbrakk>\<forall>y. y \<bullet> f x = 0\<rbrakk> \<Longrightarrow> f x = 0"  | 
|
6317  | 
using assms inner_commute all_zero_iff by metis  | 
|
6318  | 
then show ?thesis  | 
|
6319  | 
using assms  | 
|
6320  | 
by (auto simp: orthogonal_comp_def orthogonal_def adjoint_works inner_commute)  | 
|
6321  | 
qed  | 
|
| 
67986
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6322  | 
|
| 70136 | 6323  | 
subsection\<^marker>\<open>tag unimportant\<close> \<open>A non-injective linear function maps into a hyperplane.\<close>  | 
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6324  | 
|
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6325  | 
lemma linear_surj_adj_imp_inj:  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6326  | 
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6327  | 
assumes "linear f" "surj (adjoint f)"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6328  | 
shows "inj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6329  | 
proof -  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6330  | 
have "\<exists>x. y = adjoint f x" for y  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6331  | 
using assms by (simp add: surjD)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6332  | 
then show "inj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6333  | 
using assms unfolding inj_on_def image_def  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6334  | 
by (metis (no_types) adjoint_works euclidean_eqI)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6335  | 
qed  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6336  | 
|
| 70138 | 6337  | 
\<comment> \<open>\<^url>\<open>https://mathonline.wikidot.com/injectivity-and-surjectivity-of-the-adjoint-of-a-linear-map\<close>\<close>  | 
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6338  | 
lemma surj_adjoint_iff_inj [simp]:  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6339  | 
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6340  | 
assumes "linear f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6341  | 
shows "surj (adjoint f) \<longleftrightarrow> inj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6342  | 
proof  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6343  | 
assume "surj (adjoint f)"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6344  | 
then show "inj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6345  | 
by (simp add: assms linear_surj_adj_imp_inj)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6346  | 
next  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6347  | 
assume "inj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6348  | 
  have "f -` {0} = {0}"
 | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6349  | 
using assms \<open>inj f\<close> linear_0 linear_injective_0 by fastforce  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6350  | 
  moreover have "f -` {0} = range (adjoint f)\<^sup>\<bottom>"
 | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6351  | 
by (intro ker_orthogonal_comp_adjoint assms)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6352  | 
ultimately have "range (adjoint f)\<^sup>\<bottom>\<^sup>\<bottom> = UNIV"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6353  | 
by (metis orthogonal_comp_null)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6354  | 
then show "surj (adjoint f)"  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
6355  | 
using adjoint_linear \<open>linear f\<close>  | 
| 
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
6356  | 
by (subst (asm) orthogonal_comp_self)  | 
| 
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
6357  | 
(simp add: adjoint_linear linear_subspace_image)  | 
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6358  | 
qed  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6359  | 
|
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6360  | 
lemma inj_adjoint_iff_surj [simp]:  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6361  | 
fixes f :: "'m::euclidean_space \<Rightarrow> 'n::euclidean_space"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6362  | 
assumes "linear f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6363  | 
shows "inj (adjoint f) \<longleftrightarrow> surj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6364  | 
proof  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6365  | 
assume "inj (adjoint f)"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6366  | 
  have "(adjoint f) -` {0} = {0}"
 | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6367  | 
by (metis \<open>inj (adjoint f)\<close> adjoint_linear assms surj_adjoint_iff_inj ker_orthogonal_comp_adjoint orthogonal_comp_UNIV)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6368  | 
  then have "(range(f))\<^sup>\<bottom> = {0}"
 | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6369  | 
by (metis (no_types, hide_lams) adjoint_adjoint adjoint_linear assms ker_orthogonal_comp_adjoint set_zero)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6370  | 
then show "surj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6371  | 
by (metis \<open>inj (adjoint f)\<close> adjoint_adjoint adjoint_linear assms surj_adjoint_iff_inj)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6372  | 
next  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6373  | 
assume "surj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6374  | 
  then have "range f = (adjoint f -` {0})\<^sup>\<bottom>"
 | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6375  | 
by (simp add: adjoint_adjoint adjoint_linear assms ker_orthogonal_comp_adjoint)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6376  | 
  then have "{0} = adjoint f -` {0}"
 | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6377  | 
using \<open>surj f\<close> adjoint_adjoint adjoint_linear assms ker_orthogonal_comp_adjoint by force  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6378  | 
then show "inj (adjoint f)"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6379  | 
by (simp add: \<open>surj f\<close> adjoint_adjoint adjoint_linear assms linear_surj_adj_imp_inj)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6380  | 
qed  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6381  | 
|
| 69541 | 6382  | 
lemma linear_singular_into_hyperplane:  | 
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6383  | 
fixes f :: "'n::euclidean_space \<Rightarrow> 'n"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6384  | 
assumes "linear f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6385  | 
shows "\<not> inj f \<longleftrightarrow> (\<exists>a. a \<noteq> 0 \<and> (\<forall>x. a \<bullet> f x = 0))" (is "_ = ?rhs")  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6386  | 
proof  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6387  | 
assume "\<not>inj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6388  | 
then show ?rhs  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6389  | 
using all_zero_iff  | 
| 
68072
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
6390  | 
by (metis (no_types, hide_lams) adjoint_clauses(2) adjoint_linear assms  | 
| 
 
493b818e8e10
added Johannes' generalizations Modules.thy and Vector_Spaces.thy; adapted HOL and HOL-Analysis accordingly
 
immler 
parents: 
67990 
diff
changeset
 | 
6391  | 
linear_injective_0 linear_injective_imp_surjective linear_surj_adj_imp_inj)  | 
| 
67989
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6392  | 
next  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6393  | 
assume ?rhs  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6394  | 
then show "\<not>inj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6395  | 
by (metis assms linear_injective_isomorphism all_zero_iff)  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6396  | 
qed  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6397  | 
|
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6398  | 
lemma linear_singular_image_hyperplane:  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6399  | 
fixes f :: "'n::euclidean_space \<Rightarrow> 'n"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6400  | 
assumes "linear f" "\<not>inj f"  | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6401  | 
  obtains a where "a \<noteq> 0" "\<And>S. f ` S \<subseteq> {x. a \<bullet> x = 0}"
 | 
| 
 
706f86afff43
more results about measure and negligibility
 
paulson <lp15@cam.ac.uk> 
parents: 
67986 
diff
changeset
 | 
6402  | 
using assms by (fastforce simp add: linear_singular_into_hyperplane)  | 
| 
67986
 
b65c4a6a015e
quite a few more results about negligibility, etc., and a bit of tidying up
 
paulson <lp15@cam.ac.uk> 
parents: 
67968 
diff
changeset
 | 
6403  | 
|
| 
66289
 
2562f151541c
Divided Convex_Euclidean_Space.thy in half, creating new theory Starlike
 
paulson <lp15@cam.ac.uk> 
parents:  
diff
changeset
 | 
6404  | 
end  |