       Casimirs...Re: FW: How to do Lie Algebras in Mathematica...

• To: mathgroup at smc.vnet.net
• Subject: [mg20812] Casimirs...Re: FW: [mg20751] How to do Lie Algebras in Mathematica...
• From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
• Date: Sun, 14 Nov 1999 18:14:00 -0500 (EST)
• Sender: owner-wri-mathgroup at wolfram.com

```I sent the message below to Melih Sener in response to a private message
from him, which followed my reply to his posting about Lie algebras to the
mathgroup. My message is rather long but as I thought other people might be
intersted I have decided to send it to the mathgroup also.

Dear Melih

As promised I have considered this matter further, particularly in relation
to the Casimir element (rather then general casimirs, which seem to be
rather harder to study). But as I am rather rusty on this subject I hope you
will spot and correct any errors and misrepresentations.

First, a few general remarks. There are two basic methods to study Lie
algebras. We can either study abstract Lie algebras defined by explicit
formulas for the commutator, or study  Lie algebras of linear
transformations. By the Poincare-Birkhoff-Witt theorem these two approaches
are equivalent. (Moreover, in the finite dimensional case we can replace
linear transformations by matrices). Daniel Lichtblau a few months ago
posted a set of functions which can be used in the second approach. Here I
am only concerned with the first approach. I think t would be a good idea to
produce a complete package combining all the approaches because it is often
useful to switch between them.

Anyway, in order to study things like the Killing form, Casimir operator
etc, we need to consider not just a vector space with a Lie bracket, but
also the universal enveloping algebra. This requires an associative,
non-commutative multiplication. Mathematica has its own
NonCommutativeMultiply function, but it is very rudimentary so I have had to
add several rules to it. The alternative would be to use the
NonCommutativeAlgebra package available from MathSource but as I have no
looked at it for a long time I have decided not to do so. O.K. next comes my
new collection of functions, which I hope sometime to turn into a proper
package:

In:=
Bracket[0, X_] := 0
Bracket[X_Plus, Y_] := Block[{Bracket}, Distribute[Bracket[X, Y]]];
Bracket[X_, Y_Plus] := Block[{Bracket}, Distribute[Bracket[X, Y]]];
Bracket[a_?NumericQ*X_, Z_] := a*Bracket[X, Z];
Bracket[Z_, a_?NumericQ*X_] := a*Bracket[Z, X];
Bracket[X_Symbol, Y_Symbol] /;
Not[OrderedQ[{X, Y}]] := -Bracket[Apply[Sequence, Sort[{X, Y}]]];
Bracket[X_, X_] = 0;
Bracket[Z_Symbol, X_ ** Y_] := X ** Bracket[Z, Y] + Bracket[Z, X] ** Y;
Unprotect[NonCommutativeMultiply];
x_ ** (a_?NumericQ*y_) := a*(x ** y);
(a_?NumericQ*x_) ** y_ := a*(x ** y);
NonCommutativeMultiply[X_Plus, Y_] :=
Block[{NonCommutativeMultiply},
Distribute[NonCommutativeMultiply[X, Y]]];
NonCommutativeMultiply[X_, Y_Plus] :=
Block[{NonCommutativeMultiply},
Distribute[NonCommutativeMultiply[X, Y]]];
X_Symbol ** Y_Symbol /; Not[OrderedQ[{X, Y}]] := Y ** X + Bracket[X, Y];
NonCommutativeMultiply[x___Symbol, u_Symbol, v_Symbol, z___Symbol] /;
Not[OrderedQ[{u, v}]] :=
NonCommutativeMultiply[NonCommutativeMultiply[x],
NonCommutativeMultiply[u, v], NonCommutativeMultiply[z]];
0 ** X_ = 0;
X_ ** 0 = 0;
Protect[NonCommutativeMultiply];
Mat[f_, B_List] := Array[D[f[B[[#1]]], B[[#2]]] &, {Length[B], Length[B]}];
MatrixToForm[M_?MatrixQ, B_List] :=
Sum[M[[i, j]]*(B[[i]] ** B[[j]]), {i, 1, Length[B]}, {j, 1, Length[B]}]
killingMatrix[e_List] :=
Array[killingForm[e[[#1]], e[[#2]], e] &, {Length[e], Length[e]}];
casimirMatrix[e_] := MatrixPower[killingMatrix[e], -1]

Next follows an explanation of the new functions and commands that I added
to my earlier version. In the first line I added the rule for Bracket[0,X],
the following six rules are the same as earlier. The first really new rule
is

Bracket[Z_Symbol, X_ ** Y_] := X ** Bracket[Z, Y] + Bracket[Z, X] ** Y;

Which allows us to expand things like Bracket[Z,X**Y] but not
Bracket[A**B,C**D] (which would have got us into trouble)

Next, I modify the NonCommutativeMultiply function. We must first unprotect
it. We want to work with an algebra over the module of numerics (including
symbols which we define ourselves to be Numeric), which is what the first
two rules achieve. Since the function NonCommutativeExpand is not available
(there is one in the NonCommutative algebra package, but I have decided not
to make use of it), I have decided to make CommutativeMultiply automatically
distribute over Plus.

The rules:

X_Symbol ** Y_Symbol /; Not[OrderedQ[{X, Y}]] := Y ** X + Bracket[X, Y];
NonCommutativeMultiply[x___Symbol, u_Symbol, v_Symbol, z___Symbol] /;
Not[OrderedQ[{u, v}]] := NonCommutativeMultiply[NonCommutativeMultiply[x],
NonCommutativeMultiply[u, v], NonCommutativeMultiply[z]];

Express the relationship X**Y-Y**X=[X,Y]. More precisely and expression like
B**A will always be replaced by A**B-Bracket[A,B], while A**B will be left
unchanged. The second rule extend this behaviour to products of more than
two elements, e.g. :

In:=
b ** a ** c
Out=
-Bracket[a, b] ** c + a ** b ** c

We then protect NonCommutativeMultiply. The remaining functions are all
related to the Killing form and the Casimir operator.

I want to define the Killing form as Tr[ad[X].ad[Y]]. It is easy to define
the ad[X] operator. However the rest of the definition leads to a problem.
Ideally we could go on working in a basis free way, but although I know how
to define Tr of an operator without representing it as a matrix I do not
know how to do so in a constructive way, which could be written as a
Mathematica program. So I am forced at this point to choose a basis for the
underlying vector space of our Lie algebra. The function:

Mat[f_, B_List] := Array[D[f[B[[#1]]], B[[#2]]] &, {Length[B], Length[B]}];

takes a linear operator f and basis B (a list of elements) and returns the
corresponding matrix. For example if

In:=
f[e1] := e1 + e2;
f[e2] := e2 - e1;

then

In:=
Mat[f, {e1, e2}]
Out=
{{1, 1}, {-1, 1}}

The next function, MatrixToForm constructs a bilinear form from a matrix.
The Killing form is now defined in the usual way, but unfortunately relative
to a fixed basis B, even though the result does not depend on the choice of
basis.

The KillingMatrix is the matrix associated to this form, and the Casimir
matrix is defined as the inverse of the KillingMatrix. I hope all this is
mathematically correct. I have not worked on Lie algebras for years and when
I did I never had any thing to do with the Casimir operator. This definition
is taken from Helgason's "Differential geometry and Symmetric Spaces" and I
might have misunderstood it!

Anyway, let us now see how all this works, using the very simple Lie algebra
I used earlier. We take a three dimensional vector space with a base:

In:=
B = {e, f, h}

The Lie algebra structure is defined by:

In:=
Bracket[e, h] = 2e; Bracket[f, h] = -2f; Bracket[e, f] = h;

We shall also make use of a few symbolic scalars:

In:=
NumericQ[m] = True; NumericQ[n] = True; NumericQ[p] = True;
NumericQ[q] = True; NumericQ[r] = True; NumericQ[s] = True;
NumericQ[t] = True; NumericQ[u] = True; NumericQ[v] = True;
and  vectors:
In:=
x = m*e + n*h + p*f; y = q*e + r*h + s*f; z = t*e + u*h + v*f;

Now let's see what we get for the Killing matrix:

In:=
killingMatrix[B] // MatrixForm
Out//MatrixForm=
0    -4   0

-4   0    0

0    0    8

We can compute the Casimir element:

In:=
casimir = MatrixToForm[casimirMatrix[B], B] // Expand
Out=
h   e ** f   h ** h
- - ------ + ------
4     2        8

We can check if it really lies in the center of the Universal Enveloping
Algebra:

In:=
casimir ** x - x ** casimir // Expand
Out=
0

In:=
casimir ** y ** x - y ** x ** casimir // Expand
Out=
0

--

> From: Melih Sener <melih at ks.uiuc.edu>
To: mathgroup at smc.vnet.net
> Organization: TBG/Beckman Institute
> Date: Wed, 10 Nov 1999 19:25:40 -0600
> To: Andrzej Kozlowski <andrzej at tuins.ac.jp>
> Subject: [mg20812] Casimirs...Re: FW: [mg20751] How to do Lie Algebras in Mathematica...
>
> Thank you once again...
> You can't imagine how much one learns from
> a working example...
>
> One last thing though:
> I want to check whether some
> bilinears in operators are Casimirs..
>
> i.e. I want to evaluate things of the form:
>
> Bracket[e**f, g]   etc.
>
> I presume a rule on the variation of
>
> Bracket[X_Plus, Y_] := Block[{Bracket}, Distribute[Bracket[X, Y]]];
>
> for the "**" should do the trick
> (  [a**b,c] = a[b,c] + [a,c]b   etc. )
> But I still don't know the proper way to introduce it...
> Could you tell me the mechanics of this...
>
> I very much indebted to your help already and I do not wish
> to make you do my work. Can you suggest me a reference to where
> I can find some of these techniques discussed...
>
> Thanks,
>
> Melih
>
>
> Andrzej Kozlowski wrote:
>>
>> I would like to add a few corrections and improvements to my Lie algebra
>> code before. First, a bug correction.  My previous code will not expand
>> expressions of the form:
>>
>> Bracket[X,Y+Z]
>>
>> where only one of the arguments has the head Plus. This is easily fixed by
>> replacing the line:
>>
>> Bracket[X_Plus, Y_Plus] := Block[{Bracket}, Distribute[Bracket[X, Y]]]
>>
>> by the following two:
>>
>> Bracket[X_Plus, Y_] := Block[{Bracket}, Distribute[Bracket[X, Y]]];
>>
>> Bracket[X_, Y_Plus] := Block[{Bracket}, Distribute[Bracket[X, Y]]];
>>
>> Secondly, for some purposes it may be better not to add the Jacobi-Identity.
>> For example, we migh want to test if the bracket defined on the generators
>> of a vector space  satisifes the Jacobi identity. To do so we of course
>> should not make the Jacobi identity into a rule for Bracket. Let's see ho
>> wall this works in a simple case:
>>
>> In:=
>> Bracket[X_Plus, Y_] := Block[{Bracket}, Distribute[Bracket[X, Y]]];
>> Bracket[X_, Y_Plus] := Block[{Bracket}, Distribute[Bracket[X, Y]]];
>> Bracket[a_?NumericQ*X_, Z_] := a*Bracket[X, Z];
>> Bracket[Z_, a_?NumericQ*X_] := a*Bracket[Z, X];
>> Bracket[x_, y_] /;
>> Sort[{x, y}] =!= {x, y} := -Bracket[Apply[Sequence, Sort[{x, y}]]];
>> Bracket[X_, X_] = 0;
>>
>> In:=
>> Bracket[e, h] = 2e; Bracket[f, h] = -2f; Bracket[e, f] = h;
>>
>> Next, we define scalars m,n,p,q,r,s,t,u,v to be Numeric:
>>
>> In:=
>> NumericQ[m] = True; NumericQ[n] = True; NumericQ[p] = True;
>> NumericQ[q] = True; NumericQ[r] = True; NumericQ[s] = True;
>> NumericQ[t] = True; NumericQ[u] = True; NumericQ[v] = True;
>>
>> We consider three general elements in the vector space generated by e,f,h:
>>
>> In:=
>> x = m*e + n*h + p*f; y = q*e + r*h + s*f; z = t*e + u*h + v*f;
>>
>> Now we can check if the Jacobi identity holds:
>>
>> In:=
>> Bracket[Bracket[x, y], z] + Bracket[Bracket[y, z], x] +
>> Bracket[Bracket[z, x], y]
>> Out=
>> 0
>>
>> So the elements e,f,h with the Bracket defined as above do indeed generate a
>> Lie algebra.
>>
>> --
>> Andrzej Kozlowski
>> Toyama International University
>> JAPAN
>> http://sigma.tuins.ac.jp
>>
>>> From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
To: mathgroup at smc.vnet.net
>>> Date: Thu, 11 Nov 1999 01:23:05 +0900
>>> To: <melih at ks.uiuc.edu>, <mathgroup at smc.vnet.net>
>>> Subject: [mg20812] FW: [mg20751] How to do Lie Algebras in Mathematica...
>>>
>>> Here is one quick attempt. We simply define a Lie algebra axiomatically
>>> using a bracket operation just as one would do in an introductory math
>>> course on the subject:
>>>
>>>
>>> First we want the bracket to be bi-linear:
>>>
>>> In:=
>>> Bracket[X_Plus, Y_Plus] := Block[{Bracket}, Distribute[Bracket[X, Y]]]
>>>
>>> In:=
>>> Bracket[a_?NumericQ*X_, Z_] := a*Bracket[X, Z]
>>>
>>> In:=
>>> Bracket[Z_, a_?NumericQ*X_] := a*Bracket[Z, X]
>>>
>>>
>>> next anti-commutativity
>>>
>>> In:=
>>> Bracket[X_, X_] = 0;
>>>
>>> In:=
>>> Bracket[x_, y_] /;
>>> Sort[{x, y}] =!= {x, y} := -Bracket[Apply[Sequence, Sort[{x, y}]]]
>>>
>>> Finally the Jacobi identity:
>>>
>>>
>>> In:=
>>> Bracket /:
>>> Bracket[Bracket[x_, y_], z_] + Bracket[Bracket[y_, z_], x_] +
>>> Bracket[Bracket[z_, x_], y_] = 0;
>>>
>>> (This is not a minimal system of axioms but seems convenient in this case)
>>>
>>> Now we only need to define the Bracket on generators, e.g.
>>>
>>> In:=
>>> Bracket[e, h] = 2e; Bracket[f, h] = -2f; Bracket[e, f] = h;
>>>
>>> And we can now do Lie algebra computations like:
>>>
>>> In:=
>>> Bracket[3f + 2h, 5e - f + 11h]
>>> Out=
>>> -20 e - 70 f - 15 h
>>>
>>>
>>> --
>>> Andrzej Kozlowski
>>> Toyama International University
>>> JAPAN
>>> http://sigma.tuins.ac.jp
>>>
>>>
>>>
>>>
>>>
>>>> From: Melih Sener <melih at ks.uiuc.edu>
To: mathgroup at smc.vnet.net
>>>> Organization: TBG/Beckman Institute
>>>> Date: Wed, 10 Nov 1999 00:17:57 -0500
>>>> To: mathgroup at smc.vnet.net
>>>> Subject: [mg20812] [mg20751] How to do Lie Algebras in Mathematica...
>>>>
>>>>
>>>> Hi...
>>>>
>>>> Lets say I want to generate the Lie Algebra [of say su(3)]
>>>> on Mathematica without going to explicitly
>>>> constucting matrices for the generators...
>>>>
>>>> So I want Mathematica to "learn" relations like:
>>>>
>>>> [G_ij , G_kl] = (something)*G_mn
>>>>
>>>> and I want to define a "commutator product" [A , B]
>>>> which is distributive, linear etc.
>>>>
>>>> So that I can produce expressions for things like
>>>> [a*G_12+b*G_23, c*G_33+d*G_13] in an easy way...
>>>> [ "Distribute" is useful... but I don't know how to
>>>> make mathematica learn to factor coefficents of generators
>>>> outside the commutator...]
>>>>
>>>> What is the best way to do this?
>>>>
>>>> Thanks,
>>>>
>>>> Melih
>>>>
>>>
>>>

```

• Prev by Date: summary of intersection and element counts
• Next by Date: Math->LaTeX2e in v.4
• Previous by thread: summary of intersection and element counts
• Next by thread: Math->LaTeX2e in v.4