Documentation

Atlas.ComplexVariables.code.Lecture13

Lecture 13: The General Cauchy Theorem #

This file formalizes definitions, Claims 1–3, Theorem 2 (Cauchy's Integral Formula), and Theorem 1 (Cauchy's Theorem) from Lecture 13 of the complex variables course.

Main definitions #

Main results #

References #

Notes #

For open subsets of , the simply connected definition is equivalent to Mathlib's SimplyConnectedSpace, which requires path-connectedness and trivial fundamental group.

structure ClosedCurve :

A closed curve in ℂ, parametrized by a C¹ function toFun : ℝ → ℂ on the interval [a, b] with toFun a = toFun b. The C¹ regularity (continuity of the derivative) is needed for contour integration.

  • toFun :

    The parametrization of the curve.

  • a :

    Left endpoint of the parameter interval.

  • b :

    Right endpoint of the parameter interval.

  • hab : self.a self.b

    The parameter interval is non-degenerate.

  • continuous_toFun : ContinuousOn self.toFun (Set.Icc self.a self.b)

    The parametrization is continuous on [a, b].

  • differentiable : DifferentiableOn self.toFun (Set.Icc self.a self.b)

    The parametrization is differentiable on [a, b]. This is part of the C¹ regularity for contour integration.

  • continuous_deriv : ContinuousOn (deriv self.toFun) (Set.Icc self.a self.b)

    The derivative of the parametrization is continuous on [a, b]. This provides the C¹ regularity needed for contour integration.

  • closed : self.toFun self.a = self.toFun self.b

    The curve is closed: the endpoints match.

