Physicslib4.Geometry.PseudoRiemannian.LeviCivita

The Levi-Civita connection of a pseudo-Riemannian metric #

This file adapts Mathlib's Levi-Civita connection of a Riemannian manifold (Mathlib/Geometry/Manifold/VectorBundle/CovariantDerivative/LeviCivita.lean) to a pseudo-Riemannian metric g, which need not be positive definite. Mathlib's covariant derivatives (CovariantDerivative) and torsion (CovariantDerivative.torsion) are used as they are; the inner product of Mathlib's IsMetricCompatible is replaced by g.

Main definitions #

Main results #

Blueprint reference: def:metric-compatible-connection, def:levi-civita-connection, lmm:koszul-formula, thrm:levi-civita-exists-unique.

A covariant derivative ∇ on the tangent bundle is compatible with the metric g: the Leibniz rule X(g(σ, τ)) = g(∇_X σ, τ) + g(σ, ∇_X τ) holds.

The left side is the derivative of the function y ↦ g_y(σ(y), τ(y)) at x in the direction X(x); the identity is asked at every point x where X, σ and τ are differentiable. In index notation it is ∇μ g(νρ) = 0: parallel transport preserves inner products, and so the causal type of vectors.

Implementation note: this is Mathlib's condition CovariantDerivative.isMetricCompatible_iff with g in place of the inner product. The covariant derivative is Mathlib's CovariantDerivative, a map sending a vector field Y to the field of linear maps (∇Y)_x : TₓM → TₓM, with ∇_X Y at x given by (∇Y)_x(X(x)).

