2
$\begingroup$

I want to work with linear expressions involving the formal symbol $w[a_1,...,a_n]$, and I would like Mathematica to know that expressions such as

w[a,b,d] + w[a,d,b] = 0

i.e. that the symbol w is antisymmetric with respect to the swap of any of its entries. What is the best way to implement this?

$\endgroup$
2
$\begingroup$

You can do it by simplifying every mention of w to its sorted form:

w[a, b, d] + w[a, d, b] /. W_w :> Signature[W]*Sort[W]

0

{w[a, b, d], w[a, d, b], w[b, a, d], w[b, d, a], w[d, a, b], w[d, b, a]} /.
  W_w :> Signature[W]*Sort[W]

{w[a, b, d], -w[a, b, d], -w[a, b, d], w[a, b, d], w[a, b, d], -w[a, b, d]}

$\endgroup$
2
$\begingroup$

Here's a variation of Roman's answer that doesn't require the application of ReplaceAll to simplify things:

a_w /; !OrderedQ @ Unevaluated @ a := Signature[Unevaluated[a]]Sort[Unevaluated[a]]

Your example:

w[a, b, d] + w[a, d, b]

0

Another possibility is to use the symbolic tensor capabilities of Mathematica. For example:

TensorReduce[
    w + TensorTranspose[w, {1, 3, 2}],
    Assumptions -> w ∈ Arrays[{n, n, n}, Complexes, Antisymmetric[{1,2,3}]]
]

0

$\endgroup$
  • $\begingroup$ Carl, can you please add a little bit of explanation on your use of Unevaluated in your first solution? Thanks! $\endgroup$ – Roman Mar 30 '19 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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