Curvature Two-Form on the Sphere¶
The Riemann tensor can be computed directly from Christoffel symbols or assembled as the curvature of the connection one-form. Cartan's second structure equation is
$$\Omega^i{}_j=d\omega^i{}_j+\omega^i{}_k\wedge\omega^k{}_j,$$
with $\Omega^i{}_j=\tfrac12R^i{}_{jkl}\,dx^k\wedge dx^l$.
Round metric on $S^2$¶
For a sphere of radius $r$ with coordinates $(\theta,\phi)$,
$$g_{ij}=\operatorname{diag}(r^2,r^2\sin^2\theta).$$
declare symbol r, θ, φ : MathValue
def x : Vector MathValue := [| θ, φ |]
def g_i_j : Matrix MathValue :=
[| [| r ^ 2, 0 |], [| 0, r ^ 2 * (sin θ) ^ 2 |] |]_i_j
def g~i~j : Matrix MathValue :=
[| [| 1 / r ^ 2, 0 |]
, [| 0, 1 / (r ^ 2 * (sin θ) ^ 2) |] |]~i~j
g_#_#
Direct Riemann tensor¶
The Levi-Civita connection follows from metric compatibility and zero torsion. Egison's repeated symbolic indices perform the contraction over $m$.
def Γ_j_l_k : Tensor MathValue :=
(1 / 2) *
(∂/∂ g_j_l x~k + ∂/∂ g_j_k x~l - ∂/∂ g_k_l x~j)
def Γ~i_k_l : Tensor MathValue :=
withSymbols [j] g~i~j . Γ_j_l_k
def R~i_j_k_l : Tensor MathValue := withSymbols [m]
∂/∂ Γ~i_j_l x~k - ∂/∂ Γ~i_j_k x~l
+ Γ~m_j_l . Γ~i_m_k - Γ~m_j_k . Γ~i_m_l
R~#_#_1_2
Cartan's curvature form¶
Regard the last Christoffel index as the one-form index. The exterior
derivative adds one form index, and antisymmetrize projects the result
onto a genuine two-form.
def d (t : Tensor MathValue) : Tensor MathValue :=
!(flip ∂/∂) x t
def ω~i_j : Matrix MathValue := Γ~i_j_#
def Ω~i_j : Tensor MathValue := withSymbols [k]
antisymmetrize (d ω~i_j + ω~i_k ∧ ω~k_j)
Ω~#_#_1_2
The curvature-form component is one half of the corresponding direct Riemann component, exactly as $\Omega^i{}_j=\tfrac12R^i{}_{jkl}dx^k\wedge dx^l$ requires. The two computational paths therefore agree while exposing different geometry: the first uses coordinate indices, and the second treats curvature as the field strength of a connection.