Quelle Cauchy_Integral_Formula.thy
Sprache: Isabelle
section ‹Cauchy's Integral Formula\ theory Cauchy_Integral_Formula imports Winding_Numbers begin
subsection‹Proof›
lemma Cauchy_integral_formula_weak: assumes S: "convex S"and"finite k"and conf: "continuous_on S f" 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)) \" proof - 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 proof (cases "x = z") case True thenshow ?thesis using LIM_equal [of "z" ?fz "\w. if w = z then f' else ?fz w"] has_field_derivativeD [OF f'] by (force simp add: continuous_within Lim_at_imp_Lim_at_within) next case False thenhave 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))" by (rule cf continuous_intros | simp add: False)+ thenshow ?thesis using continuous_transform_within [OF _ dxz that] by (force simp: dist_commute) qed have fink': "finite (insert z k)" using \finite k\ by blast have *: "((\w. if w = z then f' else ?fz w) has_contour_integral 0) \" proof (rule Cauchy_theorem_convex [OF _ S fink' _ vpg pas loop]) show"(\w. if w = z then f' else ?fz w) field_differentiable at w" if"w \ interior S - insert z k"for w proof (rule field_differentiable_transform_within) show"(\w. ?fz w) field_differentiable at w" 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 ** 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)) \" proof - have"\x. x \ interior S \ f field_differentiable at x" using holf at_within_interior holomorphic_onD interior_subset by fastforce thenshow ?thesis using assms by (intro Cauchy_integral_formula_weak [where k = "{}"]) (auto simp: holomorphic_on_imp_continuous_on) qed
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))
(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)
(circlepath z r)" proof (rule Cauchy_integral_formula_weak [where S = "cball z r"and k = "{}"]) show"\x. x \ interior (cball z r) - {} \
f field_differentiable at x" using holf holomorphic_on_imp_differentiable_at by auto have"w \ sphere z r" by simp (metis dist_commute dist_norm not_le order_refl wz) thenshow"path_image (circlepath z r) \ cball z r - {w}" using‹r > 0›by (auto simp add: cball_def sphere_def) qed (use wz in‹simp_all add: dist_norm norm_minus_commute contf›) thenshow ?thesis by (simp add: winding_number_circlepath assms) qed
corollary🍋‹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))
(circlepath z r)" using assms by (force simp: holomorphic_on_imp_continuous_on holomorphic_on_subset Cauchy_integral_circlepath)
subsection🍋‹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 \ \ (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"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 thenobtain 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. (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)) thenshow ?thesis using contour_integrable_diff contour_integrable_div contour_integrable_on_def int w by meson qed thenhave 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 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) thenobtain 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" 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)" 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 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))" if"z \ ball w (d/2)""i \ 1"for i z proof - have"z \ path_image \" using‹x ∈ path_image γ› d that ball_divide_subset_numeral by blast thenhave xz[simp]: "x \ z"using‹x ∈ path_image γ›by blast thenhave neq: "x * x + z * z \ x * (z * 2)" by (blast intro: dest!: sum_sqs_eq) with xz have"\v. v \ 0 \ (x * x + z * z) * v \ (x * (z * 2) * v)"by auto thenhave 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, safe) apply (rule derivative_eq_intros | simp add: km1 | simp add: field_simps neq neqq)+ done qed
{ fix a::real and b::real assume ab: "a > 0""b > 0" thenhave"k * (1 + real k) * (1 / a) \ k * (1 + real k) * (4 / b) \ b \ 4 * a" by (subst mult_le_cancel_left_pos)
(use‹k ≠ 0›in‹auto simp: divide_simps›) with ab have"real k * (1 + real k) / a \ (real k * 4 + real k * real k * 4) / b \b \ 4 * a" by (simp add: field_simps)
} note canc = this have ff2: "cmod (ff (Suc 1) v) \ real (k * (k + 1)) / (d/2) ^ (k + 2)" if"v \ ball w (d/2)"for v 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 unfolding path_image_def by (smt (verit, best) dist_norm imageE insert_Diff mem_ball subset_Diff_insert) thenhave"d \ cmod (x-v) * 2" by (simp add: field_split_simps) thenhave 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 thenshow ?thesis using‹d > 0›apply (simp add: ff_def norm_mult norm_divide norm_power dist_norm canc) using dpow_le apply (simp add: field_split_simps) done 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))" using complex_Taylor [OF _ ff1 ff2 _ ub, of w, simplified] by (simp add: ff_def ‹0 < d›) thenhave"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) thenhave"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) alsohave"\ < e" using uw_less ‹0 < d›by (simp add: mult_ac divide_simps) finallyhave 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" 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 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 apply (rule_tac x = "min (d/2) ((e*(d/2)^(k + 2))/(Suc k))"in exI) apply (force simp: ‹d > 0› dist_norm that simp del: power_Suc intro: *) done qed 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 ((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 thenshow ?thesis by (simp add: ‹0 < e› h_def) next case False 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) alsohave"\ = 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) alsohave"\ < cmod (f' (\ u)) * (e/C)" using False mult_strict_left_mono [OF ec] by force alsohave"\ \ 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) finallyshow ?thesis . qed show"\\<^sub>F u in at w. ∀x∈path_image γ.
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"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 **: "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 \ S - path_image \" by (metis subsetD d dist_commute mem_ball that) thenhave"(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) thenshow ?thesis using contour_integral_unique has_contour_integral_diff
has_contour_integral_div by force qed show ?thes2 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 k: "k \ 0" and w: "w \ ball 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)"
(is"?thes2") proof - have"r > 0"using w using ball_eq_empty by fastforce have wim: "w \ ball z r - path_image (circlepath z r)" using w by (auto simp: dist_norm) show ?thes1 ?thes2 by (rule Cauchy_next_derivative [OF contf _ int k open_ball valid_path_circlepath wim, where B = "2 * pi * \r\"];
auto simp: vector_derivative_circlepath norm_mult)+ qed
text‹In particular, the first derivative formula.›
lemma Cauchy_derivative_integral_circlepath: 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)"
(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)"
(is"?thes2") proof - have [simp]: "r \ 0"using w 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) have int: "\w. dist z w < r \
((λu. f u / (u-w)) has_contour_integral (λx. 2 * of_real pi * i * 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)" 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 thenhave 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) qed
subsection‹Existence of all higher derivatives›
proposition derivative_is_holomorphic: assumes"open S" and fder: "\z. z \ S \ (f has_field_derivative f' z) (at z)" shows"f' holomorphic_on S" proof - have *: "\h. (f' has_field_derivative h) (at z)"if"z \ S"for z proof - obtain r where"r > 0"and r: "cball z r \ S" using open_contains_cball ‹z ∈ S›‹open S›by blast thenhave holf_cball: "f holomorphic_on cball z r" unfolding holomorphic_on_def using field_differentiable_at_within field_differentiable_def fder by fastforce thenhave"continuous_on (path_image (circlepath z r)) f" using‹r > 0›by (force elim: holomorphic_on_subset [THEN holomorphic_on_imp_continuous_on]) thenhave contfpi: "continuous_on (path_image (circlepath z r)) (\x. 1/(2 * of_real pi*\) * f x)" by (auto intro: continuous_intros)+ have contf_cball: "continuous_on (cball z r) f"using holf_cball by (simp add: holomorphic_on_imp_continuous_on holomorphic_on_subset) 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" 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))
(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)🚫2) / (2 * of_real pi * i)" 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)🚫2) / (2 * of_real pi * i))
(circlepath z r)" by (rule has_contour_integral_div [OF has_contour_integral_integral [OF intf]]) thenhave"((\u. f u / (2 * of_real pi * \ * (u-w)\<^sup>2)) has_contour_integral
contour_integral (circlepath z r) (λu. f u / (u-w)🚫2) / (2 * of_real pi * i))
(circlepath z r)" by (simp add: algebra_simps) thenhave"((\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 using Cauchy_next_derivative_circlepath [OF contfpi, of 2 f'] \0 < r\ * using centre_in_ball mem_ball by force qed show ?thesis by (simp add: holomorphic_on_open [OF ‹open S›] *) qed
lemma holomorphic_deriv [holomorphic_intros]: "\f holomorphic_on S; open S\ \ (deriv f) holomorphic_on S" by (metis DERIV_deriv_iff_field_differentiable at_within_open derivative_is_holomorphic holomorphic_on_def)
lemma holomorphic_deriv_compose: assumes g: "g holomorphic_on B"and f: "f holomorphic_on A"and"f ` A \ B""open B" shows"(\x. deriv g (f x)) holomorphic_on A" using holomorphic_on_compose_gen [OF f holomorphic_deriv[OF g]] assms by (auto simp: o_def)
lemma analytic_deriv [analytic_intros]: "f analytic_on S \ (deriv f) analytic_on S" using analytic_on_holomorphic holomorphic_deriv by auto
lemma holomorphic_higher_deriv [holomorphic_intros]: "\f holomorphic_on S; open S\\ (deriv ^^ n) f holomorphic_on S" by (induction n) (auto simp: holomorphic_deriv)
lemma analytic_higher_deriv [analytic_intros]: "f analytic_on S \ (deriv ^^ n) f analytic_on S" unfolding analytic_on_def using holomorphic_higher_deriv by blast
lemma has_field_derivative_higher_deriv: "\f holomorphic_on S; open S; x \ S\ ==> ((deriv ^^ n) f has_field_derivative (deriv ^^ (Suc n)) f x) (at x)" using holomorphic_derivI holomorphic_higher_deriv by fastforce
lemma higher_deriv_cmult: assumes"f holomorphic_on A""x \ A""open A" shows"(deriv ^^ j) (\x. c * f x) x = c * (deriv ^^ j) f x" using assms proof (induction j arbitrary: f x) case (Suc j f x) have"deriv ((deriv ^^ j) (\x. c * f x)) x = deriv (\x. c * (deriv ^^ j) f x) x" using eventually_nhds_in_open[of A x] assms(2,3) Suc.prems by (intro deriv_cong_ev refl) (auto elim!: eventually_mono simp: Suc.IH) alsohave"\ = c * deriv ((deriv ^^ j) f) x"using Suc.prems assms(2,3) by (intro deriv_cmult holomorphic_on_imp_differentiable_at holomorphic_higher_deriv) auto finallyshow ?caseby simp qed simp_all
lemma higher_deriv_cmult': assumes"f analytic_on {x}" shows"(deriv ^^ j) (\x. c * f x) x = c * (deriv ^^ j) f x" using assms higher_deriv_cmult[of f _ x j c] assms using analytic_at_two by blast
lemma deriv_cmult': assumes"f analytic_on {x}" shows"deriv (\x. c * f x) x = c * deriv f x" using higher_deriv_cmult'[OF assms, of 1 c] by simp
lemma analytic_derivI: assumes"f analytic_on {z}" shows"(f has_field_derivative (deriv f z)) (at z within A)" using assms holomorphic_derivI[of f _ z] analytic_at by blast
lemma deriv_compose_analytic: fixes f g :: "complex \ complex" assumes"f analytic_on {g z}""g analytic_on {z}" shows"deriv (\x. f (g x)) z = deriv f (g z) * deriv g z" proof - have"((f \ g) has_field_derivative (deriv f (g z) * deriv g z)) (at z)" by (intro DERIV_chain analytic_derivI assms) thus ?thesis by (auto intro!: DERIV_imp_deriv simp add: o_def) qed
lemma valid_path_compose_analytic: assumes"valid_path g"and holo:"f analytic_on S"and"path_image g \ S" shows"valid_path (f \ g)" proof (rule valid_path_compose[OF ‹valid_path g›]) fix x assume"x \ path_image g" thenshow"f field_differentiable at x" using analytic_on_imp_differentiable_at analytic_on_open assms holo by blast next show"continuous_on (path_image g) (deriv f)" by (intro holomorphic_on_imp_continuous_on analytic_imp_holomorphic analytic_intros
analytic_on_subset[OF holo] assms) qed
lemma analytic_on_deriv [analytic_intros]: assumes"f analytic_on g ` A" assumes"g analytic_on A" shows"(\x. deriv f (g x)) analytic_on A" proof - have"(deriv f \ g) analytic_on A" by (rule analytic_on_compose_gen[OF assms(2) analytic_deriv[OF assms(1)]]) auto thus ?thesis by (simp add: o_def) qed
lemma contour_integral_comp_analyticW: assumes"f analytic_on s""valid_path \""path_image \ \ s" shows"contour_integral (f \ \) g = contour_integral \ (\w. deriv f w * g (f w))" proof - obtain spikes where"finite spikes"and γ_diff: "\ C1_differentiable_on {0..1} - spikes" using‹valid_path γ›unfolding valid_path_def piecewise_C1_differentiable_on_def by auto show"contour_integral (f \ \) g
= contour_integral γ (λw. deriv f w * g (f w))" unfolding contour_integral_integral proof (rule integral_spike[rule_format,OF negligible_finite[OF ‹finite spikes›]]) fix t::real assume t:"t \ {0..1} - spikes" thenhave"\ differentiable at t" using γ_diff unfolding C1_differentiable_on_eq by auto moreoverhave"f field_differentiable at (\ t)" proof - have"\ t \ s"using t assms unfolding path_image_def by auto thus ?thesis using‹f analytic_on s› analytic_on_imp_differentiable_at by blast qed ultimatelyshow"deriv f (\ t) * g (f (\ t)) * vector_derivative \ (at t) =
g ((f ∘ γ) t) * vector_derivative (f ∘ γ) (at t)" by (subst vector_derivative_chain_at_general) (simp_all add:field_simps) qed qed
subsection‹Morera's theorem\
lemma Morera_local_triangle_ball: assumes"\z. z \ S ==>∃e a. 0 < e ∧ z ∈ ball a e ∧ continuous_on (ball a e) f ∧
(∀b c. closed_segment b c ⊆ ball a e ⟶ contour_integral (linepath a b) f +
contour_integral (linepath b c) f +
contour_integral (linepath c a) f = 0)" shows"f analytic_on S" proof -
{ fix z assume"z \ S" with assms obtain e a where "0 < e"and z: "z \ ball a e"and contf: "continuous_on (ball a e) f" and 0: "\b c. closed_segment b c \ ball a e ==> contour_integral (linepath a b) f +
contour_integral (linepath b c) f +
contour_integral (linepath c a) f = 0" by blast have az: "dist a z < e"using mem_ball z by blast have"\e>0. f holomorphic_on ball z e" proof (intro exI conjI) show"f holomorphic_on ball z (e - dist a z)" proof (rule holomorphic_on_subset) show"ball z (e - dist a z) \ ball a e" by (simp add: dist_commute ball_subset_ball_iff) have sub_ball: "\y. dist a y < e \ closed_segment a y \ ball a e" by (meson ‹0 < e› centre_in_ball convex_ball convex_contains_segment mem_ball) show"f holomorphic_on ball a e" using triangle_contour_integrals_starlike_primitive [OF contf _ open_ball, of a]
derivative_is_holomorphic[OF open_ball] by (force simp add: 0 ‹0 < e› sub_ball) qed qed (simp add: az)
} thenshow ?thesis by (simp add: analytic_on_def) qed
lemma Morera_local_triangle: assumes"\z. z \ S ==>∃t. open t ∧ z ∈ t ∧ continuous_on t f ∧
(∀a b c. convex hull {a,b,c} ⊆ t ⟶ contour_integral (linepath a b) f +
contour_integral (linepath b c) f +
contour_integral (linepath c a) f = 0)" shows"f analytic_on S" proof -
{ fix z assume"z \ S" with assms obtain t where "open t"and z: "z \ t"and contf: "continuous_on t f" and 0: "\a b c. convex hull {a,b,c} \ t ==> contour_integral (linepath a b) f +
contour_integral (linepath b c) f +
contour_integral (linepath c a) f = 0" by force thenobtain e where"e>0"and e: "ball z e \ t" using open_contains_ball by blast have [simp]: "continuous_on (ball z e) f"using contf using continuous_on_subset e by blast have eq0: "\b c. closed_segment b c \ ball z e \
contour_integral (linepath z b) f +
contour_integral (linepath b c) f +
contour_integral (linepath c z) f = 0" by (meson 0 z ‹0 < e› centre_in_ball closed_segment_subset convex_ball dual_order.trans e starlike_convex_subset) have"\e a. 0 < e \ z \ ball a e \ continuous_on (ball a e) f \
(∀b c. closed_segment b c ⊆ ball a e ⟶
contour_integral (linepath a b) f + contour_integral (linepath b c) f + contour_integral (linepath c a) f = 0)" using‹e > 0› eq0 by force
} thenshow ?thesis by (simp add: Morera_local_triangle_ball) qed
proposition Morera_triangle: "\continuous_on S f; open S; ∧a b c. convex hull {a,b,c} ⊆ S ⟶ contour_integral (linepath a b) f +
contour_integral (linepath b c) f +
contour_integral (linepath c a) f = 0] ==> f analytic_on S" using Morera_local_triangle by blast
subsection‹Combining theoremsfor higher derivatives including Leibniz rule›
lemma higher_deriv_linear [simp]: "(deriv ^^ n) (\w. c*w) = (\z. if n = 0 then c*z else if n = 1 then c else 0)" by (induction n) auto
lemma higher_deriv_const [simp]: "(deriv ^^ n) (\w. c) = (\w. if n=0 then c else 0)" by (induction n) auto
lemma higher_deriv_ident [simp]: "(deriv ^^ n) (\w. w) z = (if n = 0 then z else if n = 1 then 1 else 0)" proof (induction n) case (Suc n) thenshow ?caseby (metis higher_deriv_linear lambda_one) qed auto
lemma higher_deriv_id [simp]: "(deriv ^^ n) id z = (if n = 0 then z else if n = 1 then 1 else 0)" by (simp add: id_def)
lemma has_complex_derivative_funpow_1: "\(f has_field_derivative 1) (at z); f z = z\ \ (f^^n has_field_derivative 1) (at z)" proof (induction n) case 0 thenshow ?case by (simp add: id_def) next case (Suc n) thenshow ?case by (metis DERIV_chain funpow_Suc_right mult.right_neutral) qed
lemma higher_deriv_uminus: assumes"f holomorphic_on S""open S"and z: "z \ S" shows"(deriv ^^ n) (\w. -(f w)) z = - ((deriv ^^ n) f z)" using z proof (induction n arbitrary: z) case 0 thenshow ?caseby simp next case (Suc n z) have *: "((deriv ^^ n) f has_field_derivative deriv ((deriv ^^ n) f) z) (at z)" using Suc.prems assms has_field_derivative_higher_deriv by auto have"\x. x \ S \ - (deriv ^^ n) f x = (deriv ^^ n) (\w. - f w) x" by (auto simp add: Suc) thenhave"((deriv ^^ n) (\w. - f w) has_field_derivative - deriv ((deriv ^^ n) f) z) (at z)" using has_field_derivative_transform_within_open [of "\w. -((deriv ^^ n) f w)"] using"*" DERIV_minus Suc.prems ‹open S›by blast thenshow ?case by (simp add: DERIV_imp_deriv) qed
lemma higher_deriv_add: 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 = (deriv ^^ n) f z + (deriv ^^ n) g z" using z proof (induction n arbitrary: z) case 0 thenshow ?caseby simp next case (Suc n z) have *: "((deriv ^^ n) f has_field_derivative deriv ((deriv ^^ n) f) z) (at z)" "((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"\x. x \ S \ (deriv ^^ n) f x + (deriv ^^ n) g x = (deriv ^^ n) (\w. f w + g w) x" by (auto simp add: Suc) thenhave"((deriv ^^ n) (\w. f w + g w) has_field_derivative
deriv ((deriv ^^ n) f) z + deriv ((deriv ^^ n) g) z) (at z)" using has_field_derivative_transform_within_open [of "\w. (deriv ^^ n) f w + (deriv ^^ n) g w"] using"*" Deriv.field_differentiable_add Suc.prems ‹open S›by blast thenshow ?case by (simp add: DERIV_imp_deriv) qed
lemma higher_deriv_diff: fixes z::complex assumes"f holomorphic_on S""g holomorphic_on S""open S""z \ S" shows"(deriv ^^ n) (\w. f w - g w) z = (deriv ^^ n) f z - (deriv ^^ n) g z" 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)))" 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)" using z proof (induction n arbitrary: z) case 0 thenshow ?caseby simp next case (Suc n z) have *: "\n. ((deriv ^^ n) f has_field_derivative deriv ((deriv ^^ n) f) z) (at z)" "\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)) =
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) apply (auto simp: algebra_simps Suc_diff_le intro: sum.cong) done have"((deriv ^^ n) (\w. f w * g w) has_field_derivative
(∑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]) apply (simp add: algebra_simps) apply (rule derivative_eq_intros | simp)+ apply (auto intro: DERIV_mult * ‹open S› Suc.prems Suc.IH [symmetric]) by (metis (no_types, lifting) mult.commute sum.cong sumeq) thenshow ?case unfolding funpow.simps o_apply by (simp add: DERIV_imp_deriv) qed
lemma higher_deriv_transform_within_open: fixes z::complex assumes"f holomorphic_on S""g holomorphic_on S""open S"and z: "z \ S" and fg: "\w. w \ S \ f w = g w" shows"(deriv ^^ i) f z = (deriv ^^ i) g z" using z by (induction i arbitrary: z)
(auto simp: fg intro: complex_derivative_transform_within_open holomorphic_higher_deriv assms)
lemma higher_deriv_compose_linear': fixes z::complex assumes f: "f holomorphic_on T"and S: "open S"and T: "open T"and z: "z \ S" and fg: "\w. w \ S \ u*w + c \ T" shows"(deriv ^^ n) (\w. f (u*w + c)) z = u^n * (deriv ^^ n) f (u*z + c)" using z proof (induction n arbitrary: z) case 0 thenshow ?caseby simp next case (Suc n z) have holo0: "f holomorphic_on (\w. u * w+c) ` S" by (meson fg f holomorphic_on_subset image_subset_iff) have holo2: "(deriv ^^ n) f holomorphic_on (\w. u * w+c) ` S" by (meson f fg holomorphic_higher_deriv holomorphic_on_subset image_subset_iff T) have holo3: "(\z. u ^ n * (deriv ^^ n) f (u * z+c)) holomorphic_on S" by (intro holo2 holomorphic_on_compose [where g="(deriv ^^ n) f", unfolded o_def] holomorphic_intros) have"(\w. u * w+c) holomorphic_on S""f holomorphic_on (\w. u * w+c) ` S" by (rule holo0 holomorphic_intros)+ thenhave holo1: "(\w. f (u * w+c)) holomorphic_on S" by (rule holomorphic_on_compose [where g=f, unfolded o_def]) have"deriv ((deriv ^^ n) (\w. f (u * w+c))) z = deriv (\z. u^n * (deriv ^^ n) f (u*z+c)) z" proof (rule complex_derivative_transform_within_open [OF _ holo3 S Suc.prems]) show"(deriv ^^ n) (\w. f (u * w+c)) holomorphic_on S" by (rule holomorphic_higher_deriv [OF holo1 S]) qed (simp add: Suc.IH) alsohave"\ = u^n * deriv (\z. (deriv ^^ n) f (u * z+c)) z" proof - have"(deriv ^^ n) f analytic_on T" by (simp add: analytic_on_open f holomorphic_higher_deriv T) thenhave"(\w. (deriv ^^ n) f (u * w+c)) analytic_on S" using holomorphic_on_compose[OF _ holo2] ‹(λw. u * w+c) holomorphic_on S› by (simp add: S analytic_on_open o_def) thenshow ?thesis by (intro deriv_cmult analytic_on_imp_differentiable_at [OF _ Suc.prems]) qed alsohave"\ = u * u ^ n * deriv ((deriv ^^ n) f) (u * z+c)" proof - have"(deriv ^^ n) f field_differentiable at (u * z+c)" using Suc.prems T f fg holomorphic_higher_deriv holomorphic_on_imp_differentiable_at byblast thenshow ?thesis by (simp add: deriv_compose_linear') qed finallyshow ?case by simp qed
lemma higher_deriv_compose_linear: fixes z::complex assumes f: "f holomorphic_on T"and S: "open S"and T: "open T"and z: "z \ S" and fg: "\w. w \ S \ u * w \ T" shows"(deriv ^^ n) (\w. f (u * w)) z = u^n * (deriv ^^ n) f (u * z)" using higher_deriv_compose_linear' [where c=0] assms by simp
lemma higher_deriv_add_at: assumes"f analytic_on {z}""g analytic_on {z}" shows"(deriv ^^ n) (\w. f w + g w) z = (deriv ^^ n) f z + (deriv ^^ n) g z" using analytic_at_two assms higher_deriv_add by blast
lemma higher_deriv_diff_at: assumes"f analytic_on {z}""g analytic_on {z}" shows"(deriv ^^ n) (\w. f w - g w) z = (deriv ^^ n) f z - (deriv ^^ n) g z" using analytic_at_two assms higher_deriv_diff by blast
lemma higher_deriv_uminus_at: "f analytic_on {z} \ (deriv ^^ n) (\w. -(f w)) z = - ((deriv ^^ n) f z)" using higher_deriv_uminus by (auto simp: analytic_at)
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)" using analytic_at_two assms higher_deriv_mult by blast
text‹ Nonexistence of isolated singularities and a stronger integral formula.›
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" shows"f holomorphic_on S" proof -
{ fix z assume"z \ S"and cdf: "\x. x \ S - K \ f field_differentiable at x" have"f field_differentiable at z" proof (cases "z \ K") case False thenshow ?thesis by (blast intro: cdf ‹z ∈ S›) next case True with finite_set_avoid [OF K, of z] obtain d where"d>0"and d: "\x. \x\K; x \ z\ \ d \ dist z x" by blast obtain e where"e>0"and e: "ball z e \ S" using S ‹z ∈ S›by (force simp: open_contains_ball) have fde: "continuous_on (ball z (min d e)) f" by (metis Int_iff ball_min_Int continuous_on_subset e f subsetI) have cont: "{a,b,c} \ ball z (min d e) \ continuous_on (convex hull {a, b, c}) f"for a b c by (simp add: hull_minimal continuous_on_subset [OF fde]) have fd: "\{a,b,c} \ ball z (min d e); x \ interior (convex hull {a, b, c}) - K\ ==> f field_differentiable at x" for a b c x by (metis cdf Diff_iff Int_iff ball_min_Int subsetD convex_ball e interior_mono interior_subset subset_hull) obtain g where"\w. w \ ball z (min d e) \ (g has_field_derivative f w) (at w within ball z (min d e))" apply (rule contour_integral_convex_primitive
[OF convex_ball fde Cauchy_theorem_triangle_cofinite [OF _ K]]) using cont fd by auto thenhave"f holomorphic_on ball z (min d e)" by (metis open_ball at_within_open derivative_is_holomorphic) thenshow ?thesis unfolding holomorphic_on_def by (metis open_ball ‹0 < d›‹0 < e› at_within_open centre_in_ball min_less_iff_conj) qed
} with holf S K show ?thesis by (simp add: holomorphic_on_open open_Diff finite_imp_closed field_differentiable_def [symmetric]) qed
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" shows"f holomorphic_on S" proof (rule no_isolated_singularity[OF _ assms(2-)]) have"continuous_on (S-K) f" using holf holomorphic_on_imp_continuous_on by auto thenshow"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: assumes S: "convex S"and K: "finite K"and contf: "continuous_on S f" 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)) \" 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_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
text‹ Formula for higher derivatives.›
lemma Cauchy_has_contour_integral_higher_derivative_circlepath: 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))
(circlepath z r)" using w proof (induction k arbitrary: w) case 0 thenshow ?case using assms by (auto simp: Cauchy_integral_circlepath dist_commute dist_norm) next case (Suc k) have [simp]: "r > 0"using w 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)" using Cauchy_next_derivative_circlepath(1) [OF f Suc.IH _ Suc.prems] by (auto simp: contour_integrable_on_def) thenhave 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 thenhave 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))" by (force intro!: DERIV_imp_deriv Cauchy_next_derivative_circlepath [OF f Suc.IH _ Suc.prems]) alsohave"\ = of_nat (Suc k) * X" by (simp only: con) finallyhave"deriv (\w. ((2 * pi) * \ / (fact k)) * (deriv ^^ k) f w) w = of_nat (Suc k) * X" . thenhave"((2 * pi) * \ / (fact k)) * deriv (\w. (deriv ^^ k) f w) w = of_nat (Suc k) * X" by (metis deriv_cmult dnf_diff) thenhave"deriv (\w. (deriv ^^ k) f w) w = of_nat (Suc k) * X / ((2 * pi) * \ / (fact k))" by (simp add: field_simps) thenshow ?case using of_nat_eq_0_iff X by fastforce qed
lemma Cauchy_higher_derivative_integral_circlepath: 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)"
(is"?thes1") 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)
(circlepath z r)" using Cauchy_has_contour_integral_higher_derivative_circlepath [OF assms] by simp show ?thes1 using * using contour_integrable_on_def by blast show ?thes2 unfolding contour_integral_unique [OF *] by (simp add: field_split_simps) qed
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)" 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" using Cauchy_contour_integral_circlepath [OF assms, of 1] by (simp add: power2_eq_square)
subsection‹A holomorphic functionis analytic, i.e. has local power series›
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)" proof - 🍋‹Replacing 🍋‹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" proof have"cball z ((r + dist w z) / 2) \ ball z r" using w by (simp add: dist_commute field_sum_of_halves subset_eq) thenshow"f holomorphic_on cball z ((r + dist w z) / 2)" by (rule holomorphic_on_subset [OF holf]) have"r > 0" by (metis w dist_norm mem_ball norm_ge_zero not_less_iff_gr_or_eq order_less_le_trans) thenshow"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›) thenhave holf: "f holomorphic_on ball z r" 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" 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)" proof 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" 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 if"n \ N"and r: "r = dist z u"for N u proof - 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" by (metis (no_types) dist_norm divide_eq_1_iff less_irrefl mem_ball norm_minus_commute r w) have"norm ((\k
= norm ((∑k<N. (((w-z) / (u-z)) ^ k)) * f u * (u-w) / (u-z) - f u)" unfolding sum_distrib_right sum_divide_distrib power_divide by (simp add: algebra_simps) alsohave"\ = norm ((((w-z) / (u-z)) ^ N - 1) * (u-w) / (((w-z) / (u-z) - 1) * (u-z)) - 1) * norm (f u)" using‹0 < B› apply (simp add: geometric_sum [OF wzu_not1] flip: norm_mult) apply (simp add: field_simps) done alsohave"\ = 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) alsohave"\ = norm ((w-z) ^ N * (w-u)) / (r ^ N * norm (u-w)) * norm (f u)" by (simp add: algebra_simps) alsohave"\ = norm (w-z) ^ N * norm (f u) / r ^ N" by (simp add: norm_mult norm_power norm_minus_commute) alsohave"\ \ (((r-k)/r)^N) * B" using‹0 < r› w k by (simp add: B divide_simps mult_mono r wz_eq) alsohave"\ < e * k" using‹0 < B› N by (simp add: divide_simps) alsohave"\ \ e * norm (u-w)" using r kle ‹0 < e›by (simp add: dist_commute dist_norm) finallyshow ?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 ((∑k<n. (w-z) ^ k * (f x / (x-z) ^ Suc k)) - f x / (x-w)) < e" by (auto simp: mult_ac less_imp_le eventually_sequentially Ball_def) qed have🍋: "\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: "\n.
(∑k<n. contour_integral (circlepath z r) (λu. f u / (u-z) ^ Suc k) * (w-z) ^ k) =
contour_integral (circlepath z r) (λu. ∑k<n. (w-z) ^ k * (f u / (u-z) ^ Suc k))" apply (subst contour_integral_sum) apply (simp_all only: 🍋 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" using‹0 < r›by (force intro!: Cauchy_higher_derivative_integral_circlepath [OF contf holf]) thenhave"\u. (\y. \k by (intro contour_integrable_sum contour_integrable_lmul, simp) thenhave"(\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 thenhave"(\k. contour_integral (circlepath z r) (\u. f u/(u-z)^(Suc k)) * (w-z)^k)
sums (2 * of_real pi * i * f w)" using w by (auto simp: dist_commute dist_norm contour_integral_unique [OF Cauchy_integral_circlepath_simple [OF holfc]]) thenhave"(\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 * i * f w) / (i * (complex_of_real pi * 2)))" by (rule sums_divide) thenhave"(\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) thenshow ?thesis by (simp add: field_simps ‹0 < r› Cauchy_higher_derivative_integral_circlepath [OF contf holf]) qed
subsection‹The Liouville theoremand the Fundamental Theorem of Algebra›
text‹ These weak Liouville versions don't even need the derivative formula.\
lemma Liouville_weak_0: assumes holf: "f holomorphic_on UNIV"and inf: "(f \ 0) at_infinity" shows"f z = 0" proof (rule ccontr) assume fz: "f z \ 0" with inf [unfolded Lim_at_infinity, rule_format, of "norm(f z)/2"] obtain B where B: "\x. B \ cmod x \ norm (f x) * 2 < cmod (f z)" by (auto simp: dist_norm)
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)" 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 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"] by (auto simp: less_imp_le norm_mult norm_divide field_split_simps) qed
proposition Liouville_weak: assumes"f holomorphic_on UNIV"and"(f \ l) at_infinity" shows"f z = l" using Liouville_weak_0 [of "\z. f z - l"] by (simp add: assms holomorphic_on_diff LIM_zero)
proposition Liouville_weak_inverse: assumes"f holomorphic_on UNIV"and unbounded: "\B. eventually (\x. norm (f x) \ B) at_infinity" obtains z where"f z = 0" proof -
{ assume f: "\z. f z \ 0" have 1: "(\x. 1 / f x) holomorphic_on UNIV" by (simp add: holomorphic_on_divide assms f) have 2: "((\x. 1 / f x) \ 0) at_infinity" proof (rule tendstoI [OF eventually_mono]) fix e::real assume"e > 0" show"eventually (\x. 2/e \ cmod (f x)) at_infinity" by (rule_tac B="2/e"in unbounded) qed (simp add: dist_norm norm_divide field_split_simps) have False using Liouville_weak_0 [OF 1 2] f by simp
} thenshow ?thesis using that by blast qed
text‹In particular we get the Fundamental Theorem of Algebra.›
theorem fundamental_theorem_of_algebra: fixes a :: "nat \ complex" assumes"a 0 = 0 \ (\i \ {1..n}. a i \ 0)" obtains z where"(\i\n. a i * z^i) = 0" using assms proof (elim disjE bexE) assume"a 0 = 0"thenshow ?thesis by (auto simp: that [of 0]) next fix i assume i: "i \ {1..n}"and nz: "a i \ 0" have 1: "(\z. \i\n. a i * z^i) holomorphic_on UNIV" by (rule holomorphic_intros)+ show thesis proof (rule Liouville_weak_inverse [OF 1]) show"\\<^sub>F x in at_infinity. B \ cmod (\i\n. a i * x ^ i)"for B using i nz by (intro polyfun_extremal exI[of _ i]) auto qed (use that in auto) qed
subsection‹Weierstrass convergence theorem›
lemma holomorphic_uniform_limit: assumes cont: "eventually (\n. continuous_on (cball z r) (f n) \ (f n) holomorphic_on ball z r) F" and ulim: "uniform_limit (cball z r) f g F" and F: "\ trivial_limit F" obtains"continuous_on (cball z r) g""g holomorphic_on ball z r" proof (cases r "0::real" rule: linorder_cases) case less thenshow ?thesis by (force simp: ball_empty less_imp_le continuous_on_def holomorphic_on_def intro: that) next case equal thenshow ?thesis by (force simp: holomorphic_on_def intro: that) next case greater have contg: "continuous_on (cball z r) g" using cont uniform_limit_theorem [OF eventually_mono ulim F] by blast have"path_image (circlepath z r) \ cball z r" using‹0 < r›by auto thenhave 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)" if w: "w \ ball z r"for w proof -
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)" 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" 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\ ==>∀🚫F n in F. ∀x∈sphere z r.
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 thenhave 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" 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" 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" proof (rule Lim_transform_eventually) show"\\<^sub>F x in F. contour_integral (circlepath z r) (\u. f x u / (u-w))
= 2 * of_real pi * i * f x w" using w‹0 < d› d_def by (auto intro: eventually_mono [OF cont contour_integral_unique [OF Cauchy_integral_circlepath]]) qed (auto simp: cif_tends_cig) have"\e. 0 < e \ \\<^sub>F n in F. dist (f n w) (g w) < e" by (rule eventually_mono [OF uniform_limitD [OF ulim]]) (use w in auto) thenhave"((\n. 2 * of_real pi * \ * f n w) \ 2 * of_real pi * \ * g w) F" by (rule tendsto_mult_left [OF tendstoI]) thenhave"((\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 thenhave"((\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) thenshow ?thesis by (simp add: dist_norm) qed show ?thesis using Cauchy_next_derivative_circlepath(2) [OF 1 2, simplified] by (fastforce simp add: holomorphic_on_open contg intro: that) qed
lemma higher_deriv_complex_uniform_limit: assumes ulim: "uniform_limit A f g F" and f_holo: "eventually (\n. f n holomorphic_on A) F" and F: "F \ bot" and A: "open A""z \ A" shows"((\n. (deriv ^^ m) (f n) z) \ (deriv ^^ m) g z) F" proof - obtain r where r: "r > 0""cball z r \ A" using A by (meson open_contains_cball) have r': "ball z r \ A" using r by auto
define h where"h = (\n z. f n z - g z)"
define c where"c = of_real (2*pi) * \ / fact m" have [simp]: "c \ 0" by (simp add: c_def) have"g holomorphic_on ball z r \ continuous_on (cball z r) g" proof (rule holomorphic_uniform_limit) show"uniform_limit (cball z r) f g F" by (rule uniform_limit_on_subset[OF ulim r(2)]) show"\\<^sub>F n in F. continuous_on (cball z r) (f n) \ f n holomorphic_on ball z r"using f_holo by eventually_elim
(use holomorphic_on_subset[OF _ r(2)] holomorphic_on_subset[OF _ r'] in‹auto intro!: holomorphic_on_imp_continuous_on›) qed (use F in auto) hence g_holo: "g holomorphic_on ball z r"and g_cont: "continuous_on (cball z r) g" by blast+
have ulim': "uniform_limit (sphere z r) (\n x. h n x / (x - z) ^ (Suc m)) (\_. 0) F" proof - have"uniform_limit (sphere z r) (\n x. f n x / (x - z) ^ Suc m) (\x. g x / (x - z) ^ Suc m) F" proof (intro uniform_lim_divide uniform_limit_intros uniform_limit_on_subset[OF ulim]) have"compact (g ` sphere z r)" by (intro compact_continuous_image continuous_on_subset[OF g_cont]) auto thus"bounded (g ` sphere z r)" by (rule compact_imp_bounded) show"r ^ Suc m \ norm ((x - z) ^ Suc m)"if"x \ sphere z r"for x unfolding norm_power by (intro power_mono) (use that r(1) in‹auto simp: dist_norm norm_minus_commute›) qed (use r in auto) hence"uniform_limit (sphere z r) (\n x. f n x / (x - z) ^ Suc m - g x / (x - z) ^ Suc m)
(λx. g x / (x - z) ^ Suc m - g x / (x - z) ^ Suc m) F" by (intro uniform_limit_intros) thus ?thesis by (simp add: h_def diff_divide_distrib) qed
have has_integral: "eventually (\n. ((\u. h n u / (u - z) ^ Suc m) has_contour_integral
c * (deriv ^^ m) (h n) z) (circlepath z r)) F" using f_holo proof eventually_elim case (elim n) show ?case unfolding c_def proof (rule Cauchy_has_contour_integral_higher_derivative_circlepath) show"continuous_on (cball z r) (h n)"unfolding h_def by (intro continuous_intros g_cont holomorphic_on_imp_continuous_on
holomorphic_on_subset[OF elim] r) show"h n holomorphic_on ball z r" unfolding h_def by (intro holomorphic_intros g_holo holomorphic_on_subset[OF elim] r') qed (use r(1) in auto) qed
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.