I'm working on a metric-affine theory where the affine connection is independent of the metric. I've solved the general connection in terms of Levi-Civita connection of the metric plus a vector field and a constant. I want to define Christoffel tensor and change curvature from general affine Ricci to Levi-Civita Ricci. When evaluated, I get dollar indices and HeadOfTensors in the last output. The code I'm using is
<<xAct`xTensor`
<<xAct`xTras`
$PrePrint = ScreenDollarIndices;
DefManifold[M4, 4, {a, b, c, d, e, f, i, j, k, l}]
DefCovD[Cd[-a], SymbolOfCovD -> {";", "\[Del]"}]
DefMetric[-1, g[-a, -b], Cdm,
SymbolOfCovD -> {":", "\!\(\*OverscriptBox[\(\[Del]\), \(~\)]\)"},
PrintAs -> "g"]
DefNiceConstantSymbol["c", #] & /@ Range[2]
Christoffel[Cd, Cdm][a, -b, -c]
DefTensor[v[a], M4]
DefTensor[hMet[-a, -b], M4, Symmetric[{1, 2}], PrintAs -> "h"]
AutomaticRules[v, MakeRule[{v[a]*v[-a], -1}]]
AutomaticRules[v, MakeRule[{v[a] Cdm[-b]@v[-a], 0}]]
AutomaticRules[v,
MakeRule[{v[a] Cdm[-b]@Cdm[-c]@v[-a], -Cdm[-b]@v[a]*Cdm[-c]@v[-a]}]]
hMet /: hMet[a_, b_] hMet[-a_, c_] := hMet[b, c];
hMet /: hMet[a_, b_] hMet[c_, -a_] := hMet[b, c];
hMet /: hMet[b_, a_] hMet[-a_, c_] := hMet[b, c];
hMet /: hMet[b_, a_] hMet[c_, -a_] := hMet[b, c];
hMet[a_Symbol, -b_Symbol] := delta[a, -b];
hMet[-a_Symbol, b_Symbol] := delta[-a, b];
hMet[-a_Symbol, -b_Symbol] := g[-a, -b] + c1 v[-a] v[-b];
hMet[a_Symbol, b_Symbol] := g[a, b] - c1/(1 - c1) v[a] v[b];
ChristoffelCdCdm[a_Symbol, -b_Symbol, -c_Symbol] :=
Module[{l},1/2 hMet[a,l] (Cdm[-b]@hMet[-c, -l] + Cdm[-c]@hMet[-l, -b]
- Cdm[-l]@hMet[-b, -c])]
ChangeCurvature[RicciCd[-a, -b], Cd, Cdm]
I've tried almost everything within my "limited" knowledge still couldn't solve the problem.