MathGroup Archive 1999

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

Search the Archive

Re: calculus with Grassmann variables

  • To: mathgroup at smc.vnet.net
  • Subject: [mg21019] Re: [mg20970] calculus with Grassmann variables
  • From: Daniel Lichtblau <danl at wolfram.com>
  • Date: Thu, 2 Dec 1999 21:41:31 -0500 (EST)
  • References: <199912010650.BAA07735@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Diego Bellisai wrote:
> 
> Hi everybody,
> I am looking for a Mathematica package or notebook which allows me
> to deal with Grassmann (anticommuting) variables and to perform
> calculations with both (standard) commuting and anticommuting variables.
> In particular, I am interested in performing matrix calculus (products,
> determinants and so on) with "anticommuting entries" matrices and with
> commuting entries matrices.
> Can somebody help me, please?
> Cheers, Diego.
> 
> * * * * * * * * * * * * * * * * * * * * * * * * * * * *
> *  Diego Bellisai                                     *
> *  Physics Department                                 *
> *  University of Padova                               *
> *  Via F. Marzolo, 8 - 35131 Padova (Italy)           *
> *                                                     *
> *  e-mail: bellisai at pd.infn.it                        *
> *  Tel.: ++39-049-8277183      Fax: ++39-049-8277102  *
> * * * * * * * * * * * * * * * * * * * * * * * * * * * *

Say you encapsulate all anticommuting variables with the head avar[].
Then you can define product rules to handle the commutation relations
and furthermore distribute over Plus, pull out "scalars" (everything not
with head of avar) using ordinary Times, and so on. Matrix
multiplication is then just Inner with this new product specified in
place of Times. To do determinants one can use Laplace expansion, again
substituting the new product for Times.

The rules below illustrate this method, though perhaps they could be
simplified somewhat. They pass some basic sanity tests but I'd not
guarantee that they are bug-free.

Clear[myTimes];
myTimes[a___,avar[x_],b___,avar[x_],c___] := 0
myTimes[avar[x_],avar[y_],avar[z_]...] /; Not[OrderedQ[{x,y,z}]] :=
	(Signature[{x,y,z}]*
	myTimes[Sequence @@ Map[avar,Sort[{x,y,z}]]])
myTimes[a_] /; Head[a]=!=Times := a
myTimes[x___,y_Plus,z___] :=
	myTimes[x,#,z]& /@ y
myTimes[x___,y_Times,z___] :=
	myTimes[x,Apply[Sequence,y],z]
myTimes[x___,y_myTimes,z___] :=
	myTimes[x,Apply[Sequence,y],z]
myTimes[] = 1;
myTimes[vars__] /; Length[{vars}]>2 := Module[{vl={vars},antis,coms},
	antis = Cases[vl,avar[_]];
	coms = Complement[vl, antis];
	Apply[Times,coms]*Apply[myTimes,antis]
	]
myTimes[a_,b_] /; Head[a]=!=avar && Head[b]=!=avar := a*b

Here is an example. We take a 3x3 matrix with avar[] entries and find
its inner product with itself using these rules.

m1 = {{avar[1],x,avar[2]},
	{x2,avar[1]+2*avar[2],3*avar[1]-avar[2]},
	{avar[1]-avar[2],x3,-3*avar[1]+avar[2]}};

In[324]:= InputForm[Inner[myTimes, m1, m1]]
Out[324]//InputForm= 
{{x*x2 - myTimes[avar[1], avar[2]], 2*x*avar[2] + myTimes[x, avar[1]] + 
   myTimes[avar[1], x] + myTimes[avar[2], x3], 3*x*avar[1] - x*avar[2] + 
   4*myTimes[avar[1], avar[2]]}, {2*x2*avar[2] + myTimes[x2, avar[1]] + 
   myTimes[avar[1], x2] - 2*myTimes[avar[1], avar[2]], 
  x*x2 + 3*x3*avar[1] - x3*avar[2], myTimes[x2, avar[2]] - 
   7*myTimes[avar[1], avar[2]]}, {x2*x3 + 3*myTimes[avar[1], avar[2]], 
  -3*x3*avar[1] - x*avar[2] + 2*x3*avar[2] + myTimes[x3, avar[1]] + 
   myTimes[avar[1], x] + myTimes[avar[2], x3], 3*x3*avar[1] - x3*avar[2]
+ 
   myTimes[avar[1], avar[2]]}}

Now for the determinant computation.

Clear[ncDet]
ncDet[{{a_}}] := a
ncDet[mat_?MatrixQ] /; Length[mat]===Length[mat[[1]]] :=
	With[{len=Length[mat], mat1=Drop[mat,{1}]},
	Sum[myTimes[mat[[1,j]],ncDet[Drop[mat1,None,{j}]]], {j,len}]]

In[329]:= InputForm[ncDet[m1]]
Out[329]//InputForm= 
-3*x*x2*avar[1] + x*x2*avar[2] + x2*x3*avar[2] - 
 2*x*myTimes[avar[1], avar[2]] - x3*myTimes[avar[1], avar[2]]


Daniel Lichtblau
Wolfram Research


  • Prev by Date: Re: MathLink Data Types
  • Next by Date: Re: Abs[a] Sin[Abs[a]]
  • Previous by thread: calculus with Grassmann variables
  • Next by thread: corrections to: Re: calculus with Grassmann variables