# HG changeset patch # User paulson # Date 1737310687 0 # Node ID 067462a6a652b001b2dbd0f41f8f6b7ded04bfde # Parent e4ff4a4ee4ec277373255efa18f117afd424af7f simplified old proofs diff -r e4ff4a4ee4ec -r 067462a6a652 src/HOL/Complex_Analysis/Cauchy_Integral_Formula.thy --- a/src/HOL/Complex_Analysis/Cauchy_Integral_Formula.thy Fri Jan 17 23:00:13 2025 +0000 +++ b/src/HOL/Complex_Analysis/Cauchy_Integral_Formula.thy Sun Jan 19 18:18:07 2025 +0000 @@ -10,13 +10,13 @@ and fcd: "(\x. x \ interior S - k \ f field_differentiable at x)" and z: "z \ interior S - k" and vpg: "valid_path \" and pasz: "path_image \ \ S - {z}" and loop: "pathfinish \ = pathstart \" - shows "((\w. f w / (w - z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" + shows "((\w. f w / (w-z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" proof - - let ?fz = "\w. (f w - f z)/(w - z)" + let ?fz = "\w. (f w - f z)/(w-z)" obtain f' where f': "(f has_field_derivative f') (at z)" using fcd [OF z] by (auto simp: field_differentiable_def) have pas: "path_image \ \ S" and znotin: "z \ path_image \" using pasz by blast+ - have c: "continuous (at x within S) (\w. if w = z then f' else (f w - f z) / (w - z))" if "x \ S" for x + have c: "continuous (at x within S) (\w. if w = z then f' else (f w - f z) / (w-z))" if "x \ S" for x proof (cases "x = z") case True then show ?thesis using LIM_equal [of "z" ?fz "\w. if w = z then f' else ?fz w"] has_field_derivativeD [OF f'] @@ -26,7 +26,7 @@ then have dxz: "dist x z > 0" by auto have cf: "continuous (at x within S) f" using conf continuous_on_eq_continuous_within that by blast - have "continuous (at x within S) (\w. (f w - f z) / (w - z))" + have "continuous (at x within S) (\w. (f w - f z) / (w-z))" by (rule cf continuous_intros | simp add: False)+ then show ?thesis using continuous_transform_within [OF _ dxz that] by (force simp: dist_commute) @@ -41,17 +41,17 @@ using that by (intro derivative_intros fcd; simp) qed (use that in \auto simp add: dist_pos_lt dist_commute\) qed (use c in \force simp: continuous_on_eq_continuous_within\) + note ** = has_contour_integral_add [OF has_contour_integral_lmul [OF has_contour_integral_winding_number [OF vpg znotin], of "f z"] *] show ?thesis apply (rule has_contour_integral_eq) - using znotin has_contour_integral_add [OF has_contour_integral_lmul [OF has_contour_integral_winding_number [OF vpg znotin], of "f z"] *] - apply (auto simp: ac_simps divide_simps) + using znotin ** apply (auto simp: ac_simps divide_simps) done qed theorem Cauchy_integral_formula_convex_simple: assumes "convex S" and holf: "f holomorphic_on S" and "z \ interior S" "valid_path \" "path_image \ \ S - {z}" "pathfinish \ = pathstart \" - shows "((\w. f w / (w - z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" + shows "((\w. f w / (w-z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" proof - have "\x. x \ interior S \ f field_differentiable at x" using holf at_within_interior holomorphic_onD interior_subset by fastforce @@ -63,13 +63,13 @@ text\ Hence the Cauchy formula for points inside a circle.\ theorem Cauchy_integral_circlepath: - assumes contf: "continuous_on (cball z r) f" and holf: "f holomorphic_on (ball z r)" and wz: "norm(w - z) < r" - shows "((\u. f u/(u - w)) has_contour_integral (2 * of_real pi * \ * f w)) + assumes contf: "continuous_on (cball z r) f" and holf: "f holomorphic_on (ball z r)" and wz: "norm(w-z) < r" + shows "((\u. f u/(u-w)) has_contour_integral (2 * of_real pi * \ * f w)) (circlepath z r)" proof - have "r > 0" using assms le_less_trans norm_ge_zero by blast - have "((\u. f u / (u - w)) has_contour_integral (2 * pi) * \ * winding_number (circlepath z r) w * f w) + have "((\u. f u / (u-w)) has_contour_integral (2 * pi) * \ * winding_number (circlepath z r) w * f w) (circlepath z r)" proof (rule Cauchy_integral_formula_weak [where S = "cball z r" and k = "{}"]) show "\x. x \ interior (cball z r) - {} \ @@ -85,32 +85,33 @@ qed corollary\<^marker>\tag unimportant\ Cauchy_integral_circlepath_simple: - assumes "f holomorphic_on cball z r" "norm(w - z) < r" - shows "((\u. f u/(u - w)) has_contour_integral (2 * of_real pi * \ * f w)) + assumes "f holomorphic_on cball z r" "norm(w-z) < r" + shows "((\u. f u/(u-w)) has_contour_integral (2 * of_real pi * \ * f w)) (circlepath z r)" using assms by (force simp: holomorphic_on_imp_continuous_on holomorphic_on_subset Cauchy_integral_circlepath) subsection\<^marker>\tag unimportant\ \General stepping result for derivative formulas\ lemma Cauchy_next_derivative: + fixes f' :: "complex \ complex" + defines "h \ \k w u. f' u / (u-w)^k" assumes "continuous_on (path_image \) f'" and leB: "\t. t \ {0..1} \ norm (vector_derivative \ (at t)) \ B" - and int: "\w. w \ S - path_image \ \ ((\u. f' u / (u - w)^k) has_contour_integral f w) \" + and int: "\w. w \ S - path_image \ \ (h k w has_contour_integral f w) \" and k: "k \ 0" and "open S" and \: "valid_path \" and w: "w \ S - path_image \" - shows "(\u. f' u / (u - w)^(Suc k)) contour_integrable_on \" - and "(f has_field_derivative (k * contour_integral \ (\u. f' u/(u - w)^(Suc k)))) - (at w)" (is "?thes2") + shows "h (Suc k) w contour_integrable_on \" + and "(f has_field_derivative (k * contour_integral \ (h (Suc k) w))) (at w)" (is "?thes2") proof - have "open (S - path_image \)" using \open S\ closed_valid_path_image \ by blast then obtain d where "d>0" and d: "ball w d \ S - path_image \" using w using open_contains_ball by blast have [simp]: "\n. cmod (1 + of_nat n) = 1 + of_nat n" by (metis norm_of_nat of_nat_Suc) - have cint: "(\z. (f' z / (z - x) ^ k - f' z / (z - w) ^ k) / (x * k - w * k)) contour_integrable_on \" - if "x \ w" "cmod (x - w) < d" for x + have cint: "(\z. (h k x z - h k w z) / (x * k - w * k)) contour_integrable_on \" + if "x \ w" "cmod (x-w) < d" for x::complex proof - have "x \ S - path_image \" by (metis d dist_commute dist_norm mem_ball subsetD that(2)) @@ -118,31 +119,29 @@ using contour_integrable_diff contour_integrable_div contour_integrable_on_def int w by meson qed - have 1: "\\<^sub>F n in at w. (\x. f' x * (inverse (x - n) ^ k - inverse (x - w) ^ k) / (n - w) / of_nat k) + then have 1: "\\<^sub>F x in at w. (\z. (h k x z - h k w z) / (x-w) / of_nat k) contour_integrable_on \" - unfolding eventually_at - apply (rule_tac x=d in exI) - apply (simp add: \d > 0\ dist_norm field_simps cint) - done + unfolding eventually_at + by (force intro: exI [where x=d] simp add: \d > 0\ dist_norm field_simps) have bim_g: "bounded (image f' (path_image \))" by (simp add: compact_imp_bounded compact_continuous_image compact_valid_path_image assms) then obtain C where "C > 0" and C: "\x. \0 \ x; x \ 1\ \ cmod (f' (\ x)) \ C" by (force simp: bounded_pos path_image_def) have twom: "\\<^sub>F n in at w. \x\path_image \. - cmod ((inverse (x - n) ^ k - inverse (x - w) ^ k) / (n - w) / k - inverse (x - w) ^ Suc k) < e" + cmod ((inverse (x-n) ^ k - inverse (x-w) ^ k) / (n-w) / k - inverse (x-w) ^ Suc k) < e" if "0 < e" for e proof - - have *: "cmod ((inverse (x - u) ^ k - inverse (x - w) ^ k) / ((u - w) * k) - inverse (x - w) ^ Suc k) < e" - if x: "x \ path_image \" and "u \ w" and uwd: "cmod (u - w) < d/2" - and uw_less: "cmod (u - w) < e * (d/2) ^ (k+2) / (1 + real k)" + have *: "cmod ((inverse (x-u) ^ k - inverse (x-w) ^ k) / ((u-w) * k) - inverse (x-w) ^ Suc k) < e" + if x: "x \ path_image \" and "u \ w" and uwd: "cmod (u-w) < d/2" + and uw_less: "cmod (u-w) < e * (d/2) ^ (k+2) / (1 + real k)" for u x proof - define ff where [abs_def]: "ff n w = - (if n = 0 then inverse(x - w)^k - else if n = 1 then k / (x - w)^(Suc k) - else (k * of_real(Suc k)) / (x - w)^(k + 2))" for n :: nat and w + (if n = 0 then inverse(x-w)^k + else if n = 1 then k / (x-w)^(Suc k) + else (k * of_real(Suc k)) / (x-w)^(k + 2))" for n :: nat and w have km1: "\z::complex. z \ 0 \ z ^ (k - Suc 0) = z ^ k / z" by (simp add: field_simps) (metis Suc_pred \k \ 0\ neq0_conv power_Suc) have ff1: "(ff i has_field_derivative ff (Suc i) z) (at z within ball w (d/2))" @@ -157,7 +156,7 @@ then have neqq: "\v. v \ 0 \ x * (x * v) + z * (z * v) \ x * (z * (2 * v))" by (simp add: algebra_simps) show ?thesis using \i \ 1\ - apply (simp add: ff_def dist_norm Nat.le_Suc_eq km1, safe) + apply (simp add: ff_def dist_norm Nat.le_Suc_eq, safe) apply (rule derivative_eq_intros | simp add: km1 | simp add: field_simps neq neqq)+ done qed @@ -173,12 +172,12 @@ proof - have lessd: "\z. cmod (\ z - v) < d/2 \ cmod (w - \ z) < d" by (metis that norm_minus_commute norm_triangle_half_r dist_norm mem_ball) - have "d/2 \ cmod (x - v)" using d x that - using lessd d x - by (auto simp add: dist_norm path_image_def ball_def not_less [symmetric] del: divide_const_simps) - then have "d \ cmod (x - v) * 2" + have "d/2 \ cmod (x-v)" using d x that + using lessd d x unfolding path_image_def + by (smt (verit, best) dist_norm imageE insert_Diff mem_ball subset_Diff_insert) + then have "d \ cmod (x-v) * 2" by (simp add: field_split_simps) - then have dpow_le: "d ^ (k+2) \ (cmod (x - v) * 2) ^ (k+2)" + then have dpow_le: "d ^ (k+2) \ (cmod (x-v) * 2) ^ (k+2)" using \0 < d\ order_less_imp_le power_mono by blast have "x \ v" using that using \x \ path_image \\ ball_divide_subset_numeral d by fastforce @@ -189,29 +188,27 @@ qed have ub: "u \ ball w (d/2)" using uwd by (simp add: dist_commute dist_norm) - have "cmod (inverse (x - u) ^ k - (inverse (x - w) ^ k + of_nat k * (u - w) / ((x - w) * (x - w) ^ k))) - \ (real k * 4 + real k * real k * 4) * (cmod (u - w) * cmod (u - w)) / (d * (d * (d/2) ^ k))" + have "cmod (inverse (x-u) ^ k - (inverse (x-w) ^ k + of_nat k * (u-w) / ((x-w) * (x-w) ^ k))) + \ (real k * 4 + real k * real k * 4) * (cmod (u-w) * cmod (u-w)) / (d * (d * (d/2) ^ k))" using complex_Taylor [OF _ ff1 ff2 _ ub, of w, simplified] by (simp add: ff_def \0 < d\) - then have "cmod (inverse (x - u) ^ k - (inverse (x - w) ^ k + of_nat k * (u - w) / ((x - w) * (x - w) ^ k))) - \ (cmod (u - w) * real k) * (1 + real k) * cmod (u - w) / (d/2) ^ (k+2)" + then have "cmod (inverse (x-u) ^ k - (inverse (x-w) ^ k + of_nat k * (u-w) / ((x-w) * (x-w) ^ k))) + \ (cmod (u-w) * real k) * (1 + real k) * cmod (u-w) / (d/2) ^ (k+2)" by (simp add: field_simps) - then have "cmod (inverse (x - u) ^ k - (inverse (x - w) ^ k + of_nat k * (u - w) / ((x - w) * (x - w) ^ k))) - / (cmod (u - w) * real k) - \ (1 + real k) * cmod (u - w) / (d/2) ^ (k+2)" + then have "cmod (inverse (x-u) ^ k - (inverse (x-w) ^ k + of_nat k * (u-w) / ((x-w) * (x-w) ^ k))) + / (cmod (u-w) * real k) + \ (1 + real k) * cmod (u-w) / (d/2) ^ (k+2)" using \k \ 0\ \u \ w\ by (simp add: mult_ac zero_less_mult_iff pos_divide_le_eq) also have "\ < e" using uw_less \0 < d\ by (simp add: mult_ac divide_simps) finally have e: "cmod (inverse (x-u)^k - (inverse (x-w)^k + of_nat k * (u-w) / ((x-w) * (x-w)^k))) - / cmod ((u - w) * real k) < e" + / cmod ((u-w) * real k) < e" by (simp add: norm_mult) have "x \ u" using uwd \0 < d\ x d by (force simp: dist_norm ball_def norm_minus_commute) show ?thesis - apply (rule le_less_trans [OF _ e]) - using \k \ 0\ \x \ u\ \u \ w\ - apply (simp add: field_simps norm_divide [symmetric]) - done + using \k \ 0\ \x \ u\ \u \ w\ le_less_trans [OF _ e] + by (simp add: field_simps flip: norm_divide) qed show ?thesis unfolding eventually_at @@ -219,76 +216,71 @@ apply (force simp: \d > 0\ dist_norm that simp del: power_Suc intro: *) done qed - have 2: "uniform_limit (path_image \) (\n x. f' x * (inverse (x - n) ^ k - inverse (x - w) ^ k) / (n - w) / of_nat k) (\x. f' x / (x - w) ^ Suc k) (at w)" + have 2: "uniform_limit (path_image \) (\x z. (h k x z - h k w z) / (x-w) / k) (h (Suc k) w) (at w)" unfolding uniform_limit_iff dist_norm proof clarify fix e::real assume "0 < e" - have *: "cmod (f' (\ x) * (inverse (\ x - u) ^ k - inverse (\ x - w) ^ k) / ((u - w) * k) - - f' (\ x) / ((\ x - w) * (\ x - w) ^ k)) < e" - if ec: "cmod ((inverse (\ x - u) ^ k - inverse (\ x - w) ^ k) / ((u - w) * k) - - inverse (\ x - w) * inverse (\ x - w) ^ k) < e / C" - and x: "0 \ x" "x \ 1" - for u x - proof (cases "(f' (\ x)) = 0") - case True then show ?thesis by (simp add: \0 < e\) + have *: "cmod ((h k x (\ u) - h k w (\ u)) / ((x-w) * k) - h (Suc k) w (\ u)) < e" + if ec: "cmod ((inverse (\ u - x) ^ k - inverse (\ u - w) ^ k) / ((x-w) * k) - + inverse (\ u - w) * inverse (\ u - w) ^ k) < e / C" + and x: "0 \ u" "u \ 1" + for x u + proof (cases "(f' (\ u)) = 0") + case True then show ?thesis by (simp add: \0 < e\ h_def) next case False - have "cmod (f' (\ x) * (inverse (\ x - u) ^ k - inverse (\ x - w) ^ k) / ((u - w) * k) - - f' (\ x) / ((\ x - w) * (\ x - w) ^ k)) = - cmod (f' (\ x) * ((inverse (\ x - u) ^ k - inverse (\ x - w) ^ k) / ((u - w) * k) - - inverse (\ x - w) * inverse (\ x - w) ^ k))" - by (simp add: field_simps) - also have "\ = cmod (f' (\ x)) * - cmod ((inverse (\ x - u) ^ k - inverse (\ x - w) ^ k) / ((u - w) * k) - - inverse (\ x - w) * inverse (\ x - w) ^ k)" + have "cmod ((h k x (\ u) - h k w (\ u)) / ((x-w) * k) - h (Suc k) w (\ u)) = + cmod (f' (\ u) * ((inverse (\ u - x) ^ k - inverse (\ u - w) ^ k) / ((x-w) * k) - + inverse (\ u - w) * inverse (\ u - w) ^ k))" + by (simp add: h_def field_simps) + also have "\ = cmod (f' (\ u)) * + cmod ((inverse (\ u - x) ^ k - inverse (\ u - w) ^ k) / ((x-w) * k) - + inverse (\ u - w) * inverse (\ u - w) ^ k)" by (simp add: norm_mult) - also have "\ < cmod (f' (\ x)) * (e/C)" + also have "\ < cmod (f' (\ u)) * (e/C)" using False mult_strict_left_mono [OF ec] by force also have "\ \ e" using C by (metis False \0 < e\ frac_le less_eq_real_def mult.commute pos_le_divide_eq x zero_less_norm_iff) finally show ?thesis . qed - show "\\<^sub>F n in at w. + show "\\<^sub>F u in at w. \x\path_image \. - cmod (f' x * (inverse (x - n) ^ k - inverse (x - w) ^ k) / (n - w) / of_nat k - f' x / (x - w) ^ Suc k) < e" - using twom [OF divide_pos_pos [OF \0 < e\ \C > 0\]] unfolding path_image_def - by (force intro: * elim: eventually_mono) + cmod ((h k u x - h k w x) / (u-w) / of_nat k - h (Suc k) w x) < e" + using twom [OF divide_pos_pos [OF \0 < e\ \C > 0\]] * + unfolding path_image_def h_def + by (force elim: eventually_mono) qed - show "(\u. f' u / (u - w) ^ (Suc k)) contour_integrable_on \" + show "h (Suc k) w contour_integrable_on \" + using contour_integral_uniform_limit [OF 1 2 leB \] by (simp add: h_def) + have *: "(\u. contour_integral \ (\x. (h k u x - h k w x) / (u-w) / k)) + \w\ contour_integral \ (h (Suc k) w)" by (rule contour_integral_uniform_limit [OF 1 2 leB \]) auto - have *: "(\n. contour_integral \ (\x. f' x * (inverse (x - n) ^ k - inverse (x - w) ^ k) / (n - w) / k)) - \w\ contour_integral \ (\u. f' u / (u - w) ^ (Suc k))" - by (rule contour_integral_uniform_limit [OF 1 2 leB \]) auto - have **: "contour_integral \ (\x. f' x * (inverse (x - u) ^ k - inverse (x - w) ^ k) / ((u - w) * k)) = - (f u - f w) / (u - w) / k" + have **: "contour_integral \ (\x. (h k u x - h k w x) / ((u-w) * k)) = + (f u - f w) / (u-w) / k" if "dist u w < d" for u proof - - have u: "u \ S - path_image \" + have "u \ S - path_image \" by (metis subsetD d dist_commute mem_ball that) - have \
: "((\x. f' x * inverse (x - u) ^ k) has_contour_integral f u) \" - "((\x. f' x * inverse (x - w) ^ k) has_contour_integral f w) \" - using u w by (simp_all add: field_simps int) - show ?thesis - apply (rule contour_integral_unique) - apply (simp add: diff_divide_distrib algebra_simps \
has_contour_integral_diff has_contour_integral_div) - done + then have "(h k u has_contour_integral f u) \" "(h k w has_contour_integral f w) \" + using w by (simp_all add: field_simps int) + then show ?thesis + using contour_integral_unique has_contour_integral_diff + has_contour_integral_div by force qed show ?thes2 - apply (simp add: has_field_derivative_iff del: power_Suc) - apply (rule Lim_transform_within [OF tendsto_mult_left [OF *] \0 < d\ ]) - apply (simp add: \k \ 0\ **) - done + unfolding has_field_derivative_iff + by (simp add: \k \ 0\ ** Lim_transform_within [OF tendsto_mult_left [OF *] \0 < d\]) qed lemma Cauchy_next_derivative_circlepath: assumes contf: "continuous_on (path_image (circlepath z r)) f" - and int: "\w. w \ ball z r \ ((\u. f u / (u - w)^k) has_contour_integral g w) (circlepath z r)" + and int: "\w. w \ ball z r \ ((\u. f u / (u-w)^k) has_contour_integral g w) (circlepath z r)" and k: "k \ 0" and w: "w \ ball z r" - shows "(\u. f u / (u - w)^(Suc k)) contour_integrable_on (circlepath z r)" + shows "(\u. f u / (u-w)^(Suc k)) contour_integrable_on (circlepath z r)" (is "?thes1") - and "(g has_field_derivative (k * contour_integral (circlepath z r) (\u. f u/(u - w)^(Suc k)))) (at w)" + and "(g has_field_derivative (k * contour_integral (circlepath z r) (\u. f u/(u-w)^(Suc k)))) (at w)" (is "?thes2") proof - have "r > 0" using w @@ -307,9 +299,9 @@ assumes contf: "continuous_on (cball z r) f" and holf: "f holomorphic_on ball z r" and w: "w \ ball z r" - shows "(\u. f u/(u - w)^2) contour_integrable_on (circlepath z r)" + shows "(\u. f u/(u-w)^2) contour_integrable_on (circlepath z r)" (is "?thes1") - and "(f has_field_derivative (1 / (2 * of_real pi * \) * contour_integral(circlepath z r) (\u. f u / (u - w)^2))) (at w)" + and "(f has_field_derivative (1 / (2 * of_real pi * \) * contour_integral(circlepath z r) (\u. f u / (u-w)^2))) (at w)" (is "?thes2") proof - have [simp]: "r \ 0" using w @@ -317,17 +309,17 @@ have f: "continuous_on (path_image (circlepath z r)) f" by (rule continuous_on_subset [OF contf]) (force simp: cball_def sphere_def) have int: "\w. dist z w < r \ - ((\u. f u / (u - w)) has_contour_integral (\x. 2 * of_real pi * \ * f x) w) (circlepath z r)" + ((\u. f u / (u-w)) has_contour_integral (\x. 2 * of_real pi * \ * f x) w) (circlepath z r)" by (rule Cauchy_integral_circlepath [OF contf holf]) (simp add: dist_norm norm_minus_commute) show ?thes1 unfolding power2_eq_square using int Cauchy_next_derivative_circlepath [OF f _ _ w, where k=1] by fastforce - have "((\x. 2 * of_real pi * \ * f x) has_field_derivative contour_integral (circlepath z r) (\u. f u / (u - w)^2)) (at w)" + have "((\x. 2 * of_real pi * \ * f x) has_field_derivative contour_integral (circlepath z r) (\u. f u / (u-w)^2)) (at w)" unfolding power2_eq_square using int Cauchy_next_derivative_circlepath [OF f _ _ w, where k=1 and g = "\x. 2 * of_real pi * \ * f x"] by fastforce - then have fder: "(f has_field_derivative contour_integral (circlepath z r) (\u. f u / (u - w)^2) / (2 * of_real pi * \)) (at w)" + then have fder: "(f has_field_derivative contour_integral (circlepath z r) (\u. f u / (u-w)^2) / (2 * of_real pi * \)) (at w)" by (rule DERIV_cdivide [where f = "\x. 2 * of_real pi * \ * f x" and c = "2 * of_real pi * \", simplified]) show ?thes2 by simp (rule fder) @@ -356,22 +348,22 @@ have holf_ball: "f holomorphic_on ball z r" using holf_cball using ball_subset_cball holomorphic_on_subset by blast { fix w assume w: "w \ ball z r" - have intf: "(\u. f u / (u - w)\<^sup>2) contour_integrable_on circlepath z r" + have intf: "(\u. f u / (u-w)\<^sup>2) contour_integrable_on circlepath z r" by (blast intro: w Cauchy_derivative_integral_circlepath [OF contf_cball holf_ball]) - have fder': "(f has_field_derivative 1 / (2 * of_real pi * \) * contour_integral (circlepath z r) (\u. f u / (u - w)\<^sup>2)) + have fder': "(f has_field_derivative 1 / (2 * of_real pi * \) * contour_integral (circlepath z r) (\u. f u / (u-w)\<^sup>2)) (at w)" by (blast intro: w Cauchy_derivative_integral_circlepath [OF contf_cball holf_ball]) - have f'_eq: "f' w = contour_integral (circlepath z r) (\u. f u / (u - w)\<^sup>2) / (2 * of_real pi * \)" + have f'_eq: "f' w = contour_integral (circlepath z r) (\u. f u / (u-w)\<^sup>2) / (2 * of_real pi * \)" using fder' ball_subset_cball r w by (force intro: DERIV_unique [OF fder]) - have "((\u. f u / (u - w)\<^sup>2 / (2 * of_real pi * \)) has_contour_integral - contour_integral (circlepath z r) (\u. f u / (u - w)\<^sup>2) / (2 * of_real pi * \)) + have "((\u. f u / (u-w)\<^sup>2 / (2 * of_real pi * \)) has_contour_integral + contour_integral (circlepath z r) (\u. f u / (u-w)\<^sup>2) / (2 * of_real pi * \)) (circlepath z r)" by (rule has_contour_integral_div [OF has_contour_integral_integral [OF intf]]) - then have "((\u. f u / (2 * of_real pi * \ * (u - w)\<^sup>2)) has_contour_integral - contour_integral (circlepath z r) (\u. f u / (u - w)\<^sup>2) / (2 * of_real pi * \)) + then have "((\u. f u / (2 * of_real pi * \ * (u-w)\<^sup>2)) has_contour_integral + contour_integral (circlepath z r) (\u. f u / (u-w)\<^sup>2) / (2 * of_real pi * \)) (circlepath z r)" by (simp add: algebra_simps) - then have "((\u. f u / (2 * of_real pi * \ * (u - w)\<^sup>2)) has_contour_integral f' w) (circlepath z r)" + then have "((\u. f u / (2 * of_real pi * \ * (u-w)\<^sup>2)) has_contour_integral f' w) (circlepath z r)" by (simp add: f'_eq) } note * = this show ?thesis @@ -421,7 +413,7 @@ qed simp_all lemma valid_path_compose_holomorphic: - assumes "valid_path g" and holo:"f holomorphic_on S" and "open S" "path_image g \ S" + assumes "valid_path g" "f holomorphic_on S" and "open S" "path_image g \ S" shows "valid_path (f \ g)" by (meson assms holomorphic_deriv holomorphic_on_imp_continuous_on holomorphic_on_imp_differentiable_at holomorphic_on_subset subsetD valid_path_compose) @@ -589,14 +581,14 @@ unfolding diff_conv_add_uminus higher_deriv_add using assms higher_deriv_add higher_deriv_uminus holomorphic_on_minus by presburger -lemma Suc_choose: "Suc n choose k = (n choose k) + (if k = 0 then 0 else (n choose (k - 1)))" +lemma Suc_choose: "Suc n choose k = (n choose k) + (if k = 0 then 0 else (n choose (k-1)))" by (cases k) simp_all lemma higher_deriv_mult: fixes z::complex assumes "f holomorphic_on S" "g holomorphic_on S" "open S" and z: "z \ S" shows "(deriv ^^ n) (\w. f w * g w) z = - (\i = 0..n. of_nat (n choose i) * (deriv ^^ i) f z * (deriv ^^ (n - i)) g z)" + (\i = 0..n. of_nat (n choose i) * (deriv ^^ i) f z * (deriv ^^ (n-i)) g z)" using z proof (induction n arbitrary: z) case 0 then show ?case by simp @@ -606,7 +598,7 @@ "\n. ((deriv ^^ n) g has_field_derivative deriv ((deriv ^^ n) g) z) (at z)" using Suc.prems assms has_field_derivative_higher_deriv by auto have sumeq: "(\i = 0..n. - of_nat (n choose i) * (deriv ((deriv ^^ i) f) z * (deriv ^^ (n - i)) g z + deriv ((deriv ^^ (n - i)) g) z * (deriv ^^ i) f z)) = + of_nat (n choose i) * (deriv ((deriv ^^ i) f) z * (deriv ^^ (n-i)) g z + deriv ((deriv ^^ (n-i)) g) z * (deriv ^^ i) f z)) = g z * deriv ((deriv ^^ n) f) z + (\i = 0..n. (deriv ^^ i) f z * (of_nat (Suc n choose i) * (deriv ^^ (Suc n - i)) g z))" apply (simp add: Suc_choose algebra_simps sum.distrib) apply (subst (4) sum_Suc_reindex) @@ -616,7 +608,7 @@ (\i = 0..Suc n. (Suc n choose i) * (deriv ^^ i) f z * (deriv ^^ (Suc n - i)) g z)) (at z)" apply (rule has_field_derivative_transform_within_open - [of "\w. (\i = 0..n. of_nat (n choose i) * (deriv ^^ i) f w * (deriv ^^ (n - i)) g w)" _ _ S]) + [of "\w. (\i = 0..n. of_nat (n choose i) * (deriv ^^ i) f w * (deriv ^^ (n-i)) g w)" _ _ S]) apply (simp add: algebra_simps) apply (rule derivative_eq_intros | simp)+ apply (auto intro: DERIV_mult * \open S\ Suc.prems Suc.IH [symmetric]) @@ -665,13 +657,8 @@ have "(deriv ^^ n) f analytic_on T" by (simp add: analytic_on_open f holomorphic_higher_deriv T) then have "(\w. (deriv ^^ n) f (u * w+c)) analytic_on S" - proof - - have "(deriv ^^ n) f \ (\w. u * w+c) holomorphic_on S" using holomorphic_on_compose[OF _ holo2] \(\w. u * w+c) holomorphic_on S\ - by simp - then show ?thesis by (simp add: S analytic_on_open o_def) - qed then show ?thesis by (intro deriv_cmult analytic_on_imp_differentiable_at [OF _ Suc.prems]) qed @@ -710,7 +697,7 @@ lemma higher_deriv_mult_at: assumes "f analytic_on {z}" "g analytic_on {z}" shows "(deriv ^^ n) (\w. f w * g w) z = - (\i = 0..n. of_nat (n choose i) * (deriv ^^ i) f z * (deriv ^^ (n - i)) g z)" + (\i = 0..n. of_nat (n choose i) * (deriv ^^ i) f z * (deriv ^^ (n-i)) g z)" using analytic_at_two assms higher_deriv_mult by blast @@ -718,7 +705,7 @@ proposition no_isolated_singularity: fixes z::complex - assumes f: "continuous_on S f" and holf: "f holomorphic_on (S - K)" and S: "open S" and K: "finite K" + assumes f: "continuous_on S f" and holf: "f holomorphic_on (S-K)" and S: "open S" and K: "finite K" shows "f holomorphic_on S" proof - { fix z @@ -758,17 +745,14 @@ lemma no_isolated_singularity': fixes z::complex assumes f: "\z. z \ K \ (f \ f z) (at z within S)" - and holf: "f holomorphic_on (S - K)" and S: "open S" and K: "finite K" + and holf: "f holomorphic_on (S-K)" and S: "open S" and K: "finite K" shows "f holomorphic_on S" proof (rule no_isolated_singularity[OF _ assms(2-)]) - show "continuous_on S f" unfolding continuous_on_def - proof - fix z assume z: "z \ S" - have "continuous_on (S - K) f" - using holf holomorphic_on_imp_continuous_on by auto - then show "(f \ f z) (at z within S)" - by (metis Diff_iff K S at_within_interior continuous_on_def f finite_imp_closed interior_eq open_Diff z) - qed + have "continuous_on (S-K) f" + using holf holomorphic_on_imp_continuous_on by auto + then show "continuous_on S f" + by (metis Diff_iff K S at_within_open continuous_on_eq_continuous_at + continuous_within f finite_imp_closed open_Diff) qed proposition Cauchy_integral_formula_convex: @@ -776,14 +760,13 @@ and fcd: "(\x. x \ interior S - K \ f field_differentiable at x)" and z: "z \ interior S" and vpg: "valid_path \" and pasz: "path_image \ \ S - {z}" and loop: "pathfinish \ = pathstart \" - shows "((\w. f w / (w - z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" + shows "((\w. f w / (w-z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" proof - have *: "\x. x \ interior S \ f field_differentiable at x" unfolding holomorphic_on_open [symmetric] field_differentiable_def using no_isolated_singularity [where S = "interior S"] - by (meson K contf continuous_at_imp_continuous_on continuous_on_interior fcd - field_differentiable_at_within field_differentiable_def holomorphic_onI - holomorphic_on_imp_differentiable_at open_interior) + by (meson K contf continuous_on_subset fcd field_differentiable_def open_interior + has_field_derivative_at_within holomorphic_derivI holomorphic_onI interior_subset) show ?thesis by (rule Cauchy_integral_formula_weak [OF S finite.emptyI contf]) (use * assms in auto) qed @@ -794,7 +777,7 @@ assumes contf: "continuous_on (cball z r) f" and holf: "f holomorphic_on ball z r" and w: "w \ ball z r" - shows "((\u. f u / (u - w) ^ (Suc k)) has_contour_integral ((2 * pi * \) / (fact k) * (deriv ^^ k) f w)) + shows "((\u. f u / (u-w) ^ (Suc k)) has_contour_integral ((2 * pi * \) / (fact k) * (deriv ^^ k) f w)) (circlepath z r)" using w proof (induction k arbitrary: w) @@ -806,17 +789,17 @@ using ball_eq_empty by fastforce have f: "continuous_on (path_image (circlepath z r)) f" by (rule continuous_on_subset [OF contf]) (force simp: cball_def sphere_def less_imp_le) - obtain X where X: "((\u. f u / (u - w) ^ Suc (Suc k)) has_contour_integral X) (circlepath z r)" + obtain X where X: "((\u. f u / (u-w) ^ Suc (Suc k)) has_contour_integral X) (circlepath z r)" using Cauchy_next_derivative_circlepath(1) [OF f Suc.IH _ Suc.prems] by (auto simp: contour_integrable_on_def) - then have con: "contour_integral (circlepath z r) ((\u. f u / (u - w) ^ Suc (Suc k))) = X" + then have con: "contour_integral (circlepath z r) ((\u. f u / (u-w) ^ Suc (Suc k))) = X" by (rule contour_integral_unique) have "\n. ((deriv ^^ n) f has_field_derivative deriv ((deriv ^^ n) f) w) (at w)" using Suc.prems assms has_field_derivative_higher_deriv by auto then have dnf_diff: "\n. (deriv ^^ n) f field_differentiable (at w)" by (force simp: field_differentiable_def) have "deriv (\w. complex_of_real (2 * pi) * \ / (fact k) * (deriv ^^ k) f w) w = - of_nat (Suc k) * contour_integral (circlepath z r) (\u. f u / (u - w) ^ Suc (Suc k))" + of_nat (Suc k) * contour_integral (circlepath z r) (\u. f u / (u-w) ^ Suc (Suc k))" by (force intro!: DERIV_imp_deriv Cauchy_next_derivative_circlepath [OF f Suc.IH _ Suc.prems]) also have "\ = of_nat (Suc k) * X" by (simp only: con) @@ -833,12 +816,12 @@ assumes contf: "continuous_on (cball z r) f" and holf: "f holomorphic_on ball z r" and w: "w \ ball z r" - shows "(\u. f u / (u - w)^(Suc k)) contour_integrable_on (circlepath z r)" + shows "(\u. f u / (u-w)^(Suc k)) contour_integrable_on (circlepath z r)" (is "?thes1") - and "(deriv ^^ k) f w = (fact k) / (2 * pi * \) * contour_integral(circlepath z r) (\u. f u/(u - w)^(Suc k))" + and "(deriv ^^ k) f w = (fact k) / (2 * pi * \) * contour_integral(circlepath z r) (\u. f u/(u-w)^(Suc k))" (is "?thes2") proof - - have *: "((\u. f u / (u - w) ^ Suc k) has_contour_integral (2 * pi) * \ / (fact k) * (deriv ^^ k) f w) + have *: "((\u. f u / (u-w) ^ Suc k) has_contour_integral (2 * pi) * \ / (fact k) * (deriv ^^ k) f w) (circlepath z r)" using Cauchy_has_contour_integral_higher_derivative_circlepath [OF assms] by simp @@ -850,12 +833,12 @@ corollary Cauchy_contour_integral_circlepath: assumes "continuous_on (cball z r) f" "f holomorphic_on ball z r" "w \ ball z r" - shows "contour_integral(circlepath z r) (\u. f u/(u - w)^(Suc k)) = (2 * pi * \) * (deriv ^^ k) f w / (fact k)" + shows "contour_integral(circlepath z r) (\u. f u/(u-w)^(Suc k)) = (2 * pi * \) * (deriv ^^ k) f w / (fact k)" by (simp add: Cauchy_higher_derivative_integral_circlepath [OF assms]) lemma Cauchy_contour_integral_circlepath_2: assumes "continuous_on (cball z r) f" "f holomorphic_on ball z r" "w \ ball z r" - shows "contour_integral(circlepath z r) (\u. f u/(u - w)^2) = (2 * pi * \) * deriv f w" + shows "contour_integral(circlepath z r) (\u. f u/(u-w)^2) = (2 * pi * \) * deriv f w" using Cauchy_contour_integral_circlepath [OF assms, of 1] by (simp add: power2_eq_square) @@ -865,7 +848,7 @@ theorem holomorphic_power_series: assumes holf: "f holomorphic_on ball z r" and w: "w \ ball z r" - shows "((\n. (deriv ^^ n) f z / (fact n) * (w - z)^n) sums f w)" + shows "((\n. (deriv ^^ n) f z / (fact n) * (w-z)^n) sums f w)" proof - \ \Replacing \<^term>\r\ and the original (weak) premises with stronger ones\ obtain r where "r > 0" and holfc: "f holomorphic_on cball z r" and w: "w \ ball z r" @@ -875,7 +858,7 @@ then show "f holomorphic_on cball z ((r + dist w z) / 2)" by (rule holomorphic_on_subset [OF holf]) have "r > 0" - using w by clarsimp (metis dist_norm le_less_trans norm_ge_zero) + by (metis w dist_norm mem_ball norm_ge_zero not_less_iff_gr_or_eq order_less_le_trans) then show "0 < (r + dist w z) / 2" by simp (use zero_le_dist [of w z] in linarith) qed (use w in \auto simp: dist_commute\) @@ -883,87 +866,87 @@ using ball_subset_cball holomorphic_on_subset by blast have contf: "continuous_on (cball z r) f" by (simp add: holfc holomorphic_on_imp_continuous_on) - have cint: "\k. (\u. f u / (u - z) ^ Suc k) contour_integrable_on circlepath z r" + have cint: "\k. (\u. f u / (u-z) ^ Suc k) contour_integrable_on circlepath z r" by (rule Cauchy_higher_derivative_integral_circlepath [OF contf holf]) (simp add: \0 < r\) obtain B where "0 < B" and B: "\u. u \ cball z r \ norm(f u) \ B" by (metis (no_types) bounded_pos compact_cball compact_continuous_image compact_imp_bounded contf image_eqI) - obtain k where k: "0 < k" "k \ r" and wz_eq: "norm(w - z) = r - k" - and kle: "\u. norm(u - z) = r \ k \ norm(u - w)" + obtain k where k: "0 < k" "k \ r" and wz_eq: "norm(w-z) = r - k" + and kle: "\u. norm(u-z) = r \ k \ norm(u-w)" proof - show "\u. cmod (u - z) = r \ r - dist z w \ cmod (u - w)" + show "\u. cmod (u-z) = r \ r - dist z w \ cmod (u-w)" by (metis add_diff_eq diff_add_cancel dist_norm norm_diff_ineq) qed (use w in \auto simp: dist_norm norm_minus_commute\) - have ul: "uniform_limit (sphere z r) (\n x. (\kx. f x / (x - w)) sequentially" + have ul: "uniform_limit (sphere z r) (\n x. (\kx. f x / (x-w)) sequentially" unfolding uniform_limit_iff dist_norm proof clarify fix e::real assume "0 < e" - have rr: "0 \ (r - k) / r" "(r - k) / r < 1" using k by auto - obtain n where n: "((r - k) / r) ^ n < e / B * k" - using real_arch_pow_inv [of "e/B*k" "(r - k)/r"] \0 < e\ \0 < B\ k by force - have "norm ((\k (r-k) / r" "(r-k) / r < 1" using k by auto + obtain n where n: "((r-k) / r) ^ n < e / B * k" + using real_arch_pow_inv [of "e/B*k" "(r-k)/r"] \0 < e\ \0 < B\ k by force + have "norm ((\k N" and r: "r = dist z u" for N u proof - - have N: "((r - k) / r) ^ N < e / B * k" + have N: "((r-k) / r) ^ N < e / B * k" using le_less_trans [OF power_decreasing n] using \n \ N\ k by auto have u [simp]: "(u \ z) \ (u \ w)" using \0 < r\ r w by auto - have wzu_not1: "(w - z) / (u - z) \ 1" + have wzu_not1: "(w-z) / (u-z) \ 1" by (metis (no_types) dist_norm divide_eq_1_iff less_irrefl mem_ball norm_minus_commute r w) - have "norm ((\kkkk = norm ((((w - z) / (u - z)) ^ N - 1) * (u - w) / (((w - z) / (u - z) - 1) * (u - z)) - 1) * norm (f u)" + also have "\ = norm ((((w-z) / (u-z)) ^ N - 1) * (u-w) / (((w-z) / (u-z) - 1) * (u-z)) - 1) * norm (f u)" using \0 < B\ - apply (auto simp: geometric_sum [OF wzu_not1]) - apply (simp add: field_simps norm_mult [symmetric]) + apply (simp add: geometric_sum [OF wzu_not1] flip: norm_mult) + apply (simp add: field_simps) done - also have "\ = norm ((u-z) ^ N * (w - u) - ((w - z) ^ N - (u-z) ^ N) * (u-w)) / (r ^ N * norm (u-w)) * norm (f u)" + also have "\ = norm ((u-z) ^ N * (w-u) - ((w-z) ^ N - (u-z) ^ N) * (u-w)) / (r ^ N * norm (u-w)) * norm (f u)" using \0 < r\ r by (simp add: divide_simps norm_mult norm_divide norm_power dist_norm norm_minus_commute) - also have "\ = norm ((w - z) ^ N * (w - u)) / (r ^ N * norm (u - w)) * norm (f u)" + also have "\ = norm ((w-z) ^ N * (w-u)) / (r ^ N * norm (u-w)) * norm (f u)" by (simp add: algebra_simps) - also have "\ = norm (w - z) ^ N * norm (f u) / r ^ N" + also have "\ = norm (w-z) ^ N * norm (f u) / r ^ N" by (simp add: norm_mult norm_power norm_minus_commute) - also have "\ \ (((r - k)/r)^N) * B" + also have "\ \ (((r-k)/r)^N) * B" using \0 < r\ w k by (simp add: B divide_simps mult_mono r wz_eq) also have "\ < e * k" using \0 < B\ N by (simp add: divide_simps) - also have "\ \ e * norm (u - w)" + also have "\ \ e * norm (u-w)" using r kle \0 < e\ by (simp add: dist_commute dist_norm) finally show ?thesis by (simp add: field_split_simps norm_divide del: power_Suc) qed with \0 < r\ show "\\<^sub>F n in sequentially. \x\sphere z r. - norm ((\kk: "\x k. k\ {.. - (\u. (w - z) ^ k * (f u / (u - z) ^ Suc k)) contour_integrable_on circlepath z r" - using contour_integrable_lmul [OF cint, of "(w - z) ^ a" for a] by (simp add: field_simps) - have eq: "\\<^sub>F x in sequentially. - contour_integral (circlepath z r) (\u. \kku. f u / (u - z) ^ Suc k) * (w - z) ^ k)" - apply (rule eventuallyI) - apply (subst contour_integral_sum, simp) - apply (simp_all only: \
contour_integral_lmul cint algebra_simps) + (\u. (w-z) ^ k * (f u / (u-z) ^ Suc k)) contour_integrable_on circlepath z r" + using contour_integrable_lmul [OF cint, of "(w-z) ^ a" for a] by (simp add: field_simps) + have eq: "\n. + (\ku. f u / (u-z) ^ Suc k) * (w-z) ^ k) = + contour_integral (circlepath z r) (\u. \k finite_lessThan contour_integral_lmul cint algebra_simps) done - have "\u k. k \ {.. (\x. f x / (x - z) ^ Suc k) contour_integrable_on circlepath z r" + have "\u k. k \ {.. (\x. f x / (x-z) ^ Suc k) contour_integrable_on circlepath z r" using \0 < r\ by (force intro!: Cauchy_higher_derivative_integral_circlepath [OF contf holf]) - then have "\u. (\y. \ku. (\y. \kk. contour_integral (circlepath z r) (\u. f u/(u - z)^(Suc k)) * (w - z)^k) - sums contour_integral (circlepath z r) (\u. f u/(u - w))" - unfolding sums_def using \0 < r\ - by (intro Lim_transform_eventually [OF _ eq] contour_integral_uniform_limit_circlepath [OF eventuallyI ul]) auto - then have "(\k. contour_integral (circlepath z r) (\u. f u/(u - z)^(Suc k)) * (w - z)^k) + then have "(\k. contour_integral (circlepath z r) (\u. f u/(u-z)^(Suc k)) * (w-z)^k) + sums contour_integral (circlepath z r) (\u. f u/(u-w))" + unfolding sums_def eq + using \0 < r\ contour_integral_uniform_limit_circlepath [OF eventuallyI ul] + by fastforce + then have "(\k. contour_integral (circlepath z r) (\u. f u/(u-z)^(Suc k)) * (w-z)^k) sums (2 * of_real pi * \ * f w)" using w by (auto simp: dist_commute dist_norm contour_integral_unique [OF Cauchy_integral_circlepath_simple [OF holfc]]) - then have "(\k. contour_integral (circlepath z r) (\u. f u / (u - z) ^ Suc k) * (w - z)^k / (\ * (of_real pi * 2))) + then have "(\k. contour_integral (circlepath z r) (\u. f u / (u-z) ^ Suc k) * (w-z)^k / (\ * (of_real pi * 2))) sums ((2 * of_real pi * \ * f w) / (\ * (complex_of_real pi * 2)))" by (rule sums_divide) - then have "(\n. (w - z) ^ n * contour_integral (circlepath z r) (\u. f u / (u - z) ^ Suc n) / (\ * (of_real pi * 2))) + then have "(\n. (w-z) ^ n * contour_integral (circlepath z r) (\u. f u / (u-z) ^ Suc n) / (\ * (of_real pi * 2))) sums f w" by (simp add: field_simps) then show ?thesis @@ -985,10 +968,10 @@ define R where "R = 1 + \B\ + norm z" have "R > 0" unfolding R_def by (smt (verit) norm_ge_zero) - have *: "((\u. f u / (u - z)) has_contour_integral 2 * complex_of_real pi * \ * f z) (circlepath z R)" + have *: "((\u. f u / (u-z)) has_contour_integral 2 * complex_of_real pi * \ * f z) (circlepath z R)" using continuous_on_subset holf holomorphic_on_subset \0 < R\ by (force intro: holomorphic_on_imp_continuous_on Cauchy_integral_circlepath) - have "cmod (x - z) = R \ cmod (f x) * 2 < cmod (f z)" for x + have "cmod (x-z) = R \ cmod (f x) * 2 < cmod (f z)" for x unfolding R_def by (rule B) (use norm_triangle_ineq4 [of x z] in auto) with \R > 0\ fz show False using has_contour_integral_bound_circlepath [OF *, of "norm(f z)/2/R"] @@ -1064,34 +1047,34 @@ using \0 < r\ by auto then have 1: "continuous_on (path_image (circlepath z r)) (\x. 1 / (2 * complex_of_real pi * \) * g x)" by (intro continuous_intros continuous_on_subset [OF contg]) - have 2: "((\u. 1 / (2 * of_real pi * \) * g u / (u - w) ^ 1) has_contour_integral g w) (circlepath z r)" + have 2: "((\u. 1 / (2 * of_real pi * \) * g u / (u-w) ^ 1) has_contour_integral g w) (circlepath z r)" if w: "w \ ball z r" for w proof - - define d where "d = (r - norm(w - z))" + define d where "d = (r - norm(w-z))" have "0 < d" "d \ r" using w by (auto simp: norm_minus_commute d_def dist_norm) - have dle: "\u. cmod (z - u) = r \ d \ cmod (u - w)" + have dle: "\u. cmod (z-u) = r \ d \ cmod (u-w)" unfolding d_def by (metis add_diff_eq diff_add_cancel norm_diff_ineq norm_minus_commute) - have ev_int: "\\<^sub>F n in F. (\u. f n u / (u - w)) contour_integrable_on circlepath z r" + have ev_int: "\\<^sub>F n in F. (\u. f n u / (u-w)) contour_integrable_on circlepath z r" using w by (auto intro: eventually_mono [OF cont] Cauchy_higher_derivative_integral_circlepath [where k=0, simplified]) have "\e. \0 < r; 0 < d; 0 < e\ \ \\<^sub>F n in F. \x\sphere z r. x \ w \ - cmod (f n x - g x) < e * cmod (x - w)" + cmod (f n x - g x) < e * cmod (x-w)" apply (rule_tac e1="e * d" in eventually_mono [OF uniform_limitD [OF ulim]]) apply (force simp: dist_norm intro: dle mult_left_mono less_le_trans)+ done - then have ul_less: "uniform_limit (sphere z r) (\n x. f n x / (x - w)) (\x. g x / (x - w)) F" + then have ul_less: "uniform_limit (sphere z r) (\n x. f n x / (x-w)) (\x. g x / (x-w)) F" using greater \0 < d\ by (auto simp add: uniform_limit_iff dist_norm norm_divide diff_divide_distrib [symmetric] divide_simps) - have g_cint: "(\u. g u/(u - w)) contour_integrable_on circlepath z r" + have g_cint: "(\u. g u/(u-w)) contour_integrable_on circlepath z r" by (rule contour_integral_uniform_limit_circlepath [OF ev_int ul_less F \0 < r\]) - have cif_tends_cig: "((\n. contour_integral(circlepath z r) (\u. f n u / (u - w))) \ contour_integral(circlepath z r) (\u. g u/(u - w))) F" + have cif_tends_cig: "((\n. contour_integral(circlepath z r) (\u. f n u / (u-w))) \ contour_integral(circlepath z r) (\u. g u/(u-w))) F" by (rule contour_integral_uniform_limit_circlepath [OF ev_int ul_less F \0 < r\]) - have f_tends_cig: "((\n. 2 * of_real pi * \ * f n w) \ contour_integral (circlepath z r) (\u. g u / (u - w))) F" + have f_tends_cig: "((\n. 2 * of_real pi * \ * f n w) \ contour_integral (circlepath z r) (\u. g u / (u-w))) F" proof (rule Lim_transform_eventually) - show "\\<^sub>F x in F. contour_integral (circlepath z r) (\u. f x u / (u - w)) + show "\\<^sub>F x in F. contour_integral (circlepath z r) (\u. f x u / (u-w)) = 2 * of_real pi * \ * f x w" using w\0 < d\ d_def by (auto intro: eventually_mono [OF cont contour_integral_unique [OF Cauchy_integral_circlepath]]) @@ -1100,10 +1083,10 @@ by (rule eventually_mono [OF uniform_limitD [OF ulim]]) (use w in auto) then have "((\n. 2 * of_real pi * \ * f n w) \ 2 * of_real pi * \ * g w) F" by (rule tendsto_mult_left [OF tendstoI]) - then have "((\u. g u / (u - w)) has_contour_integral 2 * of_real pi * \ * g w) (circlepath z r)" + then have "((\u. g u / (u-w)) has_contour_integral 2 * of_real pi * \ * g w) (circlepath z r)" using has_contour_integral_integral [OF g_cint] tendsto_unique [OF F f_tends_cig] w by fastforce - then have "((\u. g u / (2 * of_real pi * \ * (u - w))) has_contour_integral g w) (circlepath z r)" + then have "((\u. g u / (2 * of_real pi * \ * (u-w))) has_contour_integral g w) (circlepath z r)" using has_contour_integral_div [where c = "2 * of_real pi * \"] by (force simp: field_simps) then show ?thesis @@ -1138,54 +1121,47 @@ by (simp add: DERIV_imp_deriv) have tends_f'n_g': "((\n. f' n w) \ g' w) F" if w: "w \ ball z r" for w proof - - have eq_f': "?conint (\x. f n x / (x - w)\<^sup>2) - ?conint (\x. g x / (x - w)\<^sup>2) = (f' n w - g' w) * (2 * of_real pi * \)" + have eq_f': "?conint (\x. f n x / (x-w)\<^sup>2) - ?conint (\x. g x / (x-w)\<^sup>2) = (f' n w - g' w) * (2 * of_real pi * \)" if cont_fn: "continuous_on (cball z r) (f n)" and fnd: "\w. w \ ball z r \ (f n has_field_derivative f' n w) (at w)" for n proof - have hol_fn: "f n holomorphic_on ball z r" using fnd by (force simp: holomorphic_on_open) - have "(f n has_field_derivative 1 / (2 * of_real pi * \) * ?conint (\u. f n u / (u - w)\<^sup>2)) (at w)" + have "(f n has_field_derivative 1 / (2 * of_real pi * \) * ?conint (\u. f n u / (u-w)\<^sup>2)) (at w)" by (rule Cauchy_derivative_integral_circlepath [OF cont_fn hol_fn w]) - then have f': "f' n w = 1 / (2 * of_real pi * \) * ?conint (\u. f n u / (u - w)\<^sup>2)" + then have f': "f' n w = 1 / (2 * of_real pi * \) * ?conint (\u. f n u / (u-w)\<^sup>2)" using DERIV_unique [OF fnd] w by blast show ?thesis by (simp add: f' Cauchy_contour_integral_circlepath_2 [OF g w] derg [OF w] field_split_simps) qed - define d where "d = (r - norm(w - z))^2" + define d where "d = (r - norm(w-z))^2" have "d > 0" using w by (simp add: dist_commute dist_norm d_def) - have dle: "d \ cmod ((y - w)\<^sup>2)" if "r = cmod (z - y)" for y - proof - - have "cmod (w - z) \ cmod (z - y)" - by (metis dist_commute dist_norm mem_ball order_less_imp_le that w) - moreover have "cmod (z - y) - cmod (w - z) \ cmod (y - w)" - by (metis diff_add_cancel diff_diff_eq2 norm_minus_commute norm_triangle_ineq2) - ultimately show ?thesis - using that by (simp add: d_def norm_power power_mono) - qed - have 1: "\\<^sub>F n in F. (\x. f n x / (x - w)\<^sup>2) contour_integrable_on circlepath z r" + have dle: "d \ cmod ((y-w)\<^sup>2)" if "r = cmod (z-y)" for y + by (smt (verit, best) d_def diff_add_cancel diff_diff_eq2 dist_norm mem_ball + norm_minus_commute norm_power norm_triangle_ineq2 power_mono that w) + have 1: "\\<^sub>F n in F. (\x. f n x / (x-w)\<^sup>2) contour_integrable_on circlepath z r" by (force simp: holomorphic_on_open intro: w Cauchy_derivative_integral_circlepath eventually_mono [OF cont]) - have 2: "uniform_limit (sphere z r) (\n x. f n x / (x - w)\<^sup>2) (\x. g x / (x - w)\<^sup>2) F" + have 2: "uniform_limit (sphere z r) (\n x. f n x / (x-w)\<^sup>2) (\x. g x / (x-w)\<^sup>2) F" unfolding uniform_limit_iff proof clarify fix e::real assume "e > 0" with \r > 0\ - have "\\<^sub>F n in F. \x. x \ w \ cmod (z - x) = r \ cmod (f n x - g x) < e * cmod ((x - w)\<^sup>2)" + have "\\<^sub>F n in F. \x. x \ w \ cmod (z-x) = r \ cmod (f n x - g x) < e * cmod ((x-w)\<^sup>2)" by (force simp: \0 < d\ dist_norm dle intro: less_le_trans eventually_mono [OF uniform_limitD [OF ulim], of "e*d"]) with \r > 0\ \e > 0\ - show "\\<^sub>F n in F. \x\sphere z r. dist (f n x / (x - w)\<^sup>2) (g x / (x - w)\<^sup>2) < e" + show "\\<^sub>F n in F. \x\sphere z r. dist (f n x / (x-w)\<^sup>2) (g x / (x-w)\<^sup>2) < e" by (simp add: norm_divide field_split_simps sphere_def dist_norm) qed - have "((\n. contour_integral (circlepath z r) (\x. f n x / (x - w)\<^sup>2)) - \ contour_integral (circlepath z r) ((\x. g x / (x - w)\<^sup>2))) F" + have "((\n. contour_integral (circlepath z r) (\x. f n x / (x-w)\<^sup>2)) + \ contour_integral (circlepath z r) ((\x. g x / (x-w)\<^sup>2))) F" by (rule contour_integral_uniform_limit_circlepath [OF 1 2 F \0 < r\]) - then have tendsto_0: "((\n. 1 / (2 * of_real pi * \) * (?conint (\x. f n x / (x - w)\<^sup>2) - ?conint (\x. g x / (x - w)\<^sup>2))) \ 0) F" + then have tendsto_0: "((\n. 1 / (2 * of_real pi * \) * (?conint (\x. f n x / (x-w)\<^sup>2) - ?conint (\x. g x / (x-w)\<^sup>2))) \ 0) F" using Lim_null by (force intro!: tendsto_mult_right_zero) have "((\n. f' n w - g' w) \ 0) F" - apply (rule Lim_transform_eventually [OF tendsto_0]) - apply (force simp: divide_simps intro: eq_f' eventually_mono [OF cont]) - done + by (force simp: divide_simps + intro: eq_f' eventually_mono [OF cont] Lim_transform_eventually [OF tendsto_0]) then show ?thesis using Lim_null by blast qed obtain g' where "\w. w \ ball z r \ (g has_field_derivative (g' w)) (at w) \ ((\n. f' n w) \ g' w) F" @@ -1343,13 +1319,13 @@ fixes a :: "nat \ complex" and r::real assumes "summable (\n. a n * r^n)" shows "\g g'. \z. cmod z < r \ - ((\n. a n * z^n) sums g z) \ ((\n. of_nat n * a n * z^(n - 1)) sums g' z) \ (g has_field_derivative g' z) (at z)" + ((\n. a n * z^n) sums g z) \ ((\n. of_nat n * a n * z^(n-1)) sums g' z) \ (g has_field_derivative g' z) (at z)" proof (cases "0 < r") case True - have der: "\n z. ((\x. a n * x ^ n) has_field_derivative of_nat n * a n * z ^ (n - 1)) (at z)" + have der: "\n z. ((\x. a n * x ^ n) has_field_derivative of_nat n * a n * z ^ (n-1)) (at z)" by (rule derivative_eq_intros | simp)+ have y_le: "cmod y \ cmod (of_real r + of_real (cmod z)) / 2" - if "cmod (z - y) * 2 < r - cmod z" for z y + if "cmod (z-y) * 2 < r - cmod z" for z y by (smt (verit, best) field_sum_of_halves norm_minus_commute norm_of_real norm_triangle_ineq2 of_real_add that) have "summable (\n. a n * complex_of_real r ^ n)" using assms \r > 0\ by simp @@ -1359,7 +1335,7 @@ ultimately have sum: "\z. cmod z < r \ summable (\n. of_real (cmod (a n)) * ((of_real r + complex_of_real (cmod z)) / 2) ^ n)" by (rule power_series_conv_imp_absconv_weak) have "\g g'. \z \ ball 0 r. (\n. (a n) * z ^ n) sums g z \ - (\n. of_nat n * (a n) * z ^ (n - 1)) sums g' z \ (g has_field_derivative g' z) (at z)" + (\n. of_nat n * (a n) * z ^ (n-1)) sums g' z \ (g has_field_derivative g' z) (at z)" apply (rule series_and_derivative_comparison_complex [OF open_ball der]) apply (rule_tac x="(r - norm z)/2" in exI) apply (rule_tac x="\n. of_real(norm(a n)*((r + norm z)/2)^n)" in exI) @@ -1377,46 +1353,46 @@ fixes a :: "nat \ complex" and r::real assumes "summable (\n. a n * r^n)" obtains g g' where "\z \ ball w r. - ((\n. a n * (z - w) ^ n) sums g z) \ ((\n. of_nat n * a n * (z - w) ^ (n - 1)) sums g' z) \ + ((\n. a n * (z-w) ^ n) sums g z) \ ((\n. of_nat n * a n * (z-w) ^ (n-1)) sums g' z) \ (g has_field_derivative g' z) (at z)" using power_series_and_derivative_0 [OF assms] apply clarify - apply (rule_tac g="(\z. g(z - w))" in that) + apply (rule_tac g="(\z. g(z-w))" in that) using DERIV_shift [where z="-w"] apply (auto simp: norm_minus_commute Ball_def dist_norm) done proposition\<^marker>\tag unimportant\ power_series_holomorphic: - assumes "\w. w \ ball z r \ ((\n. a n*(w - z)^n) sums f w)" + assumes "\w. w \ ball z r \ ((\n. a n*(w-z)^n) sums f w)" shows "f holomorphic_on ball z r" proof - have "\f'. (f has_field_derivative f') (at w)" if w: "dist z w < r" for w proof - - have wz: "cmod (w - z) < r" using w + have wz: "cmod (w-z) < r" using w by (auto simp: field_split_simps dist_norm norm_minus_commute) then have "0 \ r" by (meson less_eq_real_def norm_ge_zero order_trans) have inb: "z + complex_of_real ((dist z w + r) / 2) \ ball z r" using w by (simp add: dist_norm \0\r\ flip: of_real_add) - have sum: "summable (\n. a n * of_real (((cmod (z - w) + r) / 2) ^ n))" + have sum: "summable (\n. a n * of_real (((cmod (z-w) + r) / 2) ^ n))" using assms [OF inb] by (force simp: summable_def dist_norm) - obtain g g' where gg': "\u. u \ ball z ((cmod (z - w) + r) / 2) \ - (\n. a n * (u - z) ^ n) sums g u \ - (\n. of_nat n * a n * (u - z) ^ (n - 1)) sums g' u \ (g has_field_derivative g' u) (at u)" + obtain g g' where gg': "\u. u \ ball z ((cmod (z-w) + r) / 2) \ + (\n. a n * (u-z) ^ n) sums g u \ + (\n. of_nat n * a n * (u-z) ^ (n-1)) sums g' u \ (g has_field_derivative g' u) (at u)" by (rule power_series_and_derivative [OF sum, of z]) fastforce - have [simp]: "g u = f u" if "cmod (u - w) < (r - cmod (z - w)) / 2" for u + have [simp]: "g u = f u" if "cmod (u-w) < (r - cmod (z-w)) / 2" for u proof - - have less: "cmod (z - u) * 2 < cmod (z - w) + r" + have less: "cmod (z-u) * 2 < cmod (z-w) + r" using that dist_triangle2 [of z u w] by (simp add: dist_norm [symmetric] algebra_simps) - have "(\n. a n * (u - z) ^ n) sums g u" "(\n. a n * (u - z) ^ n) sums f u" + have "(\n. a n * (u-z) ^ n) sums g u" "(\n. a n * (u-z) ^ n) sums f u" using gg' [of u] less w by (auto simp: assms dist_norm) then show ?thesis by (metis sums_unique2) qed have "(f has_field_derivative g' w) (at w)" - by (rule has_field_derivative_transform_within [where d="(r - norm(z - w))/2"]) - (use w gg' [of w] in \(force simp: dist_norm)+\) + proof (rule has_field_derivative_transform_within [where d="(r - norm(z-w))/2"]) + qed (use w gg' [of w] in \(force simp: dist_norm)+\) then show ?thesis .. qed then show ?thesis by (simp add: holomorphic_on_open) @@ -1424,17 +1400,17 @@ corollary holomorphic_iff_power_series: "f holomorphic_on ball z r \ - (\w \ ball z r. (\n. (deriv ^^ n) f z / (fact n) * (w - z)^n) sums f w)" + (\w \ ball z r. (\n. (deriv ^^ n) f z / (fact n) * (w-z)^n) sums f w)" using power_series_holomorphic [where a = "\n. (deriv ^^ n) f z / (fact n)"] holomorphic_power_series by blast lemma power_series_analytic: - "(\w. w \ ball z r \ (\n. a n*(w - z)^n) sums f w) \ f analytic_on ball z r" + "(\w. w \ ball z r \ (\n. a n*(w-z)^n) sums f w) \ f analytic_on ball z r" by (force simp: analytic_on_open intro!: power_series_holomorphic) lemma analytic_iff_power_series: "f analytic_on ball z r \ - (\w \ ball z r. (\n. (deriv ^^ n) f z / (fact n) * (w - z)^n) sums f w)" + (\w \ ball z r. (\n. (deriv ^^ n) f z / (fact n) * (w-z)^n) sums f w)" by (simp add: analytic_on_open holomorphic_iff_power_series) subsection\<^marker>\tag unimportant\ \Equality between holomorphic functions, on open ball then connected set\ @@ -1444,7 +1420,7 @@ w \ ball z r; \n. (deriv ^^ n) f z = (deriv ^^ n) g z\ \ f w = g w" - by (auto simp: holomorphic_iff_power_series sums_unique2 [of "\n. (deriv ^^ n) f z / (fact n) * (w - z)^n"]) + by (auto simp: holomorphic_iff_power_series sums_unique2 [of "\n. (deriv ^^ n) f z / (fact n) * (w-z)^n"]) lemma holomorphic_fun_eq_0_on_ball: "\f holomorphic_on ball z r; w \ ball z r; @@ -1518,13 +1494,13 @@ lemma pole_lemma: assumes holf: "f holomorphic_on S" and a: "a \ interior S" shows "(\z. if z = a then deriv f a - else (f z - f a) / (z - a)) holomorphic_on S" (is "?F holomorphic_on S") + else (f z - f a) / (z-a)) holomorphic_on S" (is "?F holomorphic_on S") proof - have *: "?F field_differentiable (at u within S)" if "u \ S" "u \ a" for u proof - have fcd: "f field_differentiable at u within S" using holf holomorphic_on_def by (simp add: \u \ S\) - have cd: "(\z. (f z - f a) / (z - a)) field_differentiable at u within S" + have cd: "(\z. (f z - f a) / (z-a)) field_differentiable at u within S" by (rule fcd derivative_intros | simp add: that)+ have "0 < dist a u" using that dist_nz by blast then show ?thesis @@ -1538,7 +1514,7 @@ have 2: "?F holomorphic_on ball a e - {a}" using mem_ball that by (auto simp add: holomorphic_on_def simp flip: field_differentiable_def intro: * field_differentiable_within_subset) - have "isCont (\z. if z = a then deriv f a else (f z - f a) / (z - a)) x" + have "isCont (\z. if z = a then deriv f a else (f z - f a) / (z-a)) x" if "dist a x < e" for x proof (cases "x=a") case True @@ -1555,50 +1531,47 @@ have "?F holomorphic_on ball a e" by (auto intro: no_isolated_singularity [OF 1 2]) with that show ?thesis - by (simp add: holomorphic_on_open field_differentiable_def [symmetric] - field_differentiable_at_within) + by (simp add: holomorphic_on_imp_differentiable_at) qed ultimately show ?thesis - by (metis (no_types, lifting) holomorphic_onI a field_differentiable_at_within interior_subset openE open_interior subset_iff) + by (metis (lifting) a at_within_interior holomorphic_onI mem_interior) qed lemma pole_theorem: assumes holg: "g holomorphic_on S" and a: "a \ interior S" - and eq: "\z. z \ S - {a} \ g z = (z - a) * f z" + and eq: "\z. z \ S - {a} \ g z = (z-a) * f z" shows "(\z. if z = a then deriv g a - else f z - g a/(z - a)) holomorphic_on S" + else f z - g a/(z-a)) holomorphic_on S" using pole_lemma [OF holg a] by (rule holomorphic_transform) (simp add: eq field_split_simps) lemma pole_lemma_open: assumes "f holomorphic_on S" "open S" - shows "(\z. if z = a then deriv f a else (f z - f a)/(z - a)) holomorphic_on S" + shows "(\z. if z = a then deriv f a else (f z - f a)/(z-a)) holomorphic_on S" proof (cases "a \ S") case True with assms interior_eq pole_lemma show ?thesis by fastforce next case False - then have "(\z. (f z - f a) / (z - a)) field_differentiable at x within S" + then have "(\z. (f z - f a) / (z-a)) field_differentiable at x within S" if "x \ S" for x - using assms that - apply (simp add: holomorphic_on_def) - apply (rule derivative_intros | force)+ - done + using assms that unfolding holomorphic_on_def + by (intro derivative_intros) auto with False show ?thesis using holomorphic_on_def holomorphic_transform by presburger qed lemma pole_theorem_open: assumes holg: "g holomorphic_on S" and S: "open S" - and eq: "\z. z \ S - {a} \ g z = (z - a) * f z" + and eq: "\z. z \ S - {a} \ g z = (z-a) * f z" shows "(\z. if z = a then deriv g a - else f z - g a/(z - a)) holomorphic_on S" + else f z - g a/(z-a)) holomorphic_on S" using pole_lemma_open [OF holg S] by (rule holomorphic_transform) (auto simp: eq divide_simps) lemma pole_theorem_0: assumes holg: "g holomorphic_on S" and a: "a \ interior S" - and eq: "\z. z \ S - {a} \ g z = (z - a) * f z" + and eq: "\z. z \ S - {a} \ g z = (z-a) * f z" and [simp]: "f a = deriv g a" "g a = 0" shows "f holomorphic_on S" using pole_theorem [OF holg a eq] @@ -1606,7 +1579,7 @@ lemma pole_theorem_open_0: assumes holg: "g holomorphic_on S" and S: "open S" - and eq: "\z. z \ S - {a} \ g z = (z - a) * f z" + and eq: "\z. z \ S - {a} \ g z = (z-a) * f z" and [simp]: "f a = deriv g a" "g a = 0" shows "f holomorphic_on S" using pole_theorem_open [OF holg S eq] @@ -1615,15 +1588,15 @@ lemma pole_theorem_analytic: assumes g: "g analytic_on S" and eq: "\z. z \ S - \ \d. 0 < d \ (\w \ ball z d - {a}. g w = (w - a) * f w)" - shows "(\z. if z = a then deriv g a else f z - g a/(z - a)) analytic_on S" (is "?F analytic_on S") + \ \d. 0 < d \ (\w \ ball z d - {a}. g w = (w-a) * f w)" + shows "(\z. if z = a then deriv g a else f z - g a/(z-a)) analytic_on S" (is "?F analytic_on S") unfolding analytic_on_def proof fix x assume "x \ S" with g obtain e where "0 < e" and e: "g holomorphic_on ball x e" by (auto simp add: analytic_on_def) - obtain d where "0 < d" and d: "\w. w \ ball x d - {a} \ g w = (w - a) * f w" + obtain d where "0 < d" and d: "\w. w \ ball x d - {a} \ g w = (w-a) * f w" using \x \ S\ eq by blast have "?F holomorphic_on ball x (min d e)" using d e \x \ S\ by (fastforce simp: holomorphic_on_subset subset_ball intro!: pole_theorem_open) @@ -1633,11 +1606,11 @@ lemma pole_theorem_analytic_0: assumes g: "g analytic_on S" - and eq: "\z. z \ S \ \d. 0 < d \ (\w \ ball z d - {a}. g w = (w - a) * f w)" + and eq: "\z. z \ S \ \d. 0 < d \ (\w \ ball z d - {a}. g w = (w-a) * f w)" and [simp]: "f a = deriv g a" "g a = 0" shows "f analytic_on S" proof - - have [simp]: "(\z. if z = a then deriv g a else f z - g a / (z - a)) = f" + have [simp]: "(\z. if z = a then deriv g a else f z - g a / (z-a)) = f" by auto show ?thesis using pole_theorem_analytic [OF g eq] by simp @@ -1645,26 +1618,25 @@ lemma pole_theorem_analytic_open_superset: assumes g: "g analytic_on S" and "S \ T" "open T" - and eq: "\z. z \ T - {a} \ g z = (z - a) * f z" - shows "(\z. if z = a then deriv g a - else f z - g a/(z - a)) analytic_on S" + and eq: "\z. z \ T - {a} \ g z = (z-a) * f z" + shows "(\z. if z = a then deriv g a else f z - g a/(z-a)) analytic_on S" proof (rule pole_theorem_analytic [OF g]) fix z assume "z \ S" then obtain e where "0 < e" and e: "ball z e \ T" using assms openE by blast - then show "\d>0. \w\ball z d - {a}. g w = (w - a) * f w" + then show "\d>0. \w\ball z d - {a}. g w = (w-a) * f w" using eq by auto qed lemma pole_theorem_analytic_open_superset_0: - assumes g: "g analytic_on S" "S \ T" "open T" "\z. z \ T - {a} \ g z = (z - a) * f z" + assumes g: "g analytic_on S" "S \ T" "open T" "\z. z \ T - {a} \ g z = (z-a) * f z" and [simp]: "f a = deriv g a" "g a = 0" shows "f analytic_on S" proof - - have [simp]: "(\z. if z = a then deriv g a else f z - g a / (z - a)) = f" + have [simp]: "(\z. if z = a then deriv g a else f z - g a / (z-a)) = f" by auto - have "(\z. if z = a then deriv g a else f z - g a/(z - a)) analytic_on S" + have "(\z. if z = a then deriv g a else f z - g a/(z-a)) analytic_on S" by (rule pole_theorem_analytic_open_superset [OF g]) then show ?thesis by simp qed @@ -1680,9 +1652,9 @@ and abu: "closed_segment a b \ U" shows "continuous_on U (\w. contour_integral (linepath a b) (F w))" proof - - have *: "\d>0. \x'\U. dist x' w < d \ - dist (contour_integral (linepath a b) (F x')) - (contour_integral (linepath a b) (F w)) \ \" + have "\d>0. \x'\U. dist x' w < d \ + dist (contour_integral (linepath a b) (F x')) + (contour_integral (linepath a b) (F w)) \ \" if "w \ U" "0 < \" "a \ b" for w \ proof - obtain \ where "\>0" and \: "cball w \ \ U" using open_contains_cball \open U\ \w \ U\ by force @@ -1692,12 +1664,12 @@ cond_uu continuous_on_subset) then obtain \ where "\>0" and \: "\x x'. \x\?TZ; x'\?TZ; dist x' x < \\ \ - dist ((\(x,y). F x y) x') ((\(x,y). F x y) x) < \/norm(b - a)" + dist ((\(x,y). F x y) x') ((\(x,y). F x y) x) < \/norm(b-a)" using \0 < \\ \a \ b\ - by (auto elim: uniformly_continuous_onE [where e = "\/norm(b - a)"]) + by (auto elim: uniformly_continuous_onE [where e = "\/norm(b-a)"]) have \: "\norm (w - x1) \ \; x2 \ closed_segment a b; norm (w - x1') \ \; x2' \ closed_segment a b; norm ((x1', x2') - (x1, x2)) < \\ - \ norm (F x1' x2' - F x1 x2) \ \ / cmod (b - a)" + \ norm (F x1' x2' - F x1 x2) \ \ / cmod (b-a)" for x1 x2 x1' x2' using \ [of "(x1,x2)" "(x1',x2')"] by (force simp: dist_norm) have le_ee: "cmod (contour_integral (linepath a b) (\x. F x' x - F w x)) \ \" @@ -1705,23 +1677,20 @@ proof - have "(\x. F x' x - F w x) contour_integrable_on linepath a b" by (simp add: \w \ U\ cont_dw contour_integrable_diff that) - then have "cmod (contour_integral (linepath a b) (\x. F x' x - F w x)) \ \/norm(b - a) * norm(b - a)" + then have "cmod (contour_integral (linepath a b) (\x. F x' x - F w x)) \ \/norm(b-a) * norm(b-a)" using has_contour_integral_bound_linepath [OF has_contour_integral_integral _ \] using \0 < \\ \0 < \\ that by (force simp: norm_minus_commute) also have "\ = \" using \a \ b\ by simp finally show ?thesis . qed show ?thesis - apply (rule_tac x="min \ \" in exI) - using \0 < \\ \0 < \\ - by (auto simp: dist_norm contour_integral_diff [OF cont_dw cont_dw, symmetric] \w \ U\ intro: le_ee) + using \0 < \\ \0 < \\ \w \ U\ + apply (intro exI[where x="min \ \"]) + by (auto simp: dist_norm contour_integral_diff [OF cont_dw cont_dw, symmetric] intro: le_ee) qed - show ?thesis - proof (cases "a=b") - case False - show ?thesis - by (rule continuous_onI) (use False in \auto intro: *\) - qed auto + then show ?thesis + by (metis (no_types, lifting) continuous_onI continuous_on_iff + contour_integral_trivial dist_self) qed text\This version has \<^term>\polynomial_function \\ as an additional assumption.\ @@ -1730,7 +1699,7 @@ and z: "z \ U" and \: "polynomial_function \" and pasz: "path_image \ \ U - {z}" and loop: "pathfinish \ = pathstart \" and zero: "\w. w \ U \ winding_number \ w = 0" - shows "((\w. f w / (w - z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" + shows "((\w. f w / (w-z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" proof - obtain \' where pf\': "polynomial_function \'" and \': "\x. (\ has_vector_derivative (\' x)) (at x)" using has_vector_derivative_polynomial_function [OF \] by blast @@ -1738,7 +1707,7 @@ by (simp add: path_image_def compact_imp_bounded compact_continuous_image continuous_on_polymonial_function) then obtain B where "B>0" and B: "\x. x \ path_image \' \ norm x \ B" using bounded_pos by force - define d where [abs_def]: "d z w = (if w = z then deriv f z else (f w - f z)/(w - z))" for z w + define d where [abs_def]: "d z w = (if w = z then deriv f z else (f w - f z)/(w-z))" for z w define v where "v = {w. w \ path_image \ \ winding_number \ w = 0}" have "path \" "valid_path \" using \ by (auto simp: path_polynomial_function valid_path_polynomial_function) @@ -1750,18 +1719,18 @@ by (metis holf holomorphic_on_imp_continuous_on) have hol_d: "(d y) holomorphic_on U" if "y \ U" for y proof - - have *: "(\c. if c = y then deriv f y else (f c - f y) / (c - y)) holomorphic_on U" + have *: "(\c. if c = y then deriv f y else (f c - f y) / (c-y)) holomorphic_on U" by (simp add: holf pole_lemma_open \open U\) - then have "isCont (\x. if x = y then deriv f y else (f x - f y) / (x - y)) y" + then have "isCont (\x. if x = y then deriv f y else (f x - f y) / (x-y)) y" using at_within_open field_differentiable_imp_continuous_at holomorphic_on_def that \open U\ by fastforce then have "continuous_on U (d y)" using "*" d_def holomorphic_on_imp_continuous_on by auto moreover have "d y holomorphic_on U - {y}" proof - - have "(\w. if w = y then deriv f y else (f w - f y) / (w - y)) field_differentiable at w" + have "(\w. if w = y then deriv f y else (f w - f y) / (w-y)) field_differentiable at w" if "w \ U - {y}" for w proof (rule field_differentiable_transform_within) - show "(\w. (f w - f y) / (w - y)) field_differentiable at w" + show "(\w. (f w - f y) / (w-y)) field_differentiable at w" using that \open U\ holf by (auto intro!: holomorphic_on_imp_differentiable_at derivative_intros) show "dist w y > 0" @@ -1773,43 +1742,44 @@ ultimately show ?thesis by (rule no_isolated_singularity) (auto simp: \open U\) qed - have cint_fxy: "(\x. (f x - f y) / (x - y)) contour_integrable_on \" if "y \ path_image \" for y + have cint_fxy: "(\x. (f x - f y) / (x-y)) contour_integrable_on \" if "y \ path_image \" for y proof (rule contour_integrable_holomorphic_simple [where S = "U-{y}"]) - show "(\x. (f x - f y) / (x - y)) holomorphic_on U - {y}" + show "(\x. (f x - f y) / (x-y)) holomorphic_on U - {y}" by (force intro: holomorphic_intros holomorphic_on_subset [OF holf]) show "path_image \ \ U - {y}" using pasz that by blast qed (auto simp: \open U\ open_delete \valid_path \\) define h where - "h z = (if z \ U then contour_integral \ (d z) else contour_integral \ (\w. f w/(w - z)))" for z + "h z = (if z \ U then contour_integral \ (d z) else contour_integral \ (\w. f w/(w-z)))" for z have U: "((d z) has_contour_integral h z) \" if "z \ U" for z proof - have "d z holomorphic_on U" by (simp add: hol_d that) with that show ?thesis - by (metis Diff_subset \valid_path \\ \open U\ contour_integrable_holomorphic_simple h_def has_contour_integral_integral pasz subset_trans) + by (metis Diff_subset \valid_path \\ \open U\ contour_integrable_holomorphic_simple h_def + has_contour_integral_integral pasz subset_trans) qed - have V: "((\w. f w / (w - z)) has_contour_integral h z) \" if z: "z \ v" for z + have V: "((\w. f w / (w-z)) has_contour_integral h z) \" if z: "z \ v" for z proof - have 0: "0 = (f z) * 2 * of_real (2 * pi) * \ * winding_number \ z" using v_def z by auto - then have "((\x. 1 / (x - z)) has_contour_integral 0) \" + then have "((\x. 1 / (x-z)) has_contour_integral 0) \" using z v_def has_contour_integral_winding_number [OF \valid_path \\] by fastforce - then have "((\x. f z * (1 / (x - z))) has_contour_integral 0) \" + then have "((\x. f z * (1 / (x-z))) has_contour_integral 0) \" using has_contour_integral_lmul by fastforce - then have "((\x. f z / (x - z)) has_contour_integral 0) \" + then have "((\x. f z / (x-z)) has_contour_integral 0) \" by (simp add: field_split_simps) - moreover have "((\x. (f x - f z) / (x - z)) has_contour_integral contour_integral \ (d z)) \" + moreover have "((\x. (f x - f z) / (x-z)) has_contour_integral contour_integral \ (d z)) \" by (metis (no_types, lifting) z cint_fxy contour_integral_eq d_def has_contour_integral_integral mem_Collect_eq v_def) - ultimately have *: "((\x. f z / (x - z) + (f x - f z) / (x - z)) has_contour_integral (0 + contour_integral \ (d z))) \" + ultimately have *: "((\x. f z / (x-z) + (f x - f z) / (x-z)) has_contour_integral (0 + contour_integral \ (d z))) \" by (rule has_contour_integral_add) - have "((\w. f w / (w - z)) has_contour_integral contour_integral \ (d z)) \" + have "((\w. f w / (w-z)) has_contour_integral contour_integral \ (d z)) \" if "z \ U" using * by (auto simp: divide_simps has_contour_integral_eq) - moreover have "((\w. f w / (w - z)) has_contour_integral contour_integral \ (\w. f w / (w - z))) \" + moreover have "((\w. f w / (w-z)) has_contour_integral contour_integral \ (\w. f w / (w-z))) \" if "z \ U" proof (rule has_contour_integral_integral [OF contour_integrable_holomorphic_simple [where S=U]]) - show "(\w. f w / (w - z)) holomorphic_on U" + show "(\w. f w / (w-z)) holomorphic_on U" by (rule holomorphic_intros assms | use that in force)+ qed (use \open U\ pasz \valid_path \\ in auto) ultimately show ?thesis @@ -1825,7 +1795,8 @@ show "0 < d0 / 2" using \0 < d0\ by auto qed (use \0 < d0\ d0 in \force simp: dist_norm\) define T where "T \ {y + k |y k. y \ path_image \ \ k \ cball 0 (dd / 2)}" - have "\x x'. \x \ path_image \; dist x x' * 2 < dd\ \ \y k. x' = y + k \ y \ path_image \ \ dist 0 k * 2 \ dd" + have "\x x'. \x \ path_image \; dist x x' * 2 < dd\ + \ \y k. x' = y + k \ y \ path_image \ \ dist 0 k * 2 \ dd" by (metis add.commute diff_add_cancel dist_0_norm dist_commute dist_norm less_eq_real_def) then have subt: "path_image \ \ interior T" using \0 < dd\ @@ -1860,31 +1831,31 @@ show "path_image \ \ cball 0 C" by (meson C interior_subset mem_cball_0 subset_eq subt) qed (use ybig loop \path \\ in auto) - have [simp]: "h y = contour_integral \ (\w. f w/(w - y))" + have [simp]: "h y = contour_integral \ (\w. f w/(w-y))" by (rule contour_integral_unique [symmetric]) (simp add: v_def ynot V) - have holint: "(\w. f w / (w - y)) holomorphic_on interior T" + have holint: "(\w. f w / (w-y)) holomorphic_on interior T" proof (intro holomorphic_intros) show "f holomorphic_on interior T" using holf holomorphic_on_subset interior_subset T by blast qed (use \y \ T\ interior_subset in auto) - have leD: "cmod (f z / (z - y)) \ D * (e / L / D)" if z: "z \ interior T" for z + have leD: "cmod (f z / (z-y)) \ D * (e / L / D)" if z: "z \ interior T" for z proof - have "D * L / e + cmod z \ cmod y" using le C [of z] z using interior_subset by force - then have DL2: "D * L / e \ cmod (z - y)" + then have DL2: "D * L / e \ cmod (z-y)" using norm_triangle_ineq2 [of y z] by (simp add: norm_minus_commute) - have "cmod (f z / (z - y)) = cmod (f z) * inverse (cmod (z - y))" + have "cmod (f z / (z-y)) = cmod (f z) * inverse (cmod (z-y))" by (simp add: norm_mult norm_inverse Fields.field_class.field_divide_inverse) also have "\ \ D * (e / L / D)" proof (rule mult_mono) show "cmod (f z) \ D" using D interior_subset z by blast - show "inverse (cmod (z - y)) \ e / L / D" "D \ 0" + show "inverse (cmod (z-y)) \ e / L / D" "D \ 0" using \L>0\ \e>0\ \D>0\ DL2 by (auto simp: norm_divide field_split_simps) qed auto finally show ?thesis . qed - have "dist (h y) 0 = cmod (contour_integral \ (\w. f w / (w - y)))" + have "dist (h y) 0 = cmod (contour_integral \ (\w. f w / (w-y)))" by (simp add: dist_norm) also have "\ \ L * (D * (e / L / D))" by (rule L [OF holint leD]) @@ -1896,7 +1867,7 @@ by (meson Lim_at_infinityI) moreover have "h holomorphic_on UNIV" proof - - have con_ff: "continuous (at (x,z)) (\(x,y). (f y - f x) / (y - x))" + have con_ff: "continuous (at (x,z)) (\(x,y). (f y - f x) / (y-x))" if "x \ U" "z \ U" "x \ z" for x z using that conf apply (simp add: split_def continuous_on_eq_continuous_at \open U\) @@ -1915,7 +1886,7 @@ have con_derf: "continuous (at z) (deriv f)" if "z \ U" for z by (meson analytic_at analytic_at_imp_isCont assms(1) holf holomorphic_deriv that) have tendsto_f': "((\(x,y). if y = x then deriv f (x) - else (f (y) - f (x)) / (y - x)) \ deriv f x) + else (f (y) - f (x)) / (y-x)) \ deriv f x) (at (x, x) within U \ U)" if "x \ U" for x proof (rule Lim_withinI) fix e::real assume "0 < e" @@ -1928,7 +1899,7 @@ if "z' \ x'" and less_k1: "norm (x'-x, z'-x) < k1" and less_k2: "norm (x'-x, z'-x) < k2" for x' z' proof - - have cs_less: "w \ closed_segment x' z' \ cmod (w - x) \ norm (x'-x, z'-x)" for w + have cs_less: "w \ closed_segment x' z' \ cmod (w-x) \ norm (x'-x, z'-x)" for w using segment_furthest_le [of w x' z' x] by (metis (no_types) dist_commute dist_norm norm_fst_le norm_snd_le order_trans) have derf_le: "w \ closed_segment x' z' \ z' \ x' \ cmod (deriv f w - deriv f x) \ e" for w @@ -1952,7 +1923,7 @@ qed show "\d>0. \xa\U \ U. 0 < dist xa (x, x) \ dist xa (x, x) < d \ - dist (case xa of (x, y) \ if y = x then deriv f x else (f y - f x) / (y - x)) (deriv f x) \ e" + dist (case xa of (x, y) \ if y = x then deriv f x else (f y - f x) / (y-x)) (deriv f x) \ e" apply (rule_tac x="min k1 k2" in exI) using \k1>0\ \k2>0\ \e>0\ by (force simp: dist_norm neq intro: dual_order.strict_trans2 k1 less_imp_le norm_fst_le) @@ -1961,32 +1932,32 @@ by (meson holf holomorphic_on_imp_continuous_on holomorphic_on_subset interior_subset subt T) have le_B: "\T. T \ {0..1} \ cmod (vector_derivative \ (at T)) \ B" using \' B by (simp add: path_image_def vector_derivative_at rev_image_eqI) - have f_has_cint: "\w. w \ v - path_image \ \ ((\u. f u / (u - w) ^ 1) has_contour_integral h w) \" + have f_has_cint: "\w. w \ v - path_image \ \ ((\u. f u / (u-w) ^ 1) has_contour_integral h w) \" by (simp add: V) - have cond_uu: "continuous_on (U \ U) (\(x,y). d x y)" - apply (simp add: continuous_on_eq_continuous_within d_def continuous_within tendsto_f') - apply (simp add: tendsto_within_open_NO_MATCH open_Times \open U\, clarify) - apply (rule Lim_transform_within_open [OF _ open_uu_Id, where f = "(\(x,y). (f y - f x) / (y - x))"]) - using con_ff - apply (auto simp: continuous_within) - done + have "\x y. \x \ U; y \ U; y \ x\ \ (\(x, y). d x y) \(x, y)\ (f y - f x) / (y - x)" + unfolding d_def + apply (rule Lim_transform_within_open [OF _ open_uu_Id, where f = "(\(x,y). (f y - f x) / (y-x))"]) + using con_ff by (auto simp: continuous_within) + then have cond_uu: "continuous_on (U \ U) (\(x,y). d x y)" + unfolding continuous_on_eq_continuous_within continuous_within d_def + by (fastforce simp add: tendsto_f' intro: Lim_at_imp_Lim_at_within) have hol_dw: "(\z. d z w) holomorphic_on U" if "w \ U" for w proof - have "continuous_on U ((\(x,y). d x y) \ (\z. (w,z)))" by (rule continuous_on_compose continuous_intros continuous_on_subset [OF cond_uu] | force intro: that)+ - then have *: "continuous_on U (\z. if w = z then deriv f z else (f w - f z) / (w - z))" + then have *: "continuous_on U (\z. if w = z then deriv f z else (f w - f z) / (w-z))" by (rule rev_iffD1 [OF _ continuous_on_cong [OF refl]]) (simp add: d_def field_simps) - have **: "(\z. if w = z then deriv f z else (f w - f z) / (w - z)) field_differentiable at x" + have **: "(\z. if w = z then deriv f z else (f w - f z) / (w-z)) field_differentiable at x" if "x \ U" "x \ w" for x - proof (rule_tac f = "\x. (f w - f x)/(w - x)" and d = "dist x w" in field_differentiable_transform_within) - show "(\x. (f w - f x) / (w - x)) field_differentiable at x" + proof (rule_tac f = "\x. (f w - f x)/(w-x)" and d = "dist x w" in field_differentiable_transform_within) + show "(\x. (f w - f x) / (w-x)) field_differentiable at x" using that \open U\ by (intro derivative_intros holomorphic_on_imp_differentiable_at [OF holf]; force) qed (use that \open U\ in \auto simp: dist_commute\) show ?thesis unfolding d_def proof (rule no_isolated_singularity [OF * _ \open U\]) - show "(\z. if w = z then deriv f z else (f w - f z) / (w - z)) holomorphic_on U - {w}" + show "(\z. if w = z then deriv f z else (f w - f z) / (w-z)) holomorphic_on U - {w}" by (auto simp: field_differentiable_def [symmetric] holomorphic_on_open open_Diff \open U\ **) qed auto qed @@ -2048,7 +2019,7 @@ and kk: "\x x'. \x \ ?ddpa; x' \ ?ddpa; dist x' x < kk\ \ dist ((\(x,y). d x y) x') ((\(x,y). d x y) x) < ee" by (rule uniformly_continuous_onE [where e = ee]) (use \0 < ee\ in auto) - have kk: "\norm (w - x) \ dd; z \ path_image \; norm ((w, z) - (x, z)) < kk\ \ norm (d w z - d x z) < ee" + have kk: "\norm (w-x) \ dd; z \ path_image \; norm ((w, z) - (x, z)) < kk\ \ norm (d w z - d x z) < ee" for w z using \dd>0\ kk [of "(x,z)" "(w,z)"] by (force simp: norm_minus_commute dist_norm) obtain no where "\n\no. dist (a n) x < min dd kk" @@ -2090,16 +2061,13 @@ show "\w. w \ U \ (\z. d z w) holomorphic_on convex hull {a, b, c}" using e abc_subset by (auto intro: holomorphic_on_subset [OF hol_dw]) qed - have "contour_integral \ - (\x. contour_integral (linepath a b) (\z. d z x) + - (contour_integral (linepath b c) (\z. d z x) + - contour_integral (linepath c a) (\z. d z x))) = 0" - apply (rule contour_integral_eq_0) - using abc pasz U - apply (subst contour_integral_join [symmetric], auto intro: eq0 *)+ - done + have "\z. z \ path_image \ \ + contour_integral (linepath a b) (\x. d x z) + + (contour_integral (linepath b c) (\x. d x z) + + contour_integral (linepath c a) (\x. d x z)) = 0" + using abc pasz U "*" eq0 by auto then show ?thesis - by (simp add: cint_h abc contour_integrable_add contour_integral_add [symmetric] add_ac) + by (simp add: contour_integral_eq_0 cint_h abc contour_integrable_add contour_integral_add [symmetric] add_ac) qed show ?thesis using e \e > 0\ @@ -2110,14 +2078,14 @@ qed ultimately have [simp]: "h z = 0" for z by (meson Liouville_weak) - have "((\w. 1 / (w - z)) has_contour_integral complex_of_real (2 * pi) * \ * winding_number \ z) \" + have "((\w. 1 / (w-z)) has_contour_integral complex_of_real (2 * pi) * \ * winding_number \ z) \" by (rule has_contour_integral_winding_number [OF \valid_path \\ znot]) - then have "((\w. f z * (1 / (w - z))) has_contour_integral complex_of_real (2 * pi) * \ * winding_number \ z * f z) \" + then have "((\w. f z * (1 / (w-z))) has_contour_integral complex_of_real (2 * pi) * \ * winding_number \ z * f z) \" by (metis mult.commute has_contour_integral_lmul) - then have 1: "((\w. f z / (w - z)) has_contour_integral complex_of_real (2 * pi) * \ * winding_number \ z * f z) \" + then have 1: "((\w. f z / (w-z)) has_contour_integral complex_of_real (2 * pi) * \ * winding_number \ z * f z) \" by (simp add: field_split_simps) - moreover have 2: "((\w. (f w - f z) / (w - z)) has_contour_integral 0) \" - using U [OF z] pasz d_def by (force elim: has_contour_integral_eq [where g = "\w. (f w - f z)/(w - z)"]) + moreover have 2: "((\w. (f w - f z) / (w-z)) has_contour_integral 0) \" + using U [OF z] pasz d_def by (force elim: has_contour_integral_eq [where g = "\w. (f w - f z)/(w-z)"]) show ?thesis using has_contour_integral_add [OF 1 2] by (simp add: diff_divide_distrib) qed @@ -2127,12 +2095,12 @@ and z: "z \ S" and vpg: "valid_path \" and pasz: "path_image \ \ S - {z}" and loop: "pathfinish \ = pathstart \" and zero: "\w. w \ S \ winding_number \ w = 0" - shows "((\w. f w / (w - z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" + shows "((\w. f w / (w-z)) has_contour_integral (2*pi * \ * winding_number \ z * f z)) \" proof - have "path \" using vpg by (blast intro: valid_path_imp_path) - have hols: "(\w. f w / (w - z)) holomorphic_on S - {z}" "(\w. 1 / (w - z)) holomorphic_on S - {z}" + have hols: "(\w. f w / (w-z)) holomorphic_on S - {z}" "(\w. 1 / (w-z)) holomorphic_on S - {z}" by (rule holomorphic_intros holomorphic_on_subset [OF holf] | force)+ - then have cint_fw: "(\w. f w / (w - z)) contour_integrable_on \" + then have cint_fw: "(\w. f w / (w-z)) contour_integrable_on \" by (meson contour_integrable_holomorphic_simple holomorphic_on_imp_continuous_on open_delete S vpg pasz) obtain d where "d>0" and d: "\g h. \valid_path g; valid_path h; \t\{0..1}. cmod (g t - \ t) < d \ cmod (h t - \ t) < d; @@ -2152,7 +2120,7 @@ by (simp add: subset_Diff_insert vpg valid_path_polynomial_function winding_number_valid_path cint_eq hols) have "winding_number p w = winding_number \ w" if "w \ S" for w proof - - have hol: "(\v. 1 / (v - w)) holomorphic_on S - {z}" + have hol: "(\v. 1 / (v-w)) holomorphic_on S - {z}" using that by (force intro: holomorphic_intros holomorphic_on_subset [OF holf]) have "w \ path_image p" "w \ path_image \" using paps pasz that by auto then show ?thesis @@ -2172,14 +2140,11 @@ and zero: "\w. w \ S \ winding_number \ w = 0" shows "(f has_contour_integral 0) \" proof - - obtain z where "z \ S" and znot: "z \ path_image \" - proof - - have "path_image \ \ S" - by (metis compact_valid_path_image vpg compact_open path_image_nonempty S) - with pas show ?thesis by (blast intro: that) - qed - then have pasz: "path_image \ \ S - {z}" using pas by blast - have hol: "(\w. (w - z) * f w) holomorphic_on S" + have "path_image \ \ S" + by (metis compact_valid_path_image vpg compact_open path_image_nonempty S) + then obtain z where "z \ S" and znot: "z \ path_image \" and pasz: "path_image \ \ S - {z}" + using pas by blast + have hol: "(\w. (w-z) * f w) holomorphic_on S" by (rule holomorphic_intros holf)+ show ?thesis using Cauchy_integral_formula_global [OF S hol \z \ S\ vpg pasz loop zero] @@ -2252,11 +2217,11 @@ and contf: "continuous_on (cball z r) f" and fin : "\w. w \ ball z r \ f w \ ball y B0" and "0 < r" and "0 < n" - shows "norm ((deriv ^^ n) f z) \ (fact n) * B0 / r^n" + shows "cmod ((deriv ^^ n) f z) \ (fact n) * B0 / r^n" proof - - have "0 < B0" using \0 < r\ fin [of z] - by (metis ball_eq_empty ex_in_conv fin not_less) - have le_B0: "cmod (f w - y) \ B0" if "cmod (w - z) \ r" for w + have "0 < B0" + using \0 < r\ fin [of z] by (metis ball_eq_empty ex_in_conv fin not_less) + have le_B0: "cmod (f w - y) \ B0" if "cmod (w-z) \ r" for w proof (rule continuous_on_closure_norm_le [of "ball z r" "\w. f w - y"], use \0 < r\ in simp_all) show "continuous_on (cball z r) (\w. f w - y)" by (intro continuous_intros contf) @@ -2266,7 +2231,7 @@ have "(deriv ^^ n) f z = (deriv ^^ n) (\w. f w) z - (deriv ^^ n) (\w. y) z" using \0 < n\ by simp also have "... = (deriv ^^ n) (\w. f w - y) z" - by (rule higher_deriv_diff [OF holf, symmetric]) (auto simp: \0 < r\) + using \0 < r\ higher_deriv_diff holf by auto finally have "(deriv ^^ n) f z = (deriv ^^ n) (\w. f w - y) z" . have contf': "continuous_on (cball z r) (\u. f u - y)" by (rule contf continuous_intros)+ @@ -2281,7 +2246,7 @@ by (auto simp: higher_deriv_diff [OF holf holomorphic_on_const]) have "norm ((2 * of_real pi * \)/(fact n) * (deriv ^^ n) (\w. f w - y) z) \ (B0/r^(Suc n)) * (2 * pi * r)" - apply (rule has_contour_integral_bound_circlepath [of "(\u. (f u - y)/(u - z)^(Suc n))" _ z]) + apply (rule has_contour_integral_bound_circlepath [of "(\u. (f u - y)/(u-z)^(Suc n))" _ z]) using Cauchy_has_contour_integral_higher_derivative_circlepath [OF contf' holf'] using \0 < B0\ \0 < r\ apply (auto simp: norm_divide norm_mult norm_power divide_simps le_B0) @@ -2373,15 +2338,15 @@ using holf holomorphic_on_subset by force show "continuous_on (cball 0 (cmod w)) f" using holf holomorphic_on_imp_continuous_on holomorphic_on_subset by blast - show "\x. cmod (0 - x) = cmod w \ cmod (f x) \ B * cmod w ^ n" + show "\x. cmod (0-x) = cmod w \ cmod (f x) \ B * cmod w ^ n" by (metis nof wgeA dist_0_norm dist_norm) qed (use \w \ 0\ in auto) also have "... = fact k * B / cmod w ^ (k-n)" using \k>n\ by (simp add: divide_simps flip: power_add) - finally have "fact k * B / cmod w < fact k * B / cmod w ^ (k - n)" . - then have "1 / cmod w < 1 / cmod w ^ (k - n)" + finally have "fact k * B / cmod w < fact k * B / cmod w ^ (k-n)" . + then have "1 / cmod w < 1 / cmod w ^ (k-n)" by (metis kB divide_inverse inverse_eq_divide mult_less_cancel_left_pos) - then have "cmod w ^ (k - n) < cmod w" + then have "cmod w ^ (k-n) < cmod w" by (smt (verit, best) \w \ 0\ frac_le zero_less_norm_iff) with self_le_power [OF wge1] show ?thesis by (meson diff_is_0_eq not_gr0 not_le that) @@ -2449,11 +2414,13 @@ by (simp add: g_def) ultimately have gnz: "\x. \norm (x-\) \ s; norm (x-\) \ r/2\ \ (g x) \ 0" by fastforce - have "f x \ 0" if "x \ \" "norm (x-\) \ s" "norm (x-\) \ r/2" for x - using bsums [of x] that gnz [of x] r sums_iff unfolding g_def by fastforce - then show ?thesis - apply (rule_tac s="min s (r/2)" in that) - using \0 < r\ \0 < s\ by (auto simp: dist_commute dist_norm) + show ?thesis + proof + have *: "f x \ 0" if "x \ \" "norm (x-\) \ s" "norm (x-\) \ r/2" for x + using bsums [of x] that gnz [of x] r sums_iff unfolding g_def by fastforce + show "\z. z \ cball \ (min s (r / 2)) - {\} \ f z \ 0" + by (simp add: "*" dist_norm norm_minus_commute) + qed (use \0 < r\ \0 < s\ in auto) qed subsection \Complex functions and power series\ @@ -2473,9 +2440,9 @@ lemma fixes r :: ereal assumes "f holomorphic_on eball z0 r" - shows conv_radius_fps_expansion: "fps_conv_radius (fps_expansion f z0) \ r" - and eval_fps_expansion: "\z. z \ eball z0 r \ eval_fps (fps_expansion f z0) (z - z0) = f z" - and eval_fps_expansion': "\z. norm z < r \ eval_fps (fps_expansion f z0) z = f (z0 + z)" + shows conv_radius_fps_expansion: "fps_conv_radius (fps_expansion f z0) \ r" + and eval_fps_expansion: "\z. z \ eball z0 r \ eval_fps (fps_expansion f z0) (z - z0) = f z" + and eval_fps_expansion': "\z. norm z < r \ eval_fps (fps_expansion f z0) z = f (z0 + z)" proof - have "(\n. fps_nth (fps_expansion f z0) n * (z - z0) ^ n) sums f z" if "z \ ball z0 r'" "ereal r' < r" for z r' @@ -2560,7 +2527,7 @@ hence *: "eball 0 R = {}" by (intro eball_empty) (auto simp: R_def min_def split: if_splits) show ?thesis - proof safe + proof from False have "min r (fps_conv_radius f) \ 0" by (simp add: min_def) also have "0 \ fps_conv_radius (inverse f)" @@ -2569,10 +2536,11 @@ qed (unfold * [unfolded R_def], auto) qed - from * show "fps_conv_radius (inverse f) \ min r (fps_conv_radius f)" by blast - from * show "eval_fps (inverse f) z = inverse (eval_fps f z)" + show "fps_conv_radius (inverse f) \ min r (fps_conv_radius f)" + using * by blast + show "eval_fps (inverse f) z = inverse (eval_fps f z)" if "ereal (norm z) < fps_conv_radius f" "ereal (norm z) < r" for z - using that by auto + using that * by auto qed lemma @@ -2696,7 +2664,8 @@ using \r > 0\ by (intro eventually_nhds_in_open) auto hence "eventually (\z. eval_fps (fps_expansion f 0) z = f z) (nhds 0)" by eventually_elim (subst eval_fps_expansion'[OF holo], auto) - ultimately show ?thesis using \r > 0\ by (auto simp: has_fps_expansion_def) + ultimately show ?thesis + using \r > 0\ by (auto simp: has_fps_expansion_def) qed lemma fps_conv_radius_tan: diff -r e4ff4a4ee4ec -r 067462a6a652 src/HOL/Complex_Analysis/Contour_Integration.thy --- a/src/HOL/Complex_Analysis/Contour_Integration.thy Fri Jan 17 23:00:13 2025 +0000 +++ b/src/HOL/Complex_Analysis/Contour_Integration.thy Sun Jan 19 18:18:07 2025 +0000 @@ -105,7 +105,6 @@ from that have "x \ interior {0..1}" by auto with S[of x] that show ?thesis by (auto simp: at_within_interior[of _ "{0..1}"]) qed - have "(f has_contour_integral I) (-g) \ ((\x. f (- g x) * vector_derivative (-g) (at x)) has_integral I) {0..1}" by (simp add: has_contour_integral) @@ -577,13 +576,8 @@ "ux. f (g x) * vector_derivative g (at x)) integrable_on {u..w}" - using integrable_on_subcbox [where a=u and b=w and S = "{0..1}"] assms - by (auto simp: contour_integrable_on) - with assms show ?thesis - by (auto simp: contour_integral_subcontour_integral Henstock_Kurzweil_Integration.integral_combine) -qed + by (smt (verit) Henstock_Kurzweil_Integration.integral_combine assms + has_integral_contour_integral_subpath has_integral_iff) lemma contour_integral_subpath_combine: assumes "f contour_integrable_on g" "valid_path g" "u \ {0..1}" "v \ {0..1}" "w \ {0..1}" @@ -614,7 +608,8 @@ next case False with assms show ?thesis - by (metis add.right_neutral contour_integral_reversepath contour_integral_subpath_refl diff_0 eq_diff_eq add_0 reversepath_subpath valid_path_subpath) + by (metis add.right_neutral contour_integral_reversepath contour_integral_subpath_refl + diff_0 eq_diff_eq add_0 reversepath_subpath valid_path_subpath) qed lemma contour_integral_integral: @@ -652,9 +647,8 @@ shows "(f has_contour_integral I) (linepath a b) \ ((\x. f (of_real x)) has_integral I) {Re a..Re b}" proof - - from assms have [simp]: "of_real (Re a) = a" "of_real (Re b) = b" - by (simp_all add: complex_eq_iff) - from assms have "a \ b" by auto + have [simp]: "of_real (Re a) = a" "of_real (Re b) = b" and "a \ b" + using assms by (simp_all add: complex_eq_iff) have "((\x. f (of_real x)) has_integral I) (cbox (Re a) (Re b)) \ ((\x. f (a + b * of_real x - a * of_real x)) has_integral I /\<^sub>R (Re b - Re a)) {0..1}" by (subst has_integral_affinity_iff [of "Re b - Re a" _ "Re a", symmetric]) @@ -665,8 +659,9 @@ also have "(\ has_integral I /\<^sub>R (Re b - Re a)) {0..1} \ ((\x. f (linepath a b x) * (b - a)) has_integral I) {0..1}" using assms by (subst has_integral_cmul_iff) (auto simp: linepath_def scaleR_conv_of_real algebra_simps) - also have "\ \ (f has_contour_integral I) (linepath a b)" unfolding has_contour_integral_def - by (intro has_integral_cong) (simp add: vector_derivative_linepath_within) + also have "\ \ (f has_contour_integral I) (linepath a b)" + unfolding has_contour_integral_def + using has_contour_integral_def has_contour_integral_linepath by presburger finally show ?thesis by simp qed @@ -684,12 +679,14 @@ shows "contour_integral (linepath a b) f = integral {Re a..Re b} (\x. f (of_real x))" proof (cases "f contour_integrable_on linepath a b") case True - thus ?thesis using has_contour_integral_linepath_Reals_iff[OF assms, of f] - using has_contour_integral_integral has_contour_integral_unique by blast + thus ?thesis + by (metis assms has_contour_integral_integral + has_contour_integral_linepath_Reals_iff integral_unique) next case False - thus ?thesis using contour_integrable_linepath_Reals_iff[OF assms, of f] - by (simp add: not_integrable_contour_integral not_integrable_integral) + thus ?thesis + by (simp add: assms contour_integrable_linepath_Reals_iff + not_integrable_contour_integral not_integrable_integral) qed subsection \Cauchy's theorem where there's a primitive\ @@ -705,8 +702,7 @@ obtain K where "finite K" and K: "\x\{a..b} - K. g differentiable (at x within {a..b})" and cg: "continuous_on {a..b} g" using assms by (auto simp: piecewise_differentiable_on_def) have "continuous_on (g ` {a..b}) f" - using assms - by (metis field_differentiable_def field_differentiable_imp_continuous_at continuous_on_eq_continuous_within continuous_on_subset image_subset_iff) + using assms by (metis DERIV_continuous_on continuous_on_subset image_subsetI) then have cfg: "continuous_on {a..b} (\x. f (g x))" by (rule continuous_on_compose [OF cg, unfolded o_def]) { fix x::real @@ -753,10 +749,9 @@ by (rule continuous_intros | simp add: assms)+ then have "continuous_on {0..1} (\x. f (linepath a b x) * (b - a))" by (metis (no_types, lifting) continuous_on_compose continuous_on_cong continuous_on_linepath linepath_image_01 o_apply) - then have "(\x. f (linepath a b x) * - vector_derivative (linepath a b) - (at x within {0..1})) integrable_on - {0..1}" + then have "(\x. f (linepath a b x) + * vector_derivative (linepath a b) (at x within {0..1})) + integrable_on {0..1}" by (metis (no_types, lifting) continuous_on_cong integrable_continuous_real vector_derivative_linepath_within) then show ?thesis by (simp add: contour_integrable_on_def has_contour_integral_def integrable_on_def [symmetric]) @@ -984,7 +979,7 @@ using assms by auto next case False - then have k: "0 < k" "k < 1" "complex_of_real k \ 1" + then have k: "0 < k" "k < 1" using assms by auto have c': "c = k *\<^sub>R (b - a) + a" by (metis diff_add_cancel c) @@ -1002,8 +997,8 @@ } note fi = this { assume *: "((\x. f ((1 - x) *\<^sub>R c + x *\<^sub>R b) * (b - c)) has_integral j) {0..1}" have **: "\x. (((1 - x) / (1 - k)) *\<^sub>R c + ((x - k) / (1 - k)) *\<^sub>R b) = ((1 - x) *\<^sub>R a + x *\<^sub>R b)" - using k unfolding c' scaleR_conv_of_real - apply (simp add: divide_simps) + using k + apply (simp add: c' scaleR_conv_of_real divide_simps) apply (simp add: distrib_right distrib_left right_diff_distrib left_diff_distrib) done have "((\x. f ((1 - x) *\<^sub>R a + x *\<^sub>R b) * (b - a)) has_integral j) {k..1}" @@ -1044,10 +1039,14 @@ moreover have "closed_segment c b \ closed_segment a b" by (metis c' ends_in_segment(2) in_segment(1) k subset_closed_segment) ultimately - have *: "continuous_on (closed_segment a c) f" "continuous_on (closed_segment c b) f" + have "continuous_on (closed_segment a c) f" "continuous_on (closed_segment c b) f" by (auto intro: continuous_on_subset [OF f]) - show ?thesis - by (rule contour_integral_unique) (meson "*" c contour_integrable_continuous_linepath has_contour_integral_integral has_contour_integral_split k) + then have "(f has_contour_integral + contour_integral (linepath a c) f + contour_integral (linepath c b) f) (linepath a b)" + by (meson c contour_integrable_continuous_linepath + has_contour_integral_integral has_contour_integral_split k) + then show ?thesis + by (metis contour_integral_unique) qed lemma contour_integral_split_linepath: @@ -1113,10 +1112,7 @@ apply (subst integral_swap_continuous [where 'a = real and 'b = real, of 0 0 1 1, simplified]) subgoal by (rule fgh gvcon' hvcon' continuous_intros | simp add: split_def)+ - subgoal - unfolding integral_mult_left [symmetric] - by (simp only: mult_ac) - done + by (simp add: mult.commute mult.left_commute) also have "\ = contour_integral h (\z. contour_integral g (\w. f w z))" unfolding contour_integral_integral integral_mult_left [symmetric] by (simp add: algebra_simps) @@ -1252,14 +1248,8 @@ lemma path_image_part_circlepath': "path_image (part_circlepath z r s t) = (\x. z + r * cis x) ` closed_segment s t" -proof - - have "path_image (part_circlepath z r s t) = - (\x. z + r * exp(\ * of_real x)) ` linepath s t ` {0..1}" - by (simp add: image_image path_image_def part_circlepath_def) - also have "linepath s t ` {0..1} = closed_segment s t" - by (rule linepath_image_01) - finally show ?thesis by (simp add: cis_conv_exp) -qed + by (metis (no_types, lifting) ext cis_conv_exp image_image linepath_image_01 + part_circlepath_def path_image_def) lemma path_image_part_circlepath_subset: "\s \ t; 0 \ r\ \ path_image(part_circlepath z r s t) \ sphere z r" @@ -1443,10 +1433,11 @@ case False have *: "finite {x. cmod ((2 * real_of_int x * pi) * \) \ b + cmod (Ln w)}" proof (simp add: norm_mult finite_int_iff_bounded_le) - show "\k. abs ` {x. 2 * \of_int x\ * pi \ b + cmod (Ln w)} \ {..k}" - apply (rule_tac x="\(b + cmod (Ln w)) / (2*pi)\" in exI) - apply (auto simp: field_split_simps le_floor_iff) - done + have "abs ` {x. 2 * \real_of_int x\ * pi \ b + cmod (Ln w)} + \ {..\(b + cmod (Ln w)) / (2 * pi)\}" + by (auto simp: field_split_simps le_floor_iff) + then show "\k. abs ` {x. 2 * \of_int x\ * pi \ b + cmod (Ln w)} \ {..k}" + by blast qed have [simp]: "\P f. {z. P z \ (\n. z = f n)} = f ` {n. P (f n)}" by blast @@ -1482,12 +1473,12 @@ next case 2 have [simp]: "\r\ = r" using \r > 0\ by linarith - have [simp]: "cmod (complex_of_real t - complex_of_real s) = t-s" + have [simp]: "cmod (of_real t - of_real s) = t-s" by (metis "2" abs_of_pos diff_gt_0_iff_gt norm_of_real of_real_diff) have "finite (part_circlepath z r s t -` {y} \ {0..1})" if "y \ k" for y proof - let ?w = "(y - z)/of_real r / exp(\ * of_real s)" - have fin: "finite (of_real -` {z. cmod z \ 1 \ exp (\ * complex_of_real (t - s) * z) = ?w})" + have fin: "finite (of_real -` {z. cmod z \ 1 \ exp (\ * of_real (t - s) * z) = ?w})" using \s < t\ by (intro finite_vimageI [OF finite_bounded_log2]) (auto simp: inj_of_real) show ?thesis @@ -1583,7 +1574,7 @@ assumes "r \ 0" "s \ t" "\s - t\ < 2*pi" shows "arc (part_circlepath z r s t)" proof - - have *: "x = y" if eq: "\ * (linepath s t x) = \ * (linepath s t y) + 2 * of_int n * complex_of_real pi * \" + have *: "x = y" if eq: "\ * (linepath s t x) = \ * (linepath s t y) + 2 * of_int n * of_real pi * \" and x: "x \ {0..1}" and y: "y \ {0..1}" for x y n proof (rule ccontr) assume "x \ y" @@ -1735,9 +1726,9 @@ lemma contour_integral_circlepath: assumes "r > 0" - shows "contour_integral (circlepath z r) (\w. 1 / (w - z)) = 2 * complex_of_real pi * \" + shows "contour_integral (circlepath z r) (\w. 1 / (w - z)) = 2 * of_real pi * \" proof (rule contour_integral_unique) - show "((\w. 1 / (w - z)) has_contour_integral 2 * complex_of_real pi * \) (circlepath z r)" + show "((\w. 1 / (w - z)) has_contour_integral 2 * of_real pi * \) (circlepath z r)" unfolding has_contour_integral_def using assms has_integral_const_real [of _ 0 1] apply (subst has_integral_cong) apply (simp add: vector_derivative_circlepath01)