using the xAct I'm trying to make a rule that the antisymmetrization in three indices of an expression goes to zero. Namely I have the killing vector

$$ \xi^a $$

defined using DefTensor[\[xi][a],M,KillingVectorOf -> metric] with $M$ being the manifold. Now I would like to create a rule such that applied to an expression it acts as

$$ \xi_{[a} \nabla_{b} \xi_{d]}=0. $$ I can easily define a new tensor with such symmetries, but I have trouble defining such a rule. For example when I try

MakeRule[{(\[Xi][-d] cd[-b]@\[Xi][-a] - \[Xi][-b] cd[-d]@\[Xi][-a] + \\[Xi][-a] cd[-d]@\[Xi][-b]), 0}, UseSymmetries -> True, 

MetricOn -> All]

I end up getting a "There is more than one term on the LHS of the rule" error. Any advice on how to implement such symmetries for expressions?

  • 1
    $\begingroup$ MakeRule cannot handle rules like a+b:>c, maybe you can try rewriting it as a:>c-b, see e.g. On MakeRule $\endgroup$
    – Lacia
    Sep 7, 2022 at 19:46

1 Answer 1


As pointed out in a comment above, the key here is to add a condition on the indices. For example, with the setup

<< xAct`xTensor`

DefManifold[M, 4, {a, b, c, d, e, f}]

DefTensor[X[a], M]

DefMetric[-1, g[-a, -b], cd]

construct this sum, which you want to be zero:

zero = 6 Antisymmetrize[X[-a] cd[-b][X[-d]], {-a, -b, -d}]

And now construct the rule you need with something like this, and note the use of OrderedQ so that the rule only applies to one of the six terms of the sum:

rule = With[{lhs = First[zero], rhs = - Rest[zero]}, MakeRule[{lhs, rhs, OrderedQ[{a, b, d}]}]]

Check the rule:

In[]:= zero /. rule
Out[]= 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.