Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Creating an Attribute AntiSymmetric ?!?!?!

  • To: mathgroup at
  • Subject: [mg6428] Re: [mg6279] Creating an Attribute AntiSymmetric ?!?!?!
  • From: fransm at (Frans Martens)
  • Date: Thu, 20 Mar 1997 00:52:25 -0500 (EST)
  • Sender: owner-wri-mathgroup at


Bjoern Hassler wrote several weeks ago

> is there a way of creating your own Attributes?

> In particular I am looking for an attribute which
> work like Orderless (especially in wrt. to pattern
> matching), but makes a function totally anti(skew)-
> symmetric, rather than totally symmetric.

and Paul Abbot replied

> The following ideas have appeared in various issues of the
> Mathematica Journal. ....

and with a suggestion

> In[4]:= f[x__ /; !OrderedQ[{x}]] := Signature[{x}] f @@ Sort[{x}]
> attached to f, ensures that it is antisymmetric independent of the
> number of  its arguments. An example illustrates the utility of the
> technique:


The following rule is more adequate:

f[x__ /; Union[{x}]=!={x}]:=
  ReleaseHold[Signature[{x}] Hold[f @@ Sort[{x}]]]

With this rule f[1,1,2] yields 0 and f[1,1,2] itself is not computed!

Frans Martens
The Netherlands


  • Prev by Date: Re: Attributes
  • Next by Date: Engineering Maths Education
  • Previous by thread: Re: Creating an Attribute AntiSymmetric ?!?!?!
  • Next by thread: Competition