Documentation

Lightlike.Spacetime.Curvature

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:

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.

noncomputable def Lightlike.pd {n : ℕ} (k : Fin n) (f : (Fin n → ℝ) → ℝ) (x : Fin n → ℝ) :

Partial derivative ∂_k f (x) of a scalar function on ℝⁿ.

Equations
Instances For
    noncomputable def Lightlike.christoffel {n : ℕ} (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (i j k : Fin n) (x : Fin n → ℝ) :

    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
      noncomputable def Lightlike.riemann {n : ℕ} (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (ρ σ μ ν : Fin n) (x : Fin n → ℝ) :

      Riemann tensor R^ρ_{σμν} = ∂_μ Γ^ρ_{νσ} − ∂_ν Γ^ρ_{μσ} + Γ^ρ_{μλ}Γ^λ_{νσ} − Γ^ρ_{νλ}Γ^λ_{μσ}.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        noncomputable def Lightlike.ricci {n : ℕ} (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (σ ν : Fin n) (x : Fin n → ℝ) :

        Ricci tensor R_{σν} = R^ρ_{σρν}.

        Equations
        Instances For
          noncomputable def Lightlike.scalarCurvature {n : ℕ} (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (x : Fin n → ℝ) :

          Scalar curvature R = g^{σν} R_{σν}.

          Equations
          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.

            structure Lightlike.IsCoordMetric {n : ℕ} (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (U : Set (Fin n → ℝ)) :

            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.)

            Instances For
              def Lightlike.IsLorentzianCoordMetric {n : ℕ} (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (U : Set (Fin n → ℝ)) :

              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
                def Lightlike.IsFlatOn {n : ℕ} (g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ) (U : Set (Fin n → ℝ)) :

                g is flat on U: a coordinate metric on U whose Riemann tensor vanishes on U.

                Equations
                Instances For
                  theorem Lightlike.isCoordMetric_diagonal {n : ℕ} (d : (Fin n → ℝ) → Fin n → ℝ) {U : Set (Fin n → ℝ)} (hU : IsOpen U) (hd : ∀ (i : Fin n), ContDiffOn ℝ (↑⊤) (fun (y : Fin n → ℝ) => d y i) U) (hne : ∀ x ∈ U, ∀ (i : Fin n), d x i ≠ 0) :
                  IsCoordMetric (fun (y : Fin n → ℝ) => Matrix.diagonal (d y)) U

                  A diagonal matrix-valued function with smooth, nonvanishing entries on an open U is a coordinate metric on U.

                  Constant metrics are flat #

                  theorem Lightlike.pd_const {n : ℕ} (k : Fin n) (c : ℝ) (x : Fin n → ℝ) :
                  pd k (fun (x : Fin n → ℝ) => c) x = 0
                  theorem Lightlike.christoffel_const {n : ℕ} (G : Matrix (Fin n) (Fin n) ℝ) (i j k : Fin n) :
                  christoffel (fun (x : Fin n → ℝ) => G) i j k = fun (x : Fin n → ℝ) => 0

                  The Christoffel symbols of a constant metric vanish.

                  theorem Lightlike.riemann_const {n : ℕ} (G : Matrix (Fin n) (Fin n) ℝ) (ρ σ μ ν : Fin n) (x : Fin n → ℝ) :
                  riemann (fun (x : Fin n → ℝ) => G) ρ σ μ ν x = 0

                  The Riemann tensor of a constant matrix vanishes. This is a pure formula fact and holds even for degenerate G - which is exactly why IsFlatOn also demands IsCoordMetric.

                  theorem Lightlike.isCoordMetric_const {n : ℕ} {G : Matrix (Fin n) (Fin n) ℝ} (hsym : G.transpose = G) (hdet : IsUnit G.det) :
                  IsCoordMetric (fun (x : Fin n → ℝ) => G) Set.univ

                  A constant symmetric invertible matrix is a coordinate metric on all of ℝⁿ.

                  theorem Lightlike.isFlatOn_const {n : ℕ} {G : Matrix (Fin n) (Fin n) ℝ} (hsym : G.transpose = G) (hdet : IsUnit G.det) :
                  IsFlatOn (fun (x : Fin n → ℝ) => G) Set.univ

                  Any constant symmetric invertible metric is flat on ℝⁿ.

                  theorem Lightlike.ricci_eq_zero_of_riemann_eq_zero {n : ℕ} {g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ} {x : Fin n → ℝ} (h : ∀ (ρ σ μ ν : Fin n), riemann g ρ σ μ ν x = 0) (σ ν : Fin n) :
                  ricci g σ ν x = 0

                  If the Riemann tensor vanishes at x, so does the Ricci tensor.

                  theorem Lightlike.scalarCurvature_eq_zero_of_riemann_eq_zero {n : ℕ} {g : (Fin n → ℝ) → Matrix (Fin n) (Fin n) ℝ} {x : Fin n → ℝ} (h : ∀ (ρ σ μ ν : Fin n), riemann g ρ σ μ ν x = 0) :

                  If the Riemann tensor vanishes at x, so does the scalar curvature.

                  Coordinate components of a manifold-level Lorentzian metric #

                  noncomputable def Lightlike.LorentzianMetric.coordMetric {n : ℕ} {M : Type u_1} [TopologicalSpace M] [ChartedSpace (Fin n → ℝ) M] [IsManifold (modelWithCornersSelf ℝ (Fin n → ℝ)) (↑⊤) M] (g : LorentzianMetric (modelWithCornersSelf ℝ (Fin n → ℝ)) M n) (x₀ : M) (y : Fin n → ℝ) :
                  Matrix (Fin n) (Fin n) ℝ

                  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
                    theorem Lightlike.minkowski_coordMetric {n : ℕ} (x₀ : Fin n → ℝ) :
                    (minkowskiMetric n).coordMetric x₀ = fun (x : Fin n → ℝ) => eta n

                    In the (only) chart of Minkowski space, the metric components are the constant matrix η.

                    det η is a unit (η² = 1).

                    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.