I hope it's okay to carry on in the same thread and that people see this.
I have found an ugly workaround to my problem with defining a scalar function properly.
Recap: I have field equations which look like this (small snippet)
Fulleqs=(-(1/2) \[Sigma] lapse[] g[-i, -j] -
1/2 \[Alpha]2 lapse[] g[-i, -j] Ricci[cd][-a, -b] Ricci[cd][a,
b] + \[Xi] lapse[] Ricci[cd][-i, -j] +
2 \[Alpha]2 lapse[] Ricci[cd][-i, -a] Ricci[cd][-j, a]
everything except the lapse[] is known, and I have been struggling to define it in such a way that xCoba doesn't express everything in terms of e^i_a, which I guess is a basis connection. This is a partial workaround:
DefScalarFunction[lapse, PrintAs -> "N"]
and then extract the different components of Fulleqs, without making use of a certain basis, and defining the lapse[] function at the same time
Fulleqs[[1]][[1]][[1]] /. lapse[] -> 1/r[]^2 // Simplify
It works, but it's not pretty, and not very xCoba-esque.
Also, when I define the shift and Extrinsic curvature:
DefTensor[shift[i], M3, PrintAs -> "N"]
DefTensor[ExK[-i, -j], M3, Symmetric[{-i, -j}]]
shift = CTensor[{r[], 0, 0}, {CC}, 0];
IndexSetDelayed[ExK[-i_, -j_],
1/(2*lapse[]) (ParamD[t][g[-i, -j]] - cd[-i][shift[-j]] -
cd[-j][shift[-i]])];
The following does NOT work: ExK[i, -j], but ExK[-i, -j]*g[i,k] works just fine. Is there a reason for this?
Many thanks to all