{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# de Sitter spacetime\n", "\n", "This notebook illustrates a few capabilities of SageMath in computations regarding the 4-dimensional de Sitter spacetime. The corresponding tools have been developed within the [SageManifolds](https://sagemanifolds.obspm.fr) project (version 1.3, as included in SageMath 8.3).\n", "\n", "Click [here](https://raw.githubusercontent.com/sagemanifolds/SageManifolds/master/Worksheets/v1.3/SM_de_Sitter.ipynb) to download the notebook file (ipynb format). To run it, you must start SageMath within the Jupyter notebook, via the command `sage -n jupyter`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*NB:* a version of SageMath at least equal to 8.2 is required to run this worksheet:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'SageMath version 8.3, Release Date: 2018-08-03'" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "version()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First we set up the notebook to display mathematical objects using LaTeX rendering:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "%display latex" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We also define a viewer for 3D plots (use `'threejs'` or `'jmol'` for interactive 3D graphics):" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "viewer3D = 'threejs' # must be 'threejs', 'jmol', 'tachyon' or None (default)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Spacetime manifold\n", "\n", "We declare the de Sitter spacetime as a 4-dimensional Lorentzian manifold:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "4-dimensional Lorentzian manifold M\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "4-dimensional Lorentzian manifold M" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "M = Manifold(4, 'M', r'\\mathcal{M}', structure='Lorentzian')\n", "print(M) ; M" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

We consider hyperspherical coordinates $(\\tau,\\chi,\\theta,\\phi)$ on $\\mathcal{M}$. Allowing for the standard coordinate singularities at $\\chi=0$, $\\chi=\\pi$, $\\theta=0$ or $\\theta=\\pi$, these coordinates cover the entire spacetime manifold (which is topologically $\\mathbb{R}\\times\\mathbb{S}^3$). If we restrict ourselves to regular coordinates (i.e. to consider only mathematically well defined charts), the hyperspherical coordinates cover only an open part of $\\mathcal{M}$, which we call $\\mathcal{M}_0$, on which $\\chi$ spans the open interval $(0,\\pi)$, $\\theta$ the open interval $(0,\\pi)$ and $\\phi$ the open interval $(0,2\\pi)$. Therefore, we declare:

" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Chart (M_0, (ta, ch, th, ph))\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "Chart (M_0, (ta, ch, th, ph))" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "M0 = M.open_subset('M_0', r'\\mathcal{M}_0')\n", "X_hyp. = M0.chart(r'ta:\\tau ch:(0,pi):\\chi th:(0,pi):\\theta ph:(0,2*pi):\\phi')\n", "print(X_hyp) ; X_hyp" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## $\\mathbb{R}^{1,4}$ as an ambient space\n", "\n", "The de Sitter metric can be defined as that induced by the embedding of $\\mathcal{M}$ into the 5-dimensional Minkowski space $\\mathbb{R}^{1,4}$, the latter being nothing but $\\mathbb{R}^5\n", "$ endowed with a flat metric $h$ of signature $(-,+,+,+,+)$. We therefore introduce $\\mathbb{R}^{1,4}$ as a 5-dimensional Lorentzian manifold, covered by canonical coordinates:" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Chart (R14, (T, W, X, Y, Z))\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "Chart (R14, (T, W, X, Y, Z))" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R14 = Manifold(5, 'R14', r'\\mathbb{R}^{1,4}', structure='Lorentzian',\n", " metric_name='h')\n", "X5. = R14.chart()\n", "print(X5) ; X5" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The embedding of $\\mathcal{M}$ into $\\mathbb{R}^5$ is defined as a differential mapping $\\Phi$ from $\\mathcal{M}$ to $\\mathbb{R}^5$, by providing its expression in terms of $\\mathcal{M}$'s default chart (which is X_hyp = $(\\mathcal{M}_0,(\\tau,\\chi,\\theta,\\phi))$ ) and $\\mathbb{R}^5$'s default chart (which is X5 = $(\\mathbb{R}^5,(T,W,X,Y,Z))$ ):" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Differentiable map Phi from the 4-dimensional Lorentzian manifold M to the 5-dimensional Lorentzian manifold R14\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "Phi: M --> R14\n", "on M_0: (ta, ch, th, ph) |--> (T, W, X, Y, Z) = (sinh(b*ta)/b, cos(ch)*cosh(b*ta)/b, cos(ph)*cosh(b*ta)*sin(ch)*sin(th)/b, cosh(b*ta)*sin(ch)*sin(ph)*sin(th)/b, cos(th)*cosh(b*ta)*sin(ch)/b)" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "var('b', domain='real')\n", "Phi = M.diff_map(R14, [sinh(b*ta)/b,\n", " cosh(b*ta)/b * cos(ch),\n", " cosh(b*ta)/b * sin(ch)*sin(th)*cos(ph),\n", " cosh(b*ta)/b * sin(ch)*sin(th)*sin(ph),\n", " cosh(b*ta)/b * sin(ch)*cos(th)],\n", " name='Phi', latex_name=r'\\Phi')\n", "print(Phi) ; Phi.display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

The constant $b$ is a scale parameter. Considering de Sitter metric as a solution of vacuum Einstein equation with positive cosmological constant $\\Lambda$, one has $b = \\sqrt{\\Lambda/3}$. 

\n", "

Let us evaluate the image of a point via the mapping $\\Phi$:

" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Point p on the 4-dimensional Lorentzian manifold M\n" ] } ], "source": [ "p = M.point((ta, ch, th, ph), name='p') ; print(p)" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(ta, ch, th, ph)" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p.coord()" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Point Phi(p) on the 5-dimensional Lorentzian manifold R14\n" ] } ], "source": [ "q = Phi(p) ; print(q)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "(sinh(b*ta)/b,\n", " cos(ch)*cosh(b*ta)/b,\n", " cos(ph)*cosh(b*ta)*sin(ch)*sin(th)/b,\n", " cosh(b*ta)*sin(ch)*sin(ph)*sin(th)/b,\n", " cos(th)*cosh(b*ta)*sin(ch)/b)" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "q.coord()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

The image of $\\mathcal{M}$ by $\\Phi$ is a hyperboloid of one sheet, of equation $-T^2+W^2+X^2+Y^2+Z^2=b^{-2}$. Indeed:

" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "b^(-2)" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "(Tq,Wq,Xq,Yq,Zq) = q.coord()\n", "s = -Tq^2 + Wq^2 + Xq^2 + Yq^2 + Zq^2\n", "s.simplify_full()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

We may use the embedding $\\Phi$ to draw the coordinate grid $(\\tau,\\chi)$ in terms of the coordinates $(W,X,T)$ for $\\theta=\\pi/2$ and $\\phi=0$ (red) and $\\theta=\\pi/2$ and $\\phi=\\pi$ (green) (the brown lines are the lines $\\tau={\\rm const}$):

" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "\n", "\n" ], "text/plain": [ "Graphics3d Object" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "graph1 = X_hyp.plot(X5, mapping=Phi, ambient_coords=(W,X,T), fixed_coords={th:pi/2, ph:0},\n", " number_values=9, color={ta:'red', ch:'brown'}, thickness=2, max_range=2,\n", " parameters={b:1}, label_axes=False)\n", "graph2 = X_hyp.plot(X5, mapping=Phi, ambient_coords=(W,X,T), fixed_coords={th:pi/2, ph:pi},\n", " number_values=9, color={ta:'green', ch:'brown'}, thickness=2, max_range=2,\n", " parameters={b:1}, label_axes=False)\n", "show(graph1+graph2, aspect_ratio=1, viewer=viewer3D, online=True,\n", " axes_labels=['W','X','T'])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Spacetime metric\n", "First, we define the Minkowski metric on $\\mathbb{R}^{1,4}$:" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "h = -dT*dT + dW*dW + dX*dX + dY*dY + dZ*dZ" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "h = R14.metric()\n", "h[0,0], h[1,1], h[2,2], h[3,3], h[4,4] = -1, 1, 1, 1, 1\n", "h.display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

As mentionned above, the de Sitter metric $g$ on $\\mathcal{M}$ is that induced by $h$, i.e.$g$ is the pullback of $h$ by the mapping $\\Phi$:

" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "g = M.metric()\n", "g.set( Phi.pullback(h) )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

The expression of $g$ in terms of $\\mathcal{M}$'s default frame is found to be

" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "g = -dta*dta + cosh(b*ta)^2/b^2 dch*dch + cosh(b*ta)^2*sin(ch)^2/b^2 dth*dth + cosh(b*ta)^2*sin(ch)^2*sin(th)^2/b^2 dph*dph" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g.display()" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[ -1 0 0 0]\n", "[ 0 cosh(b*ta)^2/b^2 0 0]\n", "[ 0 0 cosh(b*ta)^2*sin(ch)^2/b^2 0]\n", "[ 0 0 0 cosh(b*ta)^2*sin(ch)^2*sin(th)^2/b^2]" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g[:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Curvature

\n", "

The Riemann tensor of $g$ is

" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Tensor field Riem(g) of type (1,3) on the 4-dimensional Lorentzian manifold M\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "Riem(g) = cosh(b*ta)^2 d/dta*dch*dta*dch - cosh(b*ta)^2 d/dta*dch*dch*dta + cosh(b*ta)^2*sin(ch)^2 d/dta*dth*dta*dth - cosh(b*ta)^2*sin(ch)^2 d/dta*dth*dth*dta + cosh(b*ta)^2*sin(ch)^2*sin(th)^2 d/dta*dph*dta*dph - cosh(b*ta)^2*sin(ch)^2*sin(th)^2 d/dta*dph*dph*dta + b^2 d/dch*dta*dta*dch - b^2 d/dch*dta*dch*dta + cosh(b*ta)^2*sin(ch)^2 d/dch*dth*dch*dth - cosh(b*ta)^2*sin(ch)^2 d/dch*dth*dth*dch + cosh(b*ta)^2*sin(ch)^2*sin(th)^2 d/dch*dph*dch*dph - cosh(b*ta)^2*sin(ch)^2*sin(th)^2 d/dch*dph*dph*dch + b^2 d/dth*dta*dta*dth - b^2 d/dth*dta*dth*dta - cosh(b*ta)^2 d/dth*dch*dch*dth + cosh(b*ta)^2 d/dth*dch*dth*dch + cosh(b*ta)^2*sin(ch)^2*sin(th)^2 d/dth*dph*dth*dph - cosh(b*ta)^2*sin(ch)^2*sin(th)^2 d/dth*dph*dph*dth + b^2 d/dph*dta*dta*dph - b^2 d/dph*dta*dph*dta - cosh(b*ta)^2 d/dph*dch*dch*dph + cosh(b*ta)^2 d/dph*dch*dph*dch + (-sin(ch)^2*sinh(b*ta)^2 + cos(ch)^2 - 1) d/dph*dth*dth*dph + cosh(b*ta)^2*sin(ch)^2 d/dph*dth*dph*dth" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Riem = g.riemann()\n", "print(Riem)\n", "Riem.display()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "Riem(g)^ta_ch,ta,ch = cosh(b*ta)^2 \n", "Riem(g)^ta_th,ta,th = cosh(b*ta)^2*sin(ch)^2 \n", "Riem(g)^ta_ph,ta,ph = cosh(b*ta)^2*sin(ch)^2*sin(th)^2 \n", "Riem(g)^ch_ta,ta,ch = b^2 \n", "Riem(g)^ch_th,ch,th = cosh(b*ta)^2*sin(ch)^2 \n", "Riem(g)^ch_ph,ch,ph = cosh(b*ta)^2*sin(ch)^2*sin(th)^2 \n", "Riem(g)^th_ta,ta,th = b^2 \n", "Riem(g)^th_ch,ch,th = -cosh(b*ta)^2 \n", "Riem(g)^th_ph,th,ph = cosh(b*ta)^2*sin(ch)^2*sin(th)^2 \n", "Riem(g)^ph_ta,ta,ph = b^2 \n", "Riem(g)^ph_ch,ch,ph = -cosh(b*ta)^2 \n", "Riem(g)^ph_th,th,ph = -sin(ch)^2*sinh(b*ta)^2 + cos(ch)^2 - 1 " ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Riem.display_comp(only_nonredundant=True)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

The Ricci tensor:

" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Field of symmetric bilinear forms Ric(g) on the 4-dimensional Lorentzian manifold M\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "Ric(g) = -3*b^2 dta*dta + 3*cosh(b*ta)^2 dch*dch + 3*cosh(b*ta)^2*sin(ch)^2 dth*dth + 3*cosh(b*ta)^2*sin(ch)^2*sin(th)^2 dph*dph" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric = g.ricci()\n", "print(Ric)\n", "Ric.display()" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "[ -3*b^2 0 0 0]\n", "[ 0 3*cosh(b*ta)^2 0 0]\n", "[ 0 0 3*cosh(b*ta)^2*sin(ch)^2 0]\n", "[ 0 0 0 3*cosh(b*ta)^2*sin(ch)^2*sin(th)^2]" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Ric[:]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

The Ricci scalar:

" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Scalar field r(g) on the 4-dimensional Lorentzian manifold M\n" ] }, { "data": { "text/html": [ "" ], "text/plain": [ "r(g): M --> R\n", "on M_0: (ta, ch, th, ph) |--> 12*b^2" ] }, "execution_count": 22, "metadata": {}, "output_type": "execute_result" } ], "source": [ "R = g.ricci_scalar()\n", "print(R)\n", "R.display()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We recover the fact that de Sitter spacetime has a constant curvature. It is indeed a **maximally symmetric space**. In particular, the Riemann tensor is expressible as\n", "$$ R^i_{\\ \\, jlk} = \\frac{R}{n(n-1)} \\left( \\delta^i_{\\ \\, k} g_{jl} - \\delta^i_{\\ \\, l} g_{jk} \\right), $$\n", "where $n$ is the dimension of $\\mathcal{M}$: $n=4$ in the present case. Let us check this formula here, under the form $R^i_{\\ \\, jlk} = -\\frac{R}{6} g_{j[k} \\delta^i_{\\ \\, l]}$:" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 23, "metadata": {}, "output_type": "execute_result" } ], "source": [ "delta = M.tangent_identity_field() \n", "Riem == - (R/6)*(g*delta).antisymmetrize(2,3) # 2,3 = last positions of the type-(1,3) tensor g*delta" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We may also check that de Sitter metric is a solution of the vacuum **Einstein equation** with (positive) cosmological constant:" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [ { "data": { "text/html": [ "" ], "text/plain": [ "True" ] }, "execution_count": 24, "metadata": {}, "output_type": "execute_result" } ], "source": [ "Lambda = 3*b^2\n", "Ric - 1/2*R*g + Lambda*g == 0" ] } ], "metadata": { "kernelspec": { "display_name": "SageMath 8.3", "language": "", "name": "sagemath" }, "language": "python", "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.15" } }, "nbformat": 4, "nbformat_minor": 1 }