Skip to content

Commit 3eea33e

Browse files
CoolRmalloefflerd
andcommitted
feat(ComplexAnalysis): Cauchy's Integral Formula for Higher Order Derivatives (#30473)
This PR adds the following `iteratedDeriv_eq_smul_circleIntegral` and `norm_iteratedDeriv_le_aux`. The first one expresses the `n`-th order derivative of a differentiable function as a circle integral. The second one proves an estimate for the `n`-th order derivative. Zulip discussion: https://leanprover.zulipchat.com/#narrow/channel/217875-Is-there-code-for-X.3F/topic/Cauchy's.20integral.20formula [#mathlib4 > Different Expressions of Cauchy's integral formula](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Different.20Expressions.20of.20Cauchy's.20integral.20formula/with/545945033) I also used Cauchy's estimate over here: [#mathlib4 > Tychonov's Counterexample for the Heat Equation](https://leanprover.zulipchat.com/#narrow/channel/287929-mathlib4/topic/Tychonov's.20Counterexample.20for.20the.20Heat.20Equation/with/547367912) Co-authored-by: David Loeffler <d.loeffler.01@cantab.net>
1 parent f63c76f commit 3eea33e

File tree

3 files changed

+141
-30
lines changed

3 files changed

+141
-30
lines changed

Mathlib/Analysis/Complex/CauchyIntegral.lean

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Banach space with second countable topology.
2525
In the following theorems, if the name ends with `off_countable`, then the actual theorem assumes
2626
differentiability at all but countably many points of the set mentioned below.
2727
28+
### Rectangle integrals
29+
2830
* `Complex.integral_boundary_rect_of_hasFDerivAt_real_off_countable`: If a function
2931
`f : ℂ → E` is continuous on a closed rectangle and *real* differentiable on its interior, then
3032
its integral over the boundary of this rectangle is equal to the integral of
@@ -35,6 +37,8 @@ differentiability at all but countably many points of the set mentioned below.
3537
`f : ℂ → E` is continuous on a closed rectangle and is *complex* differentiable on its interior,
3638
then its integral over the boundary of this rectangle is equal to zero.
3739
40+
### Annuli and circles
41+
3842
* `Complex.circleIntegral_sub_center_inv_smul_eq_of_differentiable_on_annulus_off_countable`: If a
3943
function `f : ℂ → E` is continuous on a closed annulus `{z | r ≤ |z - c| ≤ R}` and is complex
4044
differentiable on its interior `{z | r < |z - c| < R}`, then the integrals of `(z - c)⁻¹ • f z`
@@ -55,6 +59,8 @@ differentiability at all but countably many points of the set mentioned below.
5559
disc the integral of `(z - w)⁻¹ • f z` over the boundary of the disc is equal to `2πif(w)`.
5660
Two versions of the lemma put the multiplier `2πi` at the different sides of the equality.
5761
62+
### Analyticity
63+
5864
* `Complex.hasFPowerSeriesOnBall_of_differentiable_off_countable`: If `f : ℂ → E` is continuous
5965
on a closed disc of positive radius and is complex differentiable on the corresponding open disc,
6066
then it is analytic on the corresponding open disc, and the coefficients of the power series are
@@ -72,6 +78,13 @@ differentiability at all but countably many points of the set mentioned below.
7278
`cauchyPowerSeries f z R` is a formal power series representing `f` at `z` with infinite
7379
radius of convergence (this holds for any choice of `0 < R`).
7480
81+
### Higher derivatives
82+
83+
* `Complex.circleIntegral_one_div_sub_center_pow_smul_of_differentiable_on_off_countable`
84+
**Cauchy integral formula for derivatives**: formula for the higher derivatives of `f` at the
85+
centre `c` of a disc in terms of circle integrals of `f w / (w - c) ^ (n + 1)` around the
86+
boundary circle.
87+
7588
## Implementation details
7689
7790
The proof of the Cauchy integral formula in this file is based on a very general version of the
@@ -155,6 +168,11 @@ variable {E : Type u} [NormedAddCommGroup E] [NormedSpace ℂ E]
155168

