Georg Lang/ TU-Berlin/April 2002

Using the "ccr_car_algebra" Package

Copyright notice: This is work of Georg Lang, Berlin, Germay. Non-commercial use of this notebook is permitted.

Introduction

What is it good for?

The "ccr_car_algebra" package has been written for physicists and/or mathematicians, who would like to save themselves the sometimes tedious work to verify algebraic identities or calculate expectation values in many particle physics. In particular I had the CCR- and CAR-Algebras of respectively Bose and Fermi systems in mind, but the package can deal with polynomials of any algebra given by its commutation or anti-commutation relations. It includes some commands particular to the so called Wick-Theorem (hierarchy of functionals, truncated functionals), a somewhat more specialised topic.

What is the idea behind it?

The "ccr_car_algebra" package is designed to work with algebras, which are abstract in the sense that their elements are not represented by matrices or functions, but by mere symbols. The algebraic structure is encoded in either commutation or anti-commutation relations. This situation arises naturally in many particle physics, where the so called CCR-Algebra is given in terms of the "canonic commutation relations" and the CAR-Algebra is given in terms of the "canonic anti-commutation relations". According to Mathematica-Notation, the multiplication of two elements "a" and "b" of an abstract algebra is repesented by "NonCommutativeMultiply[a,b]", i.e. "a**b". This package also provides some commands, which are related to the so called hierarchy of functionals, which do play an important role in quantum field theory (see example 2 below). In particular the command "SetOfPartitions" allows to calculate the right hand side of the equality commonly known as Wick-Theorem in an easy way. This second topic is of course more specialized than the first, but both are closely related. 
Although I have written the package with the CCR and CAR-Algebras in mind, this package can in principle deal with any algebra determined by commutation or anti-commutation relations. It is written is such a way, as to presuppose as little notation as possible on the user's side. It may therefore be convenient to introduce your own shorthand notation, when working with this package.

<< ccr_car_algebra.m

Basic features

Possibly most important is the capability to distinguish between scalars (seen as elements commuting with all other elements) and general elements of the algebra. This is achieved by the functions "DeclareScalar" and "ScalarQ" in the following way:

ScalarQ[1]

ScalarQ[s]

\(DeclareScalar[s]; 
ScalarQ[s]\)

Wether or not a symbol has been declared scalar, has important consequences for other functions. This is particulary true for the Functions "Commutator" and "AntiCommutator" representing the corresponding mathematical objects.

Commutator[a, b]

Commutator[a, s]

The second commutator is zero, because "s" is a scalar! Similarly, we have:

AntiCommutator[a, b]

AntiCommutator[a, s]

These functions do have the known linearity properties, e.g.

AntiCommutator[a + s, b]

One more thing: "AntiCommutator" has the attribute of being "Orderless", so without loss of generality you may assign values to anti-commutators directly using ":=". For example:

AntiCommutator[x, y] := u

AntiCommutator[y, x]

Commutators on the other hand are anti-symmetric, so it is recommendable to use the function "DeclareCommutator"

?DeclareCommutator

Ordering of monomials of elements of an algebra

The basic problem is to determine the equality of polynomials in algebra elements. Even though seemingly different, two polynomials may be equal due to commutation relations. Let us take the example of the CCR-Algebra. Denoting its elements by a[0,p] and a[1,p], where the latter denotes the adjoint of the first and p is an index, which we do not need to specify, the CCR-Algebra is given by the commutation relations:

\(DeclareCommutator[{a[s_, p_], a[s_, q_], 0}]; 

    DeclareCommutator[{a[0, p_], a[1, q_], Kronecker[p, q]}]; \)

Obviously the follwing two expressions correspond to the same element of the algebra:

\(Clear[expr]
\)\(expr[1] = a[1, p]**a[0, q]; 

    expr[2] = a[0, q]**a[1, p] - Kronecker[p, q]; \)

Since Mathematica does not automatically use the commutation relations to simplify, it does not recognize the equality of the expressions:

Evaluate[expr[1] == expr[2]]

The "ccr_car_algebra" package provides a command to bring polynomials of algebra elements into a prescribed order, thereby reducing all expressions to a unique standard form:

?CommuteOrder

CommuteOrder[expr[1] == expr[2], {a[0, x_], a[1, y_]}]

