xPert and AnyindicesTensor.

72 views
Skip to first unread message

Obinna Umeh

unread,
Jan 2, 2012, 10:00:13 AM1/2/12
to xAct Tensor Computer Algebra
Hello,
I am having difficulty expanding many AnyindicesTensor in perturbation
theory using the xPert. I think it could be compatibility issue
between AnyindicesTensor and the xPert.
Basically am trying to expand the covariant derivative of
AnyindicesTensor in perturbation theory but mathematica gives
$RecursionLimit::reclim: Recursion depth of 256 exceeded. >>.
For an ordinary tensor, there is no problem.
I attached a notebook demonstrating the problem.
Thanks.
Obinna
xPert_AnyindicesTensor.nb

Leo Stein

unread,
Jan 2, 2012, 10:57:15 AM1/2/12
to Obinna Umeh, xAct Tensor Computer Algebra
Hi Obinna,
As far as I can tell, the problem exists in SeparateMetric.
ExpandPerturbation uses SeparateMetric to separate any implicit
dependence on a metric out of an expression. Essentially, there needs
to exist a fixed point for applying SeparateMetric to an expression.
However, SeparateMetric seems to not play well with a tensor that has
an AnyIndices slot.
The first part of the solution is to add the following four lines to
xTensor.nb:
samevbQ[vb_Symbol, _AnyIndices] := True;
samevbQ[_AnyIndices, vb_Symbol] := True;
samevbQ[-vb_Symbol, _AnyIndices] := True;
samevbQ[_AnyIndices, -vb_Symbol] := True;
These should be added in section 14.2.5, right along with the other
definitions for samevbQ. However, there also needs to be a fix for
movedindices on the lines right above those for samevbQ -- the logic
that movedindices uses to detect if a tensor has the wrong number of
indices will not work for AnyIndices. I suspect that this code is
duplicated elsewhere (in Validate?) so I have no proposal here for how
to fix it. Can anybody else add to this?

Best
Leo

JMM

unread,
Jan 2, 2012, 1:10:14 PM1/2/12
to xAct Tensor Computer Algebra

Hi,

Indeed, the function moveindices (only used by SeparateMetric) has not
been prepared to handle AnyIndices. A possible fix is:

movedindices[tensor_, inds_, slots1: {AnyIndices[vb_]}, slots2_] :=
movedindices[tensor, inds, Table[vb, {Length[slots2]}], slots2];
movedindices[tensor_, inds_, slots1: {l___, a_AnyIndices, r___},
slots2_] :=
With[{ll = Length[{l}], rl = Length[{r}], sl = Length[slots2]},
Join[
movedindices[tensor, inds, {l}, Take[slots2, ll]],
movedindices[tensor, inds, {a}, Take[slots2, {ll + 1, sl -
rl}]],
movedindices[tensor, inds, {r}, Take[slots2, rl - sl]]
]
];
movedindices[covd_Symbol?CovDQ[inds___][expr_]] :=
Join[Select[IndexList[inds], UpIndexQ], movedindices[expr]];

Put these definitions after the other definitons for movedindices in
xTensor.m. I have not tested this much, so please let me know if there
are still problems. I think Leo's proposed changes for samevbQ should
not be needed.

Cheers,
Jose.

On Jan 2, 9:57 am, Leo Stein <leo.st...@gmail.com> wrote:
> Hi Obinna,
>   As far as I can tell, the problem exists in SeparateMetric.
> ExpandPerturbation uses SeparateMetric to separate any implicit
> dependence on a metric out of an expression. Essentially, there needs
> to exist a fixed point for applying SeparateMetric to an expression.
> However, SeparateMetric seems to not play well with a tensor that has
> an AnyIndices slot.
>   The first part of the solution is to add the following four lines to
> xTensor.nb:
>     samevbQ[vb_Symbol, _AnyIndices] := True;
>     samevbQ[_AnyIndices, vb_Symbol] := True;
>     samevbQ[-vb_Symbol, _AnyIndices] := True;
>     samevbQ[_AnyIndices, -vb_Symbol] := True;
> These should be added in section 14.2.5, right along with the other
> definitions for samevbQ. However, there also needs to be a fix for
> movedindices on the lines right above those for samevbQ -- the logic
> that movedindices uses to detect if a tensor has the wrong number of
> indices will not work for AnyIndices. I suspect that this code is
> duplicated elsewhere (in Validate?) so I have no proposal here for how
> to fix it. Can anybody else add to this?
>
> Best
> Leo
>

Obinna Umeh

unread,
Jan 4, 2012, 1:14:10 AM1/4/12
to JMM, xAct Tensor Computer Algebra
Hi Jose,
The fix you provided for this problem doesn't seem to give an expected
result in the limit of a single index.
I attached a notebook illustrating this problem.
Thanks.
Obinna

--
Umeh Obinna Cosmas
Cosmology and Gravity Group
Department of Mathematics and Applied Mathematics
University of Cape Town
Private Bag 7701
Rondebosch, Cape Town
South Africa.
E-mail:umeo...@gmail.com
Phone:(+27) 78-945-9804

xPert_AnyindicesTensorv_2.nb

JMM

unread,
Jan 4, 2012, 1:24:38 AM1/4/12
to xAct Tensor Computer Algebra
Hi Obinna,

I think this is because you defined V with a *lower* index, but then
EE with an arbitrary number of *upper* indices. Hence the objects V[-
a] and EE[-a] behave differently when you perturb both with lower
indices: V is in its natural state but EE has absorbed a metric
factor, that must be separated and perturbed. You can define an object
having an arbitrary number of lower indices by using AnyIndices[ -
TangentM ].

Cheers,
Jose.
> E-mail:umeobi...@gmail.com
> Phone:(+27) 78-945-9804
>
>  xPert_AnyindicesTensorv_2.nb
> 211KViewDownload
Reply all
Reply to author
Forward
0 new messages