Covariant derivatives of fields, and unit timelike geodesic congruences
Definitionnatario_gr_congruenceCovariant derivatives of vector fields, one-forms and covariant 2-tensors in the coordinate framework, and the kinematics of a congruence of unit timelike geodesics: its second fundamental form, spatial metric, expansion, shear and vorticity.
import Definitions.Def_natario_gr_curves
open scoped ContDiff
/-!
# Covariant derivatives of fields, and timelike geodesic congruences
Continuation of the coordinate framework for J. Natário, *Mathematical Relativity*
(arXiv:2003.02855), Chapter 4, §4.1.
-/
namespace MathematicalRelativity
namespace Spacetime
variable (m : Spacetime)
/-- `∇_b V^a`, the covariant derivative of a vector field. -/
noncomputable def covVec (V : Pt → Pt) (a b : Fin 4) (x : Pt) : ℝ :=
pd (fun y => V y a) b x + ∑ c, m.christoffel a b c x * V x c
/-- `∇_u V_v`, the covariant derivative of the one-form metrically dual to `V`. -/
noncomputable def covCov (V : Pt → Pt) (u v : Fin 4) (x : Pt) : ℝ :=
pd (fun y => m.lower y (V y) v) u x - ∑ a, m.christoffel a u v x * m.lower x (V x) a
/-- `∇_a T_{uv}`, the covariant derivative of a covariant 2-tensor field. -/
noncomputable def covT2 (T : Fin 4 → Fin 4 → Pt → ℝ) (a u v : Fin 4) (x : Pt) : ℝ :=
pd (T u v) a x - ∑ b, m.christoffel b a u x * T b v x
- ∑ b, m.christoffel b a v x * T u b x
/-- The divergence `∇_a V^a` of a vector field. -/
noncomputable def divergence (V : Pt → Pt) (x : Pt) : ℝ := ∑ a, m.covVec V a a x
end Spacetime
/-- A unit timelike geodesic congruence: a smooth, future-pointing, unit timelike vector
field whose integral curves are geodesics (Natário, §4.1). -/
structure Congruence (m : Spacetime) where
X : Pt → Pt
smooth : ∀ a, ContDiff ℝ ∞ (fun x => X x a)
unit : ∀ x, m.ip x (X x) (X x) = -1
future : ∀ x, Spacetime.IsFuture (X x)
geodesic : ∀ x a, ∑ b, m.covVec X a b x * X x b = 0
namespace Congruence
variable {m : Spacetime}
/-- The second fundamental form `B_{μν} = ∇_ν X_μ` of the congruence (Natário, §4.1). -/
noncomputable def B (K : Congruence m) (u v : Fin 4) (x : Pt) : ℝ := m.covCov K.X v u x
/-- The spatial metric `h_{μν} = g_{μν} + X_μ X_ν` (Natário, Def. 4.1.4). -/
noncomputable def h (K : Congruence m) (u v : Fin 4) (x : Pt) : ℝ :=
m.g x u v + m.lower x (K.X x) u * m.lower x (K.X x) v
/-- The expansion `θ = g^{μν} B_{μν}` (Natário, Def. 4.1.4). -/
noncomputable def expansion (K : Congruence m) (x : Pt) : ℝ :=
∑ u, ∑ v, m.ginv x u v * K.B u v x
/-- The shear `σ_{μν} = B_{(μν)} - (θ/3) h_{μν}` (Natário, Def. 4.1.4). -/
noncomputable def shear (K : Congruence m) (u v : Fin 4) (x : Pt) : ℝ :=
(1/2 : ℝ) * (K.B u v x + K.B v u x) - (K.expansion x / 3) * K.h u v x
/-- The vorticity `ω_{μν} = B_{[μν]}` (Natário, Def. 4.1.4). -/
noncomputable def vorticity (K : Congruence m) (u v : Fin 4) (x : Pt) : ℝ :=
(1/2 : ℝ) * (K.B u v x - K.B v u x)
/-- The contraction `σ_{μν} σ^{μν}`. -/
noncomputable def shearSq (K : Congruence m) (x : Pt) : ℝ :=
∑ u, ∑ v, ∑ p, ∑ q, m.ginv x u p * m.ginv x v q * K.shear u v x * K.shear p q x
/-- The contraction `ω_{μν} ω^{μν}`. -/
noncomputable def vorticitySq (K : Congruence m) (x : Pt) : ℝ :=
∑ u, ∑ v, ∑ p, ∑ q, m.ginv x u p * m.ginv x v q * K.vorticity u v x * K.vorticity p q x
/-- The derivative `X · f` of a scalar field along the congruence. -/
noncomputable def along (K : Congruence m) (f : Pt → ℝ) (x : Pt) : ℝ :=
∑ a, K.X x a * pd f a x
/-- `c` is an integral curve of the congruence on `I`. -/
def IsIntegralCurveOn (K : Congruence m) (c : ℝ → Pt) (I : Set ℝ) : Prop :=
(∀ a, ContDiffOn ℝ 2 (fun s => c s a) I) ∧ ∀ t ∈ I, vel c t = K.X (c t)
end Congruence
end MathematicalRelativity
Read-back
What the Lean code literally says, in plain math · self-authored by the drafting agent (non-blind; not an independent auditor)
Disclosure — non-blind read-back, not independent testimony. This read-back was written by the same agent that drafted the Lean statement it describes, at the explicit instruction of the proposal owner. It is not the blind testimony of an independent auditor with fresh context, and it cannot serve the usual purpose of a read-back as an outside check on the drafter: any misreading in the formalization is likely to be repeated here. Please treat it as an authored restatement and obtain an independent audit before relying on it.
For a vector field this bundle defines
where is the metrically lowered field; for a field of covariant -tensors,
and the divergence . All partial derivatives are the directional Fréchet derivatives of the preceding bundle, returning at points of non-differentiability.
A congruence for a spacetime is a structure consisting of a vector field subject to four conditions holding at every point of : each component is ; ; ; and for every index , i.e. the integral curves are geodesics. Such a field must therefore be globally defined and nowhere singular on all of .
Derived quantities, all defined pointwise: ; the spatial metric ; the expansion ; the shear ; the vorticity ; the full contractions and formed by raising both indices with ; and, for a scalar field , the derivative along the congruence .
A curve is an integral curve of the congruence on when each component of is on and for every (an equality of vectors, i.e. componentwise).