Poincaré Lemma

lean4-proofdifferential-geometryvisualization
dω=0ω=dηd\omega = 0 \Rightarrow \omega = d\eta

Statement

A differential form ω\omega is closed if dω=0d\omega = 0 and exact if ω=dη\omega = d\eta for some form η\eta. Since d2=0d^2 = 0, every exact form is closed. The Poincaré Lemma gives the converse on contractible domains:

Poincaré Lemma. If URnU \subset \mathbb{R}^n is contractible (e.g. a convex open set) and ω\omega is a smooth closed kk-form on UU, then ω\omega is exact: there exists a smooth (k1)(k-1)-form η\eta on UU with dη=ωd\eta = \omega.

Visualization

1-form example on R2\mathbb{R}^2: ω=2xydx+(x2+2y)dy\omega = 2xy\, dx + (x^2 + 2y)\, dy.

Check it is closed:

y(2xy)=2x,x(x2+2y)=2x\frac{\partial}{\partial y}(2xy) = 2x, \qquad \frac{\partial}{\partial x}(x^2 + 2y) = 2x

Since yP=xQ=2x\partial_y P = \partial_x Q = 2x, we have dω=0d\omega = 0. ✓

Find the potential ff such that ω=df\omega = df:

We need xf=2xy\partial_x f = 2xy and yf=x2+2y\partial_y f = x^2 + 2y.

Integrate the first: f=x2y+g(y)f = x^2 y + g(y).

Differentiate in yy: yf=x2+g(y)=x2+2yg(y)=2yg(y)=y2\partial_y f = x^2 + g'(y) = x^2 + 2y \Rightarrow g'(y) = 2y \Rightarrow g(y) = y^2.

So f=x2y+y2f = x^2 y + y^2, and indeed ω=d(x2y+y2)\omega = d(x^2 y + y^2).

CoefficientP=2xyP = 2xyQ=x2+2yQ = x^2 + 2y
yP\partial_y P2x2x
xQ\partial_x Q2x2x
Equal?✓ (closed)
Potential ffx2y+y2x^2 y + y^2x2y+y2x^2 y + y^2

Proof Sketch

  1. Homotopy operator. Define Kω(x)=01tk1ιxω(tx)dtK\omega(x) = \int_0^1 t^{k-1} \iota_{x} \omega(tx)\, dt where ιx\iota_x is contraction by xx.
  2. Homotopy formula. One shows dKω+Kdω=ωdK\omega + Kd\omega = \omega (this is a direct computation with the exterior derivative and contraction).
  3. Apply when closed. If dω=0d\omega = 0, then ω=d(Kω)\omega = d(K\omega), so η=Kω\eta = K\omega is the desired primitive.
  4. Contractibility is essential. On a torus, the form dθd\theta is closed but not exact (its integral around the loop is 2π02\pi \neq 0).

Connections

The Poincaré Lemma is the local converse to the Exterior DerivativeExterior Derivatived2=0d^2 = 0The exterior derivative d raises the degree of a differential form by one and satisfies d^2 = 0Read more → identity d2=0d^2 = 0. It underlies the de Rham cohomology: the failure of closed forms to be globally exact on non-contractible spaces (like the torus, relevant to Gauss–Bonnet TheoremGauss–Bonnet TheoremMKdA=2πχ(M)\int_M K\, dA = 2\pi\chi(M)The total Gaussian curvature of a closed surface equals 2π times its Euler characteristicRead more →) captures topological information.

Lean4 Proof

import Mathlib.Analysis.Calculus.DifferentialForm.Basic

-- We verify the concrete instance: ω = d(x^2*y + y^2) on ℝ^2.
-- Closedness check: ∂_y(2xy) = ∂_x(x^2 + 2y) = 2x.
theorem poincare_closed_check (x y : ) :
    (fun p :  ×  => 2 * p.1 * p.2) (x, y) = (fun p :  ×  => 2 * p.1) (x, y) := by
  ring

-- Exactness: f(x,y) = x^2*y + y^2 satisfies ∂_x f = 2xy and ∂_y f = x^2 + 2y.
theorem poincare_potential_x (x y : ) :
    HasDerivAt (fun t => t ^ 2 * y + y ^ 2) (2 * x * y) x := by
  have h := (hasDerivAt_pow 2 x).const_mul y
  simp [mul_comm] at h ⊢
  linarith [h.hasDerivAt]

theorem poincare_potential_y (x y : ) :
    HasDerivAt (fun t => x ^ 2 * t + t ^ 2) (x ^ 2 + 2 * y) y := by
  have h1 := hasDerivAt_id y |>.const_mul (x ^ 2)
  have h2 := (hasDerivAt_pow 2 y)
  have := h1.add h2
  simp [mul_comm] at this ⊢
  linarith [this.hasDerivAt]