PhysLib Kerr coordinates
DefinitionPhyslibKerrCoordinatesgeneral-relativityphyslib-exact-spacetimes
The Boyer–Lindquist metric and the coordinate quantities used to derive Kerr Ricci curvature.
Definition code
import Definitions.Def_PhyslibCoordinateGeometry
import Mathlib.Algebra.BigOperators.Fin
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Algebra.Lie.Classical
import Mathlib.Analysis.Calculus.ContDiff.Deriv
import Mathlib.Analysis.Calculus.Deriv.Add
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Inv
import Mathlib.Analysis.Calculus.Deriv.Mul
import Mathlib.Analysis.Calculus.Deriv.Pow
import Mathlib.Analysis.Calculus.Deriv.Prod
import Mathlib.Analysis.Calculus.FDeriv.Symmetric
import Mathlib.Analysis.ODE.ExistUnique
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Basic
import Mathlib.Analysis.SpecialFunctions.Trigonometric.Deriv
import Mathlib.Data.Matrix.Basic
import Mathlib.Data.Real.Basic
import Mathlib.Data.Set.Basic
import Mathlib.LinearAlgebra.Matrix.Notation
import Mathlib.LinearAlgebra.Matrix.Symmetric
import Mathlib.Logic.Equiv.Fin.Basic
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.LinearCombination
import Mathlib.Tactic.NoncommRing
import Mathlib.Tactic.NormNum
import Mathlib.Tactic.Ring
import Mathlib.Tactic.Tauto
section
/-
Copyright (c) 2026 Alex Vergara Gil. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Alex Vergara Gil
-/
/-!
# Kerr black hole spacetime
The rotating vacuum Boyer–Lindquist metric, event horizons, ergosphere, and ZAMO frame-dragging
on `KerrSpacetime`.
## i. Overview
This module defines the Boyer–Lindquist Kerr metric `KerrSpacetime.metric` of a spin-`a` mass-`M`
black hole together with its analytical inverse `KerrSpacetime.metricInv`, and certifies them as a
`MetricTensor 4` at each point and as a `CoordinateMetric 4` on the chart away from the ring
singularity `Σ = 0`, horizons `Δ = 0`, and polar axis `sin θ = 0`, and establishes the basic causal
and rotational properties of the Kerr geometry: outer/inner event horizons `r±`, extremal
coalescence `a² = M²`, stationary-limit surface (ergosphere) `g₀₀ = 0`, zero-angular-momentum
observer (ZAMO) frame-dragging angular velocity `ω = -g_{tφ}/g_{φφ}`, and reduction to Schwarzschild
at `a = 0`.
## ii. Key results
- `KerrSpacetime`, `KerrSpacetime.sigma`, `KerrSpacetime.delta`, `KerrSpacetime.axialFactor` :
Kerr spacetime structure and Boyer–Lindquist auxiliary functions `Σ`, `Δ`, and `axialFactor`.
- `KerrSpacetime.metric`, `KerrSpacetime.metricInv`, `KerrSpacetime.metricTensor`,
`KerrSpacetime.toCoordinateMetric` : Kerr metric, its inverse, and the coordinate metric on the
regular chart.
- `KerrSpacetime.horizonPlus`, `KerrSpacetime.horizonMinus`, `KerrSpacetime.delta_horizonPlus`,
`KerrSpacetime.extremal` : event horizons `r±`.
- `KerrSpacetime.ergosphereRadius`, `KerrSpacetime.metric_00_ergosphere` : stationary-limit
surface `g₀₀ = 0`.
- `KerrSpacetime.frameDraggingOmega`, `KerrSpacetime.frameDraggingOmega_horizonPlus` : ZAMO frame
dragging and horizon speed.
- `KerrSpacetime.metric_zero_spin` : Schwarzschild reduction `a = 0`.
## iii. Table of contents
- A. Boyer–Lindquist metric functions and inverse
- B. Event horizons, ergosphere, and frame dragging
- C. Schwarzschild limit
## iv. References
* R. M. Wald, *General Relativity* (1984), Ch. 12 (Sec. 12.3). [ref: wald_1984_general_relativity]
* C. W. Misner, K. S. Thorne, and J. A. Wheeler, *Gravitation* (1973), Ch. 33.
[ref: mtw_1973_gravitation]
* S. M. Carroll, *Lecture Notes on General Relativity* (1997), Ch. 7
(https://arxiv.org/pdf/gr-qc/9712019#page=187). [ref: Carroll1997]
* S. Chandrasekhar, *The Mathematical Theory of Black Holes* (1983), Ch. 6. [ref: Chandrasekhar1983]
-/
namespace GeneralRelativity
namespace Kerr
/-!
## A. Boyer–Lindquist metric functions and inverse
In Boyer–Lindquist coordinates `(t, r, θ, φ)`, a rotating uncharged black hole of mass `M` and spin
`a` is governed by the auxiliary polynomials `Σ = r² + a² cos²θ`, `Δ = r² - 2Mr + a²`, and
`A = (r² + a²)² - a² Δ sin²θ`.
-/
/-- Rotating Boyer–Lindquist Kerr black hole spacetime parameterized by mass `M` and spin `a`. -/
structure KerrSpacetime where
/-- Geometric mass parameter `M` (`G = c = 1`). -/
M : ℝ
/-- Spin parameter `a = J / M`. -/
a : ℝ
namespace KerrSpacetime
/-- Boyer–Lindquist radial-polar function `Σ = r² + a² cos² θ`. -/
noncomputable def sigma (K : KerrSpacetime) (r θ : ℝ) : ℝ := r ^ 2 + K.a ^ 2 * Real.cos θ ^ 2
/-- Boyer–Lindquist horizon function `Δ = r² - 2 M r + a²`. -/
noncomputable def delta (K : KerrSpacetime) (r : ℝ) : ℝ := r ^ 2 - 2 * K.M * r + K.a ^ 2
/-- Boyer–Lindquist axial metric factor `(r² + a²)² - a² Δ sin² θ` (denoted `A` in
Misner–Thorne–Wheeler and Chandrasekhar), factored out because it governs both `g_{φφ}` and
`g^{tt}` and appears directly in the `(t, φ)` block determinant identity. -/
noncomputable def axialFactor (K : KerrSpacetime) (r θ : ℝ) : ℝ :=
(r ^ 2 + K.a ^ 2) ^ 2 - K.a ^ 2 * K.delta r * Real.sin θ ^ 2
/-- Kerr spacetime metric in Boyer–Lindquist coordinates `x = (t, r, θ, φ)` with signature
`(-, +, +, +)` and geometrized units `G = c = 1`. -/
noncomputable def metric (K : KerrSpacetime) (x : Fin 4 → ℝ) : Tensor2 4 :=
let sig := K.sigma (x 1) (x 2)
let del := K.delta (x 1)
let aval := K.axialFactor (x 1) (x 2)
let s2 := Real.sin (x 2) ^ 2
Matrix.of fun i j =>
if i = 0 ∧ j = 0 then -(1 - 2 * K.M * x 1 / sig)
else if (i = 0 ∧ j = 3) ∨ (i = 3 ∧ j = 0) then -(2 * K.M * K.a * x 1 * s2 / sig)
else if i = 1 ∧ j = 1 then sig / del
else if i = 2 ∧ j = 2 then sig
else if i = 3 ∧ j = 3 then aval * s2 / sig
else 0
/-- Analytical inverse of the Boyer–Lindquist Kerr metric `K.metric x`. -/
noncomputable def metricInv (K : KerrSpacetime) (x : Fin 4 → ℝ) : Tensor2 4 :=
let sig := K.sigma (x 1) (x 2)
let del := K.delta (x 1)
let aval := K.axialFactor (x 1) (x 2)
let s2 := Real.sin (x 2) ^ 2
Matrix.of fun i j =>
if i = 0 ∧ j = 0 then -(aval / (sig * del))
else if (i = 0 ∧ j = 3) ∨ (i = 3 ∧ j = 0) then -(2 * K.M * K.a * x 1 / (sig * del))
else if i = 1 ∧ j = 1 then del / sig
else if i = 2 ∧ j = 2 then 1 / sig
else if i = 3 ∧ j = 3 then (sig - 2 * K.M * x 1) / (sig * del * s2)
else 0
/-- Algebraic identity governing the determinant of the `(t, φ)` metric block:
`(Σ - 2 M r) axialFactor + 4 M² a² r² sin² θ = Σ² Δ`. -/
lemma tphi_det_id (K : KerrSpacetime) (r θ : ℝ) :
(K.sigma r θ - 2 * K.M * r) * K.axialFactor r θ + 4 * K.M ^ 2 * K.a ^ 2 * r ^ 2 * Real.sin θ ^ 2
= K.sigma r θ ^ 2 * K.delta r := by
simp only [sigma, delta, axialFactor]
rw [Real.sin_sq θ]
ring
/-- Symmetry of the Boyer–Lindquist Kerr metric `K.metric`. -/
lemma metric_symm (K : KerrSpacetime) (x : Fin 4 → ℝ) : IsSymm (K.metric x) :=
Matrix.IsSymm.ext fun i j => by
fin_cases i <;> fin_cases j <;> simp [metric]
/-- Left-inverse verification `g⁻¹ * g = 1` for the Boyer–Lindquist Kerr metric. -/
lemma metricInv_mul_metric (K : KerrSpacetime) (x : Fin 4 → ℝ)
(hsig : K.sigma (x 1) (x 2) ≠ 0) (hdel : K.delta (x 1) ≠ 0)
(hs : Real.sin (x 2) ≠ 0) :
K.metricInv x * K.metric x = 1 := by
ext i j
have hid := K.tphi_det_id (x 1) (x 2)
rw [Matrix.mul_apply]
fin_cases i <;> fin_cases j <;>
simp only [Matrix.one_apply, Fin.sum_univ_four, metric, metricInv, Matrix.of_apply, Fin.ext_iff] <;>
norm_num
· field_simp [hsig, hdel]; linear_combination hid
· field_simp [hsig, hdel]; ring
· field_simp [hsig, hdel]
· field_simp [hsig]
· field_simp [hsig, hdel, hs]; ring
· field_simp [hsig, hdel, hs]; linear_combination hid
/-- Right-inverse verification `g * g⁻¹ = 1` for the Boyer–Lindquist Kerr metric. -/
lemma metric_mul_metricInv (K : KerrSpacetime) (x : Fin 4 → ℝ)
(hsig : K.sigma (x 1) (x 2) ≠ 0) (hdel : K.delta (x 1) ≠ 0)
(hs : Real.sin (x 2) ≠ 0) :
K.metric x * K.metricInv x = 1 :=
mul_eq_one_of_isSymm_of_mul_eq_one (K.metric_symm x)
(K.metricInv_mul_metric x hsig hdel hs)
/-- The Boyer–Lindquist Kerr metric as a `CoordinateMetric 4` on the chart away from the ring
singularity `Σ = 0`, horizons `Δ = 0`, and polar axis `sin θ = 0`. -/
noncomputable def toCoordinateMetric (K : KerrSpacetime) : CoordinateMetric 4 where
g := K.metric
ginv := K.metricInv
domain := {x | K.sigma (x 1) (x 2) ≠ 0 ∧ K.delta (x 1) ≠ 0 ∧ Real.sin (x 2) ≠ 0}
symm := K.metric_symm
inv_left x hx := K.metric_mul_metricInv x hx.1 hx.2.1 hx.2.2
inv_right x hx := K.metricInv_mul_metric x hx.1 hx.2.1 hx.2.2
/-!
## B. Event horizons, ergosphere, and frame dragging
Because the rotating spacetime admits distinct horizon (`Δ = 0`) and static-limit (`g_{tt} = 0`)
surfaces, observers inside the ergosphere are dragged in the direction of the black hole spin.
-/
/-!
## C. Schwarzschild limit
Setting the spin parameter `a = 0` extinguishes frame dragging and reduces every component of the
Boyer–Lindquist metric to the static exterior Schwarzschild metric.
-/
end KerrSpacetime
end Kerr
end GeneralRelativity
end
section
/-
Copyright (c) 2026 Alex Vergara Gil. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Alex Vergara Gil
-/
/-!
# Boyer–Lindquist Kerr metric partial derivatives
Analytical coordinate partial derivatives `KerrSpacetime.metricCoordDeriv` of the Boyer–Lindquist
metric along `(t, r, θ, φ)` and verification against `coordDeriv`.
## i. Overview
Because the Boyer–Lindquist Kerr metric is stationary (`∂_t g = 0`) and axisymmetric
(`∂_φ g = 0`), only its radial (`∂_r`) and polar (`∂_θ`) partial derivatives are non-zero. This
module defines the closed-form derivative table `KerrSpacetime.metricCoordDeriv`, differentiates
the auxiliary Boyer–Lindquist functions `Σ`, `Δ`, and `axialFactor`, and verifies all 64 partial
derivatives `coordDeriv μ (fun y => K.metric y i j) x = K.metricCoordDeriv μ x i j`.
## ii. Key results
- `KerrSpacetime.metricCoordDeriv` : closed-form Boyer–Lindquist metric partial derivatives.
- `KerrSpacetime.hasDerivAt_sigma_r`, `KerrSpacetime.hasDerivAt_sigma_theta`,
`KerrSpacetime.hasDerivAt_delta_r` : derivatives of `Σ` and `Δ`.
- `KerrSpacetime.pd_metric_eq` : agreement of `coordDeriv` with `KerrSpacetime.metricCoordDeriv`
across all 64 components.
## iii. Table of contents
- A. Partial derivatives of the Kerr metric
## iv. References
* R. M. Wald, *General Relativity* (1984), Ch. 12 (Sec. 12.3). [ref: wald_1984_general_relativity]
* C. W. Misner, K. S. Thorne, and J. A. Wheeler, *Gravitation* (1973), Ch. 33.
[ref: mtw_1973_gravitation]
* S. M. Carroll, *Lecture Notes on General Relativity* (1997), Ch. 7
(https://arxiv.org/pdf/gr-qc/9712019#page=187). [ref: Carroll1997]
* S. Chandrasekhar, *The Mathematical Theory of Black Holes* (1983), Ch. 6. [ref: Chandrasekhar1983]
-/
namespace GeneralRelativity
namespace Kerr
open CoordinateCurvature
namespace KerrSpacetime
/-!
## A. Partial derivatives of the Kerr metric
Differentiating the stationary, axisymmetric Boyer–Lindquist metric components isolates the `r`
and `θ` derivatives of `Σ`, `Δ`, and `axialFactor` from the Christoffel inverse-metric sum.
-/
/-- Analytical coordinate partial derivatives `∂_μ (K.metric · i j)` in Boyer–Lindquist coordinates
`x = (t, r, θ, φ)`. -/
noncomputable def metricCoordDeriv (K : KerrSpacetime) (μ : Fin 4) (x : Fin 4 → ℝ)
(i j : Fin 4) : ℝ :=
let r := x 1
let c := Real.cos (x 2)
let s := Real.sin (x 2)
let sig := K.sigma r (x 2)
let del := K.delta r
let aval := K.axialFactor r (x 2)
if μ = 1 then
if i = 0 ∧ j = 0 then -(2 * K.M * (r ^ 2 - K.a ^ 2 * c ^ 2) / sig ^ 2)
else if (i = 0 ∧ j = 3) ∨ (i = 3 ∧ j = 0) then
2 * K.M * K.a * s ^ 2 * (r ^ 2 - K.a ^ 2 * c ^ 2) / sig ^ 2
else if i = 1 ∧ j = 1 then (2 * r * del - sig * (2 * r - 2 * K.M)) / del ^ 2
else if i = 2 ∧ j = 2 then 2 * r
else if i = 3 ∧ j = 3 then
s ^ 2 * ((4 * r * (r ^ 2 + K.a ^ 2) - K.a ^ 2 * (2 * r - 2 * K.M) * s ^ 2) * sig
- 2 * r * aval) / sig ^ 2
else 0
else if μ = 2 then
if i = 0 ∧ j = 0 then 4 * K.M * K.a ^ 2 * r * c * s / sig ^ 2
else if (i = 0 ∧ j = 3) ∨ (i = 3 ∧ j = 0) then
-4 * K.M * K.a * r * s * c * (r ^ 2 + K.a ^ 2) / sig ^ 2
else if i = 1 ∧ j = 1 then -2 * K.a ^ 2 * c * s / del
else if i = 2 ∧ j = 2 then -2 * K.a ^ 2 * c * s
else if i = 3 ∧ j = 3 then
((-2 * K.a ^ 2 * del * s ^ 3 * c + 2 * aval * s * c) * sig
+ 2 * K.a ^ 2 * c * s ^ 3 * aval) / sig ^ 2
else 0
else 0
end KerrSpacetime
end Kerr
end GeneralRelativity
end
section
/-
Copyright (c) 2026 Alex Vergara Gil. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Alex Vergara Gil
-/
/-!
# Boyer–Lindquist Kerr Christoffel symbols
All 20 independent Christoffel connection coefficients `KerrSpacetime.christoffel`, their
agreement with `CoordinateCurvature.christoffel`, and the contracted trace
`KerrSpacetime.christoffelTrace`.
## i. Overview
Using the coordinate partial derivatives `KerrSpacetime.metricCoordDeriv` from `Kerr.MetricDeriv`,
this module defines the analytical closed-form Christoffel symbol table `KerrSpacetime.christoffel`
(20 non-zero symmetric components) and its contracted trace `KerrSpacetime.christoffelTrace`
(`tr_r = 2 r / Σ`, `tr_θ = cot θ - 2 a² cos θ sin θ / Σ`), and establishes that
`CoordinateCurvature.christoffel K.metric K.metricInv` equals `K.christoffel` everywhere on regular
coordinates (`Σ ≠ 0`, `Δ ≠ 0`, `sin θ ≠ 0`) and on a neighborhood thereof.
## ii. Key results
- `KerrSpacetime.christoffel`, `KerrSpacetime.christoffel_symm` : explicit Christoffel symbols of
Boyer–Lindquist Kerr spacetime and lower-index symmetry.
- `KerrSpacetime.christoffel_eq`, `KerrSpacetime.eventually_christoffel_eq` : agreement with
`CoordinateCurvature.christoffel`.
- `KerrSpacetime.christoffelTrace`, `KerrSpacetime.sum_christoffel_trace` : contracted Christoffel
trace `∑ ρ, Γ^ρ_{ρ μ}`.
## iii. Table of contents
- A. Explicit Boyer–Lindquist Christoffel symbols
- B. Agreement with the Levi-Civita formula and trace identity
## iv. References
* R. M. Wald, *General Relativity* (1984), Ch. 12 (Sec. 12.3). [ref: wald_1984_general_relativity]
* C. W. Misner, K. S. Thorne, and J. A. Wheeler, *Gravitation* (1973), Ch. 33.
[ref: mtw_1973_gravitation]
* S. M. Carroll, *Lecture Notes on General Relativity* (1997), Ch. 7
(https://arxiv.org/pdf/gr-qc/9712019#page=187). [ref: Carroll1997]
* S. Chandrasekhar, *The Mathematical Theory of Black Holes* (1983), Ch. 6. [ref: Chandrasekhar1983]
-/
namespace GeneralRelativity
namespace Kerr
open CoordinateCurvature
namespace KerrSpacetime
/-!
## A. Explicit Boyer–Lindquist Christoffel symbols
The Levi-Civita connection coefficients of a stationary axisymmetric black hole split cleanly into
non-vanishing symmetric pairs `(k, i, j)` determined by the metric polynomials `Σ` and `Δ`.
-/
/-- Closed-form Levi-Civita Christoffel symbols `Γ^k_{ij}` of the Boyer–Lindquist Kerr metric. -/
noncomputable def christoffel (K : KerrSpacetime) (x : Fin 4 → ℝ) (k i j : Fin 4) : ℝ :=
let r := x 1
let c := Real.cos (x 2)
let s := Real.sin (x 2)
let sig := K.sigma r (x 2)
let del := K.delta r
if k = 0 then
if (i = 0 ∧ j = 1) ∨ (i = 1 ∧ j = 0) then
K.M * (K.a ^ 2 + r ^ 2) * (r ^ 2 - K.a ^ 2 * c ^ 2) / (sig ^ 2 * del)
else if (i = 0 ∧ j = 2) ∨ (i = 2 ∧ j = 0) then
-2 * K.M * K.a ^ 2 * c * r * s / sig ^ 2
else if (i = 1 ∧ j = 3) ∨ (i = 3 ∧ j = 1) then
-K.M * K.a * s ^ 2
* (-K.a ^ 4 * c ^ 2 + K.a ^ 2 * c ^ 2 * r ^ 2 + K.a ^ 2 * r ^ 2 + 3 * r ^ 4)
/ (sig ^ 2 * del)
else if (i = 2 ∧ j = 3) ∨ (i = 3 ∧ j = 2) then
2 * K.M * K.a ^ 3 * c * r * s ^ 3 / sig ^ 2
else 0
else if k = 1 then
if i = 0 ∧ j = 0 then K.M * (r ^ 2 - K.a ^ 2 * c ^ 2) * del / sig ^ 3
else if (i = 0 ∧ j = 3) ∨ (i = 3 ∧ j = 0) then
-K.M * K.a * s ^ 2 * (r ^ 2 - K.a ^ 2 * c ^ 2) * del / sig ^ 3
else if i = 1 ∧ j = 1 then
-(-K.M * K.a ^ 2 * c ^ 2 + K.M * r ^ 2 + K.a ^ 2 * c ^ 2 * r - K.a ^ 2 * r) / (sig * del)
else if (i = 1 ∧ j = 2) ∨ (i = 2 ∧ j = 1) then -K.a ^ 2 * c * s / sig
else if i = 2 ∧ j = 2 then -r * del / sig
else if i = 3 ∧ j = 3 then
-s ^ 2 * del * (-K.M * K.a ^ 4 * c ^ 4 + K.M * K.a ^ 4 * c ^ 2
+ K.M * K.a ^ 2 * c ^ 2 * r ^ 2 - K.M * K.a ^ 2 * r ^ 2 + K.a ^ 4 * c ^ 4 * r
+ 2 * K.a ^ 2 * c ^ 2 * r ^ 3 + r ^ 5) / sig ^ 3
else 0
else if k = 2 then
if i = 0 ∧ j = 0 then -2 * K.M * K.a ^ 2 * c * r * s / sig ^ 3
else if (i = 0 ∧ j = 3) ∨ (i = 3 ∧ j = 0) then
2 * K.M * K.a * c * r * s * (K.a ^ 2 + r ^ 2) / sig ^ 3
else if i = 1 ∧ j = 1 then K.a ^ 2 * c * s / (sig * del)
else if (i = 1 ∧ j = 2) ∨ (i = 2 ∧ j = 1) then r / sig
else if i = 2 ∧ j = 2 then -K.a ^ 2 * c * s / sig
else if i = 3 ∧ j = 3 then
-c * s * (-2 * K.M * K.a ^ 4 * c ^ 4 * r + 2 * K.M * K.a ^ 4 * r
- 4 * K.M * K.a ^ 2 * c ^ 2 * r ^ 3 + 4 * K.M * K.a ^ 2 * r ^ 3 + K.a ^ 6 * c ^ 4
+ K.a ^ 4 * c ^ 4 * r ^ 2 + 2 * K.a ^ 4 * c ^ 2 * r ^ 2 + 2 * K.a ^ 2 * c ^ 2 * r ^ 4
+ K.a ^ 2 * r ^ 4 + r ^ 6) / sig ^ 3
else 0
else
if (i = 0 ∧ j = 1) ∨ (i = 1 ∧ j = 0) then
K.M * K.a * (r ^ 2 - K.a ^ 2 * c ^ 2) / (sig ^ 2 * del)
else if (i = 0 ∧ j = 2) ∨ (i = 2 ∧ j = 0) then -2 * K.M * K.a * c * r / (s * sig ^ 2)
else if (i = 1 ∧ j = 3) ∨ (i = 3 ∧ j = 1) then
(-K.M * K.a ^ 4 * c ^ 4 + K.M * K.a ^ 4 * c ^ 2 - K.M * K.a ^ 2 * c ^ 2 * r ^ 2
- K.M * K.a ^ 2 * r ^ 2 - 2 * K.M * r ^ 4 + K.a ^ 4 * c ^ 4 * r
+ 2 * K.a ^ 2 * c ^ 2 * r ^ 3 + r ^ 5) / (sig ^ 2 * del)
else if (i = 2 ∧ j = 3) ∨ (i = 3 ∧ j = 2) then
c * (-2 * K.M * K.a ^ 2 * c ^ 2 * r + 2 * K.M * K.a ^ 2 * r + K.a ^ 4 * c ^ 4
+ 2 * K.a ^ 2 * c ^ 2 * r ^ 2 + r ^ 4) / (s * sig ^ 2)
else 0
/-!
## B. Agreement with the Levi-Civita formula and trace identity
Evaluating `CoordinateCurvature.christoffel` confirms the 20 closed-form Christoffel symbols
across all 64 components and yields the logarithmic divergence formula
`∑ ρ, Γ^ρ_{ρ μ} = ∂_μ ln(Σ sin θ)`.
-/
/-- Contracted Boyer–Lindquist Kerr Christoffel trace `∑ ρ, Γ^ρ_{ρ μ} = ∂_μ ln(Σ sin θ)`. -/
noncomputable def christoffelTrace (K : KerrSpacetime) (x : Fin 4 → ℝ) (μ : Fin 4) : ℝ :=
if μ = 1 then 2 * x 1 / K.sigma (x 1) (x 2)
else if μ = 2 then
Real.cos (x 2) / Real.sin (x 2)
- 2 * K.a ^ 2 * Real.cos (x 2) * Real.sin (x 2) / K.sigma (x 1) (x 2)
else 0
end KerrSpacetime
end Kerr
end GeneralRelativity
end
Source