Basic Lie algebra calculations with MAPLE
This worksheet assumes you have MAPLE V5, with
its share library. If not, you will need to read in the files coxeter.mpl
from
John Stembridge's site and dynkin.mpl.
The share package dynkin contains routines to do
The MAPLE V5 share package crystal may have trouble loading correctly on some machines. If so, you can download the crystal25.mpl file from the crystal page and load it using the read command.
> read(`d:/maplestuff/crystal/crystal25.mpl`);
init_crystal();
![]()
The Dynkin diagram and extended Dynkin diagrams of any simple Lie algebra are obtained by using the commands dynkin[dynkin_diagram] and dynkin[ex_dynkin_diagram].
> dynkin_diagram(C3);
ex_dynkin_diagram(C3);
![[Maple Plot]](images_dynkin/dynkin011.gif)
The package weyl tells us a basis for the weights of C3 using the weights command. The package crystal (which uses the negative of the weights from the weyl package) tells us the weights occuring in the representation R of C3 with highest weight e3 using the command crystal[weight_system]. The weights occurring in the output of this are expresses as vectors in the vector space spanned by the weight space. The "crystal graph" of this representation is the labeled graph whose vertices are the weights occuring in R and two vertices are connected by an edge if a root vector sends the one weight space to the other (the edge will then be labeled by the corresponding root). To obtain this graph, you must create the graph using the crystal[graphrep] command then display it using the crystal[showgraph] command.
> weights(C3);
weyl_dim(e3,C3);
w:=crystal[weight_system](-e3,C3);
crystal[graphrep](L1,C3,G);
crystal[showgraph](G,1,6);
![[Maple Plot]](images_dynkin/dynkin016.gif)
>
Another way to plot all the weights in the 6 dimensional representation e3 of C3=Sp(6), is to use the command dynkin[plot3d_wts]. The vertices will be connected by an edge provided a root vector sends the one weight space to the other and the edge will then be labeled by the corresponding root. This is The command dynkin[plot3d_weights] simply plots the vectors, with no labeling. In each case, the weight vectors themselves will form the basis with respect to which the axes are plotted. These commands only work with rank 3 Lie algebras.
> rootsC3:=base(C3);
w:=weights(C3);
plot3d_wts(w[3],C3);
plot3d_weights(w[3],C3);
![[Maple Plot]](images_dynkin/dynkin020.gif)
To plot all the highest weights of a rank 3 group, use the command dynkin[plot3d_highest_weights]. This command only works with rank 3 Lie algebras.
> plot3d_highest_weights(C3);
![[Maple Plot]](images_dynkin/dynkin021.gif)
To plot all the weights in the 7 dimensional representation e3-e1 of G2, use the command dynkin[plot2d_wts]. The vertices will be connected by an edge provided a root vector sends the one weight space to the other and the edge will then be labeled by the corresponding root. The command dynkin[plot2d_weights] simply plots the vectors, with no labeling. In each case, the weight vectors themselves will form the basis with respect to which the axes are plotted. These commands only work with rank 2 Lie algebras.
> w:=weights(G2);
plot2d_wts(w[1],G2);
plot2d_weights(w[1],G2);#use the mouse to
select no axes
![[Maple Plot]](images_dynkin/dynkin024.gif)
To plot all the highest weights of a rank 2 group, use the command dynkin[plot2d_highest_weights]. This command only works with rank 2 Lie algebras.
> plot2d_highest_weights(G2);
![[Maple Plot]](images_dynkin/dynkin025.gif)
>
There are basic matrix commands in the dynkin package, such as listofentries and, for the elementary matrices, mate.
> A:=array(sparse,1..2,1..2,[(1,2)=1999]);
listofentries(A);
![]()
> A:=mate(1,2,3);
evalm(A);
listofentries(A);
![]()
To find the ith basis element of the Lie algebra of type A_n, use the Liebasiselement_A(n,i) command. If the index i is too large then Liebasiselement_A(n,i) will not return an error message.
> A1:=Liebasiselement_A(3,1);
evalm(A1);
A4:=Liebasiselement_A(3,4);
evalm(A4);
Liebasiselement_A(3,17);
![[Maple Math]](images_dynkin/dynkin034.gif)
To compute the bracket of two Lie algebra elements X,Y, use the command cc(X,Y).
> cc(A1,A4);
![[Maple Math]](images_dynkin/dynkin035.gif)
To find the coefficient of Liebasiselement_A(n,k)
in the expansion of the bracket [Liebasiselement_A(n,i),Liebasiselement_A(n,j)],
use the structure_A(i,j,k,n)
command.
> seq(structure_A(1,4,i,3),i=1..15);#(note A3 is 15 dimensional)
![]()
Similar commands hold for Lie algebras of the other classical types, B, C, and D. (The matrices for G_2 are also available in the most recent version.) For example, we can compute a typical element in the maximal split torus of (the split form of) SO(6) and see how it acts on basis elements of so(6).
> for i from 1 to 3 do
H[i]:=evalm(Liebasiselement_B(3,i)):
t[i]:=linalg[exponential](log(a[i])*H[i]);
od:
A typical element of the maximal split torus A of SO(6) consists of all diagonal matrices a= diag(1,a1,a2,a3,1/a1,1/a2,1/a3), as the following calculation shows.
> t0:=evalm(t[1]&*t[2]&*t[3]);
![[Maple Math]](images_dynkin/dynkin037.gif)
Let A act on the Lie algebra so(6) by conjugation. This is a linear transformation. The computation below shows that the 4th basis element is an eigenvector of this linear transformation with eigenvalue lambda(a)=a2/a1.
> evalm(Liebasiselement_B(3,4));
evalm(t0^(-1)&*Liebasiselement_B(3,4)&*t0);
![[Maple Math]](images_dynkin/dynkin039.gif)
The computation below shows that the 5th basis element is an eigenvector of this linear transformation with eigenvalue lambda(a)=a3/a2.
> evalm(Liebasiselement_B(3,5));
evalm(t0^(-1)&*Liebasiselement_B(3,5)&*t0);