Problem with Substitution Rules and ScreenDollarIndices

435 views
Skip to first unread message

Filippo

unread,
May 14, 2012, 10:32:54 AM5/14/12
to xa...@googlegroups.com
Hello,
I'm actually having problems using substitution rules into xTensor and then the option ScreenDollarIndices, and I do not understand how to solve it.


I'm actually working with the following recursive differential relations for local operators sigma_m :

{Subscript[\[Sigma][], m] -> (-CD[-\[Mu]][CD[\[Mu]][Subscript[\[Sigma][], m-2]]] + I*(-(Subscript[\[Sigma][], m-1]*CD[-\[Mu]][CD[\[Mu]][l[]]]) -
      2*CD[-\[Mu]][Subscript[\[Sigma][], m-1]]*CD[\[Mu]][l[]]))/(\[CapitalLambda][] - CD[-\[Mu]][l[]]*CD[\[Mu]][l[]])}

The operator sigma_m depends on covariant derivatives of operators sigma_m-1 and sigma_m-2 and covariant derivatives of a biscalar l(x,x').
Since the recursive relations are all obtained starting from the same lagrangian density (which consists of a laplacian defined with contracted \mu indices) they are then defined ab initio with the same index \mu.

Given the solution for \sigma_0,

\sigma_0   prop to   CD[mu]@l * CD[-mu]@l ,

I can solve the recursive equations writing them in terms of only covariant derivatives of the biscalar l(x,x'). This introduces the following problem: using substitution relations defined with the same index \mu brings me to the error

Validate::repeated: Found indices with the same name -\[Mu]

because I have products of many covariant derivatives contracted with the same index.

I simply avoid this error renaming for every substitution rule (for every operator sigma_m) the index \mu with an other index.
But the problems is not solved since the computation of operators with m >1 also involves commutation of covariant derivatives, and then the recursion relations contain Riemann tensor contracted with covariant derivatives of l(x,x') with internal dummy indices. Up to order R there are no problems, since the dummy indices are present once in a product, but at order R^2 when I try to use ScreenDollarIndices the Validate finds terms contracted with the same dummy index and gives the error :

Validate::repeated: Found indices with the same name -\[Zeta]$1596.

So what I require to do is to assign, for every single substitution, a new dummy index, with ReplaceDummies for example. Since I cannot do this manually I would like to ask if there is some way to define 'dynamical' dummy indices. Maybe this means modify how Mma use substitution rules, since, for example

a*a /.{a -> ReplaceDummies[expr]}

gives the product of the same dummy index, which is, moreover, not correctly visualized using ScreenDollarIndices.

In the meanwhile, can please someone tell me how to disable this Validate error?

Thank you very much to everyone!
Filippo

Thomas Bäckdahl

unread,
May 14, 2012, 1:01:27 PM5/14/12
to xa...@googlegroups.com
Hi Filippo!

Use pattern rules with RuleDelayed.
For instance
Subscript[\[Sigma][], m_] :>ReplaceDummies[SomeFunction[m]]

Regards
Thomas

Filippo

unread,
May 15, 2012, 3:38:34 PM5/15/12
to xa...@googlegroups.com
Thank you for your answer Thomas.
It seems that I have to look more at the Documentation :) but anyway, I tried to use ReplaceIndex and ReplaceDummies but I cannot still solve my problem. Now I use ReplaceIndex to replace automatically the \mu index of the laplacian (which now is a dollar index), so that if 

/.RULEm is the substitution rule /.{sigma_m -> expr}

now the new rule is

/.ReplaceDummies[RULEm]

and this automatically changes the dollar indices so that when I evaluate the sigma_m the expr

expr/.ReplaceDummies[RULEm-1]/.ReplaceDummies[RULEm-2]... 

this contains only dummy indices. Anyway, already at m = 2 I get the error  'found indices with the same name'.


Trying to understand why I've seen that the recursive expression of the operators sigma is equal to

{Subscript[\[Sigma][], 1] -> (I*(-(Subscript[\[Sigma][], 0]*CD[-\[Zeta]$9123][CD[\[Zeta]$9123][l[]]]) - 2*CD[-\[Zeta]$9123][Subscript[\[Sigma][], 0]]*CD[\[Zeta]$9123][l[]]))       /    (\[CapitalLambda][] - CD[-\[Zeta]$9123][l[]]*CD[\[Zeta]$9123][l[]])}

and then contains the same dollar index in both the numerator and denominator. Using ReplaceDummies only the dollar index at the numerator changes but using ScreenDollarIndices the two dollar indices are shown with the same symbol. I think that the problem stay here since the expression

CD[mu]CD[-mu] L / (1 + CD[mu]CD[-mu] L) ^ m

is correct for the Validate, but the equivalent expression

(1 + CD[mu]CD[-mu] L)  CD[mu]CD[-mu] L / (1 + CD[mu]CD[-mu] L) ^ m+1

is not valid since contains the same index mu at the nominator, and probably using ScreenDollarIndices or Simplification Mma brings the expr in the last form. 

Is it correct? Is it there a way to use ReplaceDummies so that all the dummy indices in an expr gets different values (so that the denominator has always a different index respect to the nominator)?

Thank you very much.
Filippo 


I would like to 

Thomas Bäckdahl

unread,
May 15, 2012, 4:16:29 PM5/15/12
to xa...@googlegroups.com
Hi Filippo!

I have tried to understand what your problems is.
I am not sure because I don't have a complete idea of your code....
I have a few tips though, that might solve your problem:
*You should probably use :> instead of ->, that is RuleDelayed instead of Rule.
*Use ReplaceDummies on the right hand side of the RuleDelayed, not on the rule itself. This way ReplaceDummies is called every time you use the rule, not when you define the rule.
*When you have divisions, it is always safest to use the head Scalar in the denominator.

For instance your substitution rule should probably look like:

substitutionrule=Subscript[\[Sigma][], m_] :>
  ReplaceDummies[(-CD[-\[Mu]][

        CD[\[Mu]][Subscript[\[Sigma][], m - 2]]] +
      I*(-(Subscript[\[Sigma][], m - 1]*CD[-\[Mu]][CD[\[Mu]][l[]]]) -
         2*CD[-\[Mu]][Subscript[\[Sigma][], m - 1]]*CD[\[Mu]][l[]]))/
    Scalar[\[CapitalLambda][] - CD[-\[Mu]][l[]]*CD[\[Mu]][l[]]]]

And you use it like

%/.substitutionrule

I hope this helps.

Regards
Thomas
Reply all
Reply to author
Forward
0 new messages