Blueprint: def:metric-compatible-connection

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    A covariant derivative is a Levi-Civita connection of the metric g: it is torsion-free and compatible with g.

    Torsion-free means ∇X Y - ∇Y X = [X, Y] for vector fields differentiable at the point, so the Christoffel symbols are symmetric, Γ^ρ(μν) = Γ^ρ(νμ). Every pseudo-Riemannian metric has a Levi-Civita connection (PseudoRiemannianMetric.exists_isLeviCivitaFor), and two of them agree on differentiable vector fields (IsLeviCivitaFor.uniqueness); the Koszul formula expresses it through g (IsLeviCivitaFor.koszul).

    Implementation note: the structure mirrors Mathlib's CovariantDerivative.IsLeviCivitaConnection, with g in place of the inner product. Uniqueness holds only on differentiable vector fields, since a covariant derivative is unconstrained on the others.

    Blueprint: def:levi-civita-connection

    Instances For
      theorem Physicslib4.Geometry.CovariantDerivative.IsLeviCivitaFor.koszul {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I (↑⊤) M] [FiniteDimensional ℝ E] {g : PseudoRiemannianMetric I M} {cov : CovariantDerivative I E (TangentSpace I)} (h : IsLeviCivitaFor g cov) {x : M} {X Y Z : (x : M) → TangentSpace I x} (hX : (MDiffAt fun (x : M) => ⟨x, X x⟩) x) (hY : (MDiffAt fun (x : M) => ⟨x, Y x⟩) x) (hZ : (MDiffAt fun (x : M) => ⟨x, Z x⟩) x) :
      2 * ((g.val x) ((↑cov Y x) (X x))) (Z x) = (((have this := ((mfderiv% fun (y : M) => ((g.val y) (Y y)) (Z y)) x) (X x); this) + have this := ((mfderiv% fun (y : M) => ((g.val y) (Z y)) (X y)) x) (Y x); this) - have this := ((mfderiv% fun (y : M) => ((g.val y) (X y)) (Y y)) x) (Z x); this) - ((g.val x) (Y x)) (VectorField.mlieBracket I X Z x) - ((g.val x) (Z x)) (VectorField.mlieBracket I Y X x) + ((g.val x) (X x)) (VectorField.mlieBracket I Z Y x)

      The Koszul formula. For a Levi-Civita connection of g and vector fields X, Y, Z differentiable at x, 2 g(∇_X Y, Z) is expressed through derivatives of g and Lie brackets alone, without reference to ∇. This is Mathlib's IsLeviCivitaConnection.apply_eq multiplied by 2, with g in place of the inner product; the blueprint's form of the formula is the same statement after mlieBracket_swap and the symmetry of g.

      Blueprint reference: lmm:koszul-formula.

      theorem Physicslib4.Geometry.CovariantDerivative.IsLeviCivitaFor.uniqueness {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I (↑⊤) M] [FiniteDimensional ℝ E] {g : PseudoRiemannianMetric I M} {cov cov' : CovariantDerivative I E (TangentSpace I)} (hcov : IsLeviCivitaFor g cov) (hcov' : IsLeviCivitaFor g cov') {x : M} {Y : (x : M) → TangentSpace I x} (hY : (MDiffAt fun (x : M) => ⟨x, Y x⟩) x) (X₀ : TangentSpace I x) :
      (↑cov Y x) X₀ = (↑cov' Y x) X₀

      Uniqueness of the Levi-Civita connection. Two Levi-Civita connections of g agree on every vector field differentiable at x. (Covariant derivatives are unconstrained on non-differentiable vector fields, as in Mathlib's IsLeviCivitaConnection.uniqueness.)

      Blueprint reference: thrm:levi-civita-exists-unique.

      Existence #

      The construction follows Mathlib's CovariantDerivative.leviCivitaConnection: the right-hand side of the Koszul formula (koszulAux) is tensorial in X and Z, hence a bilinear form at each point, and the musical isomorphism flatEquiv turns it into the desired ∇_X Y.

      noncomputable def Physicslib4.Geometry.PseudoRiemannianMetric.koszulAux {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I (↑⊤) M] (g : PseudoRiemannianMetric I M) (X Y Z : (x : M) → TangentSpace I x) (x : M) :

      The right-hand side of the Koszul formula, divided by 2: for the Levi-Civita connection this is g(∇_X Y, Z).

      Blueprint reference: lmm:koszul-expression-tensorial.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Physicslib4.Geometry.PseudoRiemannianMetric.mdifferentiableAt_val_apply {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I (↑⊤) M] (g : PseudoRiemannianMetric I M) {Y Z : (x : M) → TangentSpace I x} {x : M} (hY : (MDiffAt fun (x : M) => ⟨x, Y x⟩) x) (hZ : (MDiffAt fun (x : M) => ⟨x, Z x⟩) x) :
        (MDiffAt fun (y : M) => ((g.val y) (Y y)) (Z y)) x

        y ↦ g_y(Y y, Z y) is differentiable at x if Y and Z are.

        theorem Physicslib4.Geometry.PseudoRiemannianMetric.mfderiv_apply_eq_mvfderiv {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] (F : M → ℝ) {x : M} (v : TangentSpace I x) :
        (have this := (mfderiv% F x) v; this) = (d% F x) v

        The real-valued mfderiv terms of koszulAux are mvfderiv terms.

        theorem Physicslib4.Geometry.PseudoRiemannianMetric.tensorialAt_koszulAux₁ {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I (↑⊤) M] [FiniteDimensional ℝ E] (g : PseudoRiemannianMetric I M) {Y Z : (x : M) → TangentSpace I x} (x : M) (hY : (MDiffAt fun (x : M) => ⟨x, Y x⟩) x) (hZ : (MDiffAt fun (x : M) => ⟨x, Z x⟩) x) :
        TensorialAt I E (fun (x_1 : (x : M) → TangentSpace I x) => g.koszulAux x_1 Y Z x) x

        koszulAux is tensorial in its first argument.

        Blueprint reference: lmm:koszul-expression-tensorial.

        theorem Physicslib4.Geometry.PseudoRiemannianMetric.tensorialAt_koszulAux₃ {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I (↑⊤) M] [FiniteDimensional ℝ E] (g : PseudoRiemannianMetric I M) {X Y : (x : M) → TangentSpace I x} (x : M) (hY : (MDiffAt fun (x : M) => ⟨x, Y x⟩) x) (hX : (MDiffAt fun (x : M) => ⟨x, X x⟩) x) :
        TensorialAt I E (fun (x_1 : (x : M) → TangentSpace I x) => g.koszulAux X Y x_1 x) x

        koszulAux is tensorial in its third argument.

        Blueprint reference: lmm:koszul-expression-tensorial.

        noncomputable def Physicslib4.Geometry.PseudoRiemannianMetric.leviCivitaAuxOfMDiffAt {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I (↑⊤) M] [FiniteDimensional ℝ E] (g : PseudoRiemannianMetric I M) {Y : (x : M) → TangentSpace I x} {x : M} (hY : (MDiffAt fun (x : M) => ⟨x, Y x⟩) x) :

        The candidate ∇ Y at x for a vector field Y differentiable at x.

        Equations
        Instances For

          The function underlying the Levi-Civita connection of g (zero on vector fields that are not differentiable at the point).

          Equations
          Instances For
            theorem Physicslib4.Geometry.PseudoRiemannianMetric.leviCivitaAux_apply_val {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I (↑⊤) M] [FiniteDimensional ℝ E] (g : PseudoRiemannianMetric I M) {X Y Z : (x : M) → TangentSpace I x} {x : M} (hX : (MDiffAt fun (x : M) => ⟨x, X x⟩) x) (hY : (MDiffAt fun (x : M) => ⟨x, Y x⟩) x) (hZ : (MDiffAt fun (x : M) => ⟨x, Z x⟩) x) :
            ((g.val x) ((g.leviCivitaAux Y x) (X x))) (Z x) = g.koszulAux X Y Z x

            g(∇_X Y, Z) = koszulAux X Y Z for the constructed connection.

            theorem Physicslib4.Geometry.PseudoRiemannianMetric.eq_of_forall_val_apply_eq {E : Type u_1} [NormedAddCommGroup E] [NormedSpace ℝ E] {H : Type u_2} [TopologicalSpace H] {I : ModelWithCorners ℝ E H} {M : Type u_3} [TopologicalSpace M] [ChartedSpace H M] [IsManifold I (↑⊤) M] (g : PseudoRiemannianMetric I M) {x : M} {v w : TangentSpace I x} (h : ∀ (Z : (x : M) → TangentSpace I x), (MDiffAt fun (x : M) => ⟨x, Z x⟩) x → ((g.val x) v) (Z x) = ((g.val x) w) (Z x)) :
            v = w

            A tangent vector is determined by its g-pairings with vector fields differentiable at the point.

            The constructed operator is a covariant derivative.

            Blueprint reference: lmm:koszul-connection-is-covariant-derivative.

            The Koszul connection of g: the covariant derivative defined by the Koszul formula.

            g(∇_X Y, Z) is set equal to the right-hand side of the Koszul formula (koszulAux), which is tensorial in X and Z, and the musical isomorphism flatEquiv solves for ∇_X Y. It is compatible with g and torsion-free (isMetricCompatibleWith_koszulConnection, torsion_koszulConnection_eq_zero), which proves that a Levi-Civita connection exists.

            Equations
            Instances For

              The Koszul connection is compatible with g.

              Blueprint reference: lmm:koszul-connection-is-levi-civita.

              The Koszul connection is torsion-free.

              Blueprint reference: lmm:koszul-connection-is-levi-civita.

              Existence of the Levi-Civita connection. Every pseudo-Riemannian metric has a Levi-Civita connection.

              Blueprint reference: thrm:levi-civita-exists-unique.

              The Levi-Civita connection ∇ of the metric g.

              It is torsion-free and compatible with g (isLeviCivitaFor_leviCivita), and any other connection with these properties agrees with it on differentiable vector fields (CovariantDerivative.IsLeviCivitaFor.uniqueness). In coordinates its Christoffel symbols are Γ^ρ_(μν) = ½ g^(ρσ)(∂μ g(σν) + ∂ν g(σμ) - ∂σ g(μν)). Geodesics of a spacetime are defined with it (Spacetime.IsGeodesic). For a constant metric on a vector space, as in Minkowski spacetime, it is the ordinary directional derivative (leviCivita_apply_eq_fderiv).

              Implementation note: the connection is a choice (Exists.choose) from exists_isLeviCivitaFor, so its values on non-differentiable vector fields are unspecified; statements about it use only differentiable fields.

              Blueprint: thrm:levi-civita-exists-unique

              Equations
              Instances For