| author | wenzelm |
| Mon, 24 Aug 2015 20:08:00 +0200 | |
| changeset 61017 | a538a03972d2 |
| parent 60974 | 6a6f15d8fbc4 |
| child 61204 | 3e491e34a62e |
| permissions | -rw-r--r-- |
| 41959 | 1 |
(* Title: HOL/Multivariate_Analysis/Path_Connected.thy |
| 60303 | 2 |
Author: Robert Himmelmann, TU Muenchen, and LCP with material from HOL Light |
| 36583 | 3 |
*) |
4 |
||
| 60420 | 5 |
section \<open>Continuous paths and path-connected sets\<close> |
| 36583 | 6 |
|
7 |
theory Path_Connected |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
8 |
imports Convex_Euclidean_Space |
| 36583 | 9 |
begin |
10 |
||
| 60303 | 11 |
(*FIXME move up?*) |
12 |
lemma image_affinity_interval: |
|
13 |
fixes c :: "'a::ordered_real_vector" |
|
14 |
shows "((\<lambda>x. m *\<^sub>R x + c) ` {a..b}) = (if {a..b}={} then {}
|
|
15 |
else if 0 <= m then {m *\<^sub>R a + c .. m *\<^sub>R b + c}
|
|
16 |
else {m *\<^sub>R b + c .. m *\<^sub>R a + c})"
|
|
17 |
apply (case_tac "m=0", force) |
|
18 |
apply (auto simp: scaleR_left_mono) |
|
19 |
apply (rule_tac x="inverse m *\<^sub>R (x-c)" in rev_image_eqI, auto simp: pos_le_divideR_eq le_diff_eq scaleR_left_mono_neg) |
|
20 |
apply (metis diff_le_eq inverse_inverse_eq order.not_eq_order_implies_strict pos_le_divideR_eq positive_imp_inverse_positive) |
|
21 |
apply (rule_tac x="inverse m *\<^sub>R (x-c)" in rev_image_eqI, auto simp: not_le neg_le_divideR_eq diff_le_eq) |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
22 |
using le_diff_eq scaleR_le_cancel_left_neg |
| 60303 | 23 |
apply fastforce |
24 |
done |
|
25 |
||
| 60420 | 26 |
subsection \<open>Paths and Arcs\<close> |
| 36583 | 27 |
|
| 49653 | 28 |
definition path :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> bool" |
| 53640 | 29 |
where "path g \<longleftrightarrow> continuous_on {0..1} g"
|
| 36583 | 30 |
|
| 49653 | 31 |
definition pathstart :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> 'a" |
| 36583 | 32 |
where "pathstart g = g 0" |
33 |
||
| 49653 | 34 |
definition pathfinish :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> 'a" |
| 36583 | 35 |
where "pathfinish g = g 1" |
36 |
||
| 49653 | 37 |
definition path_image :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> 'a set" |
| 36583 | 38 |
where "path_image g = g ` {0 .. 1}"
|
39 |
||
| 53640 | 40 |
definition reversepath :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> real \<Rightarrow> 'a" |
| 36583 | 41 |
where "reversepath g = (\<lambda>x. g(1 - x))" |
42 |
||
| 53640 | 43 |
definition joinpaths :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> (real \<Rightarrow> 'a) \<Rightarrow> real \<Rightarrow> 'a" |
| 36583 | 44 |
(infixr "+++" 75) |
45 |
where "g1 +++ g2 = (\<lambda>x. if x \<le> 1/2 then g1 (2 * x) else g2 (2 * x - 1))" |
|
46 |
||
| 49653 | 47 |
definition simple_path :: "(real \<Rightarrow> 'a::topological_space) \<Rightarrow> bool" |
| 36583 | 48 |
where "simple_path g \<longleftrightarrow> |
| 60303 | 49 |
path g \<and> (\<forall>x\<in>{0..1}. \<forall>y\<in>{0..1}. g x = g y \<longrightarrow> x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0)"
|
| 36583 | 50 |
|
| 60303 | 51 |
definition arc :: "(real \<Rightarrow> 'a :: topological_space) \<Rightarrow> bool" |
52 |
where "arc g \<longleftrightarrow> path g \<and> inj_on g {0..1}"
|
|
| 36583 | 53 |
|
| 49653 | 54 |
|
| 60420 | 55 |
subsection\<open>Invariance theorems\<close> |
| 60303 | 56 |
|
57 |
lemma path_eq: "path p \<Longrightarrow> (\<And>t. t \<in> {0..1} \<Longrightarrow> p t = q t) \<Longrightarrow> path q"
|
|
58 |
using continuous_on_eq path_def by blast |
|
59 |
||
60 |
lemma path_continuous_image: "path g \<Longrightarrow> continuous_on (path_image g) f \<Longrightarrow> path(f o g)" |
|
61 |
unfolding path_def path_image_def |
|
62 |
using continuous_on_compose by blast |
|
63 |
||
64 |
lemma path_translation_eq: |
|
65 |
fixes g :: "real \<Rightarrow> 'a :: real_normed_vector" |
|
66 |
shows "path((\<lambda>x. a + x) o g) = path g" |
|
67 |
proof - |
|
68 |
have g: "g = (\<lambda>x. -a + x) o ((\<lambda>x. a + x) o g)" |
|
69 |
by (rule ext) simp |
|
70 |
show ?thesis |
|
71 |
unfolding path_def |
|
72 |
apply safe |
|
73 |
apply (subst g) |
|
74 |
apply (rule continuous_on_compose) |
|
75 |
apply (auto intro: continuous_intros) |
|
76 |
done |
|
77 |
qed |
|
78 |
||
79 |
lemma path_linear_image_eq: |
|
80 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
|
81 |
assumes "linear f" "inj f" |
|
82 |
shows "path(f o g) = path g" |
|
83 |
proof - |
|
84 |
from linear_injective_left_inverse [OF assms] |
|
85 |
obtain h where h: "linear h" "h \<circ> f = id" |
|
86 |
by blast |
|
87 |
then have g: "g = h o (f o g)" |
|
88 |
by (metis comp_assoc id_comp) |
|
89 |
show ?thesis |
|
90 |
unfolding path_def |
|
91 |
using h assms |
|
92 |
by (metis g continuous_on_compose linear_continuous_on linear_conv_bounded_linear) |
|
93 |
qed |
|
94 |
||
95 |
lemma pathstart_translation: "pathstart((\<lambda>x. a + x) o g) = a + pathstart g" |
|
96 |
by (simp add: pathstart_def) |
|
97 |
||
98 |
lemma pathstart_linear_image_eq: "linear f \<Longrightarrow> pathstart(f o g) = f(pathstart g)" |
|
99 |
by (simp add: pathstart_def) |
|
100 |
||
101 |
lemma pathfinish_translation: "pathfinish((\<lambda>x. a + x) o g) = a + pathfinish g" |
|
102 |
by (simp add: pathfinish_def) |
|
103 |
||
104 |
lemma pathfinish_linear_image: "linear f \<Longrightarrow> pathfinish(f o g) = f(pathfinish g)" |
|
105 |
by (simp add: pathfinish_def) |
|
106 |
||
107 |
lemma path_image_translation: "path_image((\<lambda>x. a + x) o g) = (\<lambda>x. a + x) ` (path_image g)" |
|
108 |
by (simp add: image_comp path_image_def) |
|
109 |
||
110 |
lemma path_image_linear_image: "linear f \<Longrightarrow> path_image(f o g) = f ` (path_image g)" |
|
111 |
by (simp add: image_comp path_image_def) |
|
112 |
||
113 |
lemma reversepath_translation: "reversepath((\<lambda>x. a + x) o g) = (\<lambda>x. a + x) o reversepath g" |
|
114 |
by (rule ext) (simp add: reversepath_def) |
|
| 36583 | 115 |
|
| 60303 | 116 |
lemma reversepath_linear_image: "linear f \<Longrightarrow> reversepath(f o g) = f o reversepath g" |
117 |
by (rule ext) (simp add: reversepath_def) |
|
118 |
||
119 |
lemma joinpaths_translation: |
|
120 |
"((\<lambda>x. a + x) o g1) +++ ((\<lambda>x. a + x) o g2) = (\<lambda>x. a + x) o (g1 +++ g2)" |
|
121 |
by (rule ext) (simp add: joinpaths_def) |
|
122 |
||
123 |
lemma joinpaths_linear_image: "linear f \<Longrightarrow> (f o g1) +++ (f o g2) = f o (g1 +++ g2)" |
|
124 |
by (rule ext) (simp add: joinpaths_def) |
|
125 |
||
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
126 |
lemma simple_path_translation_eq: |
| 60303 | 127 |
fixes g :: "real \<Rightarrow> 'a::euclidean_space" |
128 |
shows "simple_path((\<lambda>x. a + x) o g) = simple_path g" |
|
129 |
by (simp add: simple_path_def path_translation_eq) |
|
130 |
||
131 |
lemma simple_path_linear_image_eq: |
|
132 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
|
133 |
assumes "linear f" "inj f" |
|
134 |
shows "simple_path(f o g) = simple_path g" |
|
135 |
using assms inj_on_eq_iff [of f] |
|
136 |
by (auto simp: path_linear_image_eq simple_path_def path_translation_eq) |
|
137 |
||
138 |
lemma arc_translation_eq: |
|
139 |
fixes g :: "real \<Rightarrow> 'a::euclidean_space" |
|
140 |
shows "arc((\<lambda>x. a + x) o g) = arc g" |
|
141 |
by (auto simp: arc_def inj_on_def path_translation_eq) |
|
142 |
||
143 |
lemma arc_linear_image_eq: |
|
144 |
fixes f :: "'a::euclidean_space \<Rightarrow> 'b::euclidean_space" |
|
145 |
assumes "linear f" "inj f" |
|
146 |
shows "arc(f o g) = arc g" |
|
147 |
using assms inj_on_eq_iff [of f] |
|
148 |
by (auto simp: arc_def inj_on_def path_linear_image_eq) |
|
149 |
||
| 60420 | 150 |
subsection\<open>Basic lemmas about paths\<close> |
| 60303 | 151 |
|
152 |
lemma arc_imp_simple_path: "arc g \<Longrightarrow> simple_path g" |
|
153 |
by (simp add: arc_def inj_on_def simple_path_def) |
|
154 |
||
155 |
lemma arc_imp_path: "arc g \<Longrightarrow> path g" |
|
156 |
using arc_def by blast |
|
157 |
||
158 |
lemma simple_path_imp_path: "simple_path g \<Longrightarrow> path g" |
|
159 |
using simple_path_def by blast |
|
160 |
||
161 |
lemma simple_path_cases: "simple_path g \<Longrightarrow> arc g \<or> pathfinish g = pathstart g" |
|
162 |
unfolding simple_path_def arc_def inj_on_def pathfinish_def pathstart_def |
|
163 |
by (force) |
|
164 |
||
165 |
lemma simple_path_imp_arc: "simple_path g \<Longrightarrow> pathfinish g \<noteq> pathstart g \<Longrightarrow> arc g" |
|
166 |
using simple_path_cases by auto |
|
167 |
||
168 |
lemma arc_distinct_ends: "arc g \<Longrightarrow> pathfinish g \<noteq> pathstart g" |
|
169 |
unfolding arc_def inj_on_def pathfinish_def pathstart_def |
|
170 |
by fastforce |
|
171 |
||
172 |
lemma arc_simple_path: "arc g \<longleftrightarrow> simple_path g \<and> pathfinish g \<noteq> pathstart g" |
|
173 |
using arc_distinct_ends arc_imp_simple_path simple_path_cases by blast |
|
174 |
||
175 |
lemma simple_path_eq_arc: "pathfinish g \<noteq> pathstart g \<Longrightarrow> (simple_path g = arc g)" |
|
176 |
by (simp add: arc_simple_path) |
|
| 36583 | 177 |
|
|
60974
6a6f15d8fbc4
New material and fixes related to the forthcoming Stone-Weierstrass development
paulson <lp15@cam.ac.uk>
parents:
60809
diff
changeset
|
178 |
lemma path_image_nonempty [simp]: "path_image g \<noteq> {}"
|
| 56188 | 179 |
unfolding path_image_def image_is_empty box_eq_empty |
| 53640 | 180 |
by auto |
| 36583 | 181 |
|
| 53640 | 182 |
lemma pathstart_in_path_image[intro]: "pathstart g \<in> path_image g" |
183 |
unfolding pathstart_def path_image_def |
|
184 |
by auto |
|
| 36583 | 185 |
|
| 53640 | 186 |
lemma pathfinish_in_path_image[intro]: "pathfinish g \<in> path_image g" |
187 |
unfolding pathfinish_def path_image_def |
|
188 |
by auto |
|
189 |
||
190 |
lemma connected_path_image[intro]: "path g \<Longrightarrow> connected (path_image g)" |
|
| 36583 | 191 |
unfolding path_def path_image_def |
| 60303 | 192 |
using connected_continuous_image connected_Icc by blast |
| 36583 | 193 |
|
| 53640 | 194 |
lemma compact_path_image[intro]: "path g \<Longrightarrow> compact (path_image g)" |
| 36583 | 195 |
unfolding path_def path_image_def |
| 60303 | 196 |
using compact_continuous_image connected_Icc by blast |
| 36583 | 197 |
|
| 53640 | 198 |
lemma reversepath_reversepath[simp]: "reversepath (reversepath g) = g" |
199 |
unfolding reversepath_def |
|
200 |
by auto |
|
| 36583 | 201 |
|
| 53640 | 202 |
lemma pathstart_reversepath[simp]: "pathstart (reversepath g) = pathfinish g" |
203 |
unfolding pathstart_def reversepath_def pathfinish_def |
|
204 |
by auto |
|
| 36583 | 205 |
|
| 53640 | 206 |
lemma pathfinish_reversepath[simp]: "pathfinish (reversepath g) = pathstart g" |
207 |
unfolding pathstart_def reversepath_def pathfinish_def |
|
208 |
by auto |
|
| 36583 | 209 |
|
| 49653 | 210 |
lemma pathstart_join[simp]: "pathstart (g1 +++ g2) = pathstart g1" |
| 53640 | 211 |
unfolding pathstart_def joinpaths_def pathfinish_def |
212 |
by auto |
|
| 36583 | 213 |
|
| 49653 | 214 |
lemma pathfinish_join[simp]: "pathfinish (g1 +++ g2) = pathfinish g2" |
| 53640 | 215 |
unfolding pathstart_def joinpaths_def pathfinish_def |
216 |
by auto |
|
| 36583 | 217 |
|
| 53640 | 218 |
lemma path_image_reversepath[simp]: "path_image (reversepath g) = path_image g" |
| 49653 | 219 |
proof - |
| 53640 | 220 |
have *: "\<And>g. path_image (reversepath g) \<subseteq> path_image g" |
| 49653 | 221 |
unfolding path_image_def subset_eq reversepath_def Ball_def image_iff |
| 60303 | 222 |
by force |
| 49653 | 223 |
show ?thesis |
224 |
using *[of g] *[of "reversepath g"] |
|
| 53640 | 225 |
unfolding reversepath_reversepath |
226 |
by auto |
|
| 49653 | 227 |
qed |
| 36583 | 228 |
|
| 53640 | 229 |
lemma path_reversepath [simp]: "path (reversepath g) \<longleftrightarrow> path g" |
| 49653 | 230 |
proof - |
231 |
have *: "\<And>g. path g \<Longrightarrow> path (reversepath g)" |
|
232 |
unfolding path_def reversepath_def |
|
233 |
apply (rule continuous_on_compose[unfolded o_def, of _ "\<lambda>x. 1 - x"]) |
|
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56188
diff
changeset
|
234 |
apply (intro continuous_intros) |
| 53640 | 235 |
apply (rule continuous_on_subset[of "{0..1}"])
|
236 |
apply assumption |
|
| 49653 | 237 |
apply auto |
238 |
done |
|
239 |
show ?thesis |
|
240 |
using *[of "reversepath g"] *[of g] |
|
241 |
unfolding reversepath_reversepath |
|
242 |
by (rule iffI) |
|
243 |
qed |
|
244 |
||
| 60303 | 245 |
lemma arc_reversepath: |
246 |
assumes "arc g" shows "arc(reversepath g)" |
|
247 |
proof - |
|
248 |
have injg: "inj_on g {0..1}"
|
|
249 |
using assms |
|
250 |
by (simp add: arc_def) |
|
251 |
have **: "\<And>x y::real. 1-x = 1-y \<Longrightarrow> x = y" |
|
252 |
by simp |
|
253 |
show ?thesis |
|
254 |
apply (auto simp: arc_def inj_on_def path_reversepath) |
|
255 |
apply (simp add: arc_imp_path assms) |
|
256 |
apply (rule **) |
|
257 |
apply (rule inj_onD [OF injg]) |
|
258 |
apply (auto simp: reversepath_def) |
|
259 |
done |
|
260 |
qed |
|
261 |
||
262 |
lemma simple_path_reversepath: "simple_path g \<Longrightarrow> simple_path (reversepath g)" |
|
263 |
apply (simp add: simple_path_def) |
|
264 |
apply (force simp: reversepath_def) |
|
265 |
done |
|
266 |
||
| 49653 | 267 |
lemmas reversepath_simps = |
268 |
path_reversepath path_image_reversepath pathstart_reversepath pathfinish_reversepath |
|
| 36583 | 269 |
|
| 49653 | 270 |
lemma path_join[simp]: |
271 |
assumes "pathfinish g1 = pathstart g2" |
|
272 |
shows "path (g1 +++ g2) \<longleftrightarrow> path g1 \<and> path g2" |
|
273 |
unfolding path_def pathfinish_def pathstart_def |
|
|
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
274 |
proof safe |
|
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
275 |
assume cont: "continuous_on {0..1} (g1 +++ g2)"
|
|
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
276 |
have g1: "continuous_on {0..1} g1 \<longleftrightarrow> continuous_on {0..1} ((g1 +++ g2) \<circ> (\<lambda>x. x / 2))"
|
|
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
277 |
by (intro continuous_on_cong refl) (auto simp: joinpaths_def) |
|
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
278 |
have g2: "continuous_on {0..1} g2 \<longleftrightarrow> continuous_on {0..1} ((g1 +++ g2) \<circ> (\<lambda>x. x / 2 + 1/2))"
|
| 53640 | 279 |
using assms |
280 |
by (intro continuous_on_cong refl) (auto simp: joinpaths_def pathfinish_def pathstart_def) |
|
281 |
show "continuous_on {0..1} g1" and "continuous_on {0..1} g2"
|
|
|
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51478
diff
changeset
|
282 |
unfolding g1 g2 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56188
diff
changeset
|
283 |
by (auto intro!: continuous_intros continuous_on_subset[OF cont] simp del: o_apply) |
|
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
284 |
next |
|
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
285 |
assume g1g2: "continuous_on {0..1} g1" "continuous_on {0..1} g2"
|
|
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
286 |
have 01: "{0 .. 1} = {0..1/2} \<union> {1/2 .. 1::real}"
|
| 36583 | 287 |
by auto |
| 53640 | 288 |
{
|
289 |
fix x :: real |
|
290 |
assume "0 \<le> x" and "x \<le> 1" |
|
291 |
then have "x \<in> (\<lambda>x. x * 2) ` {0..1 / 2}"
|
|
292 |
by (intro image_eqI[where x="x/2"]) auto |
|
293 |
} |
|
|
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
294 |
note 1 = this |
| 53640 | 295 |
{
|
296 |
fix x :: real |
|
297 |
assume "0 \<le> x" and "x \<le> 1" |
|
298 |
then have "x \<in> (\<lambda>x. x * 2 - 1) ` {1 / 2..1}"
|
|
299 |
by (intro image_eqI[where x="x/2 + 1/2"]) auto |
|
300 |
} |
|
|
51478
270b21f3ae0a
move continuous and continuous_on to the HOL image; isCont is an abbreviation for continuous (at x) (isCont is now restricted to a T2 space)
hoelzl
parents:
50935
diff
changeset
|
301 |
note 2 = this |
| 49653 | 302 |
show "continuous_on {0..1} (g1 +++ g2)"
|
| 53640 | 303 |
using assms |
304 |
unfolding joinpaths_def 01 |
|
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56188
diff
changeset
|
305 |
apply (intro continuous_on_cases closed_atLeastAtMost g1g2[THEN continuous_on_compose2] continuous_intros) |
| 53640 | 306 |
apply (auto simp: field_simps pathfinish_def pathstart_def intro!: 1 2) |
307 |
done |
|
| 49653 | 308 |
qed |
| 36583 | 309 |
|
| 60420 | 310 |
section \<open>Path Images\<close> |
| 60303 | 311 |
|
312 |
lemma bounded_path_image: "path g \<Longrightarrow> bounded(path_image g)" |
|
313 |
by (simp add: compact_imp_bounded compact_path_image) |
|
314 |
||
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
315 |
lemma closed_path_image: |
| 60303 | 316 |
fixes g :: "real \<Rightarrow> 'a::t2_space" |
317 |
shows "path g \<Longrightarrow> closed(path_image g)" |
|
318 |
by (metis compact_path_image compact_imp_closed) |
|
319 |
||
320 |
lemma connected_simple_path_image: "simple_path g \<Longrightarrow> connected(path_image g)" |
|
321 |
by (metis connected_path_image simple_path_imp_path) |
|
322 |
||
323 |
lemma compact_simple_path_image: "simple_path g \<Longrightarrow> compact(path_image g)" |
|
324 |
by (metis compact_path_image simple_path_imp_path) |
|
325 |
||
326 |
lemma bounded_simple_path_image: "simple_path g \<Longrightarrow> bounded(path_image g)" |
|
327 |
by (metis bounded_path_image simple_path_imp_path) |
|
328 |
||
329 |
lemma closed_simple_path_image: |
|
330 |
fixes g :: "real \<Rightarrow> 'a::t2_space" |
|
331 |
shows "simple_path g \<Longrightarrow> closed(path_image g)" |
|
332 |
by (metis closed_path_image simple_path_imp_path) |
|
333 |
||
334 |
lemma connected_arc_image: "arc g \<Longrightarrow> connected(path_image g)" |
|
335 |
by (metis connected_path_image arc_imp_path) |
|
336 |
||
337 |
lemma compact_arc_image: "arc g \<Longrightarrow> compact(path_image g)" |
|
338 |
by (metis compact_path_image arc_imp_path) |
|
339 |
||
340 |
lemma bounded_arc_image: "arc g \<Longrightarrow> bounded(path_image g)" |
|
341 |
by (metis bounded_path_image arc_imp_path) |
|
342 |
||
343 |
lemma closed_arc_image: |
|
344 |
fixes g :: "real \<Rightarrow> 'a::t2_space" |
|
345 |
shows "arc g \<Longrightarrow> closed(path_image g)" |
|
346 |
by (metis closed_path_image arc_imp_path) |
|
347 |
||
| 53640 | 348 |
lemma path_image_join_subset: "path_image (g1 +++ g2) \<subseteq> path_image g1 \<union> path_image g2" |
349 |
unfolding path_image_def joinpaths_def |
|
350 |
by auto |
|
| 36583 | 351 |
|
352 |
lemma subset_path_image_join: |
|
| 53640 | 353 |
assumes "path_image g1 \<subseteq> s" |
354 |
and "path_image g2 \<subseteq> s" |
|
355 |
shows "path_image (g1 +++ g2) \<subseteq> s" |
|
356 |
using path_image_join_subset[of g1 g2] and assms |
|
357 |
by auto |
|
| 36583 | 358 |
|
359 |
lemma path_image_join: |
|
| 60303 | 360 |
"pathfinish g1 = pathstart g2 \<Longrightarrow> path_image(g1 +++ g2) = path_image g1 \<union> path_image g2" |
361 |
apply (rule subset_antisym [OF path_image_join_subset]) |
|
362 |
apply (auto simp: pathfinish_def pathstart_def path_image_def joinpaths_def image_def) |
|
363 |
apply (drule sym) |
|
364 |
apply (rule_tac x="xa/2" in bexI, auto) |
|
365 |
apply (rule ccontr) |
|
366 |
apply (drule_tac x="(xa+1)/2" in bspec) |
|
367 |
apply (auto simp: field_simps) |
|
368 |
apply (drule_tac x="1/2" in bspec, auto) |
|
369 |
done |
|
| 36583 | 370 |
|
371 |
lemma not_in_path_image_join: |
|
| 53640 | 372 |
assumes "x \<notin> path_image g1" |
373 |
and "x \<notin> path_image g2" |
|
374 |
shows "x \<notin> path_image (g1 +++ g2)" |
|
375 |
using assms and path_image_join_subset[of g1 g2] |
|
376 |
by auto |
|
| 36583 | 377 |
|
| 60303 | 378 |
lemma pathstart_compose: "pathstart(f o p) = f(pathstart p)" |
379 |
by (simp add: pathstart_def) |
|
380 |
||
381 |
lemma pathfinish_compose: "pathfinish(f o p) = f(pathfinish p)" |
|
382 |
by (simp add: pathfinish_def) |
|
383 |
||
384 |
lemma path_image_compose: "path_image (f o p) = f ` (path_image p)" |
|
385 |
by (simp add: image_comp path_image_def) |
|
386 |
||
387 |
lemma path_compose_join: "f o (p +++ q) = (f o p) +++ (f o q)" |
|
388 |
by (rule ext) (simp add: joinpaths_def) |
|
389 |
||
390 |
lemma path_compose_reversepath: "f o reversepath p = reversepath(f o p)" |
|
391 |
by (rule ext) (simp add: reversepath_def) |
|
392 |
||
393 |
lemma join_paths_eq: |
|
394 |
"(\<And>t. t \<in> {0..1} \<Longrightarrow> p t = p' t) \<Longrightarrow>
|
|
395 |
(\<And>t. t \<in> {0..1} \<Longrightarrow> q t = q' t)
|
|
396 |
\<Longrightarrow> t \<in> {0..1} \<Longrightarrow> (p +++ q) t = (p' +++ q') t"
|
|
397 |
by (auto simp: joinpaths_def) |
|
398 |
||
399 |
lemma simple_path_inj_on: "simple_path g \<Longrightarrow> inj_on g {0<..<1}"
|
|
400 |
by (auto simp: simple_path_def path_image_def inj_on_def less_eq_real_def Ball_def) |
|
401 |
||
402 |
||
| 60420 | 403 |
subsection\<open>Simple paths with the endpoints removed\<close> |
| 60303 | 404 |
|
405 |
lemma simple_path_endless: |
|
406 |
"simple_path c \<Longrightarrow> path_image c - {pathstart c,pathfinish c} = c ` {0<..<1}"
|
|
407 |
apply (auto simp: simple_path_def path_image_def pathstart_def pathfinish_def Ball_def Bex_def image_def) |
|
408 |
apply (metis eq_iff le_less_linear) |
|
409 |
apply (metis leD linear) |
|
410 |
using less_eq_real_def zero_le_one apply blast |
|
411 |
using less_eq_real_def zero_le_one apply blast |
|
| 49653 | 412 |
done |
| 36583 | 413 |
|
| 60303 | 414 |
lemma connected_simple_path_endless: |
415 |
"simple_path c \<Longrightarrow> connected(path_image c - {pathstart c,pathfinish c})"
|
|
416 |
apply (simp add: simple_path_endless) |
|
417 |
apply (rule connected_continuous_image) |
|
418 |
apply (meson continuous_on_subset greaterThanLessThan_subseteq_atLeastAtMost_iff le_numeral_extra(3) le_numeral_extra(4) path_def simple_path_imp_path) |
|
419 |
by auto |
|
420 |
||
421 |
lemma nonempty_simple_path_endless: |
|
422 |
"simple_path c \<Longrightarrow> path_image c - {pathstart c,pathfinish c} \<noteq> {}"
|
|
423 |
by (simp add: simple_path_endless) |
|
424 |
||
425 |
||
| 60420 | 426 |
subsection\<open>The operations on paths\<close> |
| 60303 | 427 |
|
428 |
lemma path_image_subset_reversepath: "path_image(reversepath g) \<le> path_image g" |
|
429 |
by (auto simp: path_image_def reversepath_def) |
|
430 |
||
431 |
lemma continuous_on_op_minus: "continuous_on (s::real set) (op - x)" |
|
432 |
by (rule continuous_intros | simp)+ |
|
433 |
||
434 |
lemma path_imp_reversepath: "path g \<Longrightarrow> path(reversepath g)" |
|
435 |
apply (auto simp: path_def reversepath_def) |
|
436 |
using continuous_on_compose [of "{0..1}" "\<lambda>x. 1 - x" g]
|
|
437 |
apply (auto simp: continuous_on_op_minus) |
|
438 |
done |
|
439 |
||
440 |
lemma forall_01_trivial: "(\<forall>x\<in>{0..1}. x \<le> 0 \<longrightarrow> P x) \<longleftrightarrow> P (0::real)"
|
|
441 |
by auto |
|
442 |
||
443 |
lemma forall_half1_trivial: "(\<forall>x\<in>{1/2..1}. x * 2 \<le> 1 \<longrightarrow> P x) \<longleftrightarrow> P (1/2::real)"
|
|
444 |
by auto (metis add_divide_distrib mult_2_right real_sum_of_halves) |
|
445 |
||
446 |
lemma continuous_on_joinpaths: |
|
447 |
assumes "continuous_on {0..1} g1" "continuous_on {0..1} g2" "pathfinish g1 = pathstart g2"
|
|
448 |
shows "continuous_on {0..1} (g1 +++ g2)"
|
|
449 |
proof - |
|
450 |
have *: "{0..1::real} = {0..1/2} \<union> {1/2..1}"
|
|
451 |
by auto |
|
452 |
have gg: "g2 0 = g1 1" |
|
453 |
by (metis assms(3) pathfinish_def pathstart_def) |
|
454 |
have 1: "continuous_on {0..1 / 2} (g1 +++ g2)"
|
|
455 |
apply (rule continuous_on_eq [of _ "g1 o (\<lambda>x. 2*x)"]) |
|
456 |
apply (simp add: joinpaths_def) |
|
457 |
apply (rule continuous_intros | simp add: assms)+ |
|
458 |
done |
|
459 |
have 2: "continuous_on {1 / 2..1} (g1 +++ g2)"
|
|
460 |
apply (rule continuous_on_eq [of _ "g2 o (\<lambda>x. 2*x-1)"]) |
|
461 |
apply (simp add: joinpaths_def) |
|
462 |
apply (rule continuous_intros | simp add: forall_half1_trivial gg)+ |
|
463 |
apply (rule continuous_on_subset) |
|
464 |
apply (rule assms, auto) |
|
465 |
done |
|
466 |
show ?thesis |
|
467 |
apply (subst *) |
|
468 |
apply (rule continuous_on_union) |
|
469 |
using 1 2 |
|
470 |
apply auto |
|
471 |
done |
|
472 |
qed |
|
473 |
||
474 |
lemma path_join_imp: "\<lbrakk>path g1; path g2; pathfinish g1 = pathstart g2\<rbrakk> \<Longrightarrow> path(g1 +++ g2)" |
|
475 |
by (simp add: path_join) |
|
476 |
||
477 |
lemmas join_paths_simps = path_join path_image_join pathstart_join pathfinish_join |
|
478 |
||
| 36583 | 479 |
lemma simple_path_join_loop: |
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
480 |
assumes "arc g1" "arc g2" |
|
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
481 |
"pathfinish g1 = pathstart g2" "pathfinish g2 = pathstart g1" |
| 60303 | 482 |
"path_image g1 \<inter> path_image g2 \<subseteq> {pathstart g1, pathstart g2}"
|
483 |
shows "simple_path(g1 +++ g2)" |
|
484 |
proof - |
|
485 |
have injg1: "inj_on g1 {0..1}"
|
|
486 |
using assms |
|
487 |
by (simp add: arc_def) |
|
488 |
have injg2: "inj_on g2 {0..1}"
|
|
489 |
using assms |
|
490 |
by (simp add: arc_def) |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
491 |
have g12: "g1 1 = g2 0" |
|
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
492 |
and g21: "g2 1 = g1 0" |
| 60303 | 493 |
and sb: "g1 ` {0..1} \<inter> g2 ` {0..1} \<subseteq> {g1 0, g2 0}"
|
494 |
using assms |
|
495 |
by (simp_all add: arc_def pathfinish_def pathstart_def path_image_def) |
|
496 |
{ fix x and y::real
|
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
497 |
assume xyI: "x = 1 \<longrightarrow> y \<noteq> 0" |
| 60303 | 498 |
and xy: "x \<le> 1" "0 \<le> y" " y * 2 \<le> 1" "\<not> x * 2 \<le> 1" "g2 (2 * x - 1) = g1 (2 * y)" |
499 |
have g1im: "g1 (2 * y) \<in> g1 ` {0..1} \<inter> g2 ` {0..1}"
|
|
500 |
using xy |
|
501 |
apply simp |
|
502 |
apply (rule_tac x="2 * x - 1" in image_eqI, auto) |
|
503 |
done |
|
504 |
have False |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
505 |
using subsetD [OF sb g1im] xy |
| 60303 | 506 |
apply auto |
507 |
apply (drule inj_onD [OF injg1]) |
|
508 |
using g21 [symmetric] xyI |
|
509 |
apply (auto dest: inj_onD [OF injg2]) |
|
510 |
done |
|
511 |
} note * = this |
|
512 |
{ fix x and y::real
|
|
513 |
assume xy: "y \<le> 1" "0 \<le> x" "\<not> y * 2 \<le> 1" "x * 2 \<le> 1" "g1 (2 * x) = g2 (2 * y - 1)" |
|
514 |
have g1im: "g1 (2 * x) \<in> g1 ` {0..1} \<inter> g2 ` {0..1}"
|
|
515 |
using xy |
|
516 |
apply simp |
|
517 |
apply (rule_tac x="2 * x" in image_eqI, auto) |
|
518 |
done |
|
519 |
have "x = 0 \<and> y = 1" |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
520 |
using subsetD [OF sb g1im] xy |
| 60303 | 521 |
apply auto |
522 |
apply (force dest: inj_onD [OF injg1]) |
|
523 |
using g21 [symmetric] |
|
524 |
apply (auto dest: inj_onD [OF injg2]) |
|
525 |
done |
|
526 |
} note ** = this |
|
527 |
show ?thesis |
|
528 |
using assms |
|
529 |
apply (simp add: arc_def simple_path_def path_join, clarify) |
|
530 |
apply (simp add: joinpaths_def split: split_if_asm) |
|
531 |
apply (force dest: inj_onD [OF injg1]) |
|
532 |
apply (metis *) |
|
533 |
apply (metis **) |
|
534 |
apply (force dest: inj_onD [OF injg2]) |
|
535 |
done |
|
536 |
qed |
|
537 |
||
538 |
lemma arc_join: |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
539 |
assumes "arc g1" "arc g2" |
| 60303 | 540 |
"pathfinish g1 = pathstart g2" |
541 |
"path_image g1 \<inter> path_image g2 \<subseteq> {pathstart g2}"
|
|
542 |
shows "arc(g1 +++ g2)" |
|
543 |
proof - |
|
544 |
have injg1: "inj_on g1 {0..1}"
|
|
545 |
using assms |
|
546 |
by (simp add: arc_def) |
|
547 |
have injg2: "inj_on g2 {0..1}"
|
|
548 |
using assms |
|
549 |
by (simp add: arc_def) |
|
550 |
have g11: "g1 1 = g2 0" |
|
551 |
and sb: "g1 ` {0..1} \<inter> g2 ` {0..1} \<subseteq> {g2 0}"
|
|
552 |
using assms |
|
553 |
by (simp_all add: arc_def pathfinish_def pathstart_def path_image_def) |
|
554 |
{ fix x and y::real
|
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
555 |
assume xy: "x \<le> 1" "0 \<le> y" " y * 2 \<le> 1" "\<not> x * 2 \<le> 1" "g2 (2 * x - 1) = g1 (2 * y)" |
| 60303 | 556 |
have g1im: "g1 (2 * y) \<in> g1 ` {0..1} \<inter> g2 ` {0..1}"
|
557 |
using xy |
|
558 |
apply simp |
|
559 |
apply (rule_tac x="2 * x - 1" in image_eqI, auto) |
|
560 |
done |
|
561 |
have False |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
562 |
using subsetD [OF sb g1im] xy |
| 60303 | 563 |
by (auto dest: inj_onD [OF injg2]) |
564 |
} note * = this |
|
565 |
show ?thesis |
|
566 |
apply (simp add: arc_def inj_on_def) |
|
567 |
apply (clarsimp simp add: arc_imp_path assms path_join) |
|
568 |
apply (simp add: joinpaths_def split: split_if_asm) |
|
569 |
apply (force dest: inj_onD [OF injg1]) |
|
570 |
apply (metis *) |
|
571 |
apply (metis *) |
|
572 |
apply (force dest: inj_onD [OF injg2]) |
|
573 |
done |
|
574 |
qed |
|
575 |
||
576 |
lemma reversepath_joinpaths: |
|
577 |
"pathfinish g1 = pathstart g2 \<Longrightarrow> reversepath(g1 +++ g2) = reversepath g2 +++ reversepath g1" |
|
578 |
unfolding reversepath_def pathfinish_def pathstart_def joinpaths_def |
|
579 |
by (rule ext) (auto simp: mult.commute) |
|
580 |
||
581 |
||
| 60420 | 582 |
subsection\<open>Choosing a subpath of an existing path\<close> |
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
583 |
|
| 60303 | 584 |
definition subpath :: "real \<Rightarrow> real \<Rightarrow> (real \<Rightarrow> 'a) \<Rightarrow> real \<Rightarrow> 'a::real_normed_vector" |
585 |
where "subpath a b g \<equiv> \<lambda>x. g((b - a) * x + a)" |
|
586 |
||
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
587 |
lemma path_image_subpath_gen [simp]: |
| 60303 | 588 |
fixes g :: "real \<Rightarrow> 'a::real_normed_vector" |
589 |
shows "path_image(subpath u v g) = g ` (closed_segment u v)" |
|
590 |
apply (simp add: closed_segment_real_eq path_image_def subpath_def) |
|
591 |
apply (subst o_def [of g, symmetric]) |
|
592 |
apply (simp add: image_comp [symmetric]) |
|
593 |
done |
|
594 |
||
595 |
lemma path_image_subpath [simp]: |
|
596 |
fixes g :: "real \<Rightarrow> 'a::real_normed_vector" |
|
597 |
shows "path_image(subpath u v g) = (if u \<le> v then g ` {u..v} else g ` {v..u})"
|
|
598 |
by (simp add: closed_segment_eq_real_ivl) |
|
599 |
||
600 |
lemma path_subpath [simp]: |
|
601 |
fixes g :: "real \<Rightarrow> 'a::real_normed_vector" |
|
602 |
assumes "path g" "u \<in> {0..1}" "v \<in> {0..1}"
|
|
603 |
shows "path(subpath u v g)" |
|
604 |
proof - |
|
605 |
have "continuous_on {0..1} (g o (\<lambda>x. ((v-u) * x+ u)))"
|
|
606 |
apply (rule continuous_intros | simp)+ |
|
607 |
apply (simp add: image_affinity_atLeastAtMost [where c=u]) |
|
608 |
using assms |
|
609 |
apply (auto simp: path_def continuous_on_subset) |
|
610 |
done |
|
611 |
then show ?thesis |
|
612 |
by (simp add: path_def subpath_def) |
|
| 49653 | 613 |
qed |
| 36583 | 614 |
|
| 60303 | 615 |
lemma pathstart_subpath [simp]: "pathstart(subpath u v g) = g(u)" |
616 |
by (simp add: pathstart_def subpath_def) |
|
617 |
||
618 |
lemma pathfinish_subpath [simp]: "pathfinish(subpath u v g) = g(v)" |
|
619 |
by (simp add: pathfinish_def subpath_def) |
|
620 |
||
621 |
lemma subpath_trivial [simp]: "subpath 0 1 g = g" |
|
622 |
by (simp add: subpath_def) |
|
623 |
||
624 |
lemma subpath_reversepath: "subpath 1 0 g = reversepath g" |
|
625 |
by (simp add: reversepath_def subpath_def) |
|
626 |
||
627 |
lemma reversepath_subpath: "reversepath(subpath u v g) = subpath v u g" |
|
628 |
by (simp add: reversepath_def subpath_def algebra_simps) |
|
629 |
||
630 |
lemma subpath_translation: "subpath u v ((\<lambda>x. a + x) o g) = (\<lambda>x. a + x) o subpath u v g" |
|
631 |
by (rule ext) (simp add: subpath_def) |
|
632 |
||
633 |
lemma subpath_linear_image: "linear f \<Longrightarrow> subpath u v (f o g) = f o subpath u v g" |
|
634 |
by (rule ext) (simp add: subpath_def) |
|
635 |
||
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
636 |
lemma affine_ineq: |
|
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
637 |
fixes x :: "'a::linordered_idom" |
| 60303 | 638 |
assumes "x \<le> 1" "v < u" |
639 |
shows "v + x * u \<le> u + x * v" |
|
640 |
proof - |
|
641 |
have "(1-x)*(u-v) \<ge> 0" |
|
642 |
using assms by auto |
|
643 |
then show ?thesis |
|
644 |
by (simp add: algebra_simps) |
|
| 49653 | 645 |
qed |
| 36583 | 646 |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
647 |
lemma simple_path_subpath_eq: |
| 60303 | 648 |
"simple_path(subpath u v g) \<longleftrightarrow> |
649 |
path(subpath u v g) \<and> u\<noteq>v \<and> |
|
650 |
(\<forall>x y. x \<in> closed_segment u v \<and> y \<in> closed_segment u v \<and> g x = g y |
|
651 |
\<longrightarrow> x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u)" |
|
652 |
(is "?lhs = ?rhs") |
|
653 |
proof (rule iffI) |
|
654 |
assume ?lhs |
|
655 |
then have p: "path (\<lambda>x. g ((v - u) * x + u))" |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
656 |
and sim: "(\<And>x y. \<lbrakk>x\<in>{0..1}; y\<in>{0..1}; g ((v - u) * x + u) = g ((v - u) * y + u)\<rbrakk>
|
| 60303 | 657 |
\<Longrightarrow> x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0)" |
658 |
by (auto simp: simple_path_def subpath_def) |
|
659 |
{ fix x y
|
|
660 |
assume "x \<in> closed_segment u v" "y \<in> closed_segment u v" "g x = g y" |
|
661 |
then have "x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u" |
|
662 |
using sim [of "(x-u)/(v-u)" "(y-u)/(v-u)"] p |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
663 |
by (auto simp: closed_segment_real_eq image_affinity_atLeastAtMost divide_simps |
| 60303 | 664 |
split: split_if_asm) |
665 |
} moreover |
|
666 |
have "path(subpath u v g) \<and> u\<noteq>v" |
|
667 |
using sim [of "1/3" "2/3"] p |
|
668 |
by (auto simp: subpath_def) |
|
669 |
ultimately show ?rhs |
|
670 |
by metis |
|
671 |
next |
|
672 |
assume ?rhs |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
673 |
then |
| 60303 | 674 |
have d1: "\<And>x y. \<lbrakk>g x = g y; u \<le> x; x \<le> v; u \<le> y; y \<le> v\<rbrakk> \<Longrightarrow> x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u" |
675 |
and d2: "\<And>x y. \<lbrakk>g x = g y; v \<le> x; x \<le> u; v \<le> y; y \<le> u\<rbrakk> \<Longrightarrow> x = y \<or> x = u \<and> y = v \<or> x = v \<and> y = u" |
|
676 |
and ne: "u < v \<or> v < u" |
|
677 |
and psp: "path (subpath u v g)" |
|
678 |
by (auto simp: closed_segment_real_eq image_affinity_atLeastAtMost) |
|
679 |
have [simp]: "\<And>x. u + x * v = v + x * u \<longleftrightarrow> u=v \<or> x=1" |
|
680 |
by algebra |
|
681 |
show ?lhs using psp ne |
|
682 |
unfolding simple_path_def subpath_def |
|
683 |
by (fastforce simp add: algebra_simps affine_ineq mult_left_mono crossproduct_eq dest: d1 d2) |
|
684 |
qed |
|
685 |
||
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
686 |
lemma arc_subpath_eq: |
| 60303 | 687 |
"arc(subpath u v g) \<longleftrightarrow> path(subpath u v g) \<and> u\<noteq>v \<and> inj_on g (closed_segment u v)" |
688 |
(is "?lhs = ?rhs") |
|
689 |
proof (rule iffI) |
|
690 |
assume ?lhs |
|
691 |
then have p: "path (\<lambda>x. g ((v - u) * x + u))" |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
692 |
and sim: "(\<And>x y. \<lbrakk>x\<in>{0..1}; y\<in>{0..1}; g ((v - u) * x + u) = g ((v - u) * y + u)\<rbrakk>
|
| 60303 | 693 |
\<Longrightarrow> x = y)" |
694 |
by (auto simp: arc_def inj_on_def subpath_def) |
|
695 |
{ fix x y
|
|
696 |
assume "x \<in> closed_segment u v" "y \<in> closed_segment u v" "g x = g y" |
|
697 |
then have "x = y" |
|
698 |
using sim [of "(x-u)/(v-u)" "(y-u)/(v-u)"] p |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
699 |
by (force simp add: inj_on_def closed_segment_real_eq image_affinity_atLeastAtMost divide_simps |
| 60303 | 700 |
split: split_if_asm) |
701 |
} moreover |
|
702 |
have "path(subpath u v g) \<and> u\<noteq>v" |
|
703 |
using sim [of "1/3" "2/3"] p |
|
704 |
by (auto simp: subpath_def) |
|
705 |
ultimately show ?rhs |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
706 |
unfolding inj_on_def |
| 60303 | 707 |
by metis |
708 |
next |
|
709 |
assume ?rhs |
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
710 |
then |
| 60303 | 711 |
have d1: "\<And>x y. \<lbrakk>g x = g y; u \<le> x; x \<le> v; u \<le> y; y \<le> v\<rbrakk> \<Longrightarrow> x = y" |
712 |
and d2: "\<And>x y. \<lbrakk>g x = g y; v \<le> x; x \<le> u; v \<le> y; y \<le> u\<rbrakk> \<Longrightarrow> x = y" |
|
713 |
and ne: "u < v \<or> v < u" |
|
714 |
and psp: "path (subpath u v g)" |
|
715 |
by (auto simp: inj_on_def closed_segment_real_eq image_affinity_atLeastAtMost) |
|
716 |
show ?lhs using psp ne |
|
717 |
unfolding arc_def subpath_def inj_on_def |
|
718 |
by (auto simp: algebra_simps affine_ineq mult_left_mono crossproduct_eq dest: d1 d2) |
|
719 |
qed |
|
720 |
||
721 |
||
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
722 |
lemma simple_path_subpath: |
| 60303 | 723 |
assumes "simple_path g" "u \<in> {0..1}" "v \<in> {0..1}" "u \<noteq> v"
|
724 |
shows "simple_path(subpath u v g)" |
|
725 |
using assms |
|
726 |
apply (simp add: simple_path_subpath_eq simple_path_imp_path) |
|
727 |
apply (simp add: simple_path_def closed_segment_real_eq image_affinity_atLeastAtMost, fastforce) |
|
728 |
done |
|
729 |
||
730 |
lemma arc_simple_path_subpath: |
|
731 |
"\<lbrakk>simple_path g; u \<in> {0..1}; v \<in> {0..1}; g u \<noteq> g v\<rbrakk> \<Longrightarrow> arc(subpath u v g)"
|
|
732 |
by (force intro: simple_path_subpath simple_path_imp_arc) |
|
733 |
||
734 |
lemma arc_subpath_arc: |
|
735 |
"\<lbrakk>arc g; u \<in> {0..1}; v \<in> {0..1}; u \<noteq> v\<rbrakk> \<Longrightarrow> arc(subpath u v g)"
|
|
736 |
by (meson arc_def arc_imp_simple_path arc_simple_path_subpath inj_onD) |
|
737 |
||
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
738 |
lemma arc_simple_path_subpath_interior: |
| 60303 | 739 |
"\<lbrakk>simple_path g; u \<in> {0..1}; v \<in> {0..1}; u \<noteq> v; \<bar>u-v\<bar> < 1\<rbrakk> \<Longrightarrow> arc(subpath u v g)"
|
740 |
apply (rule arc_simple_path_subpath) |
|
741 |
apply (force simp: simple_path_def)+ |
|
742 |
done |
|
743 |
||
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
744 |
lemma path_image_subpath_subset: |
| 60303 | 745 |
"\<lbrakk>path g; u \<in> {0..1}; v \<in> {0..1}\<rbrakk> \<Longrightarrow> path_image(subpath u v g) \<subseteq> path_image g"
|
746 |
apply (simp add: closed_segment_real_eq image_affinity_atLeastAtMost) |
|
747 |
apply (auto simp: path_image_def) |
|
748 |
done |
|
749 |
||
750 |
lemma join_subpaths_middle: "subpath (0) ((1 / 2)) p +++ subpath ((1 / 2)) 1 p = p" |
|
751 |
by (rule ext) (simp add: joinpaths_def subpath_def divide_simps) |
|
| 53640 | 752 |
|
| 49653 | 753 |
|
| 60420 | 754 |
subsection \<open>Reparametrizing a closed curve to start at some chosen point\<close> |
| 36583 | 755 |
|
| 53640 | 756 |
definition shiftpath :: "real \<Rightarrow> (real \<Rightarrow> 'a::topological_space) \<Rightarrow> real \<Rightarrow> 'a" |
757 |
where "shiftpath a f = (\<lambda>x. if (a + x) \<le> 1 then f (a + x) else f (a + x - 1))" |
|
| 36583 | 758 |
|
| 53640 | 759 |
lemma pathstart_shiftpath: "a \<le> 1 \<Longrightarrow> pathstart (shiftpath a g) = g a" |
| 36583 | 760 |
unfolding pathstart_def shiftpath_def by auto |
761 |
||
| 49653 | 762 |
lemma pathfinish_shiftpath: |
| 53640 | 763 |
assumes "0 \<le> a" |
764 |
and "pathfinish g = pathstart g" |
|
765 |
shows "pathfinish (shiftpath a g) = g a" |
|
766 |
using assms |
|
767 |
unfolding pathstart_def pathfinish_def shiftpath_def |
|
| 36583 | 768 |
by auto |
769 |
||
770 |
lemma endpoints_shiftpath: |
|
| 53640 | 771 |
assumes "pathfinish g = pathstart g" |
772 |
and "a \<in> {0 .. 1}"
|
|
773 |
shows "pathfinish (shiftpath a g) = g a" |
|
774 |
and "pathstart (shiftpath a g) = g a" |
|
775 |
using assms |
|
776 |
by (auto intro!: pathfinish_shiftpath pathstart_shiftpath) |
|
| 36583 | 777 |
|
778 |
lemma closed_shiftpath: |
|
| 53640 | 779 |
assumes "pathfinish g = pathstart g" |
780 |
and "a \<in> {0..1}"
|
|
781 |
shows "pathfinish (shiftpath a g) = pathstart (shiftpath a g)" |
|
782 |
using endpoints_shiftpath[OF assms] |
|
783 |
by auto |
|
| 36583 | 784 |
|
785 |
lemma path_shiftpath: |
|
| 53640 | 786 |
assumes "path g" |
787 |
and "pathfinish g = pathstart g" |
|
788 |
and "a \<in> {0..1}"
|
|
789 |
shows "path (shiftpath a g)" |
|
| 49653 | 790 |
proof - |
| 53640 | 791 |
have *: "{0 .. 1} = {0 .. 1-a} \<union> {1-a .. 1}"
|
792 |
using assms(3) by auto |
|
| 49653 | 793 |
have **: "\<And>x. x + a = 1 \<Longrightarrow> g (x + a - 1) = g (x + a)" |
| 53640 | 794 |
using assms(2)[unfolded pathfinish_def pathstart_def] |
795 |
by auto |
|
| 49653 | 796 |
show ?thesis |
797 |
unfolding path_def shiftpath_def * |
|
798 |
apply (rule continuous_on_union) |
|
799 |
apply (rule closed_real_atLeastAtMost)+ |
|
| 53640 | 800 |
apply (rule continuous_on_eq[of _ "g \<circ> (\<lambda>x. a + x)"]) |
801 |
prefer 3 |
|
802 |
apply (rule continuous_on_eq[of _ "g \<circ> (\<lambda>x. a - 1 + x)"]) |
|
803 |
defer |
|
804 |
prefer 3 |
|
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56188
diff
changeset
|
805 |
apply (rule continuous_intros)+ |
| 53640 | 806 |
prefer 2 |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56188
diff
changeset
|
807 |
apply (rule continuous_intros)+ |
| 49653 | 808 |
apply (rule_tac[1-2] continuous_on_subset[OF assms(1)[unfolded path_def]]) |
809 |
using assms(3) and ** |
|
| 53640 | 810 |
apply auto |
811 |
apply (auto simp add: field_simps) |
|
| 49653 | 812 |
done |
813 |
qed |
|
| 36583 | 814 |
|
| 49653 | 815 |
lemma shiftpath_shiftpath: |
| 53640 | 816 |
assumes "pathfinish g = pathstart g" |
817 |
and "a \<in> {0..1}"
|
|
818 |
and "x \<in> {0..1}"
|
|
| 36583 | 819 |
shows "shiftpath (1 - a) (shiftpath a g) x = g x" |
| 53640 | 820 |
using assms |
821 |
unfolding pathfinish_def pathstart_def shiftpath_def |
|
822 |
by auto |
|
| 36583 | 823 |
|
824 |
lemma path_image_shiftpath: |
|
| 53640 | 825 |
assumes "a \<in> {0..1}"
|
826 |
and "pathfinish g = pathstart g" |
|
827 |
shows "path_image (shiftpath a g) = path_image g" |
|
| 49653 | 828 |
proof - |
829 |
{ fix x
|
|
| 53640 | 830 |
assume as: "g 1 = g 0" "x \<in> {0..1::real}" " \<forall>y\<in>{0..1} \<inter> {x. \<not> a + x \<le> 1}. g x \<noteq> g (a + y - 1)"
|
| 49654 | 831 |
then have "\<exists>y\<in>{0..1} \<inter> {x. a + x \<le> 1}. g x = g (a + y)"
|
| 49653 | 832 |
proof (cases "a \<le> x") |
833 |
case False |
|
| 49654 | 834 |
then show ?thesis |
| 49653 | 835 |
apply (rule_tac x="1 + x - a" in bexI) |
| 36583 | 836 |
using as(1,2) and as(3)[THEN bspec[where x="1 + x - a"]] and assms(1) |
| 49653 | 837 |
apply (auto simp add: field_simps atomize_not) |
838 |
done |
|
839 |
next |
|
840 |
case True |
|
| 53640 | 841 |
then show ?thesis |
842 |
using as(1-2) and assms(1) |
|
843 |
apply (rule_tac x="x - a" in bexI) |
|
844 |
apply (auto simp add: field_simps) |
|
845 |
done |
|
| 49653 | 846 |
qed |
847 |
} |
|
| 49654 | 848 |
then show ?thesis |
| 53640 | 849 |
using assms |
850 |
unfolding shiftpath_def path_image_def pathfinish_def pathstart_def |
|
851 |
by (auto simp add: image_iff) |
|
| 49653 | 852 |
qed |
853 |
||
| 36583 | 854 |
|
| 60420 | 855 |
subsection \<open>Special case of straight-line paths\<close> |
| 36583 | 856 |
|
| 49653 | 857 |
definition linepath :: "'a::real_normed_vector \<Rightarrow> 'a \<Rightarrow> real \<Rightarrow> 'a" |
858 |
where "linepath a b = (\<lambda>x. (1 - x) *\<^sub>R a + x *\<^sub>R b)" |
|
| 36583 | 859 |
|
| 53640 | 860 |
lemma pathstart_linepath[simp]: "pathstart (linepath a b) = a" |
861 |
unfolding pathstart_def linepath_def |
|
862 |
by auto |
|
| 36583 | 863 |
|
| 53640 | 864 |
lemma pathfinish_linepath[simp]: "pathfinish (linepath a b) = b" |
865 |
unfolding pathfinish_def linepath_def |
|
866 |
by auto |
|
| 36583 | 867 |
|
868 |
lemma continuous_linepath_at[intro]: "continuous (at x) (linepath a b)" |
|
| 53640 | 869 |
unfolding linepath_def |
870 |
by (intro continuous_intros) |
|
| 36583 | 871 |
|
872 |
lemma continuous_on_linepath[intro]: "continuous_on s (linepath a b)" |
|
| 53640 | 873 |
using continuous_linepath_at |
874 |
by (auto intro!: continuous_at_imp_continuous_on) |
|
| 36583 | 875 |
|
| 53640 | 876 |
lemma path_linepath[intro]: "path (linepath a b)" |
877 |
unfolding path_def |
|
878 |
by (rule continuous_on_linepath) |
|
| 36583 | 879 |
|
| 53640 | 880 |
lemma path_image_linepath[simp]: "path_image (linepath a b) = closed_segment a b" |
| 49653 | 881 |
unfolding path_image_def segment linepath_def |
| 60303 | 882 |
by auto |
| 49653 | 883 |
|
| 53640 | 884 |
lemma reversepath_linepath[simp]: "reversepath (linepath a b) = linepath b a" |
| 49653 | 885 |
unfolding reversepath_def linepath_def |
| 36583 | 886 |
by auto |
887 |
||
| 60303 | 888 |
lemma arc_linepath: |
| 49653 | 889 |
assumes "a \<noteq> b" |
| 60303 | 890 |
shows "arc (linepath a b)" |
| 36583 | 891 |
proof - |
| 53640 | 892 |
{
|
893 |
fix x y :: "real" |
|
| 36583 | 894 |
assume "x *\<^sub>R b + y *\<^sub>R a = x *\<^sub>R a + y *\<^sub>R b" |
| 53640 | 895 |
then have "(x - y) *\<^sub>R a = (x - y) *\<^sub>R b" |
896 |
by (simp add: algebra_simps) |
|
897 |
with assms have "x = y" |
|
898 |
by simp |
|
899 |
} |
|
| 49654 | 900 |
then show ?thesis |
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
901 |
unfolding arc_def inj_on_def |
| 60303 | 902 |
by (simp add: path_linepath) (force simp: algebra_simps linepath_def) |
| 49653 | 903 |
qed |
| 36583 | 904 |
|
| 53640 | 905 |
lemma simple_path_linepath[intro]: "a \<noteq> b \<Longrightarrow> simple_path (linepath a b)" |
| 60303 | 906 |
by (simp add: arc_imp_simple_path arc_linepath) |
| 49653 | 907 |
|
| 36583 | 908 |
|
| 60420 | 909 |
subsection \<open>Bounding a point away from a path\<close> |
| 36583 | 910 |
|
911 |
lemma not_on_path_ball: |
|
912 |
fixes g :: "real \<Rightarrow> 'a::heine_borel" |
|
| 53640 | 913 |
assumes "path g" |
914 |
and "z \<notin> path_image g" |
|
915 |
shows "\<exists>e > 0. ball z e \<inter> path_image g = {}"
|
|
| 49653 | 916 |
proof - |
917 |
obtain a where "a \<in> path_image g" "\<forall>y \<in> path_image g. dist z a \<le> dist z y" |
|
| 36583 | 918 |
using distance_attains_inf[OF _ path_image_nonempty, of g z] |
919 |
using compact_path_image[THEN compact_imp_closed, OF assms(1)] by auto |
|
| 49654 | 920 |
then show ?thesis |
| 49653 | 921 |
apply (rule_tac x="dist z a" in exI) |
922 |
using assms(2) |
|
923 |
apply (auto intro!: dist_pos_lt) |
|
924 |
done |
|
925 |
qed |
|
| 36583 | 926 |
|
927 |
lemma not_on_path_cball: |
|
928 |
fixes g :: "real \<Rightarrow> 'a::heine_borel" |
|
| 53640 | 929 |
assumes "path g" |
930 |
and "z \<notin> path_image g" |
|
| 49653 | 931 |
shows "\<exists>e>0. cball z e \<inter> (path_image g) = {}"
|
932 |
proof - |
|
| 53640 | 933 |
obtain e where "ball z e \<inter> path_image g = {}" "e > 0"
|
| 49653 | 934 |
using not_on_path_ball[OF assms] by auto |
| 53640 | 935 |
moreover have "cball z (e/2) \<subseteq> ball z e" |
| 60420 | 936 |
using \<open>e > 0\<close> by auto |
| 53640 | 937 |
ultimately show ?thesis |
938 |
apply (rule_tac x="e/2" in exI) |
|
939 |
apply auto |
|
940 |
done |
|
| 49653 | 941 |
qed |
942 |
||
| 36583 | 943 |
|
| 60420 | 944 |
subsection \<open>Path component, considered as a "joinability" relation (from Tom Hales)\<close> |
| 36583 | 945 |
|
| 49653 | 946 |
definition "path_component s x y \<longleftrightarrow> |
947 |
(\<exists>g. path g \<and> path_image g \<subseteq> s \<and> pathstart g = x \<and> pathfinish g = y)" |
|
| 36583 | 948 |
|
| 53640 | 949 |
lemmas path_defs = path_def pathstart_def pathfinish_def path_image_def path_component_def |
| 36583 | 950 |
|
| 49653 | 951 |
lemma path_component_mem: |
952 |
assumes "path_component s x y" |
|
| 53640 | 953 |
shows "x \<in> s" and "y \<in> s" |
954 |
using assms |
|
955 |
unfolding path_defs |
|
956 |
by auto |
|
| 36583 | 957 |
|
| 49653 | 958 |
lemma path_component_refl: |
959 |
assumes "x \<in> s" |
|
960 |
shows "path_component s x x" |
|
961 |
unfolding path_defs |
|
962 |
apply (rule_tac x="\<lambda>u. x" in exI) |
|
| 53640 | 963 |
using assms |
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56188
diff
changeset
|
964 |
apply (auto intro!: continuous_intros) |
| 53640 | 965 |
done |
| 36583 | 966 |
|
967 |
lemma path_component_refl_eq: "path_component s x x \<longleftrightarrow> x \<in> s" |
|
| 49653 | 968 |
by (auto intro!: path_component_mem path_component_refl) |
| 36583 | 969 |
|
970 |
lemma path_component_sym: "path_component s x y \<Longrightarrow> path_component s y x" |
|
| 49653 | 971 |
using assms |
972 |
unfolding path_component_def |
|
973 |
apply (erule exE) |
|
974 |
apply (rule_tac x="reversepath g" in exI) |
|
975 |
apply auto |
|
976 |
done |
|
| 36583 | 977 |
|
| 49653 | 978 |
lemma path_component_trans: |
| 53640 | 979 |
assumes "path_component s x y" |
980 |
and "path_component s y z" |
|
| 49653 | 981 |
shows "path_component s x z" |
982 |
using assms |
|
983 |
unfolding path_component_def |
|
| 53640 | 984 |
apply (elim exE) |
| 49653 | 985 |
apply (rule_tac x="g +++ ga" in exI) |
986 |
apply (auto simp add: path_image_join) |
|
987 |
done |
|
| 36583 | 988 |
|
| 53640 | 989 |
lemma path_component_of_subset: "s \<subseteq> t \<Longrightarrow> path_component s x y \<Longrightarrow> path_component t x y" |
| 36583 | 990 |
unfolding path_component_def by auto |
991 |
||
| 49653 | 992 |
|
| 60420 | 993 |
text \<open>Can also consider it as a set, as the name suggests.\<close> |
| 36583 | 994 |
|
| 49653 | 995 |
lemma path_component_set: |
996 |
"{y. path_component s x y} =
|
|
997 |
{y. (\<exists>g. path g \<and> path_image g \<subseteq> s \<and> pathstart g = x \<and> pathfinish g = y)}"
|
|
| 60303 | 998 |
unfolding mem_Collect_eq path_component_def |
| 49653 | 999 |
apply auto |
1000 |
done |
|
| 36583 | 1001 |
|
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
41959
diff
changeset
|
1002 |
lemma path_component_subset: "{y. path_component s x y} \<subseteq> s"
|
| 60303 | 1003 |
by (auto simp add: path_component_mem(2)) |
| 36583 | 1004 |
|
|
44170
510ac30f44c0
make Multivariate_Analysis work with separate set type
huffman
parents:
41959
diff
changeset
|
1005 |
lemma path_component_eq_empty: "{y. path_component s x y} = {} \<longleftrightarrow> x \<notin> s"
|
| 60303 | 1006 |
using path_component_mem path_component_refl_eq |
1007 |
by fastforce |
|
| 36583 | 1008 |
|
| 60420 | 1009 |
subsection \<open>Path connectedness of a space\<close> |
| 36583 | 1010 |
|
| 49653 | 1011 |
definition "path_connected s \<longleftrightarrow> |
| 53640 | 1012 |
(\<forall>x\<in>s. \<forall>y\<in>s. \<exists>g. path g \<and> path_image g \<subseteq> s \<and> pathstart g = x \<and> pathfinish g = y)" |
| 36583 | 1013 |
|
1014 |
lemma path_connected_component: "path_connected s \<longleftrightarrow> (\<forall>x\<in>s. \<forall>y\<in>s. path_component s x y)" |
|
1015 |
unfolding path_connected_def path_component_def by auto |
|
1016 |
||
| 53640 | 1017 |
lemma path_connected_component_set: "path_connected s \<longleftrightarrow> (\<forall>x\<in>s. {y. path_component s x y} = s)"
|
|
60809
457abb82fb9e
the Cauchy integral theorem and related material
paulson <lp15@cam.ac.uk>
parents:
60420
diff
changeset
|
1018 |
unfolding path_connected_component path_component_subset |
| 49653 | 1019 |
apply auto |
| 60303 | 1020 |
using path_component_mem(2) by blast |
| 36583 | 1021 |
|
| 60420 | 1022 |
subsection \<open>Some useful lemmas about path-connectedness\<close> |
| 36583 | 1023 |
|
1024 |
lemma convex_imp_path_connected: |
|
1025 |
fixes s :: "'a::real_normed_vector set" |
|
| 53640 | 1026 |
assumes "convex s" |
1027 |
shows "path_connected s" |
|
| 49653 | 1028 |
unfolding path_connected_def |
| 53640 | 1029 |
apply rule |
1030 |
apply rule |
|
1031 |
apply (rule_tac x = "linepath x y" in exI) |
|
| 49653 | 1032 |
unfolding path_image_linepath |
1033 |
using assms [unfolded convex_contains_segment] |
|
1034 |
apply auto |
|
1035 |
done |
|
| 36583 | 1036 |
|
| 49653 | 1037 |
lemma path_connected_imp_connected: |
1038 |
assumes "path_connected s" |
|
1039 |
shows "connected s" |
|
1040 |
unfolding connected_def not_ex |
|
| 53640 | 1041 |
apply rule |
1042 |
apply rule |
|
1043 |
apply (rule ccontr) |
|
| 49653 | 1044 |
unfolding not_not |
| 53640 | 1045 |
apply (elim conjE) |
| 49653 | 1046 |
proof - |
1047 |
fix e1 e2 |
|
1048 |
assume as: "open e1" "open e2" "s \<subseteq> e1 \<union> e2" "e1 \<inter> e2 \<inter> s = {}" "e1 \<inter> s \<noteq> {}" "e2 \<inter> s \<noteq> {}"
|
|
| 53640 | 1049 |
then obtain x1 x2 where obt:"x1 \<in> e1 \<inter> s" "x2 \<in> e2 \<inter> s" |
1050 |
by auto |
|
1051 |
then obtain g where g: "path g" "path_image g \<subseteq> s" "pathstart g = x1" "pathfinish g = x2" |
|
| 36583 | 1052 |
using assms[unfolded path_connected_def,rule_format,of x1 x2] by auto |
| 49653 | 1053 |
have *: "connected {0..1::real}"
|
1054 |
by (auto intro!: convex_connected convex_real_interval) |
|
1055 |
have "{0..1} \<subseteq> {x \<in> {0..1}. g x \<in> e1} \<union> {x \<in> {0..1}. g x \<in> e2}"
|
|
1056 |
using as(3) g(2)[unfolded path_defs] by blast |
|
1057 |
moreover have "{x \<in> {0..1}. g x \<in> e1} \<inter> {x \<in> {0..1}. g x \<in> e2} = {}"
|
|
| 53640 | 1058 |
using as(4) g(2)[unfolded path_defs] |
1059 |
unfolding subset_eq |
|
1060 |
by auto |
|
| 49653 | 1061 |
moreover have "{x \<in> {0..1}. g x \<in> e1} \<noteq> {} \<and> {x \<in> {0..1}. g x \<in> e2} \<noteq> {}"
|
| 53640 | 1062 |
using g(3,4)[unfolded path_defs] |
1063 |
using obt |
|
| 36583 | 1064 |
by (simp add: ex_in_conv [symmetric], metis zero_le_one order_refl) |
| 49653 | 1065 |
ultimately show False |
| 53640 | 1066 |
using *[unfolded connected_local not_ex, rule_format, |
1067 |
of "{x\<in>{0..1}. g x \<in> e1}" "{x\<in>{0..1}. g x \<in> e2}"]
|
|
| 36583 | 1068 |
using continuous_open_in_preimage[OF g(1)[unfolded path_def] as(1)] |
| 49653 | 1069 |
using continuous_open_in_preimage[OF g(1)[unfolded path_def] as(2)] |
1070 |
by auto |
|
1071 |
qed |
|
| 36583 | 1072 |
|
1073 |
lemma open_path_component: |
|
| 53593 | 1074 |
fixes s :: "'a::real_normed_vector set" |
| 49653 | 1075 |
assumes "open s" |
1076 |
shows "open {y. path_component s x y}"
|
|
1077 |
unfolding open_contains_ball |
|
1078 |
proof |
|
1079 |
fix y |
|
1080 |
assume as: "y \<in> {y. path_component s x y}"
|
|
| 49654 | 1081 |
then have "y \<in> s" |
| 49653 | 1082 |
apply - |
1083 |
apply (rule path_component_mem(2)) |
|
1084 |
unfolding mem_Collect_eq |
|
1085 |
apply auto |
|
1086 |
done |
|
| 53640 | 1087 |
then obtain e where e: "e > 0" "ball y e \<subseteq> s" |
1088 |
using assms[unfolded open_contains_ball] |
|
1089 |
by auto |
|
| 49653 | 1090 |
show "\<exists>e > 0. ball y e \<subseteq> {y. path_component s x y}"
|
1091 |
apply (rule_tac x=e in exI) |
|
| 60420 | 1092 |
apply (rule,rule \<open>e>0\<close>) |
| 53640 | 1093 |
apply rule |
| 49653 | 1094 |
unfolding mem_ball mem_Collect_eq |
1095 |
proof - |
|
1096 |
fix z |
|
1097 |
assume "dist y z < e" |
|
| 49654 | 1098 |
then show "path_component s x z" |
| 53640 | 1099 |
apply (rule_tac path_component_trans[of _ _ y]) |
1100 |
defer |
|
| 49653 | 1101 |
apply (rule path_component_of_subset[OF e(2)]) |
1102 |
apply (rule convex_imp_path_connected[OF convex_ball, unfolded path_connected_component, rule_format]) |
|
| 60420 | 1103 |
using \<open>e > 0\<close> as |
| 49653 | 1104 |
apply auto |
1105 |
done |
|
1106 |
qed |
|
1107 |
qed |
|
| 36583 | 1108 |
|
1109 |
lemma open_non_path_component: |
|
| 53593 | 1110 |
fixes s :: "'a::real_normed_vector set" |
| 49653 | 1111 |
assumes "open s" |
| 53640 | 1112 |
shows "open (s - {y. path_component s x y})"
|
| 49653 | 1113 |
unfolding open_contains_ball |
1114 |
proof |
|
1115 |
fix y |
|
| 53640 | 1116 |
assume as: "y \<in> s - {y. path_component s x y}"
|
1117 |
then obtain e where e: "e > 0" "ball y e \<subseteq> s" |
|
1118 |
using assms [unfolded open_contains_ball] |
|
1119 |
by auto |
|
| 49653 | 1120 |
show "\<exists>e>0. ball y e \<subseteq> s - {y. path_component s x y}"
|
1121 |
apply (rule_tac x=e in exI) |
|
| 53640 | 1122 |
apply rule |
| 60420 | 1123 |
apply (rule \<open>e>0\<close>) |
| 53640 | 1124 |
apply rule |
1125 |
apply rule |
|
1126 |
defer |
|
| 49653 | 1127 |
proof (rule ccontr) |
1128 |
fix z |
|
1129 |
assume "z \<in> ball y e" "\<not> z \<notin> {y. path_component s x y}"
|
|
| 49654 | 1130 |
then have "y \<in> {y. path_component s x y}"
|
| 60420 | 1131 |
unfolding not_not mem_Collect_eq using \<open>e>0\<close> |
| 49653 | 1132 |
apply - |
1133 |
apply (rule path_component_trans, assumption) |
|
1134 |
apply (rule path_component_of_subset[OF e(2)]) |
|
1135 |
apply (rule convex_imp_path_connected[OF convex_ball, unfolded path_connected_component, rule_format]) |
|
1136 |
apply auto |
|
1137 |
done |
|
| 53640 | 1138 |
then show False |
1139 |
using as by auto |
|
| 49653 | 1140 |
qed (insert e(2), auto) |
1141 |
qed |
|
| 36583 | 1142 |
|
1143 |
lemma connected_open_path_connected: |
|
| 53593 | 1144 |
fixes s :: "'a::real_normed_vector set" |
| 53640 | 1145 |
assumes "open s" |
1146 |
and "connected s" |
|
| 49653 | 1147 |
shows "path_connected s" |
1148 |
unfolding path_connected_component_set |
|
1149 |
proof (rule, rule, rule path_component_subset, rule) |
|
1150 |
fix x y |
|
| 53640 | 1151 |
assume "x \<in> s" and "y \<in> s" |
| 49653 | 1152 |
show "y \<in> {y. path_component s x y}"
|
1153 |
proof (rule ccontr) |
|
| 53640 | 1154 |
assume "\<not> ?thesis" |
1155 |
moreover have "{y. path_component s x y} \<inter> s \<noteq> {}"
|
|
| 60420 | 1156 |
using \<open>x \<in> s\<close> path_component_eq_empty path_component_subset[of s x] |
| 53640 | 1157 |
by auto |
| 49653 | 1158 |
ultimately |
1159 |
show False |
|
| 60420 | 1160 |
using \<open>y \<in> s\<close> open_non_path_component[OF assms(1)] open_path_component[OF assms(1)] |
| 53640 | 1161 |
using assms(2)[unfolded connected_def not_ex, rule_format, |
1162 |
of"{y. path_component s x y}" "s - {y. path_component s x y}"]
|
|
| 49653 | 1163 |
by auto |
1164 |
qed |
|
1165 |
qed |
|
| 36583 | 1166 |
|
1167 |
lemma path_connected_continuous_image: |
|
| 53640 | 1168 |
assumes "continuous_on s f" |
1169 |
and "path_connected s" |
|
| 49653 | 1170 |
shows "path_connected (f ` s)" |
1171 |
unfolding path_connected_def |
|
1172 |
proof (rule, rule) |
|
1173 |
fix x' y' |
|
1174 |
assume "x' \<in> f ` s" "y' \<in> f ` s" |
|
| 53640 | 1175 |
then obtain x y where x: "x \<in> s" and y: "y \<in> s" and x': "x' = f x" and y': "y' = f y" |
1176 |
by auto |
|
1177 |
from x y obtain g where "path g \<and> path_image g \<subseteq> s \<and> pathstart g = x \<and> pathfinish g = y" |
|
1178 |
using assms(2)[unfolded path_connected_def] by fast |
|
| 49654 | 1179 |
then show "\<exists>g. path g \<and> path_image g \<subseteq> f ` s \<and> pathstart g = x' \<and> pathfinish g = y'" |
| 53640 | 1180 |
unfolding x' y' |
| 49653 | 1181 |
apply (rule_tac x="f \<circ> g" in exI) |
1182 |
unfolding path_defs |
|
|
51481
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51478
diff
changeset
|
1183 |
apply (intro conjI continuous_on_compose continuous_on_subset[OF assms(1)]) |
|
ef949192e5d6
move continuous_on_inv to HOL image (simplifies isCont_inverse_function)
hoelzl
parents:
51478
diff
changeset
|
1184 |
apply auto |
| 49653 | 1185 |
done |
1186 |
qed |
|
| 36583 | 1187 |
|
1188 |
lemma homeomorphic_path_connectedness: |
|
| 53640 | 1189 |
"s homeomorphic t \<Longrightarrow> path_connected s \<longleftrightarrow> path_connected t" |
| 49653 | 1190 |
unfolding homeomorphic_def homeomorphism_def |
| 53640 | 1191 |
apply (erule exE|erule conjE)+ |
| 49653 | 1192 |
apply rule |
| 53640 | 1193 |
apply (drule_tac f=f in path_connected_continuous_image) |
1194 |
prefer 3 |
|
| 49653 | 1195 |
apply (drule_tac f=g in path_connected_continuous_image) |
1196 |
apply auto |
|
1197 |
done |
|
| 36583 | 1198 |
|
1199 |
lemma path_connected_empty: "path_connected {}"
|
|
1200 |
unfolding path_connected_def by auto |
|
1201 |
||
1202 |
lemma path_connected_singleton: "path_connected {a}"
|
|
1203 |
unfolding path_connected_def pathstart_def pathfinish_def path_image_def |
|
| 53640 | 1204 |
apply clarify |
1205 |
apply (rule_tac x="\<lambda>x. a" in exI) |
|
1206 |
apply (simp add: image_constant_conv) |
|
| 36583 | 1207 |
apply (simp add: path_def continuous_on_const) |
1208 |
done |
|
1209 |
||
| 49653 | 1210 |
lemma path_connected_Un: |
| 53640 | 1211 |
assumes "path_connected s" |
1212 |
and "path_connected t" |
|
1213 |
and "s \<inter> t \<noteq> {}"
|
|
| 49653 | 1214 |
shows "path_connected (s \<union> t)" |
1215 |
unfolding path_connected_component |
|
1216 |
proof (rule, rule) |
|
1217 |
fix x y |
|
1218 |
assume as: "x \<in> s \<union> t" "y \<in> s \<union> t" |
|
| 53640 | 1219 |
from assms(3) obtain z where "z \<in> s \<inter> t" |
1220 |
by auto |
|
| 49654 | 1221 |
then show "path_component (s \<union> t) x y" |
| 49653 | 1222 |
using as and assms(1-2)[unfolded path_connected_component] |
| 53640 | 1223 |
apply - |
| 49653 | 1224 |
apply (erule_tac[!] UnE)+ |
1225 |
apply (rule_tac[2-3] path_component_trans[of _ _ z]) |
|
1226 |
apply (auto simp add:path_component_of_subset [OF Un_upper1] path_component_of_subset[OF Un_upper2]) |
|
1227 |
done |
|
1228 |
qed |
|
| 36583 | 1229 |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1230 |
lemma path_connected_UNION: |
|
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1231 |
assumes "\<And>i. i \<in> A \<Longrightarrow> path_connected (S i)" |
| 49653 | 1232 |
and "\<And>i. i \<in> A \<Longrightarrow> z \<in> S i" |
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1233 |
shows "path_connected (\<Union>i\<in>A. S i)" |
| 49653 | 1234 |
unfolding path_connected_component |
1235 |
proof clarify |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1236 |
fix x i y j |
|
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1237 |
assume *: "i \<in> A" "x \<in> S i" "j \<in> A" "y \<in> S j" |
| 49654 | 1238 |
then have "path_component (S i) x z" and "path_component (S j) z y" |
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1239 |
using assms by (simp_all add: path_connected_component) |
| 49654 | 1240 |
then have "path_component (\<Union>i\<in>A. S i) x z" and "path_component (\<Union>i\<in>A. S i) z y" |
|
48125
602dc0215954
tuned proofs -- prefer direct "rotated" instead of old-style COMP;
wenzelm
parents:
44647
diff
changeset
|
1241 |
using *(1,3) by (auto elim!: path_component_of_subset [rotated]) |
| 49654 | 1242 |
then show "path_component (\<Union>i\<in>A. S i) x y" |
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1243 |
by (rule path_component_trans) |
|
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1244 |
qed |
| 36583 | 1245 |
|
| 49653 | 1246 |
|
| 60420 | 1247 |
subsection \<open>Sphere is path-connected\<close> |
|
37489
44e42d392c6e
Introduce a type class for euclidean spaces, port most lemmas from real^'n to this type class.
hoelzl
parents:
36583
diff
changeset
|
1248 |
|
| 36583 | 1249 |
lemma path_connected_punctured_universe: |
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1250 |
assumes "2 \<le> DIM('a::euclidean_space)"
|
| 53640 | 1251 |
shows "path_connected ((UNIV::'a set) - {a})"
|
| 49653 | 1252 |
proof - |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1253 |
let ?A = "{x::'a. \<exists>i\<in>Basis. x \<bullet> i < a \<bullet> i}"
|
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1254 |
let ?B = "{x::'a. \<exists>i\<in>Basis. a \<bullet> i < x \<bullet> i}"
|
| 36583 | 1255 |
|
| 49653 | 1256 |
have A: "path_connected ?A" |
1257 |
unfolding Collect_bex_eq |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1258 |
proof (rule path_connected_UNION) |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1259 |
fix i :: 'a |
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1260 |
assume "i \<in> Basis" |
| 53640 | 1261 |
then show "(\<Sum>i\<in>Basis. (a \<bullet> i - 1)*\<^sub>R i) \<in> {x::'a. x \<bullet> i < a \<bullet> i}"
|
1262 |
by simp |
|
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1263 |
show "path_connected {x. x \<bullet> i < a \<bullet> i}"
|
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1264 |
using convex_imp_path_connected [OF convex_halfspace_lt, of i "a \<bullet> i"] |
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1265 |
by (simp add: inner_commute) |
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1266 |
qed |
| 53640 | 1267 |
have B: "path_connected ?B" |
1268 |
unfolding Collect_bex_eq |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1269 |
proof (rule path_connected_UNION) |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1270 |
fix i :: 'a |
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1271 |
assume "i \<in> Basis" |
| 53640 | 1272 |
then show "(\<Sum>i\<in>Basis. (a \<bullet> i + 1) *\<^sub>R i) \<in> {x::'a. a \<bullet> i < x \<bullet> i}"
|
1273 |
by simp |
|
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1274 |
show "path_connected {x. a \<bullet> i < x \<bullet> i}"
|
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1275 |
using convex_imp_path_connected [OF convex_halfspace_gt, of "a \<bullet> i" i] |
|
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1276 |
by (simp add: inner_commute) |
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1277 |
qed |
| 53640 | 1278 |
obtain S :: "'a set" where "S \<subseteq> Basis" and "card S = Suc (Suc 0)" |
1279 |
using ex_card[OF assms] |
|
1280 |
by auto |
|
1281 |
then obtain b0 b1 :: 'a where "b0 \<in> Basis" and "b1 \<in> Basis" and "b0 \<noteq> b1" |
|
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1282 |
unfolding card_Suc_eq by auto |
| 53640 | 1283 |
then have "a + b0 - b1 \<in> ?A \<inter> ?B" |
1284 |
by (auto simp: inner_simps inner_Basis) |
|
1285 |
then have "?A \<inter> ?B \<noteq> {}"
|
|
1286 |
by fast |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1287 |
with A B have "path_connected (?A \<union> ?B)" |
|
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1288 |
by (rule path_connected_Un) |
|
50526
899c9c4e4a4c
Remove the indexed basis from the definition of euclidean spaces and only use the set of Basis vectors
hoelzl
parents:
49654
diff
changeset
|
1289 |
also have "?A \<union> ?B = {x. \<exists>i\<in>Basis. x \<bullet> i \<noteq> a \<bullet> i}"
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1290 |
unfolding neq_iff bex_disj_distrib Collect_disj_eq .. |
|
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1291 |
also have "\<dots> = {x. x \<noteq> a}"
|
| 53640 | 1292 |
unfolding euclidean_eq_iff [where 'a='a] |
1293 |
by (simp add: Bex_def) |
|
1294 |
also have "\<dots> = UNIV - {a}"
|
|
1295 |
by auto |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1296 |
finally show ?thesis . |
|
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1297 |
qed |
| 36583 | 1298 |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1299 |
lemma path_connected_sphere: |
|
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1300 |
assumes "2 \<le> DIM('a::euclidean_space)"
|
| 53640 | 1301 |
shows "path_connected {x::'a. norm (x - a) = r}"
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1302 |
proof (rule linorder_cases [of r 0]) |
| 49653 | 1303 |
assume "r < 0" |
| 53640 | 1304 |
then have "{x::'a. norm(x - a) = r} = {}"
|
1305 |
by auto |
|
1306 |
then show ?thesis |
|
1307 |
using path_connected_empty by simp |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1308 |
next |
|
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1309 |
assume "r = 0" |
| 53640 | 1310 |
then show ?thesis |
1311 |
using path_connected_singleton by simp |
|
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1312 |
next |
|
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1313 |
assume r: "0 < r" |
| 53640 | 1314 |
have *: "{x::'a. norm(x - a) = r} = (\<lambda>x. a + r *\<^sub>R x) ` {x. norm x = 1}"
|
1315 |
apply (rule set_eqI) |
|
1316 |
apply rule |
|
| 49653 | 1317 |
unfolding image_iff |
1318 |
apply (rule_tac x="(1/r) *\<^sub>R (x - a)" in bexI) |
|
1319 |
unfolding mem_Collect_eq norm_scaleR |
|
| 53640 | 1320 |
using r |
| 49653 | 1321 |
apply (auto simp add: scaleR_right_diff_distrib) |
1322 |
done |
|
1323 |
have **: "{x::'a. norm x = 1} = (\<lambda>x. (1/norm x) *\<^sub>R x) ` (UNIV - {0})"
|
|
| 53640 | 1324 |
apply (rule set_eqI) |
1325 |
apply rule |
|
| 49653 | 1326 |
unfolding image_iff |
1327 |
apply (rule_tac x=x in bexI) |
|
1328 |
unfolding mem_Collect_eq |
|
| 53640 | 1329 |
apply (auto split: split_if_asm) |
| 49653 | 1330 |
done |
|
44647
e4de7750cdeb
modernize lemmas about 'continuous' and 'continuous_on';
huffman
parents:
44531
diff
changeset
|
1331 |
have "continuous_on (UNIV - {0}) (\<lambda>x::'a. 1 / norm x)"
|
| 59557 | 1332 |
by (auto intro!: continuous_intros) |
| 53640 | 1333 |
then show ?thesis |
1334 |
unfolding * ** |
|
1335 |
using path_connected_punctured_universe[OF assms] |
|
|
56371
fb9ae0727548
extend continuous_intros; remove continuous_on_intros and isCont_intros
hoelzl
parents:
56188
diff
changeset
|
1336 |
by (auto intro!: path_connected_continuous_image continuous_intros) |
|
37674
f86de9c00c47
convert theorem path_connected_sphere to euclidean_space class
huffman
parents:
37489
diff
changeset
|
1337 |
qed |
| 36583 | 1338 |
|
| 53640 | 1339 |
lemma connected_sphere: "2 \<le> DIM('a::euclidean_space) \<Longrightarrow> connected {x::'a. norm (x - a) = r}"
|
1340 |
using path_connected_sphere path_connected_imp_connected |
|
1341 |
by auto |
|
| 36583 | 1342 |
|
1343 |
end |