1
$\begingroup$

I have a totally antisymmetric function of n arguments, f[a,b,c,d] = -f[b,a,c,d], which I would like to be multi-linear, e.g.

f[a+x,b+y,c,d] = f[a,b,c,d] + f[x,b,c,d] + f[a,y,c,d] + f[x,y,c,d]

How can I achieve this? It's easy enough to do for one argument, e.g. I could use

f[a_Plus,b__]:= f[#,b]&/@a,

however I need this to work for all n arguments. Any ideas?

$\endgroup$

2 Answers 2

1
$\begingroup$
Clear[f];

f[a1___, a2_Plus, a3___] := f[a1, #, a3] & /@ a2

f[a + x, b + y, c, d]
(* f[a, b, c, d] + f[a, y, c, d] + f[x, b, c, d] + f[x, y, c, d] *)
$\endgroup$
1
$\begingroup$

Best way is to transfer the sorting to Simplify - ing commands

f /: Simplify[f[a_, b__]] := Signature[{a, b}]*f @@ Sort[{a, b}]

f/:Expand[ f[a___,b_Plus,c___]]:=Distribute[f[a,b,c],Plus] 

I don't trust automatic definitions like

f[a_, b__] := Signature[{a, b}]*f @@ Sort[{a, b}] /; ! OrderedQ[{a, b}]

f[a___, b__Plus, c___] :=  f[a, #, c] & /@ b

f[a___, b_?NumericQ  *c__, d___] := b  f[a, c, d]

Too often such identity definitions have produced infinite recursions without control for me.

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.