{ "cells": [ { "cell_type": "markdown", "id": "57e930b3", "metadata": {}, "source": [ "# Curvature Two-Form on the Sphere\n", "\n", "The Riemann tensor can be computed directly from Christoffel symbols or\n", "assembled as the curvature of the connection one-form. Cartan's second\n", "structure equation is\n", "\n", "$$\\Omega^i{}_j=d\\omega^i{}_j+\\omega^i{}_k\\wedge\\omega^k{}_j,$$\n", "\n", "with $\\Omega^i{}_j=\\tfrac12R^i{}_{jkl}\\,dx^k\\wedge dx^l$.\n" ] }, { "cell_type": "markdown", "id": "4bd52b1e", "metadata": {}, "source": [ "## Round metric on $S^2$\n", "\n", "For a sphere of radius $r$ with coordinates $(\\theta,\\phi)$,\n", "\n", "$$g_{ij}=\\operatorname{diag}(r^2,r^2\\sin^2\\theta).$$\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "88960f0b", "metadata": {}, "outputs": [], "source": [ "declare symbol r, θ, φ : MathValue\n", "\n", "def x : Vector MathValue := [| θ, φ |]\n", "def g_i_j : Matrix MathValue :=\n", " [| [| r ^ 2, 0 |], [| 0, r ^ 2 * (sin θ) ^ 2 |] |]_i_j\n", "def g~i~j : Matrix MathValue :=\n", " [| [| 1 / r ^ 2, 0 |]\n", " , [| 0, 1 / (r ^ 2 * (sin θ) ^ 2) |] |]~i~j\n" ] }, { "cell_type": "code", "execution_count": 2, "id": "6844e309", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} r^{2} & 0 \\\\ 0 & \\sin(θ)^{2} r^{2} \\\\ \\end{pmatrix}_{\\#\\#}^{\\;\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "g_#_#\n" ] }, { "cell_type": "markdown", "id": "03fa8f6f", "metadata": {}, "source": [ "## Direct Riemann tensor\n", "\n", "The Levi-Civita connection follows from metric compatibility and zero\n", "torsion. Egison's repeated symbolic indices perform the contraction\n", "over $m$.\n" ] }, { "cell_type": "code", "execution_count": 3, "id": "615f7c34", "metadata": {}, "outputs": [], "source": [ "def Γ_j_l_k : Tensor MathValue :=\n", " (1 / 2) *\n", " (∂/∂ g_j_l x~k + ∂/∂ g_j_k x~l - ∂/∂ g_k_l x~j)\n", "\n", "def Γ~i_k_l : Tensor MathValue :=\n", " withSymbols [j] g~i~j . Γ_j_l_k\n", "\n", "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": 4, "id": "7e5120b3", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 0 & \\sin(θ)^{2} \\\\ -1 & 0 \\\\ \\end{pmatrix}_{\\;\\#}^{\\#\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "R~#_#_1_2\n" ] }, { "cell_type": "markdown", "id": "eb3fafe1", "metadata": {}, "source": [ "## Cartan's curvature form\n", "\n", "Regard the last Christoffel index as the one-form index. The exterior\n", "derivative adds one form index, and `antisymmetrize` projects the result\n", "onto a genuine two-form.\n" ] }, { "cell_type": "code", "execution_count": 5, "id": "74ecd7e6", "metadata": {}, "outputs": [], "source": [ "def d (t : Tensor MathValue) : Tensor MathValue :=\n", " !(flip ∂/∂) x t\n", "\n", "def ω~i_j : Matrix MathValue := Γ~i_j_#\n", "\n", "def Ω~i_j : Tensor MathValue := withSymbols [k]\n", " antisymmetrize (d ω~i_j + ω~i_k ∧ ω~k_j)\n" ] }, { "cell_type": "code", "execution_count": 6, "id": "5756ae5b", "metadata": {}, "outputs": [ { "data": { "text/html": [ "$\\begin{pmatrix} 0 & \\frac{1}{2} \\sin(θ)^{2} \\\\ \\frac{-1}{2} & 0 \\\\ \\end{pmatrix}_{\\;\\#}^{\\#\\;}$" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "Ω~#_#_1_2\n" ] }, { "cell_type": "markdown", "id": "27e4ae5e", "metadata": {}, "source": [ "The curvature-form component is one half of the corresponding direct\n", "Riemann component, exactly as\n", "$\\Omega^i{}_j=\\tfrac12R^i{}_{jkl}dx^k\\wedge dx^l$ requires. The two\n", "computational paths therefore agree while exposing different geometry:\n", "the first uses coordinate indices, and the second treats curvature as\n", "the field strength of a connection.\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 }