Assume that we have run the following setup code before doing anything else:
<< xAct`xCoba`
DefManifold[manifold, 3, IndexRange[a, q]]
DefChart[chart, manifold, {1, 2, 3}, {t[], θ[], ϕ[]}]
sigma1Down = CTensor[{1, 0, Cos[θ[]]}, {-chart}];
sigma2Down = CTensor[{0, Sin[t[]], -Cos[t[]] Sin[θ[]]}, {-chart}];
sigma3Down = CTensor[{0, Cos[t[]], Sin[t[]] Sin[θ[]]}, {-chart}];
metric = HeadOfTensor[(sigma1Down[-a] sigma1Down[-b] + sigma2Down[-a] sigma2Down[-b] + sigma3Down[-a] sigma3Down[-b]) / 4, {-a, -b}];
SetCMetric[metric, chart, SignatureOfMetric -> {3, 0, 0}]
cd = CovDOfMetric[metric];
I want to calculate the Lie derivative of metric[-a,-b] with respect to some general, unspecified vector field v[a], the result being an explicit expression in terms of the coefficients of v[a] with respect to chart. I have tried various ways of approaching this problem, and I would like to understand why some work while others do not. My main questions are in bold in what follows.
One possibility is the following:
components = {vt, vθ, vϕ};
DefScalarFunction /@ components;
v = CTensor[# @@ ScalarsOfChart[chart] & /@ components, {-chart}];
LieD[v[c]][metric[-a, -b]]
This actually works, and it gives me an explicit CTensor, so since this works, my question is more about understanding how xAct works. I have a feeling that this is not the way one is "supposed" to do things. Since we do not know anything about its components, v[a] should not really be a concrete CTensor, but instead an abstract tensor. If one instead defines an abstract tensor using DefTensor[v[a], manifold], then the components of v[a] exist without defining them manually, as v[{1, chart}], v[{2, chart}] and v[{3, chart}]. Another gripe with the above approach is that I do not like using scalar functions, and instead prefer to use scalar fields where the dependence on coordinate variables is implicit.
Let's adress the latter point first. At a first glance it seems like the following should work (running it after the setup code instead of the above code):
components = {vt, vθ, vϕ};
DefTensor[#[], manifold] & /@ components;
v = CTensor[#[] & /@ components, {-chart}];
LieD[v[c]][metric[-a, -b]]
Unfortunately this doesn't work, and the last step gives me the error "ManifoldOfChart::unknown: Unknown chart Null." Why does this happen, and can it be resolved in some way?
Now let's adress the former point. We run the setup code, and then define v[a] as an abstract tensor using DefTensor[v[a], manifold]. We can evaluate the expression LieD[v[c]][metric[-a, -b]] without getting any errors. It doesn't evaluate the Lie derivative any further than inserting the CTensor expression for metric, but this is what should happen. If we instead evaluate LieD[BasisExpand[v[c], chart]][metric[-a, -b]], then the result is TensorDerivative[*, LieD[**]][-a, -b], where * is the explicit expression for metric, and ** is the explicit expression obtained by evaluating BasisExpand[v[a], chart]. My guess is that xAct doesn't evaluate this any further because it doesn't know how to deal with the case where * is a CTensor and ** is an abstract tensor expression. We could then either convert v[a] to a CTensor or metric[-a, -b] to an abstract tensor expression. When attempting to convert v[a] to a CTensor by running FromBasisExpand[BasisExpand[v[c], chart]], gives a linear combination of "unit CTensors", with the component functions as coefficients. Why doesn't xCoba move the component functions inside the CTensor expressions in order to arrive at a single CTensor expression at the end? From the point of view of LieD it is still an abstract tensor expression, so evaluating LieD[ FromBasisExpand[BasisExpand[v[c], chart]] ][metric[-a, -b]] gives the same kind of "unevaluated" result as evaluating LieD[BasisExpand[v[c], chart]]. If I manually create a CTensor from the component functions and use this in place of v[a] then evaluating the Lie derivative gives the same error as previously seen: "ManifoldOfChart::unknown: Unknown chart Null." Since the components v[{i,chart}] are scalar fields just like the scalar fields manually defined in the above approach, it is not exactly unexpected that the same problem should occur.
Finally, we could try to convert metric[-a,-b] to an abstract tensor expression instead. But evaluating LieD[BasisExpand[v[c], chart]][ToBasisExpand[metric[-a, -b]]] gives the errors "VBundleOfIndex::unknown: Unknown index 1." and "DummyIn::unknown: Unknown vector bundle Null." Why does this happen, and can it be resolved in any way?
A little footnote for those interested: metric[-a, -b] is the round (i.e. standard) metric on the unit 3-sphere, where the coordinates
{t[], θ[], ϕ[]} are the so-called Euler angles, given by identifying the 3-sphere with the Lie group SU(2), which is a double cover of the Lie group SO(3), and then lifting the Euler angle coordinates on the latter to the former (this doubles the periodicity of the coordinate t[]).