Ricci Tensor and Scalar Curvature calculations using Symbolic module

[1]:
import sympy
from einsteinpy.symbolic import RicciTensor, RicciScalar
from einsteinpy.symbolic.predefined import AntiDeSitter

sympy.init_printing()

Defining the Anti-de Sitter spacetime Metric

[2]:
metric = AntiDeSitter()
metric.tensor()
[2]:
$\displaystyle \left[\begin{matrix}-1 & 0 & 0 & 0\\0 & \cos^{2}{\left(t \right)} & 0 & 0\\0 & 0 & \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0\\0 & 0 & 0 & \sin^{2}{\left(\theta \right)} \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)}\end{matrix}\right]$

Calculating the Ricci Tensor(with both indices covariant)

[3]:
Ric = RicciTensor.from_metric(metric)
Ric.tensor()
[3]:
$\displaystyle \left[\begin{matrix}3 & 0 & 0 & 0\\0 & - 3 \cos^{2}{\left(t \right)} & 0 & 0\\0 & 0 & - 3 \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)} & 0\\0 & 0 & 0 & - 3 \sin^{2}{\left(\theta \right)} \cos^{2}{\left(t \right)} \sinh^{2}{\left(\chi \right)}\end{matrix}\right]$

Calculating the Ricci Scalar(Scalar Curvature) from the Ricci Tensor

[4]:
R = RicciScalar.from_riccitensor(Ric)
R.simplify()
R.expr
[4]:
$\displaystyle -12$

The curavture is -12 which is in-line with the theoretical results