I do not understand why the output of the two commands:
metric[-c, -d] (CD[d][RicciScalar[CD][]]) (CD[c][RicciScalar[CD][]]) // Simplify,
(CD[-c][RicciScalar[CD][]]) (CD[c][RicciScalar[CD][]]) // Simplify,
is different. The first one outputs a scalar function, as expected, whereas the second gives an expression
that I do not know how to contract.