import sympy
from sympy import simplify
from einsteinpy.symbolic import RicciScalar
from einsteinpy.symbolic.predefined import Schwarzschild, DeSitter, AntiDeSitter, Minkowski, find
sympy.init_printing() # for pretty printing
All the functions return instances of :py:class:~einsteinpy.symbolic.metric.MetricTensor
sch = Schwarzschild()
sch.tensor()
Minkowski(c=1).tensor()
DeSitter().tensor()
AntiDeSitter().tensor()
They should be constant for De-Sitter and Anti-De-Sitter spacetimes.
scalar_curvature_de_sitter = RicciScalar.from_metric(DeSitter())
scalar_curvature_anti_de_sitter = RicciScalar.from_metric(AntiDeSitter())
scalar_curvature_de_sitter.expr
scalar_curvature_anti_de_sitter.expr
On simplifying the expression we got above, we indeed obtain a constant
simplify(scalar_curvature_anti_de_sitter.expr)
find function returns a list of available functions
find("sitter")