156169
namespace Complex
157170

171+
section rectangle
172+
/-!
173+
## Functions on rectangles
174+
-/
175+
158176
/-- Suppose that a function `f : ℂ → E` is continuous on a closed rectangle with opposite corners at
159177
`z w : ℂ`, is *real* differentiable at all but countably many points of the corresponding open
160178
rectangle, and $\frac{\partial f}{\partial \bar z}$ is integrable on this rectangle. Then the
@@ -280,6 +298,13 @@ theorem integral_boundary_rect_eq_zero_of_differentiableOn (f : ℂ → E) (z w
280298
H.mono <|
281299
inter_subset_inter (preimage_mono Ioo_subset_Icc_self) (preimage_mono Ioo_subset_Icc_self)
282300

301+
end rectangle
302+
303+
section annulus
304+
/-!
305+
## Functions on annuli
306+
-/
307+
283308
/-- If `f : ℂ → E` is continuous on the closed annulus `r ≤ ‖z - c‖ ≤ R`, `0 < r ≤ R`,
284309
and is complex differentiable at all but countably many points of its interior,
285310
then the integrals of `f z / (z - c)` (formally, `(z - c)⁻¹ • f z`)
@@ -334,8 +359,15 @@ theorem circleIntegral_eq_of_differentiable_on_annulus_off_countable {c : ℂ} {
334359
(differentiableAt_id.sub_const _).smul (hd z hz))
335360
_ = ∮ z in C(c, r), f z := circleIntegral.integral_sub_inv_smul_sub_smul _ _ _ _
336361

362+
end annulus
363+
337364
variable [CompleteSpace E]
338365

366+
section circle
367+
/-!
368+
## Circle integrals
369+
-/
370+
339371
/-- **Cauchy integral formula** for the value at the center of a disc. If `f` is continuous on a
340372
punctured closed disc of radius `R`, is differentiable at all but countably many points of the
341373
interior of this disc, and has a limit `y` at the center of the disc, then the integral
@@ -533,6 +565,13 @@ theorem circleIntegral_div_sub_of_differentiable_on_off_countable {R : ℝ} {c w
533565
simpa only [smul_eq_mul, div_eq_inv_mul] using
534566
circleIntegral_sub_inv_smul_of_differentiable_on_off_countable hs hw hc hd
535567

568+
end circle
569+
570+
section analyticity
571+
/-!
572+
## Applications to analyticity
573+
-/
574+
536575
/-- If `f : ℂ → E` is continuous on a closed ball of positive radius and is differentiable at all
537576
but countably many points of the corresponding open ball, then it is analytic on the open ball with
538577
coefficients of the power series given by Cauchy integral formulas. -/
@@ -650,4 +689,71 @@ theorem analyticAt_iff_eventually_differentiableAt {f : ℂ → E} {c : ℂ} :
650689
exact (d z m).differentiableWithinAt
651690
exact h _ m
652691

692+
end analyticity
693+
694+
section derivatives
695+
/-!
696+
## Circle integrals for higher derivatives
697+
698+
TODO: add a version for `w ∈ Metric.ball c R`.
699+
-/
700+
701+
variable {R : ℝ} {f : ℂ → E} {c : ℂ} {s : Set ℂ}
702+
703+
/-- **Cauchy integral formula for derivatives**, assuming `f` is continuous on a closed ball and
704+
differentiable on its interior away from a countable set. -/
705+
lemma circleIntegral_one_div_sub_center_pow_smul_of_differentiable_on_off_countable
706+
(h0 : 0 < R) (n : ℕ) (hs : s.Countable)
707+
(hc : ContinuousOn f (closedBall c R)) (hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) :
708+
∮ z in C(c, R), (1 / (z - c) ^ (n + 1)) • f z
709+
= (2 * π * I / n.factorial) • iteratedDeriv n f c := by
710+
have := hasFPowerSeriesOnBall_of_differentiable_off_countable (R := ⟨R, h0.le⟩) hs hc hd h0
711+
|>.factorial_smul 1 n
712+
rw [iteratedFDeriv_apply_eq_iteratedDeriv_mul_prod, Finset.prod_const_one, one_smul] at this
713+
rw [← this, cauchyPowerSeries_apply, ← Nat.cast_smul_eq_nsmul ℂ, ← mul_smul, ← mul_smul,
714+
div_mul_cancel₀ _ (mod_cast n.factorial_ne_zero), mul_inv_cancel₀ two_pi_I_ne_zero]
715+
simp [← mul_smul, pow_succ, mul_comm]
716+
717+
/-- **Cauchy integral formula for the first order derivative**, assuming `f` is continuous on a
718+
closed ball and differentiable on its interior away from a countable set. -/
719+
lemma differentiable_on_off_countable_deriv_eq_smul_circleIntegral
720+
(h0 : 0 < R) (hs : s.Countable) (hc : ContinuousOn f (closedBall c R))
721+
(hd : ∀ z ∈ ball c R \ s, DifferentiableAt ℂ f z) :
722+
∮ z in C(c, R), (1 / (z - c) ^ 2) • f z = (2 * π * I) • deriv f c := by
723+
simpa using circleIntegral_one_div_sub_center_pow_smul_of_differentiable_on_off_countable
724+
h0 1 hs hc hd
725+
726+
/-- **Cauchy integral formula for derivatives**, assuming `f` is continuous on a closed ball and
727+
differentiable on its interior. -/
728+
lemma _root_.DiffContOnCl.circleIntegral_one_div_sub_center_pow_smul
729+
(h0 : 0 < R) (n : ℕ) (hc : DiffContOnCl ℂ f (ball c R)) :
730+
∮ z in C(c, R), (1 / (z - c) ^ (n + 1)) • f z
731+
= (2 * π * I / n.factorial) • iteratedDeriv n f c :=
732+
c.circleIntegral_one_div_sub_center_pow_smul_of_differentiable_on_off_countable h0 n
733+
Set.countable_empty hc.continuousOn_ball fun _ hx ↦ hc.differentiableAt isOpen_ball hx.1
734+
735+
/-- **Cauchy integral formula for the first order derivative**, assuming `f` is continuous on a
736+
closed ball and differentiable on its interior. -/
737+
lemma _root_.DiffContOnCl.deriv_eq_smul_circleIntegral (h0 : 0 < R)
738+
(hc : DiffContOnCl ℂ f (ball c R)) :
739+
∮ z in C(c, R), (1 / (z - c) ^ 2) • f z = (2 * π * I) • deriv f c := by
740+
simpa using DiffContOnCl.circleIntegral_one_div_sub_center_pow_smul h0 1 hc
741+
742+
/-- **Cauchy integral formula for derivatives**, assuming `f` is differentiable on a closed ball. -/
743+
lemma _root_.DifferentiableOn.circleIntegral_one_div_sub_center_pow_smul (h0 : 0 < R) (n : ℕ)
744+
(hc : DifferentiableOn ℂ f (closedBall c R)) :
745+
∮ z in C(c, R), (1 / (z - c) ^ (n + 1)) • f z
746+
= (2 * π * I / n.factorial) • iteratedDeriv n f c :=
747+
(hc.mono closure_ball_subset_closedBall).diffContOnCl
748+
|>.circleIntegral_one_div_sub_center_pow_smul h0 n
749+
750+
/-- **Cauchy integral formula for the first order derivative**, assuming `f` is differentiable on
751+
a closed ball. -/
752+
lemma _root_.DifferentiableOn.deriv_eq_smul_circleIntegral (h0 : 0 < R)
753+
(hc : DifferentiableOn ℂ f (closedBall c R)) :
754+
∮ z in C(c, R), (1 / (z - c) ^ 2) • f z = (2 * π * I) • deriv f c := by
755+
simpa using DifferentiableOn.circleIntegral_one_div_sub_center_pow_smul h0 1 hc
756+
757+
end derivatives
758+
653759
end Complex

Mathlib/Analysis/Complex/Liouville.lean

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,42 @@ local postfix:100 "̂" => UniformSpace.Completion
3333

3434
namespace Complex
3535

36-
/-- If `f` is complex differentiable on an open disc with center `c` and radius `R > 0` and is
37-
continuous on its closure, then `f' c` can be represented as an integral over the corresponding
38-
circle.
39-
40-
TODO: add a version for `w ∈ Metric.ball c R`.
41-
42-
TODO: add a version for higher derivatives. -/
43-
theorem deriv_eq_smul_circleIntegral [CompleteSpace F] {R : ℝ} {c : ℂ} {f : ℂ → F} (hR : 0 < R)
44-
(hf : DiffContOnCl ℂ f (ball c R)) :
45-
deriv f c = (2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - c) ^ (-2 : ℤ) • f z := by
46-
lift R to ℝ≥0 using hR.le
47-
refine (hf.hasFPowerSeriesOnBall hR).hasFPowerSeriesAt.deriv.trans ?_
48-
simp only [cauchyPowerSeries_apply, one_div, zpow_neg, pow_one, smul_smul, zpow_two, mul_inv]
49-
50-
theorem norm_deriv_le_aux [CompleteSpace F] {c : ℂ} {R C : ℝ} {f : ℂ → F} (hR : 0 < R)
36+
/-- **Cauchy's estimate for derivatives**: If `f` is complex differentiable on an open disc of
37+
radius `R > 0`, is continuous on its closure, and its values on the boundary circle of this disc
38+
are bounded from above by `C`, then the norm of its `n`-th derivative at the center is at most
39+
`n.factorial * C / R ^ n`. -/
40+
theorem norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le [CompleteSpace F] {c : ℂ} {R C : ℝ}
41+
{f : ℂ → F} (n : ℕ) (hR : 0 < R) (hf : DiffContOnCl ℂ f (ball c R))
42+
(hC : ∀ z ∈ sphere c R, ‖f z‖ ≤ C) :
43+
‖iteratedDeriv n f c‖ ≤ n.factorial * C / R ^ n := by
44+
have hp (z) (hz : ‖z - c‖ = R) : ‖(z - c)⁻¹ ^ (n + 1) • f z‖ ≤ C / (R ^ n * R) := by
45+
simpa [norm_smul, norm_pow, norm_inv, hz, ← div_eq_inv_mul] using
46+
(div_le_div_iff_of_pos_right (mul_pos (pow_pos hR n) hR)).2 (hC z hz)
47+
have hq : iteratedDeriv n f c = n.factorial • (2 * π * I)⁻¹ •
48+
∮ z in C(c, R), (z - c)⁻¹ ^ (n + 1) • f z := by
49+
have : (2 * π * I / n.factorial) ≠ 0 := by simp [Nat.factorial_ne_zero]
50+
rw [← inv_smul_smul₀ this (iteratedDeriv n f c), inv_div, div_eq_inv_mul, mul_comm,
51+
← nsmul_eq_mul, smul_assoc]
52+
simp [← DiffContOnCl.circleIntegral_one_div_sub_center_pow_smul hR n hf]
53+
calc
54+
‖iteratedDeriv n f c‖ = ‖n.factorial • (2 * π * I)⁻¹ •
55+
∮ z in C(c, R), (z - c)⁻¹ ^ (n + 1) • f z‖ := by rw [hq]
56+
_ ≤ n.factorial * (R * (C / (R ^ (n + 1)))) := by
57+
rw [RCLike.norm_nsmul (K := ℂ), nsmul_eq_mul, mul_le_mul_iff_right₀ (by positivity)]
58+
exact circleIntegral.norm_two_pi_i_inv_smul_integral_le_of_norm_le_const hR.le hp
59+
_ = n.factorial * C / R ^ n := by
60+
grind
61+
62+
private theorem norm_deriv_le_aux [CompleteSpace F] {c : ℂ} {R C : ℝ} {f : ℂ → F} (hR : 0 < R)
5163
(hf : DiffContOnCl ℂ f (ball c R)) (hC : ∀ z ∈ sphere c R, ‖f z‖ ≤ C) :
5264
‖deriv f c‖ ≤ C / R := by
53-
have : ∀ z ∈ sphere c R, ‖(z - c) ^ (-2 : ℤ) • f z‖ ≤ C / (R * R) :=
54-
fun z (hz : ‖z - c‖ = R) => by
55-
simpa [-mul_inv_rev, norm_smul, hz, zpow_two, ← div_eq_inv_mul] using
56-
(div_le_div_iff_of_pos_right (mul_pos hR hR)).2 (hC z hz)
57-
calc
58-
‖deriv f c‖ = ‖(2 * π * I : ℂ)⁻¹ • ∮ z in C(c, R), (z - c) ^ (-2 : ℤ) • f z‖ :=
59-
congr_arg norm (deriv_eq_smul_circleIntegral hR hf)
60-
_ ≤ R * (C / (R * R)) :=
61-
(circleIntegral.norm_two_pi_i_inv_smul_integral_le_of_norm_le_const hR.le this)
62-
_ = C / R := by rw [mul_div_left_comm, div_self_mul_self', div_eq_mul_inv]
63-
64-
/-- If `f` is complex differentiable on an open disc of radius `R > 0`, is continuous on its
65-
closure, and its values on the boundary circle of this disc are bounded from above by `C`, then the
66-
norm of its derivative at the center is at most `C / R`. -/
65+
simpa using norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le 1 hR hf hC
66+
67+
/-- **Cauchy's estimate for the first order derivative**: If `f` is complex differentiable on an
68+
open disc of radius `R > 0`, is continuous on its closure, and its values on the boundary circle
69+
of this disc are bounded from above by `C`, then the norm of its derivative at the center is at
70+
most `C / R`. Note that this theorem does not require the completeness of the codomain of `f`. In
71+
constrast, the completeness is needed for `norm_iteratedDeriv_le_of_forall_mem_sphere_norm_le`. -/
6772
theorem norm_deriv_le_of_forall_mem_sphere_norm_le {c : ℂ} {R C : ℝ} {f : ℂ → F} (hR : 0 < R)
6873
(hd : DiffContOnCl ℂ f (ball c R)) (hC : ∀ z ∈ sphere c R, ‖f z‖ ≤ C) :
6974
‖deriv f c‖ ≤ C / R := by

Mathlib/MeasureTheory/Integral/CircleIntegral.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def circleIntegral (f : ℂ → E) (c : ℂ) (R : ℝ) : E :=
326326
∫ θ : ℝ in 0..2 * π, deriv (circleMap c R) θ • f (circleMap c R θ)
327327

328328
/-- `∮ z in C(c, R), f z` is the circle integral $\oint_{|z-c|=R} f(z)\,dz$. -/
329-
notation3 "∮ "(...)" in ""C("c", "R")"", "r:(scoped f => circleIntegral f c R) => r
329+
notation3 "∮ "(...)" in ""C("c", "R")"", "r:60:(scoped f => circleIntegral f c R) => r
330330

331331
theorem circleIntegral_def_Icc (f : ℂ → E) (c : ℂ) (R : ℝ) :
332332
(∮ z in C(c, R), f z) = ∫ θ in Icc 0 (2 * π),

0 commit comments

Comments
 (0)