Hi everyone,
I'm new to Mathematica, and I'm currently trying to define some tensors that I'll need in further calculations. However, Mathematica fails to contract the tensors I give it. Instead, it just lists all the tensors with respective indices. I tried to find some similar threads, but not seem to success. Could you may be point out, what I'm doing wrong? Thanks!
ClearAll["Global`*"]
<< xAct`xCoba`
Needs["xAct`xPert`"]
Quiet@Block[{Print}, << xAct`xTras`]
$DefInfoQ = False;
DefManifold[M,
4, {\[Mu], \[Nu], \[Lambda], \[Sigma], \[Rho], i, j, k}];
DefChart[ch, M, {0, 1, 2, 3}, {t[], x[], y[], z[]}]
DefScalarFunction[a]
g = CTensor[{{-1, 0, 0, 0}, {0, a[t[]]^2, 0, 0}, {0, 0, a[t[]]^2,
0}, {0, 0, 0, a[t[]]^2}}, {-ch, -ch}];
SetCMetric[g, ch]
DefScalarFunction[\[Phi]]
CD = CovDOfMetric[g]
A = CTensor[{\[Phi][t[]], 0, 0, 0}, {ch}]
X = -1/2 A[\[Mu]] A[-\[Mu]]
G = X^p
Fmn[-\[Mu], -\[Nu]] = CD[-\[Mu]]@A[-\[Nu]] - CD[-\[Nu]]@A[-\[Mu]]
F = -1/4 Fmn[-\[Mu], -\[Nu]] Fmn[\[Mu], \[Nu]]
Y = A[\[Mu]] A[\[Nu]] Fmn[-\[Mu], \[Alpha]] Fmn[\[Nu], \[Alpha]]