# Make a function invariant under a permutation of the arguments

The output of my current notebook contains expressions that look as follows

(V[{k,q},{s,t}] + V[{-k, -q}, {t,s}])


In my specific application these two functions are equal, so ideally I would want Mathematica to combine them when simplifying to give the output.

2 V[{k,q},{s,t}]


I assume I have to define some property of the V function, but I can't really figure out how to do this. More generally I want V to be invariant under the argument tranformation where the last two arguments are flipped, and the first two arguments have their sign flipped.

• V[{k, q}, {s, t}] + V[{-k, -q}, {t, s}] /. V[{-k_, -q_}, {t_, s_}] -> V[{k, q}, {s, t}]? – AccidentalFourierTransform May 9 at 12:48
• You can define some sort of canonical form. For example, demand that the second list should always be sorted (ordered). Here is the rule which sorts second list and adjusts the signs of the first list accordingly. myexpression /. V[{a_, b_}, {c_, d_}] :> V[{-a, -b}, {d, c}] /; Not[OrderedQ[{c, d}]] – Shadowray May 9 at 13:27