{ "cells": [ { "cell_type": "markdown", "id": "869503fe", "metadata": {}, "source": [ "# Riemann Curvature Tensor of $S^3$\n", "\n", "A round 3-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": "06b4bec5", "metadata": {}, "source": [ "## Hyperspherical chart\n", "\n", "The coordinates are $x=(\\theta, \\phi, \\psi)$. The standard embedding\n", "$X:S^3\\hookrightarrow\\mathbb{R}^4$ 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": "1f32097b", "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 ψ |]\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "6b0530bf", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} \\cos(θ) r \\\\ \\cos(φ) \\sin(θ) r \\\\ \\cos(ψ) \\sin(θ) \\sin(φ) r \\\\ \\sin(θ) \\sin(φ) \\sin(ψ) r\\\\ \\end{pmatrix}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "X\n" ] }, { "cell_type": "markdown", "id": "76ea3fb4", "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\\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": "0ee2bcf6", "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_#) [3, 3]\n", "\n", "def g~i~j : Matrix MathValue := M.inverse g_#_#\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "e0b564e7", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} r^{2} & 0 & 0 \\\\ 0 & \\sin(θ)^{2} r^{2} & 0 \\\\ 0 & 0 & \\sin(θ)^{2} \\sin(φ)^{2} r^{2} \\\\ \\end{pmatrix}_{\\#\\#}^{\\;\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "g_#_#\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "f8287600", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} r^{-2} & 0 & 0 \\\\ 0 & \\sin(θ)^{-2} r^{-2} & 0 \\\\ 0 & 0 & \\sin(θ)^{-2} \\sin(φ)^{-2} r^{-2} \\\\ \\end{pmatrix}_{\\;\\;}^{\\#\\#}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "g~#~#\n" ] }, { "cell_type": "markdown", "id": "9d09a29e", "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": 6, "id": "6dc1904b", "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": 7, "id": "444f3c24", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$-\\cos(θ) \\sin(θ)$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Γ~1_2_2\n" ] }, { "cell_type": "code", "execution_count": 8, "id": "649367b2", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\cos(θ) \\sin(θ)^{-1}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Γ~2_1_2\n" ] }, { "cell_type": "markdown", "id": "82554fac", "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": 9, "id": "cbf57a82", "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": 10, "id": "36256838", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\sin(θ)^{2}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "R~1_2_1_2\n" ] }, { "cell_type": "code", "execution_count": 11, "id": "2a8d9700", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$-1$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "R~2_1_1_2\n" ] }, { "cell_type": "markdown", "id": "e832d1aa", "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^3$ the coordinate-free prediction is\n", "\n", "$$\n", "\\operatorname{Ric}=\\frac{2}{r^2}g,\n", "\\qquad\n", "\\mathcal{R}=\\frac{6}{r^2}.\n", "$$\n" ] }, { "cell_type": "code", "execution_count": 12, "id": "f105a299", "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": 13, "id": "40d3306e", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 2 & 0 & 0 \\\\ 0 & 2 \\sin(θ)^{2} & 0 \\\\ 0 & 0 & 2 \\sin(θ)^{2} \\sin(φ)^{2} \\\\ \\end{pmatrix}_{\\#\\#}^{\\;\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Ric_#_#\n" ] }, { "cell_type": "code", "execution_count": 14, "id": "1d802baf", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$6 r^{-2}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "scalarCurvature\n" ] }, { "cell_type": "markdown", "id": "0b3e8898", "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", "$6/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 }