Riemannian Metric

lean4-proofdifferential-geometryvisualization
g=gijdxidxj,gij=gji,g(v,v)>0g = g_{ij}\, dx^i \otimes dx^j,\quad g_{ij} = g_{ji},\quad g(v,v) > 0

Statement

A Riemannian metric on a smooth manifold MM is a smooth assignment gp:TpM×TpMRg_p : T_p M \times T_p M \to \mathbb{R} at each point pp satisfying:

  1. Symmetry: gp(u,v)=gp(v,u)g_p(u, v) = g_p(v, u)
  2. Bilinearity: gpg_p is bilinear in uu and vv
  3. Positive definiteness: gp(v,v)0g_p(v, v) \geq 0 with equality iff v=0v = 0

In local coordinates (x1,,xn)(x^1, \dots, x^n), the metric is written as g=gijdxidxjg = g_{ij}\, dx^i \otimes dx^j where gij=g(i,j)g_{ij} = g(\partial_i, \partial_j).

Visualization

Standard metric on Rn\mathbb{R}^n: gij=δijg_{ij} = \delta_{ij} (Kronecker delta).

g(u,v)=i=1nuivi=uvg(u, v) = \sum_{i=1}^n u_i v_i = u \cdot v
(u,v)(u, v)g(u,v)g(u,v)g(v,u)g(v,u)g(v,v)0g(v,v) \geq 0?
(1,0),(0,1)(1,0), (0,1)0000g((0,1),(0,1))=10g((0,1),(0,1)) = 1 \geq 0
(3,4),(3,4)(3,4), (3,4)2525252525025 \geq 0

Spherical coordinates on R2{0}\mathbb{R}^2 \setminus \{0\}: (r,θ)(r, \theta), the induced metric is:

g=dr2+r2dθ2g = dr^2 + r^2\, d\theta^2

so grr=1g_{rr} = 1, gθθ=r2g_{\theta\theta} = r^2, grθ=0g_{r\theta} = 0. The factor r2r^2 encodes that angular displacements at radius rr have arc-length rdθr\, d\theta.

r = 2  |     arc = r·Δθ = 2·0.5 = 1.0
       |   /
r = 1  |  /  arc = r·Δθ = 1·0.5 = 0.5
       | /
       O ---
          Δθ = 0.5 rad

The metric captures that the same angular gap subtends a longer arc at larger rr.

Proof Sketch

  1. Existence. On any smooth manifold, a partition of unity argument patches together local inner products to give a global metric.
  2. Symmetry and bilinearity are immediate from the definition of the inner product at each tangent space.
  3. Positive definiteness at each pp is the inner-product axiom: gp(v,v)=vp20g_p(v, v) = \|v\|_p^2 \geq 0, with equality iff v=0v = 0.
  4. Smoothness. The functions gij(x)g_{ij}(x) varying with xx must be smooth; this is guaranteed by choosing gg as a smooth section of TMTMT^*M \otimes T^*M.

Connections

The Riemannian metric is the foundation for computing Gaussian curvature KK and integrating it in the 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 →. It also defines the notion of geodesic length used in Stokes' Theorem (general)Stokes' Theorem (general)Mdω=Mω\int_M d\omega = \int_{\partial M} \omegaThe integral of a differential form over the boundary equals the integral of its exterior derivative over the interiorRead more → when integrating over manifolds with curved boundaries.

Lean4 Proof

import Mathlib.Analysis.InnerProductSpace.Basic

-- The standard inner product on ℝ^n is a Riemannian metric.
-- We verify positive semi-definiteness: ⟪v, v⟫ ≥ 0 for all v : ℝ^n.
theorem euclidean_metric_nonneg (n : ) (v : EuclideanSpace  (Fin n)) :
    0  ⟪v, v⟫_ℝ :=
  real_inner_self_nonneg

-- Positive definiteness: ⟪v, v⟫ = 0 ↔ v = 0.
theorem euclidean_metric_pos_def (n : ) (v : EuclideanSpace  (Fin n)) :
    ⟪v, v⟫_ℝ = 0  v = 0 := by
  rw [real_inner_self_eq_norm_sq, sq_eq_zero_iff, norm_eq_zero]