The package also provides the related commands "Commute" and "CommuteLeft", which are both documented. The commands "AntiCommutator", "AntiCommuteOrder", "AntiCommute" and "AntiCommuteLeft" do the same for Algebras given in terms of their anti-commutators.

Example 1: Calculating vacuum expectation values (fermionic case)

In many particle physics, the CAR-Algebra given by the following "canonic anti-commutation relations"

\(AntiCommutator[a[0, p_], a[1, q_]] := Kronecker[p, q]; 

    AntiCommutator[a[s_, p_], a[s_, q_]] := 0; \)

is a C-star-algebra, the selfadjoined elements of which, represent the observables of a quantum many particle system with fermionic statistics. In addition to the algebra there exists a normalized functional on the algebra, the vacuum expectation, with the follwing properties

\(Clear[Vacuum]
\)\(ScalarQ[Vacuum[_]] ^= True; 

Vacuum[s_] := s /; ScalarQ[s]\ ; 


    Vacuum[b_ + c_] := Vacuum[b] + Vacuum[c]; 

    Vacuum[a_?ScalarQ**x_] := a*Vacuum[x]; 

Vacuum[a[1, _]**x_] := 0; 

    Vacuum[x_**a[0, _]] := 0; \)

Remark: It is more convenient to define the value of "ScalarQ[Vacuum[_]]" as an upvalue of "Vacuum[_]" rather than using the function "DeclareScalar". Otherwise the evaluation of "Vacuum" would imply the evaluation of "ScalarQ" and viceversa, possibly giving rise to an infinite recursion loop.

Calculating the expectation value of polynomial in algebra elements, is a merely combinatorial problem, which can effectively be tackled as in the following example:

expr[3]  =  
      Vacuum[a[0, p[1]]**a[0, p[2]]**a[1, p[3]]**a[1, p[4]]]

expr[4] = AntiCommuteOrder[expr[3], {a[1, _], a[0, _]}]

The remaining vacuum expectation values of ordered monomials vanish by the last two properties defined for "Vacuum".

Those familiar with many particle physics will not be surprised by this result, predicted by the so called Wick-Theorem

Example 2: Truncated funtionals (Bosonic Case)

In many particle physics, it is common to view expectation values of fields as an hierarchiy of functionals. Let "W" be such an hierachy. We may then define the so called truncated hierarchy of functionals  "w" associated to "W" using the function "SetOfPartitions"

?SetOfPartitions

We illustrate this function with an example:

SetOfPartitions[{a, b, c}]

We first define the left hand side of the equation, which is to determine "w" in terms of "W"

\(Clear[W, w, V]
\)V[fs___] := 
      Plus@@Apply[Times, Apply[w, SetOfPartitions[{fs}], {2}], {1}]

We repeat the last example given above for "V":

V[a, b, c]

Now  "w" as a hierarchy of functionals is determined by equating "W" with "V":

\(Clear[eqn]
\)eqn[n_] := 
      (W@@Table[f[k], {k, 1, n}] == V@@Table[f[k], {k, 1, n}])

For example we obtain the following equations:

eqn[1]eqn[2]eqn[3]

These equations can be recursively solved to give explict expressions for "w" in terms of "W". This expressions now become definitions of "w":

w[f_] = 
      (w[f[1]] /. Solve[eqn[1], w[f[1]]][[1]]) /. f[1] -> f

w[f_, g_] = 
      (w[f[1], f[2]] /. Solve[eqn[2], w[f[1], f[2]]][[1]]) /. {
          f[1] -> f, f[2] -> g}

w[f_, g_, h_] = 
      (w[f[1], f[2], f[3]] /. 
            Solve[eqn[3], w[f[1], f[2], f[3]]][[1]]) /. {f[1] -> f, 
          f[2] -> g, f[3] -> h}

and so on ...

Complete List of Documented Commands Provided by the Package

DeclareScalar
ScalarQ
Kronecker
DeclareCommutator
AlgebraExpand
AlgebraCollectMonomials
AlgebraCollectScalars
AntiCommutator
AntiCommute
AntiCommuteLeft
AntiCommuteOrder
AlgebraDropZeros
Commutator
Commute
CommuteLeft
CommuteOrder
NonCommutativeDot
SetOfPartitions
SignatureOfPartition
WickOrder