{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# 24. Riemannian curvature tensor of type (0,4)\n", "\n", "This notebook is part of the [Introduction to manifolds in SageMath](https://sagemanifolds.obspm.fr/intro_to_manifolds.html) by Andrzej Chrzeszczyk (Jan Kochanowski University of Kielce, Poland)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'SageMath version 9.6, Release Date: 2022-05-15'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "version()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Assume now that $M$ is a Riemannian manifold with metric $g$ and $\\nabla$ is the corresponding Levi-Civita connection. We define **Riemannian curvature tensor** of type $(0,4)$ by\n", "\n", "\\begin{equation}\n", "R(X, Y, Z , W ) = g(R(X, Y )Z , W ),\\quad \\text{for } X,Y,Z,W\\in \\mathfrak{X}(M).\n", "\\tag{24.1}\n", "\\end{equation}\n", "\n", "Since $g$ is non-singular (cf. [notebook 22](https://nbviewer.org/github/sagemanifolds/IntroToManifolds/blob/main/22Manifold_Riemann.ipynb)) the curvature (0,4)-type tensor contains the same information as the corresponding (1,3)-type tensor from the [previous notebook](https://nbviewer.org/github/sagemanifolds/IntroToManifolds/blob/main/23Manifold_Curvature.ipynb). \n", "\n", "In a local coordinate system $(x^1,\\ldots,x^n)$ we have\n", "\n", "\\begin{equation}\n", "R_{ijkl}=g_{im}R^m_{jkl}.\n", "\\tag{24.1'}\n", "\\end{equation}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "### Symmetries of Riemannian curvature tensor\n", "\n", "
\n", "\n", "If $X, Y, Z , W$ are vector fields in $M$ and $∇$ is the Levi–Civita connection, then\n", "\n", "\\begin{equation}\n", "\\begin{matrix}\n", "R(X, Y, Z , W ) + R(Y, Z , X, W ) + R(Z , X, Y, W ) = 0,\\\\\n", "R(X, Y, Z , W ) = −R(Y, X, Z , W ),\\\\\n", "R(X, Y, Z , W ) = −R(X, Y, W, Z ),\\\\\n", "R(X, Y, Z , W ) = R(Z , W, X, Y ).\n", "\\end{matrix}\n", "\\tag{24.2}\n", "\\end{equation}\n", "\n", "
\n", "\n", "Since the Levi-Civita connections are torsion-free, the first Bianchi identity (23.4) reduces to\n", "$R(X, Y)Z + R(Z, X)Y + R(Y, Z)X=0$ and implies the first relation.\n", "\n", "The antisymmetry $R(X, Y) = −R(Y, X)$ implies the second equality.\n", "\n", "The third equality is equivalent to $R(X, Y, Z , Z ) = 0.$ Indeed, if it holds then clearly $R(X, Y, Z , Z ) = 0.$ Conversely, if $R(X, Y, Z , Z ) = 0$, we have\n", "\n", "$$R(X, Y, Z + W, Z + W ) = 0\\\\\n", "⇔R(X, Y, Z , Z ) + R(X, Y, Z, W ) +R(X, Y, W, Z ) + R(X, Y, W, W )=0\\\\\n", "⇔ R(X, Y, Z , W ) + R(X, Y, W, Z ) = 0.$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To prove $R(X, Y, Z , Z ) = 0$, let us note that\n", "since the Levi-Civita connection is compatible with the metric, we have\n", "\n", "$$ g(∇_X ∇_Y Z , Z ))=X ( g(∇_Y Z , Z ))-g( ∇_Y Z , ∇_X Z),\\\\\n", "g(∇_Y ∇_X Z , Z ))=Y ( g(∇_X Z , Z ))-g( ∇_X Z , ∇_Y Z).\n", "$$\n", "\n", "It is also clear, that for connections compatible with the metric, taking $V=[X,Y]$ we obtain \n", "\n", "$$V(g(Z,Z))=2g(\\nabla_V Z,Z) \\Longrightarrow \n", "[X,Y](g(Z , Z))=2 g(∇_{[X,Y ]} Z , Z). $$\n", "\n", "Therefore\n", "$$\n", "R(X, Y, Z , Z ) = \n", "g(∇_X ∇_Y Z , Z) − g(∇_Y ∇_X Z , Z) − g(∇_{[X,Y ]} Z , Z)\\\\\n", "= X(g( ∇_Y Z , Z)) − g(∇_Y Z , ∇_X Z)\\\\\n", "− Y(g( ∇_X Z , Z))+ g(∇_X Z , ∇_Y Z)\\\\\n", "− \\frac{1}{2}[X, Y ](g( Z , Z))\n", "$$\n", "But we have also\n", "$$\n", "g(\\nabla_YZ,Z)=Y(g(Z,Z))-g(Z,\\nabla_YZ),\\\\\n", "g(\\nabla_XZ,Z)=X(g(Z,Z))-g(Z,\\nabla_XZ),\n", "$$\n", "\n", "and consequently\n", "$$\n", "g(\\nabla_YZ,Z)=\\frac{1}{2}Y(g(Z,Z)),\\\\\n", "g(\\nabla_XZ,Z)=\\frac{1}{2}X(g(Z,Z)),\n", "$$\n", "\n", "therefore\n", "\n", "$$\n", "R(X, Y, Z , Z )\\\\\n", "=\\frac{1}{2}X(Y( g(Z , Z ))-\\frac{1}{2}Y(X( g(Z , Z ))-\\frac{1}{2}[X,Y]( g(Z , Z ))\\\\\n", "=\\frac{1}{2}[X,Y]( g(Z , Z ))-\\frac{1}{2}[X,Y]( g(Z , Z ))=0.\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In the proof of the fourth relation we use the first one to obtain\n", "\n", "$$\n", "R(X, Y, Z , W )+R(Y, Z , X, W )+R(Z , X, Y, W )=0,\\\\\n", "R(Y, Z, W, X) +R(Z , W, Y, X )+R(W, Y, Z , X )=0,\\\\\n", "R(Z , W, X, Y )+R(W, X, Z , Y )+R(X, Z , W, Y )=0,\\\\\n", "R(W, X, Y, Z )+R(X, Y, W, Z )+R(Y, W, X, Z )=0.\n", "$$\n", "\n", "Adding side by side and using the third equality we obtain\n", "\n", "$$\n", "R(Z , X, Y, W ) + R(W, Y, Z , X ) + R(X, Z , W, Y ) + R(Y, W, X, Z ) = 0.\n", "$$\n", "\n", "Using the second and third relation, we have\n", "\n", "$$2R(Z , X, Y, W ) − 2R(Y, W, Z , X ) = 0.$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
\n", "\n", "The component-wise version of (24.2) reads as follows:\n", "\n", "\\begin{equation}\n", "\\begin{matrix}\n", "R_{i jkl} + R_{ikl j} + R_{il jk} = 0,\\\\\n", "R_{ijkl} = −R_{jikl},\\\\\n", "R_{ijkl} = −R_{ijlk},\\\\\n", "R_{ijkl} = R_{klij}.\n", "\\end{matrix}\n", "\\tag{24.2'}\n", "\\end{equation}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "### The case of of 2-dimensional manifolds in $R^3$\n", "\n", "
\n", "\n", "If $n=2$, then the indices take values 1 or 2 (or 0,1 if Python is used). The antisymmetry in $i,j$ and $k,l$ means that for nonzero components of of the tensor $R_{ijkl}$, we have $i\\not=j$ and $k\\not=l$. Furthermore changing the order of $i,j$ or $k,l$ we only change the sign of the corresponding components $R_{ijkl}$. Thus, for manifolds of dimension $n =\n", "2,$ there is only one independent component of the Riemannian curvature tensor, namely, $R_{1212}$. The remaining ones vanish or can be obtained by permutations of indices $(i,j)=(1,2), \\ (k,l)=(1,2)$ and an appropriate change of signs." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Suppose we are given a surface in Euclidean 3-space \n", "\n", "$$ x=x(u,v),\\ \\ y=y(u,v),\\ \\ z=z(u,v),\\ \\ (u,v)\\in V\\subset R^2,$$\n", "\n", "and a non-singular\n", "point $P=(x_0 , y_0 , z_0 )=(x(u_0,v_0),y(u_0,v_0),z(u_0,v_0))$ on it. i.e., \n", "\n", "$$\n", "\\text{rank}\\left.\n", "\\left(\n", "\\begin{matrix}\n", "x_u & y_u & z_u\\\\\n", "x_v & y_v & z_v\n", "\\end{matrix}\n", "\\right)\n", "\\right|_{(u_0,v_0)}=2.\n", "$$\n", "\n", "We shall assume that the $z$-axis is perpendicular to the tangent plane to the surface at the point $P,$ in which\n", "case the $x$-axis and $y$-axis will be parallel to it. The surface may then be given\n", "locally about (i.e. in a neighborhood of) the point $P$ by an equation\n", "of the form $z = f(x, y)$, where $z_0 = f(x_0 , y_0 )$ and\n", "\n", "$$\\frac{\\partial f}{\\partial x}\\Big|_{\\substack{x=x_0\\\\y=y_0}}\n", "=\\frac{\\partial f}{\\partial y}\\Big|_{\\substack{x=x_0\\\\y=y_0}}=0, \\quad \\text{i.e.}\\quad \n", "\\text{grad}\\, f\\,\\Big|_{\\substack{x=x_0\\\\y=y_0}}=0.\n", "$$\n", "\n", "Given a surface $z = f(x, y)$, and a point $P=(x_0 , y_0 , z_0 )$ on it\n", "at which grad $f = 0$, we can define the **Gaussian curvature $K$** of the surface at $(x_0,y_0,z_0)$ to be the determinant of the matrix \n", "\n", "$$K=\\det (f_{x^ix^j})\\Big|_{\\substack{x=x_0\\\\y=y_0}}=\n", "\\det \\left(\n", "\\begin{matrix}\n", "f_{xx} & f_{xy}\\\\\n", "f_{yx} & f_{yy}\n", "\\end{matrix}\n", "\\right)\\Big|_{\\substack{x=x_0\\\\y=y_0}}.\n", "$$\n", "\n", "The metric on such surface is defined by\n", "\n", "$$ g_{11}=1+f^2_x,\\quad g_{12}=f_xf_y,\\quad g_{22}=1+f_y^2.$$\n", "\n", "By the assumption $\\text{grad}\\, f\\,\\Big|_{\\substack{x=x_0\\\\y=y_0}}=0$ at point $P$, the derivatives of $g_{ij}$ with respect to $x$ and $y$ vanish, so all Levi-Civita connection coefficients $\\Gamma^m_{ij}=0$ at $P$. \n", "\n", "Recall the formulas defining the Riemannian curvature tensor at $P$ ( here, as usual $(g_{ij})$ is the matrix of metric components and $(g^{ij})$ its inverse).\n", "\n", "$$\\displaystyle\\Gamma_{rs}^q=\\frac{1}{2}g^{tq}\\Big(\\frac{\\partial g_{rt}}{\\partial x^s}\n", "+\\frac{\\partial g_{ts}}{\\partial x^r}-\n", "\\frac{\\partial g_{sr}}{\\partial x^t}\\Big),\\\\\n", "R^m_{kij}=\\frac{\\partial \\Gamma^m_{kj}}{\\partial x^i}\n", "-\\frac{\\partial \\Gamma^m_{ki}}{\\partial x^j}\n", "+\\Gamma^m_{li}\\Gamma^l_{kj}\n", "-\\Gamma^m_{lj}\\Gamma^l_{ki},\\\\\n", "R_{ijkl}=g_{im}R^m_{jkl}\n", "=g_{im}\n", "\\Big(\\frac{\\partial \\Gamma^m_{jl}}{\\partial x^k}\n", "-\\frac{\\partial \\Gamma^m_{jk}}{\\partial x^l}\\Big),\\\\\n", "$$\n", "(in the last formula we used the fact that $\\Gamma^m_{ki}=0$ at $P=(x_0,y_0,z_0)$).\n", "To obtain the derivatives of Christoffel symbols we need their values in a neighborhood of $P$\n", "\n", "$$\\Gamma^m_{jl}=\\frac{1}{2}g^{pm}\\Big(\\frac{\\partial g_{jp}}{\\partial x^l}\n", "+\\frac{\\partial g_{pl}}{\\partial x^j}-\n", "\\frac{\\partial g_{lj}}{\\partial x^p}\\Big),\n", "$$\n", "so using the fact that derivatives of $g_{ij}$ vanish at $P$ we obtain\n", "\n", "$$\\frac{\\partial \\Gamma^m_{jl}}{\\partial x^k}\n", "=\\frac{1}{2}g^{pm}\\big(\\frac{\\partial^2 g_{jp}}{\\partial x^k\\partial x^l}\n", "+\\frac{\\partial^2 g_{pl}}{\\partial x^k\\partial x^j}-\n", "\\frac{\\partial^2 g_{lj}}{\\partial x^k\\partial x^p}\\Big).\n", "$$\n", "Similarly\n", "\n", "$$\\Gamma^m_{jk}=\\frac{1}{2}g^{pm}\\Big(\\frac{\\partial g_{jp}}{\\partial x^k}\n", "+\\frac{\\partial g_{pk}}{\\partial x^j}-\n", "\\frac{\\partial g_{kj}}{\\partial x^p}\\Big),\n", "$$\n", "so\n", "$$\n", "\\frac{\\partial \\Gamma^m_{jk}}{\\partial x^l}\n", "=\\frac{1}{2}g^{pm}\\big(\\frac{\\partial^2 g_{jp}}{\\partial x^l\\partial x^k}\n", "+\\frac{\\partial^2 g_{pk}}{\\partial x^l\\partial x^j}-\n", "\\frac{\\partial^2 g_{kj}}{\\partial x^l\\partial x^p}\\Big).\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Since $g_{im}g^{pm}=\\delta_i^p$, then $R_{ijkl}$ is a difference of two expressions:\n", "\n", "$$\\frac{1}{2}\\delta_i^p\\big(\\frac{\\partial^2 g_{jp}}{\\partial x^k\\partial x^l}\n", "+\\frac{\\partial^2 g_{pl}}{\\partial x^k\\partial x^j}-\n", "\\frac{\\partial^2 g_{lj}}{\\partial x^k\\partial x^p}\\big)\n", "=\n", "\\frac{1}{2}\\big(\\frac{\\partial^2 g_{ji}}{\\partial x^k\\partial x^l}\n", "+\\frac{\\partial^2 g_{il}}{\\partial x^k\\partial x^j}-\n", "\\frac{\\partial^2 g_{lj}}{\\partial x^k\\partial x^i}\\big)\n", "$$\n", "\n", "and\n", "\n", "$$\\frac{1}{2}\\delta_i^p\\big(\\frac{\\partial^2 g_{jp}}{\\partial x^l\\partial x^k}\n", "+\\frac{\\partial^2 g_{pk}}{\\partial x^l\\partial x^j}-\n", "\\frac{\\partial^2 g_{kj}}{\\partial x^l\\partial x^p}\\big)\n", "=\n", "\\frac{1}{2}\\big(\\frac{\\partial^2 g_{ji}}{\\partial x^l\\partial x^k}\n", "+\\frac{\\partial^2 g_{ik}}{\\partial x^l\\partial x^j}-\n", "\\frac{\\partial^2 g_{kj}}{\\partial x^l\\partial x^i}\\big).\n", "$$\n", "\n", "Thus\n", "\n", "$$R_{ijkl}=\\frac{1}{2}\\Big(\n", "\\frac{\\partial^2 g_{il}}{\\partial x^k\\partial x^j}+\n", "\\frac{\\partial^2 g_{kj}}{\\partial x^l\\partial x^i}-\n", "\\frac{\\partial^2 g_{lj}}{\\partial x^k\\partial x^i}-\n", "\\frac{\\partial^2 g_{ik}}{\\partial x^l\\partial x^j}\\Big).\n", "$$\n", "\n", "For $(i,j,k,l)=(1,2,1,2)$ we obtain\n", "$$R_{1212}=\\frac{1}{2}\\Big(\n", "\\frac{\\partial^2 g_{12}}{\\partial x^1\\partial x^2}+\n", "\\frac{\\partial^2 g_{12}}{\\partial x^2\\partial x^1}-\n", "\\frac{\\partial^2 g_{22}}{\\partial x^1\\partial x^1}-\n", "\\frac{\\partial^2 g_{11}}{\\partial x^2\\partial x^2}\\Big)\\\\\n", "=\\frac{1}{2}\\Big(\\frac{\\partial^2 g_{12}}{\\partial x\\partial y}+\n", "\\frac{\\partial^2 g_{12}}{\\partial y\\partial x}-\n", "\\frac{\\partial^2 g_{22}}{\\partial x^2}-\n", "\\frac{\\partial^2 g_{11}}{\\partial y^2}\\Big)\n", ".\n", "$$\n", "\n", "Since at $P$ \n", "$$(g_{11})_{yy}=2(f_{xy})^2,\\quad (g_{22})_{xx}=2(f_{xy})^2,\\quad (g_{12})_{xy}=f_{xx}f_{yy}+(f_{xy})^2,\n", "$$\n", "we have at $P$\n", "$$R_{1212}=\\frac{1}{2}\\big(2(f_{xx}f_{yy}+(f_{xy})^2)\n", "-2(f_{xy})^2\n", "-2(f_{xy})^2\\big)=f_{xx}f_{yy}-(f_{xy})^2=\\det\n", "\\left(\n", "\\begin{matrix}\n", "f_{xx} & f_{xy}\\\\\n", "f_{yx} & f_{yy}\n", "\\end{matrix}\n", "\\right)=K.\n", "$$\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "### Ricci tensor and scalar curvature\n", "\n", "
\n", "\n", "**Ricci tensor** can be defined by\n", "\n", "\\begin{equation}\n", "Ric(u,v)=R(e^i,u,e_i,v),\n", "\\tag{24.3}\n", "\\end{equation}\n", "\n", "for any vector fields $u,v$, where $e_i$ is any vector frame and $e^i$ the corresponding coframe.\n", "\n", "In a Riemannian manifold with the metric $g$ the components of Ricci tensor are defined by\n", "\n", "$$Ric_{ij}=R^k_{ikj}=g^{kl}R_{likj}=g^{lk}R_{kjli},$$\n", "\n", "and the **scalar curvature** by\n", "\n", "\\begin{equation}\n", "R=g^{ij}Ric_{ij}.\n", "\\tag{24.4}\n", "\\end{equation}\n", "\n", "In the case of two-dimensional manifold we have $R=2K$. In fact\n", "\n", "$$R=g^{ij}Ric_{ij}=g^{ij}g^{lk}R_{kjli}.$$ \n", "\n", "From the symmetry properties of $R_{ijkl}$ it follows that in the obtained sum of $2^4$ elements only 4 are non-zero:\n", "\n", "$$R=g^{22}g^{11}R_{1212}+g^{12}g^{21}R_{1221}+\n", "g^{21}g^{12}R_{2112}+g^{11}g^{22}R_{2121}\\\\\n", "=g^{22}g^{11}R_{1212}-g^{12}g^{21}R_{1212}-g^{21}g^{12}R_{1212}+g^{11}g^{22}R_{1212}\\\\\n", "=2(g^{11}g^{22}-(g^{12})^2)R_{1212}=2\\det (g^{ij})R_{1212}=\\frac{2}{\\det (g_{ij})}R_{1212}.\n", "$$\n", "\n", "**Remark** in the last calculations the condition $\\text{grad}\\, f\\,\\Big|_{\\substack{x=x_0\\\\y=y_0}}=0,$ was not used.\n", "\n", "\n", "If as previously, the coordinates at $P$ are such that $\\text{grad}\\, f\\,\\Big|_{\\substack{x=x_0\\\\y=y_0}}=0,$ we have $ \\det (g_{ij})\\Big|_{\\substack{x=x_0\\\\y=y_0}}=1$ and $R=2K$. Since $R$ and $K$ are scalars, and consequently, are coordinate-independent, we conclude that \n", "\n", "\\begin{equation}\n", "R = 2K\n", "\\tag{24.5}\n", "\\end{equation}\n", "\n", "at every (non-singular) point of the surface." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Remark.** For non-singular surfaces represented locally in the form $z=f(x,y)$ (without the condition $\\text{grad}\\, f\\,\\Big|_{\\substack{x=x_0\\\\y=y_0}}=0$) the Gauss curvature is defined by\n", "$$K=\\frac{f_{xx}f_{yy}-(f_{xy})^2}{(1+(f_x)^2+(f_y)^2)^2}.$$\n", "\n", "**Remark.**\n", "The calculations above give us the formula\n", "$$R_{1212}=\\frac{R}{2}\\det(g_{ij}).$$\n", "\n", "It can be generalized to all components of the tensor $R_{ijkl}$ as follows:\n", "\n", "$$R_{ijkl}=\\frac{R}{2}(g_{ik}g_{jl}-g_{il}g_{jk}).$$\n", "\n", "In fact, an explicit calculations using the symmetry properties of $R_{ijkl}$ show that\n", "\n", "\\begin{eqnarray}\n", " (i,j,k,l)=(1,2,1,2)\\quad \\Rightarrow & \\quad\n", "\\frac{R}{2}(g_{11}g_{22}-g_{12}g_{21})=\\frac{R}{2}\\det(g_{ij})=R_{1212},\\\\\n", "(i,j,k,l)=(2,1,1,2)\\quad \\Rightarrow & \\quad\n", "\\frac{R}{2}(g_{21}g_{12}-g_{22}g_{11})=-\\frac{R}{2}\\det(g_{ij})=R_{2112},\\\\\n", "(i,j,k,l)=(1,2,2,1)\\quad \\Rightarrow & \\quad\n", "\\frac{R}{2}(g_{12}g_{21}-g_{11}g_{22})=-\\frac{R}{2}\\det(g_{ij})=R_{1221},\\\\\n", "(i,j,k,l)=(2,1,2,1)\\quad \\Rightarrow & \\quad\n", "\\frac{R}{2}(g_{22}g_{11}-g_{21}g_{12})=\\frac{R}{2}\\det(g_{ij})=R_{2121},\\\\\n", "\\end{eqnarray}\n", "\n", "and for the remaining sequences of indices, both sides are zero.\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Example 24.1**\n", "\n", "In $R^2$ with $g=dx\\otimes dx+dy\\otimes dy$, we have $R^i_{mkl}=0$ and $K=\\frac{R}{2}=0.$" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Tensor field Riem(g) of type (1,3) on the Euclidean plane E^2\n" ] }, { "data": { "text/plain": [ "Riem(g) = 0" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "E.=EuclideanSpace() # Euclidean space E^2\n", "print(E.metric().riemann()) # curvature tensor of (1,3)-type\n", "E.metric().riemann().disp() # show the curvature tensor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The method `ricci` gives the Ricci tensor: " ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Field of symmetric bilinear forms Ric(g) on the Euclidean plane E^2\n" ] }, { "data": { "text/plain": [ "Ric(g) = 0" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "print(E.metric().ricci()) # Ricci curvature tensor\n", "E.metric().ricci().disp() # show the result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Ricci scalar curvature can be obtained using `ricci_scalar` method:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "E.metric().ricci_scalar().expr() # Ricci scalar curvature" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Example 24.2**\n", "\n", "The same can be done without `EuclideanSpace` command." ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Tensor field Riem(g) of type (1,3) on the 2-dimensional differentiable manifold R^2\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\mathrm{Riem}\\left(g\\right) = 0\\)" ], "text/latex": [ "$\\displaystyle \\mathrm{Riem}\\left(g\\right) = 0$" ], "text/plain": [ "Riem(g) = 0" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%display latex\n", "M=Manifold(2,name='R^2',start_index=1) # manifold R2\n", "c_xy.=M.chart() # chart on R^2\n", "g = M.metric('g'); # metric on R^2\n", "g[:]=[[1,0],[0,1]] # nonzero components\n", "Riem=g.riemann() # curvature (1,3)-type tensor \n", "print(Riem) # show information on curv. tensor\n", "Riem.disp() # show the curvature tensor" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Field of symmetric bilinear forms Ric(g) on the 2-dimensional differentiable manifold R^2\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\mathrm{Ric}\\left(g\\right) = 0\\)" ], "text/latex": [ "$\\displaystyle \\mathrm{Ric}\\left(g\\right) = 0$" ], "text/plain": [ "Ric(g) = 0" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "print(g.ricci()) # Ricci curvature tensor information\n", "g.ricci().disp() # show Ricci tensor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Ricci scalar curvature: " ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle 0\\)" ], "text/latex": [ "$\\displaystyle 0$" ], "text/plain": [ "0" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.ricci_scalar().expr() # Ricci scalar curvature " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Example 24.3**\n", "\n", "For the metric on the sphere $S^2\\subset R^3$, we have \n", "$𝑔=d𝜃⊗d𝜃+sin(𝜃)^2d𝜙⊗d𝜙$, $K=R/2=1.$" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle g = \\mathrm{d} \\theta\\otimes \\mathrm{d} \\theta + \\sin\\left(\\theta\\right)^{2} \\mathrm{d} \\phi\\otimes \\mathrm{d} \\phi\\)" ], "text/latex": [ "$\\displaystyle g = \\mathrm{d} \\theta\\otimes \\mathrm{d} \\theta + \\sin\\left(\\theta\\right)^{2} \\mathrm{d} \\phi\\otimes \\mathrm{d} \\phi$" ], "text/plain": [ "g = dtheta⊗dtheta + sin(theta)^2 dphi⊗dphi" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%display latex\n", "M = Manifold(3, 'R^3') # R^3 ambient space for S^2\n", "c_xyz. = M.chart() # chart on R^3\n", "N = Manifold(2, 'N',start_index=1) # sphere S^2\n", "c_sph.=N.chart() # chart on S^2\n", "psi = N.diff_map(M, (sin(theta)*cos(phi), \n", " sin(theta)*sin(phi),\n", " cos(theta)),\n", " name='psi',latex_name=r'\\psi') # embedding S^2 -> R^3\n", "g0=M.metric('g0') # metric g0 on R^3\n", "g0[0,0],g0[1,1],g0[2,2]=1,1,1 # components of g0\n", "g=N.metric('g') # metric on S^2\n", "g.set( psi.pullback(g0) ) # g is the pullback of g0\n", "g.disp() # show g" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\begin{array}{lcl} \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 1}\\,2\\,1\\,2}^{\\,1\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\sin\\left(\\theta\\right)^{2} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 1}\\,2\\,2\\,1}^{\\,1\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\sin\\left(\\theta\\right)^{2} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 2}\\,1\\,1\\,2}^{\\,2\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -1 \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 2}\\,1\\,2\\,1}^{\\,2\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & 1 \\end{array}\\)" ], "text/latex": [ "$\\displaystyle \\begin{array}{lcl} \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 1}\\,2\\,1\\,2}^{\\,1\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\sin\\left(\\theta\\right)^{2} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 1}\\,2\\,2\\,1}^{\\,1\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\sin\\left(\\theta\\right)^{2} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 2}\\,1\\,1\\,2}^{\\,2\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -1 \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 2}\\,1\\,2\\,1}^{\\,2\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & 1 \\end{array}$" ], "text/plain": [ "Riem(g)^1_212 = sin(theta)^2 \n", "Riem(g)^1_221 = -sin(theta)^2 \n", "Riem(g)^2_112 = -1 \n", "Riem(g)^2_121 = 1 " ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Riem=g.riemann() # curvature (1,3)-tensor\n", "Riem.display_comp(coordinate_labels=False) # show components" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Field of symmetric bilinear forms Ric(g) on the 2-dimensional differentiable manifold N\n" ] }, { "data": { "text/html": [ "\\(\\displaystyle \\mathrm{Ric}\\left(g\\right) = \\mathrm{d} \\theta\\otimes \\mathrm{d} \\theta + \\sin\\left(\\theta\\right)^{2} \\mathrm{d} \\phi\\otimes \\mathrm{d} \\phi\\)" ], "text/latex": [ "$\\displaystyle \\mathrm{Ric}\\left(g\\right) = \\mathrm{d} \\theta\\otimes \\mathrm{d} \\theta + \\sin\\left(\\theta\\right)^{2} \\mathrm{d} \\phi\\otimes \\mathrm{d} \\phi$" ], "text/plain": [ "Ric(g) = dtheta⊗dtheta + sin(theta)^2 dphi⊗dphi" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "print(g.ricci()) # Ricci curvature tensor\n", "g.ricci().disp() # show Ricci tensor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us show how to apply (24.3).\n", "\n", "First we have to define the frame and coframe fields:" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [], "source": [ "fr=c_sph.frame()[:] # frame\n", "cfr=c_sph.coframe()[:] # coframe" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "next we define the matrix of coefficient of the Ricci tensor field according to (24.3). " ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\left[\\left[1, 0\\right], \\left[0, \\sin\\left(\\theta\\right)^{2}\\right]\\right]\\)" ], "text/latex": [ "$\\displaystyle \\left[\\left[1, 0\\right], \\left[0, \\sin\\left(\\theta\\right)^{2}\\right]\\right]$" ], "text/plain": [ "[[1, 0], [0, sin(theta)^2]]" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric_coeff=[[sum([Riem(cfr[i],fr[k],fr[i],fr[l]).expr() \n", " for i in range(2)])\n", " for k in range(2)] for l in range(2)] # cf. (24.3)\n", "Ric_coeff[:] # Ricci ten. components" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Finally we define the Ricci tensor:" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle Ric = \\mathrm{d} \\theta\\otimes \\mathrm{d} \\theta + \\sin\\left(\\theta\\right)^{2} \\mathrm{d} \\phi\\otimes \\mathrm{d} \\phi\\)" ], "text/latex": [ "$\\displaystyle Ric = \\mathrm{d} \\theta\\otimes \\mathrm{d} \\theta + \\sin\\left(\\theta\\right)^{2} \\mathrm{d} \\phi\\otimes \\mathrm{d} \\phi$" ], "text/plain": [ "Ric = dtheta⊗dtheta + sin(theta)^2 dphi⊗dphi" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric=N.tensor_field(0,2,'Ric') # Ricci curvature tensor\n", "Ric[:]=Ric_coeff # define all components\n", "Ric.disp() # show Ricci tensor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ricci scalar curvature:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle 2\\)" ], "text/latex": [ "$\\displaystyle 2$" ], "text/plain": [ "2" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.ricci_scalar().expr() # Ricci scalar curvature" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Formula (24.4) can be used as follows:" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle 2\\)" ], "text/latex": [ "$\\displaystyle 2$" ], "text/plain": [ "2" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.inverse().contract(Ric).trace().expr()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "According to (24.5), the Gaussian curvature is 1." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Example 24.4**\n", "\n", "Consider the Poincare half-plane $y>0$ with the metric defined by\n", "$g_{11}=\\frac{1}{y^2},\\ \\ g_{22}=\\frac{1}{y^2}, \\ $ and remaining components equal to zero." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "M = Manifold(2, 'M', start_index=1) # Poincare half-plane\n", "X. = M.chart(coord_restrictions=lambda x,y: y>0)\n", "g = M.metric('g') # metric on M\n", "g[1,1], g[2,2] = 1/y^2, 1/y^2 # nonzero components of g" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Compute (1,3) type curvature tensor:" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\begin{array}{lcl} \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 1}\\,2\\,1\\,2}^{\\,1\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{1}{y^{2}} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 1}\\,2\\,2\\,1}^{\\,1\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{1}{y^{2}} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 2}\\,1\\,1\\,2}^{\\,2\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{1}{y^{2}} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 2}\\,1\\,2\\,1}^{\\,2\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{1}{y^{2}} \\end{array}\\)" ], "text/latex": [ "$\\displaystyle \\begin{array}{lcl} \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 1}\\,2\\,1\\,2}^{\\,1\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{1}{y^{2}} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 1}\\,2\\,2\\,1}^{\\,1\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{1}{y^{2}} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 2}\\,1\\,1\\,2}^{\\,2\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{1}{y^{2}} \\\\ \\mathrm{Riem}\\left(g\\right)_{\\phantom{\\, 2}\\,1\\,2\\,1}^{\\,2\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{1}{y^{2}} \\end{array}$" ], "text/plain": [ "Riem(g)^1_212 = -1/y^2 \n", "Riem(g)^1_221 = y^(-2) \n", "Riem(g)^2_112 = y^(-2) \n", "Riem(g)^2_121 = -1/y^2 " ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Riem=g.riemann() # (1,3) type curvature tensor\n", "Riem.display_comp(coordinate_labels=False) # show nonzero comp." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "and next the Riemannian curvature tensor of type (0,4), using (24.1):" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\begin{array}{lcl} R_{\\,1\\,2\\,1\\,2}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{1}{y^{4}} \\\\ R_{\\,1\\,2\\,2\\,1}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{1}{y^{4}} \\\\ R_{\\,2\\,1\\,1\\,2}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{1}{y^{4}} \\\\ R_{\\,2\\,1\\,2\\,1}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{1}{y^{4}} \\end{array}\\)" ], "text/latex": [ "$\\displaystyle \\begin{array}{lcl} R_{\\,1\\,2\\,1\\,2}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{1}{y^{4}} \\\\ R_{\\,1\\,2\\,2\\,1}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{1}{y^{4}} \\\\ R_{\\,2\\,1\\,1\\,2}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{1}{y^{4}} \\\\ R_{\\,2\\,1\\,2\\,1}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{1}{y^{4}} \\end{array}$" ], "text/plain": [ "R_1212 = -1/y^4 \n", "R_1221 = y^(-4) \n", "R_2112 = y^(-4) \n", "R_2121 = -1/y^4 " ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R=M.tensor_field(0,4,'R') # R is (0,4)-type tensor field\n", "R[:]=g.contract(Riem)[:] # apply (24.1)\n", "R.display_comp(coordinate_labels=False) # show (0,4) type ten. R" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now compute the Ricci curvature tensor:" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\mathrm{Ric}\\left(g\\right) = -\\frac{1}{y^{2}} \\mathrm{d} x\\otimes \\mathrm{d} x -\\frac{1}{y^{2}} \\mathrm{d} y\\otimes \\mathrm{d} y\\)" ], "text/latex": [ "$\\displaystyle \\mathrm{Ric}\\left(g\\right) = -\\frac{1}{y^{2}} \\mathrm{d} x\\otimes \\mathrm{d} x -\\frac{1}{y^{2}} \\mathrm{d} y\\otimes \\mathrm{d} y$" ], "text/plain": [ "Ric(g) = -1/y^2 dx⊗dx - 1/y^2 dy⊗dy" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.ricci().disp() # Ricci curv. tensor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "and Ricci curvature scalar:" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle -2\\)" ], "text/latex": [ "$\\displaystyle -2$" ], "text/plain": [ "-2" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.ricci_scalar().expr() # Ricci scalar curv." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
\n", "\n", "**Example 24.5**\n", "\n", "Poincare disk is the set $\\ \\ \\{(x,y)\\in R^2:x^2+y^2<1\\}\\ \\ $ with the metric defined by\n", "$g_{11}=\\frac{4}{(1-x^2-y^2)^2},\\ \\ g_{22}=\\frac{4}{(1-x^2-y^2)^2}\\ \\ $ and remaining components equal to zero." ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [], "source": [ "M = Manifold(2, 'M', start_index=1) # Poincare disc\n", " # Cartesian coordinates on the Poincaré disk:\n", "X. = M.chart('x:(-1,1) y:(-1,1)', \n", " coord_restrictions=lambda x,y: x^2+y^2<1)\n", "g = M.metric('g') # metric on M\n", " # components of g\n", "g[1,1], g[2,2] = 4/(1-x^2-y^2)^2,4/(1-x^2-y^2)^2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Compute (1,3)-type curvature tensor. Since `g.riemann()` gives an unsimplified result, we simplify the components one by one." ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\begin{array}{lcl} R_{\\phantom{\\, 1}\\,2\\,1\\,2}^{\\,1\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\\\ R_{\\phantom{\\, 1}\\,2\\,2\\,1}^{\\,1\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\\\ R_{\\phantom{\\, 2}\\,1\\,1\\,2}^{\\,2\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\\\ R_{\\phantom{\\, 2}\\,1\\,2\\,1}^{\\,2\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\end{array}\\)" ], "text/latex": [ "$\\displaystyle \\begin{array}{lcl} R_{\\phantom{\\, 1}\\,2\\,1\\,2}^{\\,1\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\\\ R_{\\phantom{\\, 1}\\,2\\,2\\,1}^{\\,1\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\\\ R_{\\phantom{\\, 2}\\,1\\,1\\,2}^{\\,2\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\\\ R_{\\phantom{\\, 2}\\,1\\,2\\,1}^{\\,2\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\end{array}$" ], "text/plain": [ "R^1_212 = -4/(x^2 + y^2 - 1)^2 \n", "R^1_221 = 4/(x^2 + y^2 - 1)^2 \n", "R^2_112 = 4/(x^2 + y^2 - 1)^2 \n", "R^2_121 = -4/(x^2 + y^2 - 1)^2 " ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Riem = g.riemann(); # curvature (1,3) type tensor\n", " # factor components\n", "Riem2=[[[[Riem[a,b,c,d].factor() for a in [1,2]] \n", " for b in [1,2]] for c in [1,2]] for d in[1,2]];\n", "R=M.tensor_field(1,3,'R') # tensor field of type (1,3)\n", "R[X.frame(),:]=Riem2 # simplified components\n", "R.display_comp(coordinate_labels=False) # show R" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ricci curvature tensor:" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\mathrm{Ric}\\left(g\\right) = -\\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\mathrm{d} x\\otimes \\mathrm{d} x -\\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\mathrm{d} y\\otimes \\mathrm{d} y\\)" ], "text/latex": [ "$\\displaystyle \\mathrm{Ric}\\left(g\\right) = -\\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\mathrm{d} x\\otimes \\mathrm{d} x -\\frac{4}{{\\left(x^{2} + y^{2} - 1\\right)}^{2}} \\mathrm{d} y\\otimes \\mathrm{d} y$" ], "text/plain": [ "Ric(g) = -4/(x^2 + y^2 - 1)^2 dx⊗dx - 4/(x^2 + y^2 - 1)^2 dy⊗dy" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric=g.ricci() # Ricci curvature tensor\n", "Ric.apply_map(factor) # factor components\n", "Ric.disp() # show Ricci curv.tensor " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ricci curvature scalar:" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle -2\\)" ], "text/latex": [ "$\\displaystyle -2$" ], "text/plain": [ "-2" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.ricci_scalar().expr() # Ricci scalar curvature " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Example 24.6**\n", "\n", "Consider $R^2$ with the matrix of metric components:" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\left(\\begin{array}{rr}\n", "4 \\, x^{2} + 1 & 4 \\, x y \\\\\n", "4 \\, x y & 4 \\, y^{2} + 1\n", "\\end{array}\\right)\\)" ], "text/latex": [ "$\\displaystyle \\left(\\begin{array}{rr}\n", "4 \\, x^{2} + 1 & 4 \\, x y \\\\\n", "4 \\, x y & 4 \\, y^{2} + 1\n", "\\end{array}\\right)$" ], "text/plain": [ "[4*x^2 + 1 4*x*y]\n", "[ 4*x*y 4*y^2 + 1]" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "matrix([[1+4*x^2,4*x*y],[4*x*y,1+4*y^2]])" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [], "source": [ "N=Manifold(2,name='R^2',start_index=1) # Manifold R^2\n", "X.=N.chart() # chart on R^2\n", "g = N.metric('g'); # metric g on R^2\n", "g[:]=[[1+4*x^2,4*x*y],[4*x*y,1+4*y^2]] # components of g\n", "Riem = g.riemann(); # (1,3) type curv. tens.\n", "R=N.tensor_field(0,4,'R') # (0,4) type curv. tens." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Compute Riemannian (0,4)-type tensor." ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\begin{array}{lcl} R_{\\,1\\,2\\,1\\,2}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{4}{4 \\, x^{2} + 4 \\, y^{2} + 1} \\\\ R_{\\,1\\,2\\,2\\,1}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{4}{4 \\, x^{2} + 4 \\, y^{2} + 1} \\\\ R_{\\,2\\,1\\,1\\,2}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{4}{4 \\, x^{2} + 4 \\, y^{2} + 1} \\\\ R_{\\,2\\,1\\,2\\,1}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{4}{4 \\, x^{2} + 4 \\, y^{2} + 1} \\end{array}\\)" ], "text/latex": [ "$\\displaystyle \\begin{array}{lcl} R_{\\,1\\,2\\,1\\,2}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{4}{4 \\, x^{2} + 4 \\, y^{2} + 1} \\\\ R_{\\,1\\,2\\,2\\,1}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{4}{4 \\, x^{2} + 4 \\, y^{2} + 1} \\\\ R_{\\,2\\,1\\,1\\,2}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{4}{4 \\, x^{2} + 4 \\, y^{2} + 1} \\\\ R_{\\,2\\,1\\,2\\,1}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{4}{4 \\, x^{2} + 4 \\, y^{2} + 1} \\end{array}$" ], "text/plain": [ "R_1212 = 4/(4*x^2 + 4*y^2 + 1) \n", "R_1221 = -4/(4*x^2 + 4*y^2 + 1) \n", "R_2112 = -4/(4*x^2 + 4*y^2 + 1) \n", "R_2121 = 4/(4*x^2 + 4*y^2 + 1) " ] }, "execution_count": 27, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R[:]=g.contract(Riem)[:] # use (24.1)\n", "R.display_comp(coordinate_labels=False) # show (0,4) t. R" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ricci curvature tensor:" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\mathrm{Ric}\\left(g\\right) = \\frac{4 \\, {\\left(4 \\, x^{2} + 1\\right)}}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}} \\mathrm{d} x\\otimes \\mathrm{d} x + \\frac{16 \\, x y}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}} \\mathrm{d} x\\otimes \\mathrm{d} y + \\frac{16 \\, x y}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}} \\mathrm{d} y\\otimes \\mathrm{d} x + \\frac{4 \\, {\\left(4 \\, y^{2} + 1\\right)}}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}} \\mathrm{d} y\\otimes \\mathrm{d} y\\)" ], "text/latex": [ "$\\displaystyle \\mathrm{Ric}\\left(g\\right) = \\frac{4 \\, {\\left(4 \\, x^{2} + 1\\right)}}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}} \\mathrm{d} x\\otimes \\mathrm{d} x + \\frac{16 \\, x y}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}} \\mathrm{d} x\\otimes \\mathrm{d} y + \\frac{16 \\, x y}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}} \\mathrm{d} y\\otimes \\mathrm{d} x + \\frac{4 \\, {\\left(4 \\, y^{2} + 1\\right)}}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}} \\mathrm{d} y\\otimes \\mathrm{d} y$" ], "text/plain": [ "Ric(g) = 4*(4*x^2 + 1)/(4*x^2 + 4*y^2 + 1)^2 dx⊗dx + 16*x*y/(4*x^2 + 4*y^2 + 1)^2 dx⊗dy + 16*x*y/(4*x^2 + 4*y^2 + 1)^2 dy⊗dx + 4*(4*y^2 + 1)/(4*x^2 + 4*y^2 + 1)^2 dy⊗dy" ] }, "execution_count": 28, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric=g.ricci() # Ricci curvature tensor\n", "Ric.apply_map(factor) # factor components\n", "Ric.disp() # show the result" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "and Ricci scalar curvature:" ] }, { "cell_type": "code", "execution_count": 29, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\frac{4}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}}\\)" ], "text/latex": [ "$\\displaystyle \\frac{4}{{\\left(4 \\, x^{2} + 4 \\, y^{2} + 1\\right)}^{2}}$" ], "text/plain": [ "4/(4*x^2 + 4*y^2 + 1)^2" ] }, "execution_count": 29, "metadata": {}, "output_type": "execute_result" } ], "source": [ "factor(g.ricci_scalar().expr()/2) # Ricci curvature scalar" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "**Example 24.7**\n", "\n", "Consider the embedding of the hyperboloid into $R^3$ defined by \n", "$\\ \\ \\psi(u,v)= (u, v,u^2-v^2)$. The metric on the hyperboloid can be defined as the pullback $\\psi^*g_0\\ \\ $ under $\\psi$ where $g_0$ is the standard metric on $R^3$." ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle g = \\left( 4 \\, u^{2} + 1 \\right) \\mathrm{d} u\\otimes \\mathrm{d} u -4 \\, u v \\mathrm{d} u\\otimes \\mathrm{d} v -4 \\, u v \\mathrm{d} v\\otimes \\mathrm{d} u + \\left( 4 \\, v^{2} + 1 \\right) \\mathrm{d} v\\otimes \\mathrm{d} v\\)" ], "text/latex": [ "$\\displaystyle g = \\left( 4 \\, u^{2} + 1 \\right) \\mathrm{d} u\\otimes \\mathrm{d} u -4 \\, u v \\mathrm{d} u\\otimes \\mathrm{d} v -4 \\, u v \\mathrm{d} v\\otimes \\mathrm{d} u + \\left( 4 \\, v^{2} + 1 \\right) \\mathrm{d} v\\otimes \\mathrm{d} v$" ], "text/plain": [ "g = (4*u^2 + 1) du⊗du - 4*u*v du⊗dv - 4*u*v dv⊗du + (4*v^2 + 1) dv⊗dv" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "%display latex\n", "M = Manifold(3, 'R3') # manifold R^3\n", "c_xyz. = M.chart() # Cart. coord. on R^3\n", "N=Manifold(2,name='R2',start_index=1) # hyperboloid N\n", "c_uv.=N.chart() # coordinates on N\n", "g0 = M.metric('g0'); # standard metr, of R^3\n", "g0[:]=[[1,0,0],[0,1,0],[0,0,1]]; # components of g0\n", "psi = N.diff_map(M, (u, v,u^2-v^2) ,name='psi') # embedding\n", "g=N.metric('g') # metric on N\n", "g.set(psi.pullback(g0)) # g is pullback of g0\n", "g.disp() # show g" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Compute the Riemannian curvature tensor of type (0,4)." ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\begin{array}{lcl} R_{\\,1\\,2\\,1\\,2}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{4}{4 \\, u^{2} + 4 \\, v^{2} + 1} \\\\ R_{\\,1\\,2\\,2\\,1}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{4}{4 \\, u^{2} + 4 \\, v^{2} + 1} \\\\ R_{\\,2\\,1\\,1\\,2}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{4}{4 \\, u^{2} + 4 \\, v^{2} + 1} \\\\ R_{\\,2\\,1\\,2\\,1}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{4}{4 \\, u^{2} + 4 \\, v^{2} + 1} \\end{array}\\)" ], "text/latex": [ "$\\displaystyle \\begin{array}{lcl} R_{\\,1\\,2\\,1\\,2}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}} & = & -\\frac{4}{4 \\, u^{2} + 4 \\, v^{2} + 1} \\\\ R_{\\,1\\,2\\,2\\,1}^{\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 2}\\phantom{\\, 1}} & = & \\frac{4}{4 \\, u^{2} + 4 \\, v^{2} + 1} \\\\ R_{\\,2\\,1\\,1\\,2}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 1}\\phantom{\\, 2}} & = & \\frac{4}{4 \\, u^{2} + 4 \\, v^{2} + 1} \\\\ R_{\\,2\\,1\\,2\\,1}^{\\phantom{\\, 2}\\phantom{\\, 1}\\phantom{\\, 2}\\phantom{\\, 1}} & = & -\\frac{4}{4 \\, u^{2} + 4 \\, v^{2} + 1} \\end{array}$" ], "text/plain": [ "R_1212 = -4/(4*u^2 + 4*v^2 + 1) \n", "R_1221 = 4/(4*u^2 + 4*v^2 + 1) \n", "R_2112 = 4/(4*u^2 + 4*v^2 + 1) \n", "R_2121 = -4/(4*u^2 + 4*v^2 + 1) " ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Riem = g.riemann(); # curv. (1,3) tensor\n", "R=N.tensor_field(0,4,'R') # tensor field (0,4)-type\n", "R[:]=g.contract(Riem)[:] # use (24.1)\n", "R.display_comp(coordinate_labels=False) # show (0,4) type ten. R" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ricci tensor:" ] }, { "cell_type": "code", "execution_count": 32, "metadata": { "tags": [] }, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle \\mathrm{Ric}\\left(g\\right) = -\\frac{4 \\, {\\left(4 \\, u^{2} + 1\\right)}}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}} \\mathrm{d} u\\otimes \\mathrm{d} u + \\frac{16 \\, u v}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}} \\mathrm{d} u\\otimes \\mathrm{d} v + \\frac{16 \\, u v}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}} \\mathrm{d} v\\otimes \\mathrm{d} u -\\frac{4 \\, {\\left(4 \\, v^{2} + 1\\right)}}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}} \\mathrm{d} v\\otimes \\mathrm{d} v\\)" ], "text/latex": [ "$\\displaystyle \\mathrm{Ric}\\left(g\\right) = -\\frac{4 \\, {\\left(4 \\, u^{2} + 1\\right)}}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}} \\mathrm{d} u\\otimes \\mathrm{d} u + \\frac{16 \\, u v}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}} \\mathrm{d} u\\otimes \\mathrm{d} v + \\frac{16 \\, u v}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}} \\mathrm{d} v\\otimes \\mathrm{d} u -\\frac{4 \\, {\\left(4 \\, v^{2} + 1\\right)}}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}} \\mathrm{d} v\\otimes \\mathrm{d} v$" ], "text/plain": [ "Ric(g) = -4*(4*u^2 + 1)/(4*u^2 + 4*v^2 + 1)^2 du⊗du + 16*u*v/(4*u^2 + 4*v^2 + 1)^2 du⊗dv + 16*u*v/(4*u^2 + 4*v^2 + 1)^2 dv⊗du - 4*(4*v^2 + 1)/(4*u^2 + 4*v^2 + 1)^2 dv⊗dv" ] }, "execution_count": 32, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric=g.ricci() # Ricci curvature tensor\n", "Ric.apply_map(factor) # factor components\n", "Ric.disp() # show the Ricci tensor" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Ricci scalar curvature:" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\\(\\displaystyle -\\frac{8}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}}\\)" ], "text/latex": [ "$\\displaystyle -\\frac{8}{{\\left(4 \\, u^{2} + 4 \\, v^{2} + 1\\right)}^{2}}$" ], "text/plain": [ "-8/(4*u^2 + 4*v^2 + 1)^2" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "factor(g.ricci_scalar().expr()) # Ricci scalar curvature " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## What's next?\n", "\n", "Take a look at the notebook [Torsion and curvature forms](https://nbviewer.org/github/sagemanifolds/IntroToManifolds/blob/main/25Manifold_Torsion_Curvature_Forms.ipynb)." ] } ], "metadata": { "kernelspec": { "display_name": "SageMath 9.6", "language": "sage", "name": "sagemath" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 4 }