Repeated Dummy Index

434 views
Skip to first unread message

Arash Yunesi

unread,
Jan 29, 2017, 12:27:59 PM1/29/17
to xAct Tensor Computer Algebra
Dear all

I have done perturbation on Sqrt[-Detg[]]RicciScalarCD[] to cubic order in gravitational perturbation, h, and I have repeated dummy indices in some terms. I searched in the documentation and in the forum and couldn't solve the problem.
I would really appreciate it if you could give me some advice on how to solve this.

Best,
Aresh

Arash Yunesi

unread,
Feb 2, 2017, 12:28:58 PM2/2/17
to xAct Tensor Computer Algebra
My metric definition:

DefMetricPerturbation[g, h, \[Alpha]];

Making perturbation to the metric exact:

h[LI[n_], a_, b_] := 0 /; n > 1

One easy example of my problem with the repeated dummy indices is clear below:

(Perturbation[Sqrt[-Detg[]], 2] // ExpandPerturbation) /. Detg[] -> -1

which gives
-1/2 h[a,b]h[-a,-b] + 1/2 h[a,-a]h[b,-b] - 1/4 (h[a,-a])^2

The last term is inside red parentheses and I think it is because the dummy index is repeated. Mathematica has written it like that because probably it was -1/4 h[a,-a]h[a,-a]. We know that the second and third term have the same structure and they should be added together. How can I solve this problem?

Best,
Aresh

Leo Stein

unread,
Feb 2, 2017, 12:38:20 PM2/2/17
to Arash Yunesi, xAct Tensor Computer Algebra
Arash,

The red parentheses is not an error. You can inspect this expression by applying InputForm or FullForm to it. You will see something like
  ... - 1/4 Scalar[ h[a,-a] ]^2.
Scalar[] is a head which protects expressions with all indices contracted from problems like squaring. For example, imagine you wanted to replace a scalar field Phi[] with a contracted tensor T[a,-a] with a rule Phi[] -> T[a,-a]. If you had an expression with \Phi[]^n with some power n, you would have index problems. If instead you use Phi[] -> Scalar[T[a,-a]], you will not.

You can remove the Scalar[] head and replace all dummy indices with new indices that avoid repetition with the command NoScalar[].

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.

Arash Yunesi

unread,
Mar 4, 2017, 12:51:18 PM3/4/17
to xAct Tensor Computer Algebra, arash.yu...@gmail.com
Thank you so much Leo.
Arash
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.

Meng-Sen Ma

unread,
Mar 5, 2017, 2:23:43 AM3/5/17
to xAct Tensor Computer Algebra, arash.yu...@gmail.com
Leo,

I also met the similar problem. Ffor example,  the calculus of variation, VarD[g[-a,-b],CD][(F[a,b]*F[-a,-b])^2] will give an error information:" Found indices with the same name a ". However, if the exponent is not an integer, it can give a result without an error. I think this problem can be easily solved, but I do not know how to do that. Can you give any suggestion?
MS Ma

在 2017年2月3日星期五 UTC+8上午1:38:20,Leo Stein写道:
To unsubscribe from this group and stop receiving emails from it, send an email to xact+uns...@googlegroups.com.

Mario Herrero Valea

unread,
Mar 5, 2017, 11:25:39 AM3/5/17
to Meng-Sen Ma, xAct Tensor Computer Algebra, arash.yu...@gmail.com
Hi,

I did not try it but I guess it can be solved by using the Scalar head. In general, any time you want to exponentiate a contraction, be careful enough and use Scalar[F[a,b]*F[-a,-b]].

The reason is that only in this case xAct will know that when taking iterations of the expression, it should assign different indices to it. If you just write it as you did, what xAct reads is

(F[a,b]*F[-a,-b])*(F[a,b]*F[-a,-b)

which gives you the same indices error.

Cheers,

Mario
Reply all
Reply to author
Forward
0 new messages