3860 by (rule_tac x="exp(Re i) / norm r" in exI) (auto simp: path_image_def) |
3860 by (rule_tac x="exp(Re i) / norm r" in exI) (auto simp: path_image_def) |
3861 qed |
3861 qed |
3862 |
3862 |
3863 lemma winding_number_big_meets: |
3863 lemma winding_number_big_meets: |
3864 fixes z::complex |
3864 fixes z::complex |
3865 assumes \<gamma>: "valid_path \<gamma>" and z: "z \<notin> path_image \<gamma>" and "abs (Re (winding_number \<gamma> z)) \<ge> 1" |
3865 assumes \<gamma>: "valid_path \<gamma>" and z: "z \<notin> path_image \<gamma>" and "\<bar>Re (winding_number \<gamma> z)\<bar> \<ge> 1" |
3866 and w: "w \<noteq> z" |
3866 and w: "w \<noteq> z" |
3867 shows "\<exists>a::real. 0 < a \<and> z + a*(w - z) \<in> path_image \<gamma>" |
3867 shows "\<exists>a::real. 0 < a \<and> z + a*(w - z) \<in> path_image \<gamma>" |
3868 proof - |
3868 proof - |
3869 { assume "Re (winding_number \<gamma> z) \<le> - 1" |
3869 { assume "Re (winding_number \<gamma> z) \<le> - 1" |
3870 then have "Re (winding_number (reversepath \<gamma>) z) \<ge> 1" |
3870 then have "Re (winding_number (reversepath \<gamma>) z) \<ge> 1" |
3886 lemma winding_number_less_1: |
3886 lemma winding_number_less_1: |
3887 fixes z::complex |
3887 fixes z::complex |
3888 shows |
3888 shows |
3889 "\<lbrakk>valid_path \<gamma>; z \<notin> path_image \<gamma>; w \<noteq> z; |
3889 "\<lbrakk>valid_path \<gamma>; z \<notin> path_image \<gamma>; w \<noteq> z; |
3890 \<And>a::real. 0 < a \<Longrightarrow> z + a*(w - z) \<notin> path_image \<gamma>\<rbrakk> |
3890 \<And>a::real. 0 < a \<Longrightarrow> z + a*(w - z) \<notin> path_image \<gamma>\<rbrakk> |
3891 \<Longrightarrow> abs (Re(winding_number \<gamma> z)) < 1" |
3891 \<Longrightarrow> \<bar>Re(winding_number \<gamma> z)\<bar> < 1" |
3892 by (auto simp: not_less dest: winding_number_big_meets) |
3892 by (auto simp: not_less dest: winding_number_big_meets) |
3893 |
3893 |
3894 text\<open>One way of proving that WN=1 for a loop.\<close> |
3894 text\<open>One way of proving that WN=1 for a loop.\<close> |
3895 lemma winding_number_eq_1: |
3895 lemma winding_number_eq_1: |
3896 fixes z::complex |
3896 fixes z::complex |
4317 shows "\<bar>Re (winding_number \<gamma> z)\<bar> \<le> 1/2" |
4317 shows "\<bar>Re (winding_number \<gamma> z)\<bar> \<le> 1/2" |
4318 proof - |
4318 proof - |
4319 { assume wnz_12: "\<bar>Re (winding_number \<gamma> z)\<bar> > 1/2" |
4319 { assume wnz_12: "\<bar>Re (winding_number \<gamma> z)\<bar> > 1/2" |
4320 have "isCont (winding_number \<gamma>) z" |
4320 have "isCont (winding_number \<gamma>) z" |
4321 by (metis continuous_at_winding_number valid_path_imp_path \<gamma> z) |
4321 by (metis continuous_at_winding_number valid_path_imp_path \<gamma> z) |
4322 then obtain d where "d>0" and d: "\<And>x'. dist x' z < d \<Longrightarrow> dist (winding_number \<gamma> x') (winding_number \<gamma> z) < abs(Re(winding_number \<gamma> z)) - 1/2" |
4322 then obtain d where "d>0" and d: "\<And>x'. dist x' z < d \<Longrightarrow> dist (winding_number \<gamma> x') (winding_number \<gamma> z) < \<bar>Re(winding_number \<gamma> z)\<bar> - 1/2" |
4323 using continuous_at_eps_delta wnz_12 diff_gt_0_iff_gt by blast |
4323 using continuous_at_eps_delta wnz_12 diff_gt_0_iff_gt by blast |
4324 def z' \<equiv> "z - (d / (2 * cmod a)) *\<^sub>R a" |
4324 def z' \<equiv> "z - (d / (2 * cmod a)) *\<^sub>R a" |
4325 have *: "a \<bullet> z' \<le> b - d / 3 * cmod a" |
4325 have *: "a \<bullet> z' \<le> b - d / 3 * cmod a" |
4326 unfolding z'_def inner_mult_right' divide_inverse |
4326 unfolding z'_def inner_mult_right' divide_inverse |
4327 apply (simp add: divide_simps algebra_simps dot_square_norm power2_eq_square anz) |
4327 apply (simp add: divide_simps algebra_simps dot_square_norm power2_eq_square anz) |
4477 using t t1 t2 ltd \<open>e > 0\<close> |
4477 using t t1 t2 ltd \<open>e > 0\<close> |
4478 apply (auto intro!: e simp: d no2 simp del: less_divide_eq_numeral1) |
4478 apply (auto intro!: e simp: d no2 simp del: less_divide_eq_numeral1) |
4479 done |
4479 done |
4480 } |
4480 } |
4481 then have "\<exists>e. 0 < e \<and> |
4481 then have "\<exists>e. 0 < e \<and> |
4482 (\<forall>t1 t2. t1 \<in> {0..1} \<and> t2 \<in> {0..1} \<and> abs(t1 - t) < e \<and> abs(t2 - t) < e |
4482 (\<forall>t1 t2. t1 \<in> {0..1} \<and> t2 \<in> {0..1} \<and> \<bar>t1 - t\<bar> < e \<and> \<bar>t2 - t\<bar> < e |
4483 \<longrightarrow> (\<exists>d. 0 < d \<and> |
4483 \<longrightarrow> (\<exists>d. 0 < d \<and> |
4484 (\<forall>g1 g2. valid_path g1 \<and> valid_path g2 \<and> |
4484 (\<forall>g1 g2. valid_path g1 \<and> valid_path g2 \<and> |
4485 (\<forall>u \<in> {0..1}. |
4485 (\<forall>u \<in> {0..1}. |
4486 norm(g1 u - k((t1,u))) < d \<and> norm(g2 u - k((t2,u))) < d) \<and> |
4486 norm(g1 u - k((t1,u))) < d \<and> norm(g2 u - k((t2,u))) < d) \<and> |
4487 linked_paths atends g1 g2 |
4487 linked_paths atends g1 g2 |
4488 \<longrightarrow> contour_integral g2 f = contour_integral g1 f)))" |
4488 \<longrightarrow> contour_integral g2 f = contour_integral g1 f)))" |
4489 by (rule_tac x=d in exI) (simp add: \<open>d > 0\<close>) |
4489 by (rule_tac x=d in exI) (simp add: \<open>d > 0\<close>) |
4490 } |
4490 } |
4491 then obtain ee where ee: |
4491 then obtain ee where ee: |
4492 "\<And>t. t \<in> {0..1} \<Longrightarrow> ee t > 0 \<and> |
4492 "\<And>t. t \<in> {0..1} \<Longrightarrow> ee t > 0 \<and> |
4493 (\<forall>t1 t2. t1 \<in> {0..1} \<longrightarrow> t2 \<in> {0..1} \<longrightarrow> abs(t1 - t) < ee t \<longrightarrow> abs(t2 - t) < ee t |
4493 (\<forall>t1 t2. t1 \<in> {0..1} \<longrightarrow> t2 \<in> {0..1} \<longrightarrow> \<bar>t1 - t\<bar> < ee t \<longrightarrow> \<bar>t2 - t\<bar> < ee t |
4494 \<longrightarrow> (\<exists>d. 0 < d \<and> |
4494 \<longrightarrow> (\<exists>d. 0 < d \<and> |
4495 (\<forall>g1 g2. valid_path g1 \<and> valid_path g2 \<and> |
4495 (\<forall>g1 g2. valid_path g1 \<and> valid_path g2 \<and> |
4496 (\<forall>u \<in> {0..1}. |
4496 (\<forall>u \<in> {0..1}. |
4497 norm(g1 u - k((t1,u))) < d \<and> norm(g2 u - k((t2,u))) < d) \<and> |
4497 norm(g1 u - k((t1,u))) < d \<and> norm(g2 u - k((t2,u))) < d) \<and> |
4498 linked_paths atends g1 g2 |
4498 linked_paths atends g1 g2 |
4865 case 1 with fi [unfolded has_contour_integral] |
4865 case 1 with fi [unfolded has_contour_integral] |
4866 have "i = 0" by (simp add: vector_derivative_part_circlepath) |
4866 have "i = 0" by (simp add: vector_derivative_part_circlepath) |
4867 with assms show ?thesis by simp |
4867 with assms show ?thesis by simp |
4868 next |
4868 next |
4869 case 2 |
4869 case 2 |
4870 have [simp]: "abs r = r" using \<open>r > 0\<close> by linarith |
4870 have [simp]: "\<bar>r\<bar> = r" using \<open>r > 0\<close> by linarith |
4871 have [simp]: "cmod (complex_of_real t - complex_of_real s) = t-s" |
4871 have [simp]: "cmod (complex_of_real t - complex_of_real s) = t-s" |
4872 by (metis "2" abs_of_pos diff_gt_0_iff_gt norm_of_real of_real_diff) |
4872 by (metis "2" abs_of_pos diff_gt_0_iff_gt norm_of_real of_real_diff) |
4873 have "finite (part_circlepath z r s t -` {y} \<inter> {0..1})" if "y \<in> k" for y |
4873 have "finite (part_circlepath z r s t -` {y} \<inter> {0..1})" if "y \<in> k" for y |
4874 proof - |
4874 proof - |
4875 def w \<equiv> "(y - z)/of_real r / exp(ii * of_real s)" |
4875 def w \<equiv> "(y - z)/of_real r / exp(ii * of_real s)" |
4938 apply (simp add: exp_Euler cos_of_real sin_of_real part_circlepath_def algebra_simps cos_squared_eq [unfolded power2_eq_square]) |
4938 apply (simp add: exp_Euler cos_of_real sin_of_real part_circlepath_def algebra_simps cos_squared_eq [unfolded power2_eq_square]) |
4939 using assms \<open>0 < r\<close> by auto |
4939 using assms \<open>0 < r\<close> by auto |
4940 qed |
4940 qed |
4941 |
4941 |
4942 proposition simple_path_part_circlepath: |
4942 proposition simple_path_part_circlepath: |
4943 "simple_path(part_circlepath z r s t) \<longleftrightarrow> (r \<noteq> 0 \<and> s \<noteq> t \<and> abs(s - t) \<le> 2*pi)" |
4943 "simple_path(part_circlepath z r s t) \<longleftrightarrow> (r \<noteq> 0 \<and> s \<noteq> t \<and> \<bar>s - t\<bar> \<le> 2*pi)" |
4944 proof (cases "r = 0 \<or> s = t") |
4944 proof (cases "r = 0 \<or> s = t") |
4945 case True |
4945 case True |
4946 then show ?thesis |
4946 then show ?thesis |
4947 apply (rule disjE) |
4947 apply (rule disjE) |
4948 apply (force simp: part_circlepath_def simple_path_def intro: bexI [where x = "1/4"] bexI [where x = "1/3"])+ |
4948 apply (force simp: part_circlepath_def simple_path_def intro: bexI [where x = "1/4"] bexI [where x = "1/3"])+ |
4950 next |
4950 next |
4951 case False then have "r \<noteq> 0" "s \<noteq> t" by auto |
4951 case False then have "r \<noteq> 0" "s \<noteq> t" by auto |
4952 have *: "\<And>x y z s t. ii*((1 - x) * s + x * t) = ii*(((1 - y) * s + y * t)) + z \<longleftrightarrow> ii*(x - y) * (t - s) = z" |
4952 have *: "\<And>x y z s t. ii*((1 - x) * s + x * t) = ii*(((1 - y) * s + y * t)) + z \<longleftrightarrow> ii*(x - y) * (t - s) = z" |
4953 by (simp add: algebra_simps) |
4953 by (simp add: algebra_simps) |
4954 have abs01: "\<And>x y::real. 0 \<le> x \<and> x \<le> 1 \<and> 0 \<le> y \<and> y \<le> 1 |
4954 have abs01: "\<And>x y::real. 0 \<le> x \<and> x \<le> 1 \<and> 0 \<le> y \<and> y \<le> 1 |
4955 \<Longrightarrow> (x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0 \<longleftrightarrow> abs(x - y) \<in> {0,1})" |
4955 \<Longrightarrow> (x = y \<or> x = 0 \<and> y = 1 \<or> x = 1 \<and> y = 0 \<longleftrightarrow> \<bar>x - y\<bar> \<in> {0,1})" |
4956 by auto |
4956 by auto |
4957 have abs_away: "\<And>P. (\<forall>x\<in>{0..1}. \<forall>y\<in>{0..1}. P(abs(x - y))) \<longleftrightarrow> (\<forall>x::real. 0 \<le> x \<and> x \<le> 1 \<longrightarrow> P x)" |
4957 have abs_away: "\<And>P. (\<forall>x\<in>{0..1}. \<forall>y\<in>{0..1}. P \<bar>x - y\<bar>) \<longleftrightarrow> (\<forall>x::real. 0 \<le> x \<and> x \<le> 1 \<longrightarrow> P x)" |
4958 by force |
4958 by force |
4959 have **: "\<And>x y. (\<exists>n. (complex_of_real x - of_real y) * (of_real t - of_real s) = 2 * (of_int n * of_real pi)) \<longleftrightarrow> |
4959 have **: "\<And>x y. (\<exists>n. (complex_of_real x - of_real y) * (of_real t - of_real s) = 2 * (of_int n * of_real pi)) \<longleftrightarrow> |
4960 (\<exists>n. abs(x - y) * (t - s) = 2 * (of_int n * pi))" |
4960 (\<exists>n. \<bar>x - y\<bar> * (t - s) = 2 * (of_int n * pi))" |
4961 by (force simp: algebra_simps abs_if dest: arg_cong [where f=Re] arg_cong [where f=complex_of_real] |
4961 by (force simp: algebra_simps abs_if dest: arg_cong [where f=Re] arg_cong [where f=complex_of_real] |
4962 intro: exI [where x = "-n" for n]) |
4962 intro: exI [where x = "-n" for n]) |
4963 have 1: "\<forall>x. 0 \<le> x \<and> x \<le> 1 \<longrightarrow> (\<exists>n. x * (t - s) = 2 * (real_of_int n * pi)) \<longrightarrow> x = 0 \<or> x = 1 \<Longrightarrow> \<bar>s - t\<bar> \<le> 2 * pi" |
4963 have 1: "\<forall>x. 0 \<le> x \<and> x \<le> 1 \<longrightarrow> (\<exists>n. x * (t - s) = 2 * (real_of_int n * pi)) \<longrightarrow> x = 0 \<or> x = 1 \<Longrightarrow> \<bar>s - t\<bar> \<le> 2 * pi" |
4964 apply (rule ccontr) |
4964 apply (rule ccontr) |
4965 apply (drule_tac x="2*pi / abs(t-s)" in spec) |
4965 apply (drule_tac x="2*pi / \<bar>t - s\<bar>" in spec) |
4966 using False |
4966 using False |
4967 apply (simp add: abs_minus_commute divide_simps) |
4967 apply (simp add: abs_minus_commute divide_simps) |
4968 apply (frule_tac x=1 in spec) |
4968 apply (frule_tac x=1 in spec) |
4969 apply (drule_tac x="-1" in spec) |
4969 apply (drule_tac x="-1" in spec) |
4970 apply (simp add:) |
4970 apply (simp add:) |
4984 apply (auto simp: 2 divide_simps abs_mult dest: of_int_leD) |
4984 apply (auto simp: 2 divide_simps abs_mult dest: of_int_leD) |
4985 done |
4985 done |
4986 qed |
4986 qed |
4987 |
4987 |
4988 proposition arc_part_circlepath: |
4988 proposition arc_part_circlepath: |
4989 assumes "r \<noteq> 0" "s \<noteq> t" "abs(s - t) < 2*pi" |
4989 assumes "r \<noteq> 0" "s \<noteq> t" "\<bar>s - t\<bar> < 2*pi" |
4990 shows "arc (part_circlepath z r s t)" |
4990 shows "arc (part_circlepath z r s t)" |
4991 proof - |
4991 proof - |
4992 have *: "x = y" if eq: "\<i> * (linepath s t x) = \<i> * (linepath s t y) + 2 * of_int n * complex_of_real pi * \<i>" |
4992 have *: "x = y" if eq: "\<i> * (linepath s t x) = \<i> * (linepath s t y) + 2 * of_int n * complex_of_real pi * \<i>" |
4993 and x: "x \<in> {0..1}" and y: "y \<in> {0..1}" for x y n |
4993 and x: "x \<in> {0..1}" and y: "y \<in> {0..1}" for x y n |
4994 proof - |
4994 proof - |
5109 unfolding circlepath path_image_def sphere_def dist_norm |
5109 unfolding circlepath path_image_def sphere_def dist_norm |
5110 by (force simp: assms algebra_simps norm_mult norm_minus_commute intro: *) |
5110 by (force simp: assms algebra_simps norm_mult norm_minus_commute intro: *) |
5111 qed |
5111 qed |
5112 |
5112 |
5113 proposition path_image_circlepath [simp]: |
5113 proposition path_image_circlepath [simp]: |
5114 "path_image (circlepath z r) = sphere z (abs r)" |
5114 "path_image (circlepath z r) = sphere z \<bar>r\<bar>" |
5115 using path_image_circlepath_minus |
5115 using path_image_circlepath_minus |
5116 by (force simp add: path_image_circlepath_nonneg abs_if) |
5116 by (force simp add: path_image_circlepath_nonneg abs_if) |
5117 |
5117 |
5118 lemma has_contour_integral_bound_circlepath_strong: |
5118 lemma has_contour_integral_bound_circlepath_strong: |
5119 "\<lbrakk>(f has_contour_integral i) (circlepath z r); |
5119 "\<lbrakk>(f has_contour_integral i) (circlepath z r); |
6161 proof (rule ccontr) |
6161 proof (rule ccontr) |
6162 assume fz: "f z \<noteq> 0" |
6162 assume fz: "f z \<noteq> 0" |
6163 with inf [unfolded Lim_at_infinity, rule_format, of "norm(f z)/2"] |
6163 with inf [unfolded Lim_at_infinity, rule_format, of "norm(f z)/2"] |
6164 obtain B where B: "\<And>x. B \<le> cmod x \<Longrightarrow> norm (f x) * 2 < cmod (f z)" |
6164 obtain B where B: "\<And>x. B \<le> cmod x \<Longrightarrow> norm (f x) * 2 < cmod (f z)" |
6165 by (auto simp: dist_norm) |
6165 by (auto simp: dist_norm) |
6166 def R \<equiv> "1 + abs B + norm z" |
6166 def R \<equiv> "1 + \<bar>B\<bar> + norm z" |
6167 have "R > 0" unfolding R_def by (meson abs_add_one_gt_zero le_less_trans less_add_same_cancel2 norm_ge_zero) |
6167 have "R > 0" unfolding R_def by (meson abs_add_one_gt_zero le_less_trans less_add_same_cancel2 norm_ge_zero) |
6168 have *: "((\<lambda>u. f u / (u - z)) has_contour_integral 2 * complex_of_real pi * \<i> * f z) (circlepath z R)" |
6168 have *: "((\<lambda>u. f u / (u - z)) has_contour_integral 2 * complex_of_real pi * \<i> * f z) (circlepath z R)" |
6169 apply (rule Cauchy_integral_circlepath) |
6169 apply (rule Cauchy_integral_circlepath) |
6170 using \<open>R > 0\<close> apply (auto intro: holomorphic_on_subset [OF holf] holomorphic_on_imp_continuous_on)+ |
6170 using \<open>R > 0\<close> apply (auto intro: holomorphic_on_subset [OF holf] holomorphic_on_imp_continuous_on)+ |
6171 done |
6171 done |