Residue theorem for rectangular contours #
This file proves the residue theorem for rectangular contours. Mathlib already has
Cauchy–Goursat for rectangles
(Complex.integral_boundary_rect_eq_zero_of_differentiable_on_off_countable)
and the Cauchy integral formula for circles. This file fills the gap between them by
proving the residue formula for rectangular boundary integrals, together with a
rotated principal log branch needed to evaluate the left-edge integral that crosses
the standard cut.
The development proceeds in five stages:
- a notation
Complex.boundaryIntegralfor the oriented boundary integral over[z, w], with a Cauchy–Goursat wrapper and additivity/scaling lemmas; - a rotated principal logarithm
Complex.logNeg z := log (-z) + I·πwith cut on the positive real axis, plus its derivative and corner-comparison identities with the standardComplex.log; - explicit FTC-based evaluations of the four edge integrals of
(s − ρ)⁻¹; - a closed-form residue boundary integral
∮_{∂[z,w]} (s − ρ)⁻¹ ds = 2πiforρstrictly inside the rectangle; - a parametric residue theorem for sums of simple poles plus a holomorphic
remainder, packaged as
Complex.RectangleResidueData.
Main results #
Complex.hasDerivAt_log_neg:Complex.logNeghas derivativez⁻¹on the rotated slit plane{z | -z ∈ slitPlane}.Complex.boundaryIntegral_inv_sub_eq_two_pi_I: forρstrictly inside the rectangle[z, w], the boundary integral of(s − ρ)⁻¹equals2πi.Complex.boundaryIntegral_eq_residue_sum: for aComplex.RectangleResidueDatabundle describing simple poles inside the rectangle plus a holomorphic remainder, the boundary integral equals2πitimes the sum of residues.Complex.boundaryIntegral_single_pole: the one-pole specialization.
References #
- L. Ahlfors, Complex Analysis (3rd ed.), §4.5.
- E. Stein, R. Shakarchi, Complex Analysis, Ch. 2 §3 Theorem 3.1.
- W. Rudin, Real and Complex Analysis (3rd ed.), §10.42.
Tags #
complex analysis, residue theorem, contour integral, Cauchy formula, rectangular contour
Boundary integral over a rectangle #
The oriented boundary integral of f over the rectangle [z, w], in the sign
convention of Complex.integral_boundary_rect_eq_zero_of_differentiable_on_off_countable.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Cauchy–Goursat for the boundary-integral notation: a function continuous on the closed rectangle and differentiable off a countable subset of the open rectangle has vanishing boundary integral.
Linearity of the boundary integral #
The boundary integral is additive in the integrand.
The boundary integral pulls a complex constant outside.
Finite-sum decomposition #
The boundary integral distributes over a finite sum of integrands.
Rotated principal logarithm logNeg #
The standard branch Complex.log has its branch cut on the negative real axis. To
evaluate boundary integrals on rectangles whose left edge crosses that cut, we
introduce the rotated branch logNeg z := log (-z) + I·π, whose cut is on the
positive real axis.
A principal logarithm with branch cut on the positive real axis.
Equations
Instances For
logNeg has derivative z⁻¹ whenever -z lies in the standard slit plane.
Real-FTC chain rule for logNeg: if f : ℝ → ℂ has derivative f' at x
and -(f x) lies in the standard slit plane, then t ↦ logNeg (f t) has
derivative f' / f x at x.
For points with positive imaginary part, logNeg agrees with Complex.log.
For points with negative imaginary part, logNeg differs from Complex.log
by 2πi.
Edge integrals for (s − ρ)⁻¹ #
Bottom-edge integral of (s − ρ)⁻¹ evaluated via FTC + standard log.
Top-edge integral of (s − ρ)⁻¹ evaluated via FTC + standard log.
Right-edge integral of (s − ρ)⁻¹ evaluated via FTC + standard log.
Left-edge integral of (s − ρ)⁻¹ evaluated via FTC + the rotated logNeg
branch. The left edge crosses the standard cut, so the standard Complex.log
antiderivative does not work directly; logNeg (cut on the positive real axis)
is the right branch here.
Closed-form principal-part rectangle integral #
Cauchy integral formula on a rectangle. For ρ strictly inside the
rectangle [z, w], the boundary integral of (s − ρ)⁻¹ equals 2πi.
This is the rectangular analogue of Mathlib's circle-based Cauchy integral formula
for (s − ρ)⁻¹. The proof evaluates each of the four edge integrals using the FTC
with the standard logarithm (three edges) and the rotated branch logNeg for the
left edge, then verifies that the corner identity reduces to 2πi.
Parametric residue theorem #
Hypothesis bundle for the parametric residue theorem on a rectangle.
The integrand decomposes as f s = ∑_{ρ ∈ S} c ρ · (s − ρ)⁻¹ + h s, where S is
the finite set of simple poles (assumed inside the open rectangle), c ρ is the
residue at each pole, and h is holomorphic on the closed rectangle off a
countable set. The bundle records the integrability hypotheses needed to apply
linearity of the boundary integral.
Finite set of distinct simple-pole locations inside the open rectangle.
Residue at each pole.
Holomorphic remainder.
- principalPart_int (ρ : ℂ) : ρ ∈ self.S → boundaryIntegral (fun (s : ℂ) => (s - ρ)⁻¹) z w = 2 * ↑Real.pi * Complex.I
The principal-part rectangle integral evaluates to
2πifor each pole. his continuous on the closed rectangle.Countable set off which
his differentiable on the open rectangle.- h_off_countable : self.differentiabilityExceptions.Countable
The off-set is countable.
- h_differentiableAt (x : ℂ) : x ∈ Set.Ioo (min z.re w.re) (max z.re w.re) ×ℂ Set.Ioo (min z.im w.im) (max z.im w.im) \ self.differentiabilityExceptions → DifferentiableAt ℂ self.h x
his differentiable on the open rectangle minus the off-set. - pp_int_b (ρ : ℂ) : ρ ∈ self.S → IntervalIntegrable (fun (x : ℝ) => (↑x + ↑z.im * Complex.I - ρ)⁻¹) MeasureTheory.volume z.re w.re
Principal-part bottom-edge integrability.
- pp_int_t (ρ : ℂ) : ρ ∈ self.S → IntervalIntegrable (fun (x : ℝ) => (↑x + ↑w.im * Complex.I - ρ)⁻¹) MeasureTheory.volume z.re w.re
Principal-part top-edge integrability.
- pp_int_r (ρ : ℂ) : ρ ∈ self.S → IntervalIntegrable (fun (y : ℝ) => (↑w.re + ↑y * Complex.I - ρ)⁻¹) MeasureTheory.volume z.im w.im
Principal-part right-edge integrability.
- pp_int_l (ρ : ℂ) : ρ ∈ self.S → IntervalIntegrable (fun (y : ℝ) => (↑z.re + ↑y * Complex.I - ρ)⁻¹) MeasureTheory.volume z.im w.im
Principal-part left-edge integrability.
- h_int_b : IntervalIntegrable (fun (x : ℝ) => self.h (↑x + ↑z.im * Complex.I)) MeasureTheory.volume z.re w.re
Remainder bottom-edge integrability.
- h_int_t : IntervalIntegrable (fun (x : ℝ) => self.h (↑x + ↑w.im * Complex.I)) MeasureTheory.volume z.re w.re
Remainder top-edge integrability.
- h_int_r : IntervalIntegrable (fun (y : ℝ) => self.h (↑w.re + ↑y * Complex.I)) MeasureTheory.volume z.im w.im
Remainder right-edge integrability.
- h_int_l : IntervalIntegrable (fun (y : ℝ) => self.h (↑z.re + ↑y * Complex.I)) MeasureTheory.volume z.im w.im
Remainder left-edge integrability.
Instances For
The integrand assembled from a RectangleResidueData bundle:
f s = ∑_{ρ ∈ S} c ρ · (s − ρ)⁻¹ + h s.
Instances For
Parametric residue theorem for rectangles.
If the integrand decomposes as f s = ∑_{ρ ∈ S} c ρ · (s − ρ)⁻¹ + h s per the
hypotheses bundled in RectangleResidueData, then the boundary integral equals
2πi · ∑_{ρ ∈ S} c ρ. The proof combines linearity of the boundary integral,
Cauchy–Goursat for the holomorphic remainder, and the principal-part value at
each pole.
Single-pole specialization of the residue theorem. If `f s = c · (s − ρ)⁻¹
- h s
withhcontinuous on the closed rectangle and differentiable off a countable set in the open rectangle, then the boundary integral equals2πi · c`.