3269 } then |
3269 } then |
3270 show ?thesis |
3270 show ?thesis |
3271 by (force simp: L contour_integral_integral) |
3271 by (force simp: L contour_integral_integral) |
3272 qed |
3272 qed |
3273 |
3273 |
3274 subsection\<open>Constancy of a function from a connected set into a finite, disconnected or discrete set\<close> |
|
3275 |
|
3276 text\<open>Still missing: versions for a set that is smaller than R, or countable.\<close> |
|
3277 |
|
3278 lemma continuous_disconnected_range_constant: |
|
3279 assumes s: "connected s" |
|
3280 and conf: "continuous_on s f" |
|
3281 and fim: "f ` s \<subseteq> t" |
|
3282 and cct: "\<And>y. y \<in> t \<Longrightarrow> connected_component_set t y = {y}" |
|
3283 shows "\<exists>a. \<forall>x \<in> s. f x = a" |
|
3284 proof (cases "s = {}") |
|
3285 case True then show ?thesis by force |
|
3286 next |
|
3287 case False |
|
3288 { fix x assume "x \<in> s" |
|
3289 then have "f ` s \<subseteq> {f x}" |
|
3290 by (metis connected_continuous_image conf connected_component_maximal fim image_subset_iff rev_image_eqI s cct) |
|
3291 } |
|
3292 with False show ?thesis |
|
3293 by blast |
|
3294 qed |
|
3295 |
|
3296 lemma discrete_subset_disconnected: |
|
3297 fixes s :: "'a::topological_space set" |
|
3298 fixes t :: "'b::real_normed_vector set" |
|
3299 assumes conf: "continuous_on s f" |
|
3300 and no: "\<And>x. x \<in> s \<Longrightarrow> \<exists>e>0. \<forall>y. y \<in> s \<and> f y \<noteq> f x \<longrightarrow> e \<le> norm (f y - f x)" |
|
3301 shows "f ` s \<subseteq> {y. connected_component_set (f ` s) y = {y}}" |
|
3302 proof - |
|
3303 { fix x assume x: "x \<in> s" |
|
3304 then obtain e where "e>0" and ele: "\<And>y. \<lbrakk>y \<in> s; f y \<noteq> f x\<rbrakk> \<Longrightarrow> e \<le> norm (f y - f x)" |
|
3305 using conf no [OF x] by auto |
|
3306 then have e2: "0 \<le> e / 2" |
|
3307 by simp |
|
3308 have "f y = f x" if "y \<in> s" and ccs: "f y \<in> connected_component_set (f ` s) (f x)" for y |
|
3309 apply (rule ccontr) |
|
3310 using connected_closed [of "connected_component_set (f ` s) (f x)"] \<open>e>0\<close> |
|
3311 apply (simp add: del: ex_simps) |
|
3312 apply (drule spec [where x="cball (f x) (e / 2)"]) |
|
3313 apply (drule spec [where x="- ball(f x) e"]) |
|
3314 apply (auto simp: dist_norm open_closed [symmetric] simp del: le_divide_eq_numeral1 dest!: connected_component_in) |
|
3315 apply (metis diff_self e2 ele norm_minus_commute norm_zero not_less) |
|
3316 using centre_in_cball connected_component_refl_eq e2 x apply blast |
|
3317 using ccs |
|
3318 apply (force simp: cball_def dist_norm norm_minus_commute dest: ele [OF \<open>y \<in> s\<close>]) |
|
3319 done |
|
3320 moreover have "connected_component_set (f ` s) (f x) \<subseteq> f ` s" |
|
3321 by (auto simp: connected_component_in) |
|
3322 ultimately have "connected_component_set (f ` s) (f x) = {f x}" |
|
3323 by (auto simp: x) |
|
3324 } |
|
3325 with assms show ?thesis |
|
3326 by blast |
|
3327 qed |
|
3328 |
|
3329 lemma finite_implies_discrete: |
|
3330 fixes s :: "'a::topological_space set" |
|
3331 assumes "finite (f ` s)" |
|
3332 shows "(\<forall>x \<in> s. \<exists>e>0. \<forall>y. y \<in> s \<and> f y \<noteq> f x \<longrightarrow> e \<le> norm (f y - f x))" |
|
3333 proof - |
|
3334 have "\<exists>e>0. \<forall>y. y \<in> s \<and> f y \<noteq> f x \<longrightarrow> e \<le> norm (f y - f x)" if "x \<in> s" for x |
|
3335 proof (cases "f ` s - {f x} = {}") |
|
3336 case True |
|
3337 with zero_less_numeral show ?thesis |
|
3338 by (fastforce simp add: Set.image_subset_iff cong: conj_cong) |
|
3339 next |
|
3340 case False |
|
3341 then obtain z where z: "z \<in> s" "f z \<noteq> f x" |
|
3342 by blast |
|
3343 have finn: "finite {norm (z - f x) |z. z \<in> f ` s - {f x}}" |
|
3344 using assms by simp |
|
3345 then have *: "0 < Inf{norm(z - f x) | z. z \<in> f ` s - {f x}}" |
|
3346 apply (rule finite_imp_less_Inf) |
|
3347 using z apply force+ |
|
3348 done |
|
3349 show ?thesis |
|
3350 by (force intro!: * cInf_le_finite [OF finn]) |
|
3351 qed |
|
3352 with assms show ?thesis |
|
3353 by blast |
|
3354 qed |
|
3355 |
|
3356 text\<open>This proof requires the existence of two separate values of the range type.\<close> |
|
3357 lemma finite_range_constant_imp_connected: |
|
3358 assumes "\<And>f::'a::topological_space \<Rightarrow> 'b::real_normed_algebra_1. |
|
3359 \<lbrakk>continuous_on s f; finite(f ` s)\<rbrakk> \<Longrightarrow> \<exists>a. \<forall>x \<in> s. f x = a" |
|
3360 shows "connected s" |
|
3361 proof - |
|
3362 { fix t u |
|
3363 assume clt: "closedin (subtopology euclidean s) t" |
|
3364 and clu: "closedin (subtopology euclidean s) u" |
|
3365 and tue: "t \<inter> u = {}" and tus: "t \<union> u = s" |
|
3366 have conif: "continuous_on s (\<lambda>x. if x \<in> t then 0 else 1)" |
|
3367 apply (subst tus [symmetric]) |
|
3368 apply (rule continuous_on_cases_local) |
|
3369 using clt clu tue |
|
3370 apply (auto simp: tus continuous_on_const) |
|
3371 done |
|
3372 have fi: "finite ((\<lambda>x. if x \<in> t then 0 else 1) ` s)" |
|
3373 by (rule finite_subset [of _ "{0,1}"]) auto |
|
3374 have "t = {} \<or> u = {}" |
|
3375 using assms [OF conif fi] tus [symmetric] |
|
3376 by (auto simp: Ball_def) (metis IntI empty_iff one_neq_zero tue) |
|
3377 } |
|
3378 then show ?thesis |
|
3379 by (simp add: connected_closedin_eq) |
|
3380 qed |
|
3381 |
|
3382 lemma continuous_disconnected_range_constant_eq: |
|
3383 "(connected s \<longleftrightarrow> |
|
3384 (\<forall>f::'a::topological_space \<Rightarrow> 'b::real_normed_algebra_1. |
|
3385 \<forall>t. continuous_on s f \<and> f ` s \<subseteq> t \<and> (\<forall>y \<in> t. connected_component_set t y = {y}) |
|
3386 \<longrightarrow> (\<exists>a::'b. \<forall>x \<in> s. f x = a)))" (is ?thesis1) |
|
3387 and continuous_discrete_range_constant_eq: |
|
3388 "(connected s \<longleftrightarrow> |
|
3389 (\<forall>f::'a::topological_space \<Rightarrow> 'b::real_normed_algebra_1. |
|
3390 continuous_on s f \<and> |
|
3391 (\<forall>x \<in> s. \<exists>e. 0 < e \<and> (\<forall>y. y \<in> s \<and> (f y \<noteq> f x) \<longrightarrow> e \<le> norm(f y - f x))) |
|
3392 \<longrightarrow> (\<exists>a::'b. \<forall>x \<in> s. f x = a)))" (is ?thesis2) |
|
3393 and continuous_finite_range_constant_eq: |
|
3394 "(connected s \<longleftrightarrow> |
|
3395 (\<forall>f::'a::topological_space \<Rightarrow> 'b::real_normed_algebra_1. |
|
3396 continuous_on s f \<and> finite (f ` s) |
|
3397 \<longrightarrow> (\<exists>a::'b. \<forall>x \<in> s. f x = a)))" (is ?thesis3) |
|
3398 proof - |
|
3399 have *: "\<And>s t u v. \<lbrakk>s \<Longrightarrow> t; t \<Longrightarrow> u; u \<Longrightarrow> v; v \<Longrightarrow> s\<rbrakk> |
|
3400 \<Longrightarrow> (s \<longleftrightarrow> t) \<and> (s \<longleftrightarrow> u) \<and> (s \<longleftrightarrow> v)" |
|
3401 by blast |
|
3402 have "?thesis1 \<and> ?thesis2 \<and> ?thesis3" |
|
3403 apply (rule *) |
|
3404 using continuous_disconnected_range_constant apply metis |
|
3405 apply clarify |
|
3406 apply (frule discrete_subset_disconnected; blast) |
|
3407 apply (blast dest: finite_implies_discrete) |
|
3408 apply (blast intro!: finite_range_constant_imp_connected) |
|
3409 done |
|
3410 then show ?thesis1 ?thesis2 ?thesis3 |
|
3411 by blast+ |
|
3412 qed |
|
3413 |
|
3414 lemma continuous_discrete_range_constant: |
|
3415 fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_algebra_1" |
|
3416 assumes s: "connected s" |
|
3417 and "continuous_on s f" |
|
3418 and "\<And>x. x \<in> s \<Longrightarrow> \<exists>e>0. \<forall>y. y \<in> s \<and> f y \<noteq> f x \<longrightarrow> e \<le> norm (f y - f x)" |
|
3419 shows "\<exists>a. \<forall>x \<in> s. f x = a" |
|
3420 using continuous_discrete_range_constant_eq [THEN iffD1, OF s] assms |
|
3421 by blast |
|
3422 |
|
3423 lemma continuous_finite_range_constant: |
|
3424 fixes f :: "'a::topological_space \<Rightarrow> 'b::real_normed_algebra_1" |
|
3425 assumes "connected s" |
|
3426 and "continuous_on s f" |
|
3427 and "finite (f ` s)" |
|
3428 shows "\<exists>a. \<forall>x \<in> s. f x = a" |
|
3429 using assms continuous_finite_range_constant_eq |
|
3430 by blast |
|
3431 |
|
3432 |
|
3433 text\<open>We can treat even non-rectifiable paths as having a "length" for bounds on analytic functions in open sets.\<close> |
3274 text\<open>We can treat even non-rectifiable paths as having a "length" for bounds on analytic functions in open sets.\<close> |
3434 |
3275 |
3435 subsection\<open>Winding Numbers\<close> |
3276 subsection\<open>Winding Numbers\<close> |
3436 |
3277 |
3437 definition winding_number:: "[real \<Rightarrow> complex, complex] \<Rightarrow> complex" where |
3278 definition winding_number:: "[real \<Rightarrow> complex, complex] \<Rightarrow> complex" where |