\documentclass{article}
\usepackage{fullpage}
\usepackage{amsmath}
\usepackage[utf8x]{inputenc}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{etoolbox}
\usepackage{url}
\usepackage{hyperref}
\usepackage[T1]{fontenc}
\makeatletter
\preto{\@verbatim}{\topsep=0pt \partopsep=0pt }
\makeatother
\usepackage{listings}
\lstdefinelanguage{Sage}[]{Python}
{morekeywords={True,False,sage,singular},
sensitive=true}
\lstset{
showtabs=False,
showspaces=False,
showstringspaces=False,
commentstyle={\ttfamily\color{dbrowncolor}},
keywordstyle={\ttfamily\color{dbluecolor}\bfseries},
stringstyle ={\ttfamily\color{dgraycolor}\bfseries},
backgroundcolor=\color{lightyellow},
language = Sage,
basicstyle={\ttfamily},
aboveskip=1em,
belowskip=0.1em,
breaklines=true,
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\backslash}},
}
\usepackage{color}
\definecolor{lightyellow}{rgb}{1,1,.92}
\definecolor{dblackcolor}{rgb}{0.0,0.0,0.0}
\definecolor{dbluecolor}{rgb}{.01,.02,0.7}
\definecolor{dredcolor}{rgb}{1,0,0}
\definecolor{dbrowncolor}{rgb}{0.625,0.3125,0}
\definecolor{dgraycolor}{rgb}{0.30,0.3,0.30}
\definecolor{graycolor}{rgb}{0.35,0.35,0.35}
\title{SM{\textbackslash}\_de{\textbackslash}\_Sitter.sagews}
\author{}
\begin{document}
\maketitle
\tableofcontents
\begin{lstlisting}
\end{lstlisting}
\begin{lstlisting}
\end{lstlisting}
{
\section{de Sitter spacetime}
{This worksheet demonstrates a few capabilities of \url{SageManifolds} (version 0.8) in computations regarding de Sitter spacetime.}
{It is released under the GNU General Public License version 3.}
{(c) Eric Gourgoulhon, Michal Bejger (2015)}
{{{The corresponding worksheet file can be downloaded from}{{ \url{{here}}}}}}
{{{{{{}}}}}}
}
\subsection{Spacetime manifold}
{{{We declare the de Sitter spacetime as a 4-dimensional differentiable manifold:}}}
\begin{lstlisting}
M = Manifold(4, 'M', r'\mathcal{M}')
print M ; M
\end{lstlisting}\begin{verbatim}4-dimensional manifold 'M'\end{verbatim}
{$\mathcal{M}$}
\begin{lstlisting}
<p>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 <em>regular</em> 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:</p>
\end{lstlisting}{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:}
\begin{lstlisting}
M0 = M.open_subset('M_0', r'\mathcal{M}_0')
X_hyp.<ta,ch,th,ph> = M0.chart(r'ta:\tau ch:(0,pi):\chi th:(0,pi):\theta ph:(0,2*pi):\phi')
print X_hyp ; X_hyp
\end{lstlisting}\begin{verbatim}chart (M_0, (ta, ch, th, ph))\end{verbatim}
{$\left(\mathcal{M}_0,({\tau}, {\chi}, {\theta}, {\phi})\right)$}
\begin{lstlisting}
\end{lstlisting}\subsection{$\mathbb{R}^5$ as an ambient space}
{The de Sitter metric can be defined as that induced by the embedding of $\mathcal{M}$ into a 5-dimensional Minkowski space, i.e. $\mathbb{R}^5$ equipped with a flat Lorentzian metric. We therefore introduce $\mathbb{R}^5$ as a 5-dimensional manifold covered by canonical coordinates:}
\begin{lstlisting}
R5 = Manifold(5, 'R5', r'\mathbb{R}^5')
X5.<T,W,X,Y,Z> = R5.chart()
print X5 ; X5
\end{lstlisting}\begin{verbatim}chart (R5, (T, W, X, Y, Z))\end{verbatim}
{$\left(\mathbb{R}^5,(T, W, X, Y, Z)\right)$}
\begin{lstlisting}
\end{lstlisting}{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))$ ):}
\begin{lstlisting}
var('b')
Phi = M.diff_mapping(R5, [sinh(b*ta)/b,
cosh(b*ta)/b * cos(ch),
cosh(b*ta)/b * sin(ch)*sin(th)*cos(ph),
cosh(b*ta)/b * sin(ch)*sin(th)*sin(ph),
cosh(b*ta)/b * sin(ch)*cos(th)],
name='Phi', latex_name=r'\Phi')
print Phi ; Phi.display()
\end{lstlisting}
{$b$}\begin{verbatim}differentiable mapping 'Phi' from the 4-dimensional manifold 'M' to the 5-dimensional
manifold 'R5'\end{verbatim}
{$\begin{array}{llcl} \Phi:& \mathcal{M} & \longrightarrow & \mathbb{R}^5 \\ \mbox{on}\ \mathcal{M}_0 : & \left({\tau}, {\chi}, {\theta}, {\phi}\right) & \longmapsto & \left(T, W, X, Y, Z\right) = \left(\frac{\sinh\left(b {\tau}\right)}{b}, \frac{\cos\left({\chi}\right) \cosh\left(b {\tau}\right)}{b}, \frac{\cos\left({\phi}\right) \cosh\left(b {\tau}\right) \sin\left({\chi}\right) \sin\left({\theta}\right)}{b}, \frac{\cosh\left(b {\tau}\right) \sin\left({\chi}\right) \sin\left({\phi}\right) \sin\left({\theta}\right)}{b}, \frac{\cos\left({\theta}\right) \cosh\left(b {\tau}\right) \sin\left({\chi}\right)}{b}\right) \end{array}$}
\begin{lstlisting}
\end{lstlisting}{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}$.}
{Let us evaluate the image of a point via the mapping $\Phi$:}
\begin{lstlisting}
p = M.point((ta, ch, th, ph), name='p') ; print p
\end{lstlisting}\begin{verbatim}point 'p' on 4-dimensional manifold 'M'\end{verbatim}
\begin{lstlisting}
p.coord()
\end{lstlisting}
{(${\tau}$, ${\chi}$, ${\theta}$, ${\phi}$)}
\begin{lstlisting}
q = Phi(p) ; print q
\end{lstlisting}\begin{verbatim}point 'Phi(p)' on 5-dimensional manifold 'R5'\end{verbatim}\begin{verbatim}\end{verbatim}
\begin{lstlisting}
q.coord()
\end{lstlisting}
{($\frac{\sinh\left(b {\tau}\right)}{b}$, $\frac{\cos\left({\chi}\right) \cosh\left(b {\tau}\right)}{b}$, $\frac{\cos\left({\phi}\right) \cosh\left(b {\tau}\right) \sin\left({\chi}\right) \sin\left({\theta}\right)}{b}$, $\frac{\cosh\left(b {\tau}\right) \sin\left({\chi}\right) \sin\left({\phi}\right) \sin\left({\theta}\right)}{b}$, $\frac{\cos\left({\theta}\right) \cosh\left(b {\tau}\right) \sin\left({\chi}\right)}{b}$)}
\begin{lstlisting}
\end{lstlisting}{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:}
\begin{lstlisting}
(Tq,Wq,Xq,Yq,Zq) = q.coord()
s = -Tq^2 + Wq^2 + Xq^2 + Yq^2 + Zq^2
s.simplify_full()
\end{lstlisting}
{$\frac{1}{b^{2}}$}
\begin{lstlisting}
\end{lstlisting}{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}$):}
\begin{lstlisting}
graph1 = X_hyp.plot(X5, mapping=Phi, ambient_coords=(W,X,T), fixed_coords={th:pi/2, ph:0}, nb_values=9, color={ta:'red', ch:'brown'}, thickness=2, max_value=2, parameters={b:1}, label_axes=False)
graph2 = X_hyp.plot(X5, mapping=Phi, ambient_coords=(W,X,T), fixed_coords={th:pi/2, ph:pi}, nb_values=9, color={ta:'green', ch:'brown'}, thickness=2, max_value=2, parameters={b:1}, label_axes=False)
show(set_axes_labels(graph1+graph2,'W','X','T'), aspect_ratio=1)
\end{lstlisting}\url{https://cloud.sagemath.com/blobs/f97f4212-d46d-4ad8-b8f7-4979d61774e6.sage3d?uuid=f97f4212-d46d-4ad8-b8f7-4979d61774e6}
{}
\begin{lstlisting}
\end{lstlisting}\subsection{Spacetime metric}
{First, we introduce on $\mathbb{R}^5$ the Minkowski metric $h$:}
\begin{lstlisting}
h = R5.lorentz_metric('h')
h[0,0], h[1,1], h[2,2], h[3,3], h[4,4] = -1, 1, 1, 1, 1
h.display()
\end{lstlisting}
{$h = -\mathrm{d} T\otimes \mathrm{d} T+\mathrm{d} W\otimes \mathrm{d} W+\mathrm{d} X\otimes \mathrm{d} X+\mathrm{d} Y\otimes \mathrm{d} Y+\mathrm{d} Z\otimes \mathrm{d} Z$}
\begin{lstlisting}
\end{lstlisting}{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$:}
\begin{lstlisting}
g = M.metric('g')
g.set( Phi.pullback(h) )
\end{lstlisting}
\begin{lstlisting}
\end{lstlisting}{The expression of $g$ in terms of $\mathcal{M}$'s default frame is found to be}
\begin{lstlisting}
g.display()
\end{lstlisting}
{$g = -\mathrm{d} {\tau}\otimes \mathrm{d} {\tau} + \frac{\cosh\left(b {\tau}\right)^{2}}{b^{2}} \mathrm{d} {\chi}\otimes \mathrm{d} {\chi} + \frac{\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2}}{b^{2}} \mathrm{d} {\theta}\otimes \mathrm{d} {\theta} + \frac{\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2}}{b^{2}} \mathrm{d} {\phi}\otimes \mathrm{d} {\phi}$}
\begin{lstlisting}
g[:]
\end{lstlisting}
{$\left(\begin{array}{rrrr}
-1 & 0 & 0 & 0 \\
0 & \frac{\cosh\left(b {\tau}\right)^{2}}{b^{2}} & 0 & 0 \\
0 & 0 & \frac{\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2}}{b^{2}} & 0 \\
0 & 0 & 0 & \frac{\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2}}{b^{2}}
\end{array}\right)$}
\begin{lstlisting}
\end{lstlisting}\subsection{Curvature}
{The Riemann tensor of $g$ is}
\begin{lstlisting}
Riem = g.riemann()
print Riem
Riem.display()
\end{lstlisting}\begin{verbatim}tensor field 'Riem(g)' of type (1,3) on the 4-dimensional manifold 'M'\end{verbatim}
{$\mathrm{Riem}\left(g\right) = \cosh\left(b {\tau}\right)^{2} \frac{\partial}{\partial {\tau} }\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\chi} -\cosh\left(b {\tau}\right)^{2} \frac{\partial}{\partial {\tau} }\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\tau} + \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \frac{\partial}{\partial {\tau} }\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\theta} -\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \frac{\partial}{\partial {\tau} }\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\tau} + \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \frac{\partial}{\partial {\tau} }\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\phi} -\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \frac{\partial}{\partial {\tau} }\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\tau} + b^{2} \frac{\partial}{\partial {\chi} }\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\chi} -b^{2} \frac{\partial}{\partial {\chi} }\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\tau} + \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \frac{\partial}{\partial {\chi} }\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\theta} -\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \frac{\partial}{\partial {\chi} }\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\chi} + \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \frac{\partial}{\partial {\chi} }\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\phi} -\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \frac{\partial}{\partial {\chi} }\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\chi} + b^{2} \frac{\partial}{\partial {\theta} }\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\theta} -b^{2} \frac{\partial}{\partial {\theta} }\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\tau} + \left( -\frac{\sin\left({\chi}\right)^{2} \sinh\left(b {\tau}\right)^{2} - \cos\left({\chi}\right)^{2} + 1}{\sin\left({\chi}\right)^{2}} \right) \frac{\partial}{\partial {\theta} }\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\theta} + \cosh\left(b {\tau}\right)^{2} \frac{\partial}{\partial {\theta} }\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\chi} + \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \frac{\partial}{\partial {\theta} }\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\phi} -\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \frac{\partial}{\partial {\theta} }\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\theta} + b^{2} \frac{\partial}{\partial {\phi} }\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\phi} -b^{2} \frac{\partial}{\partial {\phi} }\otimes \mathrm{d} {\tau}\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\tau} + \left( -\frac{\sin\left({\chi}\right)^{2} \sinh\left(b {\tau}\right)^{2} - \cos\left({\chi}\right)^{2} + 1}{\sin\left({\chi}\right)^{2}} \right) \frac{\partial}{\partial {\phi} }\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\phi} + \cosh\left(b {\tau}\right)^{2} \frac{\partial}{\partial {\phi} }\otimes \mathrm{d} {\chi}\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\chi} -\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \frac{\partial}{\partial {\phi} }\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\phi} + \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \frac{\partial}{\partial {\phi} }\otimes \mathrm{d} {\theta}\otimes \mathrm{d} {\phi}\otimes \mathrm{d} {\theta}$}
\begin{lstlisting}
Riem.display_comp(only_nonredundant=True)
\end{lstlisting}
{$\begin{array}{lcl} \mathrm{Riem}\left(g\right)_{ \phantom{\, {\tau} } \, {\chi} \, {\tau} \, {\chi} }^{ \, {\tau} \phantom{\, {\chi} } \phantom{\, {\tau} } \phantom{\, {\chi} } } & = & \cosh\left(b {\tau}\right)^{2} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\tau} } \, {\theta} \, {\tau} \, {\theta} }^{ \, {\tau} \phantom{\, {\theta} } \phantom{\, {\tau} } \phantom{\, {\theta} } } & = & \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\tau} } \, {\phi} \, {\tau} \, {\phi} }^{ \, {\tau} \phantom{\, {\phi} } \phantom{\, {\tau} } \phantom{\, {\phi} } } & = & \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\chi} } \, {\tau} \, {\tau} \, {\chi} }^{ \, {\chi} \phantom{\, {\tau} } \phantom{\, {\tau} } \phantom{\, {\chi} } } & = & b^{2} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\chi} } \, {\theta} \, {\chi} \, {\theta} }^{ \, {\chi} \phantom{\, {\theta} } \phantom{\, {\chi} } \phantom{\, {\theta} } } & = & \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\chi} } \, {\phi} \, {\chi} \, {\phi} }^{ \, {\chi} \phantom{\, {\phi} } \phantom{\, {\chi} } \phantom{\, {\phi} } } & = & \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\theta} } \, {\tau} \, {\tau} \, {\theta} }^{ \, {\theta} \phantom{\, {\tau} } \phantom{\, {\tau} } \phantom{\, {\theta} } } & = & b^{2} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\theta} } \, {\chi} \, {\chi} \, {\theta} }^{ \, {\theta} \phantom{\, {\chi} } \phantom{\, {\chi} } \phantom{\, {\theta} } } & = & -\frac{\sin\left({\chi}\right)^{2} \sinh\left(b {\tau}\right)^{2} - \cos\left({\chi}\right)^{2} + 1}{\sin\left({\chi}\right)^{2}} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\theta} } \, {\phi} \, {\theta} \, {\phi} }^{ \, {\theta} \phantom{\, {\phi} } \phantom{\, {\theta} } \phantom{\, {\phi} } } & = & \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\phi} } \, {\tau} \, {\tau} \, {\phi} }^{ \, {\phi} \phantom{\, {\tau} } \phantom{\, {\tau} } \phantom{\, {\phi} } } & = & b^{2} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\phi} } \, {\chi} \, {\chi} \, {\phi} }^{ \, {\phi} \phantom{\, {\chi} } \phantom{\, {\chi} } \phantom{\, {\phi} } } & = & -\frac{\sin\left({\chi}\right)^{2} \sinh\left(b {\tau}\right)^{2} - \cos\left({\chi}\right)^{2} + 1}{\sin\left({\chi}\right)^{2}} \\ \mathrm{Riem}\left(g\right)_{ \phantom{\, {\phi} } \, {\theta} \, {\theta} \, {\phi} }^{ \, {\phi} \phantom{\, {\theta} } \phantom{\, {\theta} } \phantom{\, {\phi} } } & = & -\cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \end{array}$}
\begin{lstlisting}
\end{lstlisting}{The Ricci tensor:}
\begin{lstlisting}
Ric = g.ricci()
print Ric
Ric.display()
\end{lstlisting}\begin{verbatim}field of symmetric bilinear forms 'Ric(g)' on the 4-dimensional manifold 'M'\end{verbatim}
{$\mathrm{Ric}\left(g\right) = -3 \, b^{2} \mathrm{d} {\tau}\otimes \mathrm{d} {\tau} + 3 \, \cosh\left(b {\tau}\right)^{2} \mathrm{d} {\chi}\otimes \mathrm{d} {\chi} + 3 \, \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \mathrm{d} {\theta}\otimes \mathrm{d} {\theta} + 3 \, \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2} \mathrm{d} {\phi}\otimes \mathrm{d} {\phi}$}
\begin{lstlisting}
Ric[:]
\end{lstlisting}
{$\left(\begin{array}{rrrr}
-3 \, b^{2} & 0 & 0 & 0 \\
0 & 3 \, \cosh\left(b {\tau}\right)^{2} & 0 & 0 \\
0 & 0 & 3 \, \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} & 0 \\
0 & 0 & 0 & 3 \, \cosh\left(b {\tau}\right)^{2} \sin\left({\chi}\right)^{2} \sin\left({\theta}\right)^{2}
\end{array}\right)$}
\begin{lstlisting}
\end{lstlisting}{The Ricci scalar:}
\begin{lstlisting}
R = g.ricci_scalar()
print R
R.display()
\end{lstlisting}\begin{verbatim}scalar field 'r(g)' on the 4-dimensional manifold 'M'\end{verbatim}
{$\begin{array}{llcl} \mathrm{r}\left(g\right):& \mathcal{M} & \longrightarrow & \mathbb{R} \\ \mbox{on}\ \mathcal{M}_0 : & \left({\tau}, {\chi}, {\theta}, {\phi}\right) & \longmapsto & 12 \, b^{2} \end{array}$}
\begin{lstlisting}
\end{lstlisting}{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}
{\[ R^i_{\ \, jlk} = \frac{R}{n(n-1)} \left( \delta^i_{\ \, k} g_{jl} - \delta^i_{\ \, l} g_{jk} \right) \]}
{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]}$:}
\begin{lstlisting}
delta = M.tangent_identity_field()
Riem == - (R/6)*(g*delta).antisymmetrize(2,3) # 2,3 = last positions of the type-(1,3) tensor g*delta
\end{lstlisting}
{$\mathrm{True}$}
\begin{lstlisting}
\end{lstlisting}{We may also check that de Sitter metric is a solution of the vacuum {Einstein equation} with (positive) cosmological constant:}
\begin{lstlisting}
Lambda = 3*b^2
Ric - 1/2*R*g + Lambda*g == 0
\end{lstlisting}
{$\mathrm{True}$}
\end{document}