Using xAct package in Mathematica, I am trying to obtain expansions of Ricci scalar upto second order in metric perturbations. Although I am able to obtain the perturbed expressions, Mathematica/xAct does not seem to simplify some tensor expressions. For example, there are terms like:
p2[a, -a] p2[b, -b] - (p2[a, -a])^2
where p2[a,b]
is a second rank tensor. I would like such expressions to be automatically simplified; in the above case, expected result is 0
. However, when I use the command //Simplification
, I get the same expression. For instance, this is what I get for the above expression:
In[42]:= p2[a, -a] * p2[b, -b] - (p2[a, -a])^2 // Simplification
Out[42]= p2[a, -a] p2[b, -b] - xAct`xTensor`Scalar[p2[a, -a]]^2
Why is xAct/Mathematica not recognizing the two terms as equal?
What is xAct
xTensorScalar[]
object?
A prescription to simplify such expressions in general would be appreciated.
//ScalarQ
returnsTrue
, implying that this expression is a scalar. $\endgroup$