MathGroup Archive 2010

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

Search the Archive

Re: Define an antisymmetric function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg107409] Re: [mg107396] Define an antisymmetric function
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 12 Feb 2010 04:39:51 -0500 (EST)
  • Reply-to: hanlonr at cox.net

G[a, b] := f[a, b];
G[a, c] := g[a, c];
G[b, c] := h[b, c];

G[x_, y_] := -G[y, x] /;
  
  MemberQ[{a, b, c}, x] &&
   MemberQ[{a, b, c}, y] && (x =!= y)

G @@@ {{a, b}, {b, a}, {a, a}, {a, x}, {a, f[b]}}

{f[a, b], -f[a, b], G[a, a], G[a, x], G[a, f[b]]}


Bob Hanlon

---- Torsten Schoenfeld <kaffeetisch at gmx.de> wrote: 

=============
I'd like to define an antisymmetric function by giving its value on a 
set of known objects.  I'm having trouble enforcing antisymmetry.  Say I 
want to define G[_, _] on the objects {a, b, c}:

   G[a, b] := f[a, b]
   G[a, c] := g[a, c]
   G[b, c] := h[b, c]

If I now enforce antisymmetry simply by

   G[x_, y_] := -G[y, x]

then it mostly works (e.g., G[b, a] evaluates to -f[a, b]).  But if I 
apply G to something that is not in {a, b, c}, then I run into an 
infinite loop: G[a, f[b]] yields "$RecursionLimit::reclim: Recursion 
depth of 256 exceeded."

Ideally, I would like applications to unknown input to stay unevaluated 
(e.g., G[a, f[b]] just yields G[a, f[b]]).  How can I achieve that while 
also enforcing antisymmetry?




  • Prev by Date: Re: How to scope PopupMenu values in a DynamicModule?
  • Next by Date: Re: Define an antisymmetric function
  • Previous by thread: Re: Re: Define an antisymmetric function
  • Next by thread: Re: Define an antisymmetric function