I'm using xAct package to compute the curvature tensor from a specific connection, of the form $\Gamma^a_{bc}= \mathring{\Gamma}^a_{bc} + S^a_{\:bc}$, where the first term is the Levi Civita connection constructed from the metric of the manifold, and the second term is the shift tensor which depends on a vector field $f_k$ : $S^a_{bc}=\delta^a_bf_c+\delta^a_cf_b-g_{bc}f_a$. I would like to find the curvature tensor, Ricci tensor, and eventually the Ricci curvature related to this connection. However, i'm having a hard time trying to apply Simplification to the curvature tensor, and RicciScalar[] does not give me the desired result. Any suggestions? Thanks in advance.
Load packages
In[310]:= << xAct`xTensor`
<< xAct`TexAct`
<< xAct`xTras`
<< xAct`xCoba`
Clear variables
In[314]:= ClearAll["Global`*"];
UndefTensor@$Tensors;
UndefMetric@$Metrics;
UndefConstantSymbol[dim];
NotebookDelete[Cells[EvaluationNotebook[], GeneratedCell -> True]]
Initialize fundamental quantities
In[319]:= (* Dimension of the manifold *)
DefConstantSymbol[dim];
$Assumptions = dim > 2;
During evaluation of In[319]:= ** DefConstantSymbol: Defining constant symbol dim.
In[321]:= (* Manifold *)
DefManifold[M, dim, Join[IndexRange[a, e], IndexRange[i, n]]];
During evaluation of In[321]:= ** DefManifold: Defining manifold M.
During evaluation of In[321]:= ** DefVBundle: Defining vbundle TangentM.
In[322]:= (* Lorentzian metric *)
DefMetric[-1, g[-a, -b], lc];
During evaluation of In[322]:= ** DefTensor: Defining symmetric metric tensor g[-a,-b].
During evaluation of In[322]:= ** DefTensor: Defining antisymmetric tensor epsilong[-a,-b].
During evaluation of In[322]:= ** DefCovD: Defining covariant derivative lc[-a].
During evaluation of In[322]:= ** DefTensor: Defining vanishing torsion tensor Torsionlc[a,-b,-c].
During evaluation of In[322]:= ** DefTensor: Defining symmetric Christoffel tensor Christoffellc[a,-b,-c].
During evaluation of In[322]:= ** DefTensor: Defining Riemann tensor Riemannlc[-a,-b,-c,-d].
During evaluation of In[322]:= ** DefTensor: Defining symmetric Ricci tensor Riccilc[-a,-b].
During evaluation of In[322]:= ** DefCovD: Contractions of Riemann automatically replaced by Ricci.
During evaluation of In[322]:= ** DefTensor: Defining Ricci scalar RicciScalarlc[].
During evaluation of In[322]:= ** DefCovD: Contractions of Ricci automatically replaced by RicciScalar.
During evaluation of In[322]:= ** DefTensor: Defining symmetric Einstein tensor Einsteinlc[-a,-b].
During evaluation of In[322]:= ** DefTensor: Defining Weyl tensor Weyllc[-a,-b,-c,-d].
During evaluation of In[322]:= ** DefTensor: Defining symmetric TFRicci tensor TFRiccilc[-a,-b].
During evaluation of In[322]:= ** DefTensor: Defining Kretschmann scalar Kretschmannlc[].
During evaluation of In[322]:= ** DefCovD: Computing RiemannToWeylRules for dim dim
During evaluation of In[322]:= ** DefCovD: Computing RicciToTFRicci for dim dim
During evaluation of In[322]:= ** DefCovD: Computing RicciToEinsteinRules for dim dim
During evaluation of In[322]:= ** DefTensor: Defining symmetrized Riemann tensor SymRiemannlc[-a,-b,-c,-d].
During evaluation of In[322]:= ** DefTensor: Defining symmetric Schouten tensor Schoutenlc[-a,-b].
During evaluation of In[322]:= ** DefTensor: Defining symmetric cosmological Schouten tensor SchoutenCClc[LI[_],-a,-b].
During evaluation of In[322]:= ** DefTensor: Defining symmetric cosmological Einstein tensor EinsteinCClc[LI[_],-a,-b].
During evaluation of In[322]:= ** DefTensor: Defining weight +2 density Detg[]. Determinant.
During evaluation of In[322]:= ** DefParameter: Defining parameter PerturbationParameterg.
During evaluation of In[322]:= ** DefTensor: Defining tensor Perturbationg[LI[order],-a,-b].
In[323]:= (* Metric affine covariant derivative *)
DefCovD[cd[-a], Torsion -> True, {"|", "\[ScriptCapitalD]"}];
During evaluation of In[323]:= ** DefCovD: Defining covariant derivative cd[-a].
During evaluation of In[323]:= ** DefTensor: Defining torsion tensor Torsioncd[a,-b,-c].
During evaluation of In[323]:= ** DefTensor: Defining non-symmetric Christoffel tensor Christoffelcd[a,-b,-c].
During evaluation of In[323]:= ** DefTensor: Defining Riemann tensor Riemanncd[-a,-b,-c,d]. Antisymmetric only in the first pair.
During evaluation of In[323]:= ** DefTensor: Defining non-symmetric Ricci tensor Riccicd[-a,-b].
During evaluation of In[323]:= ** DefCovD: Contractions of Riemann automatically replaced by Ricci.
Set options
In[324]:= $PrePrint = ScreenDollarIndices;
$RiemannSign = -1
SetOptions[ToCanonical, UseMetricOnVBundle -> g];
SetOptions[ContractMetric, OverDerivatives -> True];
Out[325]= -1
Initialize additional tensors
In[328]:= (* Torsion vector Subscript[T, a] *)
DefTensor[T[-a], M];
During evaluation of In[328]:= ** DefTensor: Defining tensor T[-a].
In[329]:= (* Subscript[f, a] *)
DefTensor[f[-a], M];
During evaluation of In[329]:= ** DefTensor: Defining tensor f[-a].
In[330]:= (* Shift tensor Subscript[S^a, bc] *)
DefTensor[S[a, -b, -c], M, Symmetric[{-b, -c}]];
During evaluation of In[330]:= ** DefTensor: Defining tensor S[a,-b,-c].
Define tensors
In[332]:= (* Shift tensor: Subscript[S^a, bc] = (\!\(
\*SubsuperscriptBox[\(\[Delta]\), \(b\), \(a\)]
\*SubscriptBox[\(f\), \(c\)]\) + \!\(
\*SubsuperscriptBox[\(\[Delta]\), \(c\), \(a\)]
\*SubscriptBox[\(f\), \(b\)]\) - Subscript[g, bc]f^a) *)
IndexSet[S[a_, -b_, -c_], g[a, -b] f[-c] + g[a, -c] f[-b] - g[-b, -c] f[a]];
(* Metric affine connection: Subsuperscript[\[CapitalGamma], bc, a] = \
Subsuperscript[{, bc, a]} + 1/(D-1)Subscript[T, b]Subsuperscript[\[Delta], c, \
a] + 1/(D-2)Subscript[S^a, bc] *)
rule = IndexRule[Christoffelcd[a_, -b_, -c_],
Christoffellc[a, -b, -c] + 1/(dim - 1) T[-b] g[a, -c] +
1/(dim - 2) S[a, -b, -c]];
Compute curvature related quantities
In[368]:= (* Curvature tensor *)
Riemanncd[-c, -d, -b, a] // RiemannToChristoffel;
% /. rule;
% // ChristoffelToGradMetric;
% // Simplification
During evaluation of In[368]:= Intersection::normal: Nonatomic expression expected at position 2 in {\[DoubleStruckCapitalT]M}\[Intersection]g.
During evaluation of In[368]:= Intersection::normal: Nonatomic expression expected at position 2 in {\[DoubleStruckCapitalT]M}\[Intersection]g.
During evaluation of In[368]:= TranslatePerm::invalid: InversePerm[$Failed] is not a valid permutation.
During evaluation of In[368]:= Throw::nocatch: Uncaught Throw[Null] returned to top level.
Out[371]= Hold[Throw[Null]]
In[360]:= RicciScalarcd[]
Out[360]= RicciScalarcd[]