Morera's Theorem

lean4-proofcomplex-analysisvisualization
Rf(z)dz=0  R    f holomorphic\oint_{\partial R} f(z)\,dz = 0 \;\forall R \implies f \text{ holomorphic}

Statement

Morera's Theorem is the converse of Cauchy's theorem: Let ff be a continuous function on an open disk B(c,r)B(c, r). If

Rf(z)dz=0\int_{\partial R} f(z)\,dz = 0

for every closed rectangle RR whose interior is contained in B(c,r)B(c, r), then ff is holomorphic on B(c,r)B(c, r).

Equivalently: a continuous function that is conservative (zero integral on rectangles) is automatically differentiable.

Visualization

Verify for f(z)=zf(z) = z on any rectangle.

Take the rectangle with corners 0,1,1+i,i0, 1, 1+i, i (traversed counterclockwise):

  i -------- 1+i
  |            |
  |            |
  0 -------- 1

Parameterize each side:

SidePathIntegral
Bottom: 010 \to 1z=tz = t, dz=dtdz = dt01tdt=1/2\int_0^1 t\,dt = 1/2
Right: 11+i1 \to 1+iz=1+itz = 1+it, dz=idtdz = i\,dt01(1+it)idt=i1/2\int_0^1 (1+it)\,i\,dt = i - 1/2
Top: 1+ii1+i \to iz=(1t)+iz = (1-t)+i, dz=dtdz = -dt01((1t)+i)(dt)=1/2+i(1)...\int_0^1 ((1-t)+i)(-dt) = -1/2 + i(-1)...
Left: i0i \to 0z=i(1t)z = i(1-t), dz=idtdz = -i\,dt01i(1t)(i)dt=1/21/2\int_0^1 i(1-t)(-i)\,dt = 1/2 - 1/2

Summing: 1/2+(i1/2)+(1/2i)+(1/2+1/2)=01/2 + (i - 1/2) + (-1/2 - i) + (-1/2 + 1/2) = 0. The total vanishes, consistent with f(z)=zf(z) = z being holomorphic.

A non-holomorphic function f(z)=zˉf(z) = \bar{z} gives zˉdz=2iArea(R)0\oint \bar{z}\,dz = -2i \cdot \text{Area}(R) \ne 0.

Proof Sketch

  1. Define F(z)=czf(ζ)dζF(z) = \int_c^z f(\zeta)\,d\zeta along a rectilinear path (horizontal then vertical) from cc to zz.
  2. The vanishing rectangle integrals ensure FF is well-defined (path-independent within the disk).
  3. Compute F(z)=f(z)F'(z) = f(z) directly: the difference quotient [F(z+h)F(z)]/hf(z)[F(z+h) - F(z)]/h \to f(z) by continuity of ff.
  4. So FF is holomorphic, and the derivative of a holomorphic function is holomorphic, making f=Ff = F' holomorphic.

Connections

Morera's theorem pairs with the Cauchy Integral FormulaCauchy Integral Formulaf(w)=12πizc=Rf(z)zwdzf(w) = \frac{1}{2\pi i}\oint_{|z-c|=R} \frac{f(z)}{z - w}\,dzA holomorphic function's value at any interior point is determined by its values on the boundary circle.Read more → as its converse: Cauchy says holomorphic \Rightarrow zero integrals; Morera says zero integrals \Rightarrow holomorphic. It is also used in Liouville's TheoremLiouville's Theoremf:CC entire,  fC    fconstf : \mathbb{C} \to \mathbb{C} \text{ entire},\; |f| \leq C \implies f \equiv \text{const}A bounded entire function on ℂ must be constant — complex differentiability is far more rigid than real differentiabilityRead more → proofs via normal families: a locally uniform limit of holomorphic functions passes the Morera test and hence is holomorphic.

Lean4 Proof

import Mathlib.Analysis.Complex.HasPrimitives

open Complex

/-- **Morera's Theorem**: a continuous function on a disk whose integrals on
    rectangles all vanish is holomorphic (has a primitive, hence is differentiable).
    Uses `Complex.IsConservativeOn.isExactOn_ball` from Mathlib. -/
theorem morera_theorem {c : } {r : } {f :   }
    (hcont : ContinuousOn f (Metric.ball c r))
    (hcons : IsConservativeOn f (Metric.ball c r)) :
     F :   ,  z  Metric.ball c r, HasDerivAt F (f z) z :=
  (hcons.isExactOn_ball hcont).hasDerivAt