Curvature in local coordinates; Minkowski space is flat #
Mathlib (v4.35) has a Levi-Civita connection for Riemannian (positive definite) metrics, but no curvature tensor and nothing for indefinite metrics. We therefore work in local coordinates, which is how curvature is computed in every GR textbook:
- a coordinate metric is a matrix-valued function
g : ℝⁿ → Matrix (Fin n) (Fin n) ℝ(the componentsg_{μν}(x)in a chart); christoffel,riemann,ricci,scalarCurvatureare the standard coordinate formulas (Carroll, Spacetime and Geometry, eqs. 3.27, 3.67, 3.89, 3.91), with partial derivatives given by Mathlib's Fréchet derivativefderiv.LorentzianMetric.coordMetric g x₀extracts the coordinate components of a manifold-levelLorentzianMetricin the preferred chart ofMatx₀.
What is not proved here: that these coordinate expressions transform as tensors under a change
of chart. For Minkowski space this does not matter for the flatness statement below, because the
model-space atlas consists of a single chart (the identity), so "the Riemann tensor vanishes in
every chart of the atlas" is literally what minkowski_flat states.
Christoffel symbols of the second kind
Γ^i_{jk} = ½ gⁱˡ (∂_j g_{lk} + ∂_k g_{lj} − ∂_l g_{jk}).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Riemann tensor R^ρ_{σμν} = ∂_μ Γ^ρ_{νσ} − ∂_ν Γ^ρ_{μσ} + Γ^ρ_{μλ}Γ^λ_{νσ} − Γ^ρ_{νλ}Γ^λ_{μσ}.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Coordinate metrics on an open domain #
Lean is a total language: (g x)⁻¹ is the zero matrix when g x is singular, a / 0 = 0, and
fderiv is 0 wherever a function is not differentiable. Curvature formulas therefore return
junk values (not errors) on degenerate or non-smooth input, and a statement like "the Riemann
tensor vanishes" can be true for meaningless reasons (e.g. for g = 0).
All curvature predicates below therefore require IsCoordMetric g U: U open, and on U the
matrix g is symmetric, invertible, with smooth (C^∞) components. Pure formula identities (e.g.
antisymmetry of riemann in its last two indices) are stated without these hypotheses because they
hold for every input.
g is a coordinate metric on the open set U: smooth, symmetric and invertible on U.
(Signature is not part of this predicate; Lorentzian signature is imposed separately where needed.)
- isOpen : IsOpen U
Instances For
g has Lorentzian signature on U: a coordinate metric on U that at every point is
congruent to η (g x = Pᵀ η P with P invertible) - the coordinate form of "admits a Lorentz
frame".
Equations
Instances For
g is flat on U: a coordinate metric on U whose Riemann tensor vanishes on U.
Equations
- Lightlike.IsFlatOn g U = (Lightlike.IsCoordMetric g U ∧ ∀ x ∈ U, ∀ (ρ σ μ ν : Fin n), Lightlike.riemann g ρ σ μ ν x = 0)
Instances For
A diagonal matrix-valued function with smooth, nonvanishing entries on an open U is a
coordinate metric on U.
Constant metrics are flat #
Coordinate components of a manifold-level Lorentzian metric #
The components g_{ij}(y) = g(∂ᵢ, ∂ⱼ) of a Lorentzian metric in the preferred chart of M
at x₀, where ∂ᵢ is the coordinate vector field: the image of the standard basis vector eᵢ
under the derivative of the inverse chart. Defined for all y : ℝⁿ; meaningful on the chart's
target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
In the (only) chart of Minkowski space, the metric components are the constant matrix η.
Minkowski space's chart components form a coordinate metric on all of ℝⁿ.
Minkowski space is flat: in its chart, η is a coordinate metric on all of ℝⁿ and its
Riemann tensor vanishes everywhere.