Instances For

    The image (range) of a closed curve in ℂ.

    Instances For

      A closed curve lies in a set Ω if its image is contained in Ω.

      Instances For
        noncomputable def ClosedCurve.windingNumber (γ : ClosedCurve) (w : ) :

        The winding number of a closed curve γ about a point w, defined as n(γ, w) = (2πi)⁻¹ ∫_a^b γ'(t) / (γ(t) - w) dt.

        This is the standard integral formula for the winding number, as defined on page 116 of the textbook (referenced in Lecture 9).

        Instances For

          Definition 1, Lecture 13. A closed curve γ in an open set Ω is homologous to 0 (written γ ~ 0) with respect to Ω if n(γ, a) = 0 for all a ∉ Ω.

          Instances For
            noncomputable def ClosedCurve.contourIntegral (γ : ClosedCurve) (f : ) :

            The contour integral of f along the closed curve γ, defined as ∮_γ f(z) dz = ∫_a^b f(γ(t)) · γ'(t) dt.

            Instances For

              Auxiliary lemmas #

              The range of a closed curve is nonempty (since [a, b] is nonempty).

              theorem ClosedCurve.liesIn_nonempty (γ : ClosedCurve) {Ω : Set } (h : γ.LiesIn Ω) :

              If a closed curve lies in Ω, then Ω is nonempty.

              The range of a closed curve is compact (continuous image of compact interval).

              The range of a closed curve is closed (compact in a Hausdorff space).

              The image of a closed curve's range under OnePoint.some is closed in OnePoint.

              Extended winding number on ℂ∞ \ (image of γ). Returns 0 at and γ.windingNumber w at finite points w ∉ γ.range.

              Instances For
                noncomputable def ClosedCurve.circleContour (c : ) (R : ) :

                The circle z(t) = c + R·e^{it} for t ∈ [0, 2π], viewed as a ClosedCurve. This is the standard parametrization of the positively oriented circle of radius R centered at c, as used throughout the textbook for contour integration and residues.

                Instances For

                  The contour integral of f along the circle contour circleContour c R equals Mathlib's circleIntegral ∮ z in C(c, R), f z. This bridges the custom ClosedCurve.contourIntegral with Mathlib's circleIntegral for circle paths.

                  Axioms for continuity and integer-valuedness of the winding number #

                  These are deep analytic facts from Lecture 9, axiomatized because linking the custom parametric contour integral with Mathlib's Bochner integral requires substantial machinery.

                  The winding number is continuous on the complement of the curve's range. This is proved in the textbook (Lecture 9, page 116) via differentiation under the integral sign: the integrand (γ(t) - w)⁻¹ · γ'(t) depends continuously on w for w away from the curve, and dominated convergence gives continuity of the parametric integral.

                  theorem ClosedCurve.windingNumber_intValued (γ : ClosedCurve) (z : ) (hz : zγ.range) :
                  ∃ (n : ), γ.windingNumber z = n

                  The winding number takes integer values on the complement of the curve's range. Proved via the exponential lifting argument: define F(t) = exp(-g(t)) * (γ(t)-z) where g(t) is the antiderivative of the integrand, show F has zero derivative, deduce F is constant, then use the closed curve condition and exp_eq_one_iff.

                  theorem isLocallyConstant_of_continuous_intValued {X : Type u_1} [TopologicalSpace X] {f : X} (hf_cont : Continuous f) (hf_int : ∀ (x : X), ∃ (n : ), f x = n) :

                  A continuous -valued function whose values all lie in (embedded in ) is locally constant, because is a discrete subset of .

                  The winding number is locally constant on the complement of the curve's range. This follows from the winding number being a continuous integer-valued function on ℂ \ γ.range (see Lecture 9 of the textbook): continuity and integer-valuedness are axiomatized separately, and locally constancy follows because is discrete in .

                  theorem ClosedCurve.windingNumber_eq_zero_of_norm_large (γ : ClosedCurve) :
                  ∃ (R : ), ∀ (w : ), R < wwγ.rangeγ.windingNumber w = 0

                  The winding number is zero for points w sufficiently far from the curve. This follows from the integral formula: the integrand (γ(t) - w)⁻¹ · γ'(t) has norm bounded by D / (‖w‖ - M) for large ‖w‖, and combined with integer-valuedness this forces the winding number to be exactly zero.

                  The extended winding number is locally constant on ℂ∞ \ (image of γ).

                  This packages two standard facts from Lecture 9:

                  1. The winding number n(γ, ·) is locally constant on ℂ \ γ.range (since the integrand is holomorphic in z).
                  2. n(γ, z) → 0 as |z| → ∞, hence n(γ, z) = 0 for large |z|.

                  Together these imply the extended winding number (set to 0 at ) is locally constant on the complement of the curve's image in the Riemann sphere.

                  theorem ClosedCurve.windingNumber_eq_zero_of_isConnected (γ : ClosedCurve) (C : Set (OnePoint )) (hC : IsConnected C) (h_infty : OnePoint.infty C) (h_disj : C (OnePoint.some '' γ.range)) (z : ) (hz : z C) :

                  The winding number of a closed curve is zero at any point z in a connected subset of the Riemann sphere ℂ∞ \ (image of γ) that contains the point at infinity.

                  This packages two standard facts from Lecture 9:

                  1. The winding number n(γ, ·) is locally constant on ℂ \ γ.range.
                  2. n(γ, z) → 0 as |z| → ∞, hence n(γ, z) = 0 for large |z|.
                  axiom ClosedCurve.no_compact_open_complement_subset (Ω : Set ) ( : IsOpen Ω) (hsc : IsSimplyConnected Ω) (K : Set ) (hKne : K.Nonempty) (hKsub : K Ω) (hKcompact : IsCompact K) (hKopen_in_compl : ∃ (U : Set ), IsOpen U K = Ω U) :

                  For an open simply connected subset Ω ⊆ ℂ (in the sense of Mathlib's IsSimplyConnected, which requires path-connectedness and trivial fundamental group), the complement of Ω in the Riemann sphere ℂ∞ = ℂ ∪ {∞} is connected.

                  This is the equivalence between the algebraic-topology and complex-analysis definitions of simply connected for open subsets of (see Definition 2, Lecture 13 and the Notes in the module docstring).

                  Proved from no_compact_open_complement_subset by contrapositive: if the complement were disconnected, the disconnection would produce a nonempty compact set K ⊆ Ωᶜ that is open in Ωᶜ, contradicting simple-connectedness.

                  In a simply connected open subset of ℂ, every closed curve lying in the set is homologous to zero. This is because the winding number n(γ, z) is constant on each connected component of ℂ \ γ and equals 0 for |z| sufficiently large. When Ω is simply connected, ℂ \ Ω is connected, so n(γ, z) = 0 for all z ∉ Ω. (See the remark following Theorem 1 in Lecture 13.)

                  Proof of Theorem 1 #

                  theorem ClosedCurve.contourIntegral_cancel_sub_inv (γ : ClosedCurve) {f : } {z₀ : } (hz₀ : z₀γ.range) :
                  (γ.contourIntegral fun (ζ : ) => (ζ - z₀) * f ζ * (ζ - z₀)⁻¹) = γ.contourIntegral f

                  On the image of γ, for z₀ ∉ γ.range, the function ζ ↦ (ζ - z₀) * f(ζ) * (ζ - z₀)⁻¹ simplifies to f(ζ), so the contour integrals agree.

                  Reverse (negative) curve #

                  The reverse (negative) of a closed curve, traversing γ backwards. If γ is parametrized by t ∈ [a, b], then −γ is given by (−γ)(t) = γ(a + b − t), which retraces the same image in reverse.

                  Instances For

                    The contour integral along the reverse curve equals the negation of the original. This follows from the chain rule for the derivative and the substitution u = a + b − t in the integral.

                    The winding number of the reverse curve equals the negation of the original. This is an immediate consequence of contourIntegral_neg.

                    Claim 1: Properties of the Divided Difference #

                    Claim 1, Lecture 13. Let f be holomorphic on an open set Ω ⊆ ℂ. Define g(z, ζ) = (f(ζ) - f(z)) / (ζ - z) for z ≠ ζ and g(z, z) = f'(z). Then:

                    The function g(z, ζ) equals Mathlib's dslope f z ζ.

                    Proof strategy:

                    noncomputable def dividedDiff (f : ) :

                    The divided difference function g(z, ζ) from Claim 1, Lecture 13. For f : ℂ → ℂ, defines:

                    • g(z, ζ) = (f(ζ) - f(z)) / (ζ - z) when z ≠ ζ
                    • g(z, z) = f'(z) when z = ζ

                    This equals Mathlib's dslope f z ζ.

                    Instances For
                      @[simp]
                      theorem dividedDiff_apply (f : ) (z ζ : ) :
                      dividedDiff f (z, ζ) = dslope f z ζ
                      @[simp]
                      theorem dividedDiff_diag (f : ) (z : ) :
                      theorem dividedDiff_symm (f : ) (z ζ : ) :

                      Claim 1(c), Lecture 13 (Symmetry). The divided difference is symmetric: g(z, ζ) = g(ζ, z). This follows from (f(ζ) - f(z))/(ζ - z) = (f(z) - f(ζ))/(z - ζ).

                      theorem dslope_sub_deriv_norm_le {f : } {s : Set } {z ζ z₀ : } {C : } (hf : ws, DifferentiableAt f w) (hC : ws, deriv f w - deriv f z₀ C) (hs : Convex s) (hz : z s) ( : ζ s) :
                      dslope f z ζ - deriv f z₀ C

                      Key estimate for the continuity proof: on a convex set where f is differentiable and ‖f'(w) - f'(z₀)‖ ≤ C for all w in the set, the divided difference satisfies ‖dslope f z ζ - f'(z₀)‖ ≤ C for all z, ζ in the set.

                      This follows from the mean value inequality applied to the auxiliary function h(w) = f(w) - f'(z₀) · w, which has h'(w) = f'(w) - f'(z₀).

                      theorem continuousOn_dividedDiff {f : } {Ω : Set } ( : IsOpen Ω) (hf : DifferentiableOn f Ω) :

                      Claim 1(a), Lecture 13 (Continuity). The divided difference g is continuous on Ω × Ω when f is holomorphic on the open set Ω.

                      theorem differentiableOn_dividedDiff_snd {f : } {Ω : Set } ( : IsOpen Ω) (hf : DifferentiableOn f Ω) (z₀ : ) (hz₀ : z₀ Ω) :
                      DifferentiableOn (fun (ζ : ) => dividedDiff f (z₀, ζ)) Ω

                      Claim 1(b), Lecture 13 (Holomorphicity in the second variable). For each z₀ ∈ Ω, the function ζ ↦ g(z₀, ζ) is holomorphic on Ω. This follows from Complex.differentiableOn_dslope (the removable singularity theorem, Theorem 7 in the textbook, p.124).

                      theorem differentiableOn_dividedDiff_fst {f : } {Ω : Set } ( : IsOpen Ω) (hf : DifferentiableOn f Ω) (ζ₀ : ) (hζ₀ : ζ₀ Ω) :
                      DifferentiableOn (fun (z : ) => dividedDiff f (z, ζ₀)) Ω

                      Claim 1(b), Lecture 13 (Holomorphicity in the first variable). For each ζ₀ ∈ Ω, the function z ↦ g(z, ζ₀) is holomorphic on Ω. This follows from holomorphicity in the second variable and the symmetry g(z, ζ₀) = g(ζ₀, z).

                      Claim 2: The function h is holomorphic #

                      Claim 2, Lecture 13. The function h defined piecewise on by

                      Proof outline (Lecture 13):

                      1. Ω ∪ Ω' = ℂ: For z ∉ Ω, γ ~ 0 implies n(γ, z) = 0, and z ∉ γ.range since γ ⊂ Ω. So z ∈ Ω'.
                      2. On Ω ∩ Ω', the two formulas agree: since g(z, ζ) = (f(ζ) - f(z))/(ζ - z), we have ∫_γ g(z, ζ) dζ = ∫_γ f(ζ)/(ζ - z) dζ - f(z) · 2πi · n(γ, z), and n(γ, z) = 0 on Ω'.
                      3. Holomorphy on Ω: At any z₀ ∈ γ, pick a disk D ⊂ Ω centered at z₀. For any closed curve δ in D, exchange order of integration (Fubini) to get ∫_δ h(z) dz = (2πi)⁻¹ ∫_γ (∫_δ g(z, ζ) dz) dζ = 0 by Cauchy's theorem for disks (since z ↦ g(z, ζ) is holomorphic on Ω by Claim 1). Morera's theorem then gives holomorphy. For z₀ ∈ Ω \ γ, differentiation under the integral sign applies directly.
                      4. Holomorphy on Ω': Standard result for Cauchy-type integrals.
                      5. Since Ω and Ω' are both open and cover , h is holomorphic on .

                      Ω' from Lecture 13. The complement domain of a closed curve γ is Ω' = {z ∈ ℂ \ (γ) : n(γ, z) = 0}, the set of points not on γ with winding number zero. Together with the open set Ω (where γ ~ 0), we have Ω ∪ Ω' = ℂ.

                      Instances For
                        noncomputable def cauchyPiecewise (Ω : Set ) (f : ) (γ : ClosedCurve) (z : ) :

                        The function h from Claim 2, Lecture 13. Defined piecewise:

                        • h(z) = (2πi)⁻¹ ∫_γ g(z, ζ) dζ for z ∈ Ω (using the divided difference g),
                        • h(z) = (2πi)⁻¹ ∫_γ f(ζ)/(ζ - z) dζ for z ∉ Ω (Cauchy-type integral).

                        On the overlap Ω ∩ Ω', the two formulas agree because n(γ, z) = 0 on Ω' and g(z, ζ) = (f(ζ) - f(z))/(ζ - z) for ζ ≠ z.

                        Instances For

                          Auxiliary results for Claim 2 #

                          theorem cauchyPiecewise_eq_on_omega {Ω : Set } {f : } {γ : ClosedCurve} {z : } (hz : z Ω) :
                          cauchyPiecewise Ω f γ z = (2 * Real.pi * Complex.I)⁻¹ * γ.contourIntegral fun (ζ : ) => dividedDiff f (z, ζ)

                          On Ω, cauchyPiecewise equals the g-integral formula.

                          theorem cauchyPiecewise_eq_off_omega {Ω : Set } {f : } {γ : ClosedCurve} {z : } (hz : zΩ) :
                          cauchyPiecewise Ω f γ z = (2 * Real.pi * Complex.I)⁻¹ * γ.contourIntegral fun (ζ : ) => f ζ * (ζ - z)⁻¹

                          Off Ω, cauchyPiecewise equals the Cauchy-type integral formula.

                          Ω ∪ Ω' = ℂ when γ is homologous to zero in Ω. For z ∉ Ω, the homology condition gives n(γ, z) = 0, and γ ⊂ Ω gives z ∉ γ.range, so z ∈ Ω'.

                          The contour integral of (ζ - z)⁻¹ equals 2πi · n(γ, z). This is immediate from the definition of the winding number.

                          theorem dslope_integrand_eq (f : ) (z : ) (γ : ClosedCurve) (hz : zγ.range) (t : ) (ht : t Set.Icc γ.a γ.b) :
                          dslope f z (γ.toFun t) * deriv γ.toFun t = f (γ.toFun t) * (γ.toFun t - z)⁻¹ * deriv γ.toFun t - f z * ((γ.toFun t - z)⁻¹ * deriv γ.toFun t)

                          Pointwise decomposition of the dslope integrand: for γ(t) ≠ z, dslope f z (γ(t)) · γ'(t) = f(γ(t))·(γ(t)-z)⁻¹·γ'(t) - f(z)·(γ(t)-z)⁻¹·γ'(t). This is the key algebraic identity underlying the overlap agreement.

                          Axioms for the analytic steps in the proof of Claim 2 #

                          The proof of Claim 2 uses several deep analytic facts that connect the custom ClosedCurve contour integral infrastructure with Mathlib's analysis:

                          These are all proved in the textbook (Lectures 9–13) and in standard complex analysis references. They are axiomatized here because they require substantial machinery to bridge the custom parametric contour integral with Mathlib's Bochner integral framework.

                          Ω' is open. This follows from two facts:

                          1. γ.range is compact (continuous image of [a, b]), so ℂ \ γ.range is open.
                          2. The winding number is locally constant on ℂ \ γ.range (it is a continuous integer-valued function, see Lecture 9). Thus Ω' = {z ∈ ℂ \ γ.range : n(γ, z) = 0} is open in ℂ \ γ.range, hence open in .
                          noncomputable def cauchyTypeIntegral (f : ) (γ : ClosedCurve) (z : ) :

                          Cauchy-type integral: z ↦ (2πi)⁻¹ * ∫_γ f(ζ)·(ζ - z)⁻¹ dζ.

                          This is the standard Cauchy-type integral, which defines a holomorphic function on (γ.range)ᶜ by parametric differentiation under the integral sign.

                          Instances For

                            The Cauchy-type integral is holomorphic on (γ.range)ᶜ.

                            This follows from parametric differentiation under the integral sign: z ↦ f(ζ) * (ζ - z)⁻¹ has complex derivative f(ζ) * (ζ - z)⁻² at each z ∉ γ.range, and the dominated convergence / parametric differentiation theorem applies because γ.range is compact and z stays at positive distance from it.

                            Cauchy's Integral Formula (Theorem 2) — Proof and auxiliary results #

                            The proof of the Cauchy Integral Formula (Theorem 2) proceeds via three claims:

                            1. Claim 1 (formalized in claim-g-holomorphic-symmetric): The difference quotient function g(z,ζ) = (f(ζ) - f(z))/(ζ - z) (extended by f'(z) on the diagonal) is continuous on Ω × Ω, holomorphic in each variable, and symmetric.
                            2. Claim 2 (formalized in claim-h-holomorphic): The auxiliary function h defined piecewise on Ω and Ω' is entire.
                            3. Claim 3 (formalized in claim-h-zero): h ≡ 0 by Liouville's theorem.

                            Claims 2 and 3 are decomposed into helper lemmas:

                            The key consequence h_vanishes is then derived from this theorem. The Cauchy Integral Formula is then deduced from h_vanishes by algebraic manipulation.

                            theorem ClosedCurve.differentiableOn_dslope_contourIntegral_complement (γ : ClosedCurve) {Ω : Set } ( : IsOpen Ω) {f : } (hf : DifferentiableOn f Ω) ( : γ.IsHomologousToZero Ω) :
                            DifferentiableOn (fun (z : ) => γ.contourIntegral fun (ζ : ) => dslope f z ζ) γ.range

                            Holomorphicity of the dslope contour integral off γ.range (parametric differentiation). The contour integral z ↦ ∫_γ dslope f z ζ dζ is holomorphic on (γ.range)ᶜ.

                            For z ∉ γ.range, dslope f z (γ(t)) = (f(γ(t)) − f(z))/(γ(t) − z). The integrand has a complex derivative in z which can be computed and bounded by a dominating integrable function (using the positive distance between z and the compact set γ.range). The Leibniz integral rule for Bochner integrals (hasFDerivAt_integral_of_dominated_of_fderiv_le) then yields holomorphicity.

                            This is a standard result from parametric integration theory.

                            theorem ClosedCurve.differentiableOn_dslope_contourIntegral_omega_morera (γ : ClosedCurve) {Ω : Set } ( : IsOpen Ω) {f : } (hf : DifferentiableOn f Ω) ( : γ.IsHomologousToZero Ω) (z₀ : ) (hz₀ : z₀ Ω) :
                            DifferentiableWithinAt (fun (z : ) => γ.contourIntegral fun (ζ : ) => dslope f z ζ) Ω z₀

                            Holomorphicity at points on the curve (Leibniz integral rule). For z₀ ∈ Ω, the contour integral z ↦ ∫_γ dslope f z ζ dζ is differentiable within Ω at z₀.

                            The proof uses parametric differentiation under the integral sign (intervalIntegral.hasDerivAt_integral_of_dominated_loc_of_deriv_le). The key insight is that dslope f z ζ is holomorphic in z on all of Ω (even when z = ζ, since dslope extends the removable singularity), so the Leibniz rule applies directly.

                            theorem ClosedCurve.differentiableOn_dslope_contourIntegral_omega (γ : ClosedCurve) {Ω : Set } ( : IsOpen Ω) {f : } (hf : DifferentiableOn f Ω) ( : γ.IsHomologousToZero Ω) :
                            DifferentiableOn (fun (z : ) => γ.contourIntegral fun (ζ : ) => dslope f z ζ) Ω

                            Holomorphicity of the dslope contour integral on Ω (Morera + Fubini). The contour integral z ↦ ∫_γ dslope f z ζ dζ is holomorphic on the open set Ω where f is holomorphic.

                            The proof uses Morera's theorem (every continuous function with vanishing contour integrals over rectangles is holomorphic) combined with Fubini's theorem (to exchange the order of integration). These are standard results from a first course in complex analysis that are not proved in this lecture.

                            For z₀ ∈ Ω \ γ.range: differentiation under the integral sign applies directly, since z ↦ dslope f z ζ is holomorphic in z (Claim 1) and ζ stays at positive distance from z.

                            For z₀ ∈ γ.range ∩ Ω: pick a disk D ⊂ Ω centered at z₀. For any closed curve δ ⊂ D, Fubini gives ∫_δ (∫_γ g(z,ζ) dζ) dz = ∫_γ (∫_δ g(z,ζ) dz) dζ = 0 since z ↦ g(z,ζ) is holomorphic on D. Morera's theorem then yields holomorphicity.

                            theorem ClosedCurve.contourIntegral_dslope_differentiable (γ : ClosedCurve) {Ω : Set } ( : IsOpen Ω) {f : } (hf : DifferentiableOn f Ω) ( : γ.IsHomologousToZero Ω) :
                            Differentiable fun (z : ) => γ.contourIntegral fun (ζ : ) => dslope f z ζ

                            Claim 2 (Lecture 13, proof of Cauchy's Integral Formula). The function z ↦ ∮_γ dslope f z ζ dζ is entire (differentiable on all of ).

                            This is Claim 2 from the proof of Theorem 2 (Cauchy's Integral Formula). The auxiliary function h, defined piecewise as the contour integral of dslope f z on Ω and via the Cauchy-type integral on Ω', is holomorphic on all of . Since h agrees with z ↦ ∫_γ dslope f z ζ dζ on the open set Ω, and both functions are entire, they agree everywhere.

                            The proof follows the textbook argument and uses:

                            • Claim 1: z ↦ g(z, ζ) is holomorphic in z (by differentiableOn_dividedDiff_fst).
                            • Morera's theorem + Fubini for points z₀ ∈ γ.range ∩ Ω.
                            • Differentiation under the integral sign for z₀ ∈ Ω \ γ.range.
                            • Holomorphicity of the Cauchy-type integral on Ω' and agreement on Ω ∩ Ω'.
                            theorem ClosedCurve.contourIntegral_dslope_tendsto_zero (γ : ClosedCurve) {Ω : Set } ( : IsOpen Ω) {f : } (hf : DifferentiableOn f Ω) ( : γ.IsHomologousToZero Ω) :
                            Filter.Tendsto (fun (z : ) => γ.contourIntegral fun (ζ : ) => dslope f z ζ) (Filter.cocompact ) (nhds 0)

                            Claim 3, asymptotic part (Lecture 13). The function z ↦ ∫_γ dslope f z ζ dζ tends to 0 at infinity (along the cocompact filter).

                            For large |z|, the winding number n(γ, z) = 0 (since γ.range is bounded), so ∫_γ dslope f z ζ dζ = ∫_γ f(ζ)/(ζ - z) dζ → 0 because f is bounded on the compact set γ.range and 1/(ζ - z) → 0 uniformly over ζ ∈ γ.range.

                            theorem ClosedCurve.contourIntegral_dslope_eq_zero (γ : ClosedCurve) {Ω : Set } ( : IsOpen Ω) {f : } (hf : DifferentiableOn f Ω) ( : γ.IsHomologousToZero Ω) {z : } (_hz : z Ω) :
                            (γ.contourIntegral fun (ζ : ) => dslope f z ζ) = 0

                            Claims 2+3 combined (Lecture 13). The auxiliary function h, defined as the contour integral of the divided difference dslope f z along γ, vanishes identically.

                            This combines:

                            By Liouville's theorem (Mathlib's Differentiable.apply_eq_of_tendsto_cocompact), an entire function that tends to a limit at infinity must be constant. Since the limit is 0, the function is identically 0.

                            theorem ClosedCurve.h_vanishes (γ : ClosedCurve) {Ω : Set } ( : IsOpen Ω) {f : } (hf : DifferentiableOn f Ω) ( : γ.IsHomologousToZero Ω) {z : } (hz : z Ω) (hzγ : zγ.range) :
                            (γ.contourIntegral fun (ζ : ) => (f ζ - f z) * (ζ - z)⁻¹) = 0

                            The key consequence of Claims 1, 2, and 3 from the proof of Theorem 2: the contour integral of the difference quotient (f(ζ) - f(z))/(ζ - z) vanishes. This encodes the statement h(z) = 0 for z ∈ Ω \ γ, where h is the auxiliary entire function constructed in the proof.

                            The proof follows from:

                            • Claim 1: g(z,ζ) = (f(ζ) - f(z))/(ζ - z) (extended by f'(z) on the diagonal) is holomorphic in each variable.
                            • Claim 2: The auxiliary function h defined piecewise is entire.
                            • Claim 3: h ≡ 0 by Liouville's theorem (since h is bounded).

                            These claims are proved in separate tasks (claim-g-holomorphic-symmetric, claim-h-holomorphic, claim-h-zero).

                            theorem ClosedCurve.contourIntegrable_cauchy_kernel (γ : ClosedCurve) {Ω : Set } ( : IsOpen Ω) {f : } (hf : DifferentiableOn f Ω) ( : γ.IsHomologousToZero Ω) {z : } (hz : z Ω) (hzγ : zγ.range) :
                            IntervalIntegrable (fun (t : ) => f (γ.toFun t) * (γ.toFun t - z)⁻¹ * deriv γ.toFun t) MeasureTheory.volume γ.a γ.b IntervalIntegrable (fun (t : ) => f z * ((γ.toFun t - z)⁻¹ * deriv γ.toFun t)) MeasureTheory.volume γ.a γ.b

                            Integrability of the Cauchy kernel f(γ(t)) · (γ(t) - z)⁻¹ · γ'(t) and the related constant-coefficient integrand, which follows from continuity of f on Ω, continuity of γ, and the fact that z ∉ γ.range ensures (γ(t) - z)⁻¹ stays bounded.

                            This is a standard consequence of the continuity hypotheses and the compactness of [a,b]. The full proof requires additional regularity of γ (piecewise differentiability).

                            theorem ClosedCurve.cauchy_integral_formula (Ω : Set ) ( : IsOpen Ω) (f : ) (hf : DifferentiableOn f Ω) (γ : ClosedCurve) ( : γ.IsHomologousToZero Ω) (z : ) (hz : z Ω) (hzγ : zγ.range) :
                            γ.windingNumber z * f z = (2 * Real.pi * Complex.I)⁻¹ * γ.contourIntegral fun (ζ : ) => f ζ * (ζ - z)⁻¹

                            Theorem 2, Lecture 13 (Cauchy's Integral Formula). Let f be holomorphic in an open set Ω, and let γ be a closed curve in Ω that is homologous to zero with respect to Ω. Then for any z ∈ Ω not on the curve γ, $$n(\gamma, z)\, f(z) = \frac{1}{2\pi i} \int_{\gamma} \frac{f(\zeta)}{\zeta - z}\, d\zeta.$$

                            The proof proceeds by defining the auxiliary function h(z) = (2πi)⁻¹ ∫_γ g(z,ζ) dζ where g is the difference quotient of f, showing h is entire (Claims 1 and 2) and vanishes at infinity, hence h ≡ 0 by Liouville's theorem (Claim 3). The CIF follows from h(z) = 0 by algebraic manipulation of the integral.

                            Axioms and auxiliary results used in the proof of Theorem 1 #

                            Additional topological facts are stated as axioms:

                            The theorem isSimplyConnected_complement_connected (complement in the Riemann sphere is connected) is derived from no_compact_open_complement_subset.

                            theorem ClosedCurve.exists_point_in_open_not_on_curve (Ω : Set ) ( : IsOpen Ω) (hΩne : Ω.Nonempty) (γ : ClosedCurve) ( : γ.LiesIn Ω) :
                            z₀Ω, z₀γ.range

                            In ℂ, if Ω is a nonempty open set and γ is a closed curve lying in Ω, then there exists a point in Ω not on γ. This holds because the continuous image of a compact interval [a, b] ⊆ ℝ in ℂ has empty interior (it is a one-dimensional curve in a two-dimensional space), so an open set cannot be entirely contained in the curve's image.

                            theorem ClosedCurve.cauchy_theorem (Ω : Set ) ( : IsOpen Ω) (f : ) (hf : DifferentiableOn f Ω) (γ : ClosedCurve) ( : γ.IsHomologousToZero Ω) :

                            Theorem 1, Lecture 13 (Cauchy's Theorem). If f is holomorphic on an open set Ω, then ∮_γ f(z) dz = 0 for every closed curve γ ⊂ Ω such that γ ∼ 0 with respect to Ω.

                            The proof follows the textbook: pick z₀ ∈ Ω \ γ and define F(ζ) = (ζ - z₀) · f(ζ). By the Cauchy Integral Formula (Theorem 2) applied to F at z₀, n(γ, z₀) · F(z₀) = (2πi)⁻¹ · ∮_γ F(ζ)/(ζ - z₀) dζ. Since F(z₀) = (z₀ - z₀) · f(z₀) = 0, the left-hand side vanishes. Since F(ζ)/(ζ - z₀) = f(ζ) on γ, the right-hand side is (2πi)⁻¹ · ∮_γ f(ζ) dζ. As 2πi ≠ 0, we conclude ∮_γ f(ζ) dζ = 0.

                            theorem ClosedCurve.cauchy_theorem_simply_connected (Ω : Set ) ( : IsOpen Ω) (hsc : IsSimplyConnected Ω) (f : ) (hf : DifferentiableOn f Ω) (γ : ClosedCurve) ( : γ.LiesIn Ω) :

                            Corollary of Theorem 1, Lecture 13 (Cauchy's Theorem for simply connected domains). In particular, if Ω is simply connected then ∮_γ f(z) dz = 0 for every closed γ ⊂ Ω, because every closed curve in a simply connected domain is homologous to zero.

                            theorem differentiableOn_cauchyPiecewise_omega (Ω : Set ) ( : IsOpen Ω) (f : ) (hf : DifferentiableOn f Ω) (γ : ClosedCurve) ( : γ.IsHomologousToZero Ω) :

                            Holomorphicity of h on Ω (part of the proof of Claim 2, Lecture 13).

                            On Ω, cauchyPiecewise equals (2πi)⁻¹ ∫_γ g(z, ζ) dζ. This is holomorphic because:

                            • For z₀ ∈ Ω \ γ, differentiation under the integral sign applies since z ↦ g(z, ζ) is holomorphic in z (Claim 1) and ζ varies over the compact set γ.range.
                            • For z₀ ∈ γ (with γ ⊂ Ω), the proof uses Morera's theorem: pick a disk D ⊂ Ω centered at z₀. For any closed curve δ ⊂ D, exchange the order of integration (Fubini): ∫_δ h(z) dz = (2πi)⁻¹ ∫_γ (∫_δ g(z, ζ) dz) dζ = 0, since z ↦ g(z, ζ) is holomorphic on D (by Claim 1) and Cauchy's theorem for disks gives ∫_δ g(z, ζ) dz = 0.

                            cauchyPiecewise agrees with cauchyTypeIntegral on complementDomain.

                            • For z ∉ Ω: both are definitionally (2πi)⁻¹ ∫_γ f(ζ)/(ζ-z) dζ.
                            • For z ∈ Ω with n(γ,z) = 0: both sides equal 0. The left side vanishes because ∫_γ dslope f z = 0 (by contourIntegral_dslope_eq_zero). The right side vanishes because (2πi)⁻¹ ∫_γ f(ζ)/(ζ-z) dζ = n(γ,z)·f(z) = 0 (by cauchy_integral_formula and the winding number condition).

                            Holomorphicity of h on Ω' (part of the proof of Claim 2, Lecture 13).

                            On Ω', cauchyPiecewise is holomorphic. The proof decomposes into:

                            Proof of Claim 2 #

                            theorem cauchyPiecewise_differentiable (Ω : Set ) ( : IsOpen Ω) (f : ) (hf : DifferentiableOn f Ω) (γ : ClosedCurve) ( : γ.IsHomologousToZero Ω) :

                            Claim 2, Lecture 13. The function h = cauchyPiecewise Ω f γ is holomorphic on all of .

                            The proof combines holomorphicity on the two open sets Ω and Ω' whose union is (by union_complementDomain_eq_univ), using DifferentiableOn.union_of_isOpen.

                            Claim 3: h ≡ 0 (Liouville) #

                            By Claim 2, h is entire. The key observation is that h(z) → 0 as |z| → ∞: for sufficiently large |z|, we have z ∈ Ω' (the exterior of γ where the winding number is zero), so h(z) = (2πi)⁻¹ ∫_γ f(ζ)/(ζ − z) dζ. Since f is bounded on the compact image γ.range and |ζ − z| → ∞ uniformly for ζ ∈ γ.range, the integral tends to 0.

                            A bounded entire function is constant (Liouville's theorem), and a constant that tends to 0 must be identically 0. Mathlib provides Differentiable.apply_eq_of_tendsto_cocompact which combines these two steps: if f is entire and f → c along cocompact ℂ, then f = c. Applying this with c = 0 yields h ≡ 0.

                            Boundedness at infinity: The auxiliary function h tends to 0 along the cocompact filter on (i.e., as |z| → ∞).

                            For large |z|, z lies in the exterior region Ω' where h(z) = (2πi)⁻¹ ∫_γ f(ζ)/(ζ − z) dζ. The integrand is bounded by M / (|z| − R) where M = sup |f| on γ and R = sup |ζ| for ζ ∈ γ.range, so |h(z)| ≤ M · L(γ) / (2π(|z| − R)) → 0.

                            The proof uses the identity principle for analytic functions: on Ω, cauchyPiecewise equals (2πi)⁻¹ ∫_γ dslope f z ζ dζ (since dividedDiff f (z, ζ) = dslope f z ζ). Both functions are entire, so by AnalyticOnNhd.eq_of_eventuallyEq they agree everywhere. The result then follows from contourIntegral_dslope_tendsto_zero.

                            theorem cauchyPiecewise_eq_zero (Ω : Set ) ( : IsOpen Ω) (f : ) (hf : DifferentiableOn f Ω) (γ : ClosedCurve) ( : γ.IsHomologousToZero Ω) (z : ) :
                            cauchyPiecewise Ω f γ z = 0

                            Claim 3 (Lecture 13): The auxiliary function h ≡ 0.

                            By Claim 2 (cauchyPiecewise_differentiable), h is entire (differentiable on all of ). By cauchyPiecewise_tendsto_zero_cocompact, h(z) → 0 as |z| → ∞. Liouville's theorem (Differentiable.apply_eq_of_tendsto_cocompact) then forces h to be the constant 0.

                            Combined with the definition of h on Ω, this gives the vanishing of the divided-difference integral (h_vanishes) and hence the Cauchy integral formula.

                            All dependencies are fully proved — no custom axioms are used in this proof chain.

                            Definition 2: Simply Connected Regions #

                            @[reducible, inline]

                            The Riemann sphere, i.e., the one-point compactification of . The point at infinity is (∞ : RiemannSphere), which is OnePoint.infty.

                            Instances For

                              The image of a set Ω ⊆ ℂ in the Riemann sphere ℂ∞ = OnePoint under the canonical embedding OnePoint.some : ℂ → OnePoint.

                              Instances For

                                Definition 2 (Lecture 13). A region Ω ⊆ ℂ (i.e., an open connected subset of ) is simply connected if its complement with respect to the extended plane (the Riemann sphere ℂ∞ = ℂ ∪ {∞}) is connected.

                                This is the classical complex-analysis definition. For open subsets of , it is equivalent to Mathlib's SimplyConnectedSpace (path-connected with trivial fundamental group).

                                Instances For

                                  The point at infinity in the Riemann sphere always belongs to the complement of any set Ω ⊆ ℂ embedded into the Riemann sphere.

                                  A simply connected region is open.

                                  A simply connected region is connected.

                                  The complement of a simply connected region in the Riemann sphere is connected.

                                  Cycle Combinations (ℤ-linear combinations of closed curves) #

                                  A cycle (or cycle combination) is a formal ℤ-linear combination of closed curves σ = Σ nᵢ γᵢ. The contour integral and winding number extend by linearity, and the notion of being homologous to zero generalizes naturally. Cauchy's theorem then extends to cycle combinations.

                                  While the textbook (Lecture 13) states Cauchy's theorem for a single closed curve, the extension to cycle combinations is standard and follows immediately by linearity when each curve is individually homologous to zero.

                                  A cycle combination (formal ℤ-linear combination of closed curves) σ = Σ nᵢ γᵢ.

                                  Instances For
                                    noncomputable def CycleCombination.contourIntegral (σ : CycleCombination) (f : ) :

                                    The contour integral of f along a cycle combination σ = Σ nᵢ γᵢ, defined as Σ nᵢ · ∮_{γᵢ} f(z) dz.

                                    Instances For
                                      noncomputable def CycleCombination.windingNumber (σ : CycleCombination) (w : ) :

                                      The winding number of a cycle combination σ = Σ nᵢ γᵢ about a point w, defined as Σ nᵢ · n(γᵢ, w).

                                      Instances For

                                        A cycle combination σ is homologous to zero in an open set Ω if every curve in σ lies in Ω and the total winding number Σ nᵢ · n(γᵢ, a) vanishes for all a ∉ Ω.

                                        Instances For

                                          Each individual curve in a cycle combination that is homologous to zero lies in Ω.

                                          theorem CycleCombination.cauchy_theorem_cycle (Ω : Set ) ( : IsOpen Ω) (f : ) (hf : DifferentiableOn f Ω) (σ : CycleCombination) ( : pσ.curves.zip σ.coeffs, p.1.IsHomologousToZero Ω) :

                                          Cauchy's Theorem for cycle combinations (individual homologous-to-zero version). If each curve γᵢ in a cycle combination σ = Σ nᵢ γᵢ is individually homologous to zero in an open set Ω and f is holomorphic on Ω, then σ.contourIntegral f = 0.

                                          This is a corollary of Cauchy's Theorem for single closed curves (Theorem 1, Lecture 13) and linearity. The full version where only the total winding number vanishes (not individual ones) requires extending the Dixon proof to cycles, which is not done in the textbook.