Replacing tensors with dummy indices and avoiding duplicate indices

203 views
Skip to first unread message

Nathan Moynihan

unread,
May 14, 2016, 1:22:58 PM5/14/16
to xAct Tensor Computer Algebra
I am trying to replace an arbitrary product of tensors with expressions involving indices, for example: I might want to expand the metric in:

L = g[a, c] g[b, d] F[-a, -b] F[-c, -d];

So, I naturally try MakeRules as follows:

ruleIG = MakeRule[{g[a, b],
    \[Eta][a, b] - k*h[LI[q], a, b] +  
     k^2*h[LI[q], a, c] h[LI[q], -c, b] -  
     k^3*h[LI[q], a, c] h[LI[q], -c, -d] h[LI[q], d, b]},
   MetricOn -> All, UseSymmetries -> True
   ];

If I now do L/.ruleIG I get a bunch of errors involving:

IndexForm::nouse: Attempting to apply IndexForm on -I.

This does output something, however the indices are all messed up and there are repeated indices often.

The second thing I thought I would try is just a straight up replacement, which also didn't work due to repeated indices c, -c.

I also tried this with no avail, the same error as using MakeRule occurs.

gExpand[a_, b_] := 
 Module[{c, d}, \[Eta][a, b] - k*H[a, b] + k^2*H[a, c] H[-c, b] -  
   k^3*H[a, c] H[-c, -d] H[d, b]];

ruleg2h := g[a_, b_] ->  gExpand[a, b] // ScreenDollarIndices;

What is the correct way of doing this?

Thanks

Nathan Moynihan

unread,
May 16, 2016, 7:28:25 AM5/16/16
to Leo Stein, xAct Tensor Computer Algebra
Thanks for the minimal example Leo - it turns out that this error is caused by some sort of conflict between xAct and the “SPINORS @ MATHEMATICA (S@M)“ package.

Specifically, using $PrePrint = ScreenDollarIndices; causes these errors when the S@M package is used. I can obviously just do this manually, but justg in case anyone comes across this bug in future i've attached a minimal example.

Commenting out either $PrePrint = ScreenDollarIndices  or the S@M package fixes the error.
On Sun, 15 May 2016 at 03:01 Leo Stein <leo....@gmail.com> wrote:
Nathan,

I have attempted to replicate the problem you are having, but there must be more going on in your notebook that you did not include in your email. Please see the attached notebook, which is the minimal working example: I copied+pasted your expressions for L an ruleIG, and they work just fine.

Please provide a minimal notebook that shows the problem you're having. Please also comment on whether or not you're using xPert, if that's relevant to the problem.

L

--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

minimal_example.zip

Leo Stein

unread,
May 16, 2016, 7:28:25 AM5/16/16
to Nathan Moynihan, xAct Tensor Computer Algebra
Nathan,

I have attempted to replicate the problem you are having, but there must be more going on in your notebook that you did not include in your email. Please see the attached notebook, which is the minimal working example: I copied+pasted your expressions for L an ruleIG, and they work just fine.

Please provide a minimal notebook that shows the problem you're having. Please also comment on whether or not you're using xPert, if that's relevant to the problem.

L
On Sat, May 14, 2016 at 8:24 AM, Nathan Moynihan <n...@ltx.im> wrote:

--
You received this message because you are subscribed to the Google Groups "xAct Tensor Computer Algebra" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.
NathansExample.nb
Reply all
Reply to author
Forward
0 new messages