<< xAct`xTensor`
<< xAct`xPert`
DefManifold[M4, 4, {a, b, c, d}];
DefTensor[TS[LI[label], a, b], M4, Symmetric[{2, 3}]];
DefTensor[T[LI[label], a, b], M4];
DefTensor[Phi[LI[label]], M4];
I now create two rules
testrule1 = MakeRule[{T[LI[z_], a, b], PD[a][PD[b][Phi[LI[z]]]]}]
testrule2 = MakeRule[{TS[LI[z_], a, b], PD[a][PD[b][Phi[LI[z]]]]}]
Defining the first rule goes through without any problems, but the second rule fails to compile and creates a warning that the "First element in pattern Pattern[z_,_] is not a valid pattern name." The precise form of the substitution seems to be irrelevant - what controls whether there is a problem or not is whether the tensor to be substituted for is symmetric in some of its indices or not...
Am I doing something wrong here? Perhaps I'm misunderstanding the syntax and there is there some way of making these rules work for symmetric tensors?
Best wishes and many thanks in advance!
Johannes