Documentation

LeanPool.LeanModularForms.GeneralizedResidueTheory.Homotopy.MathlibBridge

Bridge to Mathlib Circle Integrals #

Connects the project's generalizedWindingNumber' (defined via Cauchy principal value) to mathlib's circleIntegral for the case of circular contours.

Mathlib does not define a general winding number, but it provides:

This file shows that for circleMap c R over [0, 2π], the project's generalizedWindingNumber' agrees with the classical contour integral formula, which in turn equals (2πi)⁻¹ * circleIntegral (· - w)⁻¹ c R.

Main Results #

theorem contourIntegral_circleMap_eq_circleIntegral (f : ) (c : ) (R : ) :
(θ : ) in 0..2 * Real.pi, f (circleMap c R θ) * deriv (circleMap c R) θ = (z : ) in C(c, R), f z

The interval integral ∫ θ in 0..2π, f(circleMap c R θ) * deriv(circleMap c R) θ equals mathlib's circle integral z in C(c,R), f z.

This is the key bridge: mathlib defines circleIntegral using smul (scalar multiplication deriv(circleMap c R) θ • f(circleMap c R θ)), while the project uses mul (pointwise multiplication f(γ t) * deriv γ t). For -valued functions, smul and mul coincide.

The generalized winding number of circleMap c R around w (for a point not on the circle) equals (2πi)⁻¹ * ∮ z in C(c,R), (z - w)⁻¹.

This combines generalizedWindingNumber_eq_classical_away (which shows the PV winding number equals the classical integral when the curve avoids w) with contourIntegral_circleMap_eq_circleIntegral (which identifies the classical integral with mathlib's circleIntegral).

The generalized winding number of circleMap c R around a point w inside the circle equals 1.

This is the definitive bridge between the project's generalizedWindingNumber' and mathlib's circle integral theory. The proof factors through mathlib's circleIntegral.integral_sub_inv_of_mem_ball, which computes z in C(c,R), (z-w)⁻¹ = 2πi.

theorem circleMap_contourIntegral_sub_inv_eq_two_pi_I (c w : ) (R : ) (_hR : 0 < R) (hw : w Metric.ball c R) :
(θ : ) in 0..2 * Real.pi, (circleMap c R θ - w)⁻¹ * deriv (circleMap c R) θ = 2 * Real.pi * Complex.I

The classical contour integral of (z - w)⁻¹ around a circle containing w equals 2πi, expressed in the project's interval integral format.

This is a convenience wrapper: it states the result purely in terms of interval integrals (no circleIntegral notation), useful for downstream proofs that work with ∫ t in a..b, ... rather than .