{ "cells": [ { "cell_type": "markdown", "id": "dd4139c7", "metadata": {}, "source": [ "# Riemann Curvature Tensor of $S^4$\n", "\n", "A round 4-sphere of radius $r$ has constant sectional curvature\n", "$1/r^2$. This notebook builds its metric, Levi-Civita connection, Riemann\n", "tensor, Ricci tensor, and scalar curvature in indexed Egison notation.\n", "\n", "We use the convention\n", "\n", "$$\n", "R^i{}_{jkl}\n", " = \\partial_k\\Gamma^i{}_{jl}\n", " - \\partial_l\\Gamma^i{}_{jk}\n", " + \\Gamma^m{}_{jl}\\Gamma^i{}_{mk}\n", " - \\Gamma^m{}_{jk}\\Gamma^i{}_{ml}.\n", "$$\n" ] }, { "cell_type": "markdown", "id": "21407d87", "metadata": {}, "source": [ "## Hyperspherical chart\n", "\n", "The coordinates are $x=(\\theta, \\phi, \\psi, \\eta)$. The standard embedding\n", "$X:S^4\\hookrightarrow\\mathbb{R}^5$ is built by\n", "successively multiplying by sines: $X_1=r\\cos \\theta$,\n", "$X_2=r\\sin \\theta\\cos \\phi$, and so on. It makes\n", "$X\\mathbin{\\cdot}X=r^2$ manifest.\n", "\n", "The chart excludes the usual coordinate poles; those singularities are\n", "features of hyperspherical coordinates, not of the round geometry.\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "609ce6be", "metadata": {}, "outputs": [], "source": [ "declare symbol r, θ, φ, ψ, η: MathValue\n", "\n", "def x : Vector MathValue := [| θ, φ, ψ, η |]\n", "\n", "def X : Vector MathValue := [| r * cos θ, r * sin θ * cos φ, r * sin θ * sin φ * cos ψ, r * sin θ * sin φ * sin ψ * cos η, r * sin θ * sin φ * sin ψ * sin η |]\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "a6cc3d4e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} \\cos(θ) r \\\\ \\cos(φ) \\sin(θ) r \\\\ \\cos(ψ) \\sin(θ) \\sin(φ) r \\\\ \\cos(η) \\sin(θ) \\sin(φ) \\sin(ψ) r \\\\ \\sin(η) \\sin(θ) \\sin(φ) \\sin(ψ) r\\\\ \\end{pmatrix}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "X\n" ] }, { "cell_type": "markdown", "id": "56771c37", "metadata": {}, "source": [ "## Metric and inverse metric\n", "\n", "Differentiating the embedding gives an orthogonal coordinate basis. Its\n", "line element is\n", "\n", "$$\n", "ds^2=r^2\\left(d\\theta^2 + \\sin^2 \\theta d\\phi^2 + \\sin^2 \\theta \\sin^2 \\phi d\\psi^2 + \\sin^2 \\theta \\sin^2 \\phi \\sin^2 \\psi d\\eta^2\\right).\n", "$$\n", "\n", "Egison differentiates the embedding to obtain the coordinate tangent\n", "vectors and constructs every component as their dot product,\n", "$g_{ij}=\\partial_iX\\mathbin{\\cdot}\\partial_jX$. The inverse metric is\n", "then computed from that induced metric.\n" ] }, { "cell_type": "code", "execution_count": 3, "id": "e09f02b5", "metadata": {}, "outputs": [], "source": [ "def e_i_j : Matrix MathValue := ∂/∂ X_j x~i\n", "\n", "def g_i_j : Matrix MathValue :=\n", " generateTensor (\\[a, b] -> V.* e_a_# e_b_#) [4, 4]\n", "\n", "def g~i~j : Matrix MathValue := M.inverse g_#_#\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "a2a2e671", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} r^{2} \\\\ 0 \\\\ 0 \\\\ 0\\\\ \\end{pmatrix}_{\\#}^{\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "g_1_#\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "f6194630", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 0 \\\\ 0 \\\\ 0 \\\\ \\sin(θ)^{2} \\sin(φ)^{2} \\sin(ψ)^{2} r^{2}\\\\ \\end{pmatrix}_{\\#}^{\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "g_4_#\n" ] }, { "cell_type": "code", "execution_count": 6, "id": "5a5e59c2", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} r^{-2} \\\\ 0 \\\\ 0 \\\\ 0\\\\ \\end{pmatrix}_{\\;}^{\\#}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "g~1~#\n" ] }, { "cell_type": "markdown", "id": "6178cdbc", "metadata": {}, "source": [ "## Levi-Civita connection\n", "\n", "The Christoffel symbols of the first kind and second kind are\n", "\n", "$$\n", "\\Gamma_{ijk}=\\frac12\n", "(\\partial_jg_{ik}+\\partial_kg_{ij}-\\partial_ig_{jk}),\n", "\\qquad\n", "\\Gamma^i{}_{jk}=g^{im}\\Gamma_{mjk}.\n", "$$\n", "\n", "Repeated symbolic indices are contracted by `.`. The `withSymbols`\n", "block makes the dummy index local to the definition.\n" ] }, { "cell_type": "code", "execution_count": 7, "id": "51ab0de7", "metadata": {}, "outputs": [], "source": [ "def Γ_i_j_k : Tensor MathValue :=\n", " (1 / 2) * (∂/∂ g_i_k x~j + ∂/∂ g_i_j x~k - ∂/∂ g_j_k x~i)\n", "\n", "def Γ~i_j_k : Tensor MathValue := withSymbols [m]\n", " g~i~m . Γ_m_j_k\n" ] }, { "cell_type": "code", "execution_count": 8, "id": "e65f3852", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$-\\cos(θ) \\sin(θ)$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Γ~1_2_2\n" ] }, { "cell_type": "code", "execution_count": 9, "id": "872e9ea6", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\cos(θ) \\sin(θ)^{-1}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Γ~2_1_2\n" ] }, { "cell_type": "markdown", "id": "1aa7efce", "metadata": {}, "source": [ "## Riemann tensor\n", "\n", "The following definition is a direct transcription of the stated\n", "convention. The two output cells sample the same coordinate\n", "two-plane with the first two tensor slots exchanged; their different\n", "coordinate factors are exactly what one expects in a non-orthonormal\n", "coordinate basis.\n" ] }, { "cell_type": "code", "execution_count": 10, "id": "5388d224", "metadata": {}, "outputs": [], "source": [ "def R~i_j_k_l : Tensor MathValue := withSymbols [m]\n", " ∂/∂ Γ~i_j_l x~k - ∂/∂ Γ~i_j_k x~l\n", " + Γ~m_j_l . Γ~i_m_k - Γ~m_j_k . Γ~i_m_l\n" ] }, { "cell_type": "code", "execution_count": 11, "id": "77b9090c", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\sin(θ)^{2}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "R~1_2_1_2\n" ] }, { "cell_type": "code", "execution_count": 12, "id": "824a66c2", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$-1$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "R~2_1_1_2\n" ] }, { "cell_type": "markdown", "id": "c400cb40", "metadata": {}, "source": [ "## Ricci and scalar curvature\n", "\n", "Contracting the first and third Riemann indices gives\n", "\n", "$$\n", "\\operatorname{Ric}_{ij}=R^m{}_{imj},\n", "\\qquad\n", "\\mathcal{R}=g^{ij}\\operatorname{Ric}_{ij}.\n", "$$\n", "\n", "For a round $S^4$ the coordinate-free prediction is\n", "\n", "$$\n", "\\operatorname{Ric}=\\frac{3}{r^2}g,\n", "\\qquad\n", "\\mathcal{R}=\\frac{12}{r^2}.\n", "$$\n" ] }, { "cell_type": "code", "execution_count": 13, "id": "977e531a", "metadata": {}, "outputs": [], "source": [ "def Ric_i_j : Matrix MathValue := withSymbols [m]\n", " sum (contract R~m_i_m_j)\n", "\n", "def scalarCurvature : MathValue := withSymbols [i, j]\n", " g~i~j . Ric_i_j\n" ] }, { "cell_type": "code", "execution_count": 14, "id": "59c5bf20", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 3 \\\\ 0 \\\\ 0 \\\\ 0\\\\ \\end{pmatrix}_{\\#}^{\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Ric_1_#\n" ] }, { "cell_type": "code", "execution_count": 15, "id": "a36a65be", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$12 r^{-2}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "scalarCurvature\n" ] }, { "cell_type": "markdown", "id": "152daae0", "metadata": {}, "source": [ "## Interpretation\n", "\n", "The sampled components are coordinate dependent, but their contractions\n", "recover the invariant statement: every tangent two-plane has sectional\n", "curvature $1/r^2$, the metric is Einstein, and the scalar curvature is\n", "$12/r^2$. Factors such as $\\sin \\theta$ vanish\n", "at chart poles because the coordinate frame degenerates there; the\n", "curvature itself remains smooth.\n" ] } ], "metadata": { "kernelspec": { "display_name": "Egison", "language": "egison", "name": "egison" }, "language_info": { "codemirror_mode": "egison", "file_extension": ".egi", "mimetype": "text/x-egison", "name": "egison" } }, "nbformat": 4, "nbformat_minor": 5 }