# replacement rules

21 views

### olse barn

Mar 11, 2023, 8:51:34 AMMar 11
to xAct Tensor Computer Algebra
Hey everyone,

I have again a very specific question: I have a couple of Tensors, let's call them A[i] and B[i], that satisfy certain relations e.g. for A[i]:

PD[i]A[j]+PD[j]A[i]=0.

I would now like to use these relations in a very long expression that includes for example

...+PD[i][A[j]]B[-i]A[-j]*something_long_with_indices_being_contracted+...+PD[j][A[i]]B[-i]A[-j]*something_long_with_indices_being_contracted+...

such that, the two given terms vanish.
More specifically, I face the problem that the index names are potentially different, i.e. they could occur in a form like:

...+PD[q][A[r]]B[-q]A[-r]*something1+...+PD[j][A[i]]B[-i]A[-j]*something1+...

Is there an easy way to obtain such a replacement rule?

All the best.

### TB

Mar 11, 2023, 9:27:14 AMMar 11
to xAct Tensor Computer Algebra
Hi!

In general it is not a great idea to make rules that tries to replace several terms with something else. It is better to make a rule that replaces one term with something with more symmetries.

For instance split PD[i]A[j] into its symmetric and antisymmetric part like in the following discussion:
After that you could set the symmetric part to zero. This gives a systematic way of doing it which does not depend on the names of the indices.

Se also the following discussions regarding similar problems:

Regards
Thomas