###################################################################### ##affine-lie-algebras: Save this file as affine-lie-algebras. To use # ##it, stay in the same directory, get into Maple (by typing: maple # ## ) # ##and then type: read affine-lie-algebras : # ##Then follow the instructions given there # ## # ##Written by Alejandro Ginory, Rutgers University , # #aginory@math.rutgers.edu. # ###################################################################### #This is a package for computing objects related to simple and affine Kac-Moody Lie algebras. with(linalg): with(ArrayTools): with(LinearAlgebra): with(ArrayTools): with(ListTools): with(combinat): interface(rtablesize=50): Help:=proc(): if args=NULL then print( SCM(X,r), ACM(X,r,k), AffLab(X,r,k), AffDuaLab(X,r,k), AffDiagMat(X,r,k),): print( AffBilForCoRoo(X,r,k), AffBilForRoo(X,r,k), FinAffBilForRoo(X,r,k), FinAffCart(X,r,k), ): print( Mbasis(X,l,r), Aff2Fin(X,r,k), Aff2Fin2(X,r,k), HighestLongRoot(X,r), HighestShortRoot(X,r), ): print( DualCoxeterNumber(X,r), CoxeterNumber(X,r) ): fi: if nops([args])=1 and op(1,[args])=tolist then print(tolist(M): converts matrix to list form): fi: if nops([args])=1 and op(1,[args])=SCM then print(SCM(X,r): "Simple Cartan Matrices" gives the Cartan matrix (in list form) of rank r): print( for the simple finite dim Lie algebra of type X. ): fi: if nops([args])=1 and op(1,[args])=ACM then print(ACM(X,r,k): "Affine Cartan Matrices" gives the Cartan matrix (in list form) of rank r): print( for the affine Lie algebra of type X^{(k)}_r. ): fi: if nops([args])=1 and op(1,[args])=AffLab then print(AffLab(X,r,k): "affine Dynkin diagram labels" gives the ordered labels of the ): print( Dynkin diagrams of the affine Lie algebra of type X^{(k)}_r. ): fi: if nops([args])=1 and op(1,[args])=AffDuaLab then print(AffDuaLab(X,r,k): "affine Dynkin diagram dual labels" gives the ordered dual labels ): print( of the Dykin diagram of the affine Lie algebra of type X^{(k)}_r.): fi: if nops([args])=1 and op(1,[args])=AffDiagMat then print(AffDiagMat(X,r,k): "affine diagonal matrix" produces the diagonal matrix D that ): print( so that A=DB where B is symmetric and A is the affine Cartan matrix associated ): print( to X^{(k)}_r. ): fi: if nops([args])=1 and op(1,[args])=AffBilForCoRoo then print(AffBilForCoRoo(X,r,k): "bilinear form of the affine Lie algebra Cartan subalgebra" gives ): print( the matrix of the bilinear form w.r.t. the basis alpha_0^v,alpha_1^v,...,alpha_r^v ): print( in the Cartan subalgebra of the affine KM algebra of type X^{(k)}_r. ): fi: if nops([args])=1 and op(1,[args])=AffBilForRoo then print(AffBilForRoo(X,r,k): "bilinear form of the dual of the affine Lie algebra Cartan ): print( subalgebra" gives the matrix of the bilinear form w.r.t. the basis alpha_0,alpha_1, ): print( ...,alpha_r in the dual of the Cartan subalgebra of the affine KM algebra of type ): print( X^{(k)}_r. ): fi: if nops([args])=1 and op(1,[args])=FinAffBilForRoo then print(FinAffBilForRoo(X,r,k): "bilinear form w.r.t. finite roots" gives the matrix of the ): print(bilinear form on the span of alpha_1,alpha_2,...,alpha_r in the dual of the Cartan ): print(subalgebra of the affine KM algebra of type X^{(k)}_r.): fi: if nops([args])=1 and op(1,[args])=FinAffCart then print(FinAffCart(X,r,k): "Cartan matrix of simple Lie algebra associated to affine Lie algebra" ): print(gives the matrix of finite Cartan matrix corresponding to an affine Lie algebra of type): print(X^{(k)}_r.): fi: if nops([args])=1 and op(1,[args])=Mbasis then print(Mbasis(X,l,r): outputs the basis of M, which is the \mathbb{Z}-span of the finite Weyl group ): print(conugates of theta^v, w.r.t. basis of root lattice alpha_1,alpha_2,...,alpha_r.): fi: if nops([args])=1 and op(1,[args])=Aff2Fin then print(Aff2Fin(X,r,k): input X^(k)_r and outputs the associated finite root system): print(the output is of the form A1, A2,...,B2,B3,...,G2.): fi: if nops([args])=1 and op(1,[args])=Aff2Fin2 then print(Aff2Fin2(X,r,k): input X^(k)_r and outputs the associated finite root system): print(the output is of the form A,1, A,2,...,B,2,B,3,...,G,2.): fi: if nops([args])=1 and op(1,[args])=HighestLongRoot then print(HighestLongRoot(X,r): input a simple Lie algebra of type X and rank r): print(Outputs the highest root in terms of the basis of simple roots.): fi: if nops([args])=1 and op(1,[args])=HighestShortRoot then print(HighestShortRoot(X,r): input a simple Lie algebra of type X and rank r): print(Outputs the highest short root in terms of the basis of simple roots.): fi: if nops([args])=1 and op(1,[args])=CoxeterNumber then print(CoxeterNumber(X,r): input a simple Lie algebra of type X and rank r): print(Outputs its Coxeter number.): fi: if nops([args])=1 and op(1,[args])=DualCoxeterNumber then print(DualCoxeterNumber(X,r): input a simple Lie algebra of type X and rank r): print(Outputs its dual Coxeter number.): fi: end: #Helper programs: ############################################ ############################################ ############################################ #tolist(M): converts matrix to list form tolist:=(M)->[seq([seq(M[ii,jj],jj=1..Size(M)[2])],ii=1..Size(M)[1])]: ############################################ ############################################ ############################################ #Lie ALgebra Programs ################################################################################ #SCM(X,r): "Simple Cartan Matrices" gives the Cartan matrix (in list form) of rank r #for the simple finite dim Lie algebra of type X. SCM:=proc(X,r): if not(type(r,integer)) or r<1 then RETURN(Rank must be a positive integer, buddy boy.): fi: if X=A and r<1 then RETURN(Rank is too low, buddy.): fi: if X=B and r<2 then RETURN(Rank is too low, buddy.): fi: if X=C and r<3 then RETURN(Rank is too low, buddy.): fi: if X=D and r<4 then RETURN(Rank is too low, buddy.): fi: #if X=E and r<6 then RETURN(Rank is too low, buddy.): elif X=E and r>8 then RETURN(Rank is too high, buddy.): fi: if X=E and r<6 then RETURN(Rank is too low, buddy.): fi: if X=F and r<>4 then RETURN(Rank is must be 4, buddy.): fi: if X=G and r<>2 then RETURN(Rank is must be 2, buddy.): fi: if X=A then if r>1 then RETURN(tolist(BandMatrix( [ seq([0$ii],ii=1..r-2),[-1$(r-1)],[2$r],[-1$(r-1)],seq([0$(r-ii)],ii=2..r-1) ] ) ) ): else RETURN([[2]]): fi: fi: if X=B then RETURN(tolist(BandMatrix( [ seq([0$ii],ii=1..r-2),[-1$(r-1)],[2$r],[-1$(r-2),-2],seq([0$(r-ii)],ii=2..r-1) ] ) ) ): fi: if X=C then RETURN(tolist(BandMatrix( [ seq([0$ii],ii=1..r-2),[-1$(r-2),-2],[2$r],[-1$(r-1)],seq([0$(r-ii)],ii=2..r-1) ] ) ) ): fi: if X=D then RETURN(tolist(BandMatrix( [ seq([0$ii],ii=1..r-3),[0$(r-3),-1],[-1$(r-2),0],[2$r],[-1$(r-2),0],[0$(r-3),-1],seq([0$(r-ii)],ii=3..r-1) ] ) ) ): fi: if X=E and r=6 then RETURN(tolist(BandMatrix([[0],[0,0],[0,0,0], [-1,-1,0,0], [0,0,-1,-1,-1], [2$6], [0,0,-1,-1,-1] , [-1,-1,0,0] ,[0,0,0],[0,0],[0]]) ) ): elif X=E and r>6 then # RETURN(tolist(BandMatrix([[0],[0,0],[0,0,0], [0$4], [-1,-1,0,0,0], [0,0,-1,-1,-1,-1], [2$7], [0,0,-1,-1,-1,-1] , [-1,-1,0,0,0], [0$4] ,[0,0,0],[0,0],[0]]) ) ): RETURN(tolist(BandMatrix([seq([0$ii],ii=1..r-3), [-1,-1,0$(r-4)], [0,0,-1$(r-3)], [2$r], [0,0,-1$(r-3)] , [-1,-1,0$(r-4)], seq([0$(r-2-ii)],ii=1..r-3)]) ) ): #elif X=E and r=8 then # RETURN(tolist(BandMatrix([[0],[0,0],[0,0,0], [0$4], [0$5], [-1,-1,0,0,0,0], [0,0,-1,-1,-1,-1,-1], [2$8], [0,0,-1,-1,-1,-1,-1] , [-1,-1,0,0,0,0], [0$5], [0$4] ,[0,0,0],[0,0],[0]]) ) ): fi: if X=F then RETURN(tolist(BandMatrix([[0],[0,0], [-1,-1,-1], [2$4], [-1,-2,-1] ,[0,0],[0]]) ) ): fi: if X=G then RETURN(tolist(BandMatrix([[-3],[2,2],[-1]]) ) ): fi: end: ################################################################################ #ACM(X,r,k): "Affine Cartan Matrices" gives the Cartan matrix (in list form) of rank r #for the affine Lie algebra of type X^{(k)}_r. ACM:=proc(X,r,k) local BB,rr: if not(type(r,integer)) or r<1 or not(type(k,integer)) then RETURN(Rank and type must be positive integers, buddy boy/girl.): fi: if X=A and r<1 then RETURN(Rank is too low, buddy.): fi: if X=B and r<3 then RETURN(Rank is too low, buddy.): fi: if X=C and r<2 then RETURN(Rank is too low, buddy.): fi: if X=D and r<4 then RETURN(Rank is too low, buddy.): fi: if X=E and r<6 then RETURN(Rank is too low, buddy.): elif X=E and r>8 then RETURN(Rank is too high, buddy.): fi: if X=F and r<>4 then RETURN(Rank is must be 4, buddy.): fi: if X=G and r<>2 then RETURN(Rank is must be 2, buddy.): fi: if k=1 then if X=A and r=1 then RETURN([[2,-2],[-2,2]]): fi: if X=A and r>1 then RETURN(tolist(BandMatrix( [ [-1],seq([0$ii],ii=2..r+1-2),[-1$(r+1-1)],[2$(r+1)],[-1$(r)],seq([0$(r+1-ii)],ii=2..r-1) ,[-1] ] ) ) ): fi: if X=B and r>2 then BB:=tolist(transpose(BandMatrix( [ seq([0$ii],ii=1..r-2),[-1$(r-1)],[2$r],[-1$(r-2),-2],seq([0$(r-ii)],ii=2..r-1) ] ) )): RETURN([[2,0,-1,0$(r-2)],seq([0,op(BB[ii])],ii=1..1),[-1,op(BB[2])],seq([0,op(BB[ii])],ii=3..r)]): fi: if X=C then BB:=tolist(transpose(BandMatrix( [ seq([0$ii],ii=1..r-2),[-1$(r-2),-2],[2$r],[-1$(r-1)],seq([0$(r-ii)],ii=2..r-1) ] ) )): RETURN([[2,-1,0$(r-1)],[-2,op(BB[1])],seq([0,op(BB[ii])],ii=2..nops(BB))]): fi: if X=D then BB:=tolist(transpose(BandMatrix( [ seq([0$ii],ii=1..r-3),[0$(r-3),-1],[-1$(r-2),0],[2$r],[-1$(r-2),0],[0$(r-3),-1],seq([0$(r-ii)],ii=3..r-1) ] ) ) ): RETURN([[2,0,-1,0$(r-2)],seq([0,op(BB[ii])],ii=1..1),[-1,op(BB[2])],seq([0,op(BB[ii])],ii=3..r)]): fi: if X=G then BB:=tolist(BandMatrix([[-3],[2,2],[-1]] ) ): RETURN([[2,-1,0],[-1 , op(BB[1]) ],[0,op(BB[2])] ]): fi: if X=F then BB:=tolist(transpose(BandMatrix([[0],[0,0], [-1,-1,-1], [2$4], [-1,-2,-1] ,[0,0],[0]]) )): RETURN([ [2,-1,0,0,0], [-1,op(BB[1])], [0,op(BB[2])] , [0,op(BB[3])] , [0,op(BB[4])]]): fi: if X=E and r=6 then BB:=tolist(transpose(multiply(multiply(inverse(Matrix([[1,0$5],[0$5,1],[0,1,0$4],[0,0,1,0$3],[0,0,0,1,0$2],[0$4,1,0]])) , BandMatrix([[0],[0,0],[0,0,0], [-1,-1,0,0], [0,0,-1,-1,-1], [2$6], [0,0,-1,-1,-1] , [-1,-1,0,0] ,[0,0,0],[0,0],[0]])), Matrix([[1,0$5],[0$5,1],[0,1,0$4],[0,0,1,0$3],[0,0,0,1,0$2],[0$4,1,0]]) ) )) : RETURN([ [2,0,0,0,0,0,-1], [0,op(BB[1])], [0,op(BB[2])] , [0,op(BB[3])] , [0,op(BB[4])], [0,op(BB[5])], [-1,op(BB[6])]]): elif X=E and r=7 then BB:=tolist(transpose(multiply(multiply(inverse(Matrix([[1,0$6],[0$6,1],[0,1,0$5],[0,0,1,0$4],[0,0,0,1,0$3],[0$4,1,0,0],[0$5,1,0]])) , BandMatrix([[0],[0,0],[0,0,0], [0$4], [-1,-1,0,0,0], [0,0,-1,-1,-1,-1], [2$7], [0,0,-1,-1,-1,-1] , [-1,-1,0,0,0], [0$4] ,[0,0,0],[0,0],[0]]) ), Matrix([[1,0$6],[0$6,1],[0,1,0$5],[0,0,1,0$4],[0,0,0,1,0$3],[0$4,1,0,0],[0$5,1,0]]) ) )) : RETURN([ [2,-1,0,0,0,0,0,0], [-1,op(BB[1])], [0,op(BB[2])] , [0,op(BB[3])] , [0,op(BB[4])], [0,op(BB[5])], [0,op(BB[6])], [0,op(BB[7])]]): elif X=E and r=8 then BB:=tolist(transpose(multiply(multiply(inverse(Matrix([[0$6,1,0],[0$7,1],[0$5,1,0$2],[0$4,1,0$3],[0$3,1,0$4],[0$2,1,0$5],[0$1,1,0$6],[1,0$7]])) , BandMatrix([[0],[0,0],[0,0,0], [0$4], [0$5], [-1,-1,0,0,0,0], [0,0,-1,-1,-1,-1,-1], [2$8], [0,0,-1,-1,-1,-1,-1] , [-1,-1,0,0,0,0], [0$5], [0$4] ,[0,0,0],[0,0],[0]]) ), Matrix([[0$6,1,0],[0$7,1],[0$5,1,0$2],[0$4,1,0$3],[0$3,1,0$4],[0$2,1,0$5],[0$1,1,0$6],[1,0$7]]) ) )) : RETURN([ [2,-1,0,0,0,0,0,0,0], [-1,op(BB[1])], [0,op(BB[2])] , [0,op(BB[3])] , [0,op(BB[4])], [0,op(BB[5])], [0,op(BB[6])], [0,op(BB[7])],[0,op(BB[8])]]): fi: fi: if k=2 then if X=A and r=2 then RETURN([[2,-4],[-1,2]]): fi: if X=A and type(r/2,integer) then rr:=r/2: BB:=tolist(transpose(BandMatrix( [ seq([0$ii],ii=1..rr-2),[-1$(rr-2),-2],[2$rr],[-1$(rr-1)],seq([0$(rr-ii)],ii=2..rr-1) ] ) )): RETURN([[2,-2,0$(rr-1)],[-1,op(BB[1])],seq([0,op(BB[ii])],ii=2..nops(BB))]): fi: if X=A and type((r+1)/2,integer) then rr:=(r+1)/2: if rr<3 then RETURN(Increase rank, homie.): fi: BB:=tolist(transpose(BandMatrix( [ seq([0$ii],ii=1..rr-2),[-1$(rr-2),-2],[2$rr],[-1$(rr-1)],seq([0$(rr-ii)],ii=2..rr-1) ] ) ) ): RETURN([[2,0,-1,0$(rr-2)],[0,op(BB[1])],[-1,op(BB[2])],seq([0,op(BB[ii])],ii=3..nops(BB))]): fi: if X=D then rr:=r-1: BB:=tolist(transpose(BandMatrix( [ seq([0$ii],ii=1..rr-2),[-1$(rr-1)],[2$rr],[-1$(rr-2),-2],seq([0$(rr-ii)],ii=2..rr-1) ] ) ) ): RETURN([[2,-2,0$(rr-1)],seq([-1,op(BB[ii])],ii=1..1),[0,op(BB[2])],seq([0,op(BB[ii])],ii=3..rr)]): fi: if X=E then if r<>6 then RETURN(You know that rank has to be exactly 6, homeslice.): fi: BB:=tolist(transpose(BandMatrix([[0],[0,0], [-1,-1,-1], [2$4], [-1,-2,-1] ,[0,0],[0]]) )): RETURN(tolist(transpose([ [2,-1,0,0,0], [-1,op(BB[1])], [0,op(BB[2])] , [0,op(BB[3])] , [0,op(BB[4])]])) ): fi: fi: if k=3 then if X<>D then RETURN(Oh, come on! Only D has an order 3 graph automorphism, gangsta!): fi: if r<>4 then RETURN(Playa, you know that a Y has 4 vertices!): fi: BB:=tolist(BandMatrix([[-3],[2,2],[-1]]) ): RETURN(tolist(transpose([[2,-1,0],[-1 , op(BB[1]) ],[0,op(BB[2])] ]))): fi: if k>3 then RETURN(Listen here, killa, they are no Aff 4, 5,6, etc. affine Dynkin diagrams!): fi: end: ################################################################################ #AffLab(X,r,k): "affine Dynkin diagram labels" gives the ordered labels of the #Dynkin diagrams of the affine Lie algebra of type X^{(k)}_r. AffLab:=proc(X,r,k) local BB: if not(type(r,integer)) or r<1 or not(type(k,integer)) then RETURN(Rank and type must be positive integers, buddy boy/girl.): fi: if X=A and r<1 then RETURN(Rank is too low, buddy.): fi: if X=B and r<3 then RETURN(Rank is too low, buddy.): fi: if X=C and r<2 then RETURN(Rank is too low, buddy.): fi: if X=D and r<4 then RETURN(Rank is too low, buddy.): fi: if X=E and r<6 then RETURN(Rank is too low, buddy.): elif X=E and r>8 then RETURN(Rank is too high, buddy.): fi: if X=F and r<>4 then RETURN(Rank must be 4, buddy.): fi: if X=G and r<>2 then RETURN(Rank must be 2, buddy.): fi: if k=1 then if X=A then RETURN([1$(r+1)]): fi: if X=B and r>2 then RETURN([1,1,2$(r-1)]): fi: if X=C then RETURN([1,2$(r-1),1]): fi: if X=D then RETURN([1,1,2$(r-3),1,1]): fi: if X=G then RETURN([1,2,3]): fi: if X=F then RETURN([1,2,3,4,2]): fi: if X=E and r=6 then RETURN([1,1,2,3,2,1,2]): elif X=E and r=7 then RETURN([1,2,3,4,3,2,1,2]): elif X=E and r=8 then RETURN([1,2,3,4,5,6,4,2,3]): fi: fi: if k=2 then if X=A and r=2 then RETURN([2,1]): fi: if X=A and type(r/2,integer) then RETURN([2$(r/2),1]): fi: if X=A and type((r+1)/2,integer) then if r<3 then RETURN(Increase rank, homie.): fi: RETURN([1,1,2$((r-3)/2),1]): fi: if X=D then RETURN([1$(r-1)]): fi: if X=E then if r<>6 then RETURN(You know that the subscript has to be exactly 6, homeslice.): fi: RETURN([1,2,3,2,1]): fi: fi: if k=3 then if X<>D then RETURN(Oh, come on! Only D has an order 3 graph automorphism, gangsta!): fi: if r<>4 then RETURN(Playa, you know that a Y has 4 vertices!): fi: RETURN([1,2,1]): fi: if k>3 then RETURN(Listen here, bro, they are no Aff 4, 5,6, etc. affine Dynkin diagrams!): fi: end: ################################################################################ #AffDuaLab(X,r,k): "affine Dynkin diagram dual labels" gives the ordered dual labels #of the Dykin diagram of the affine Lie algebra of type X^{(k)}_r. AffDuaLab:=proc(X,r,k) local M,sol,duacox,ll,i: M:=transpose(ACM(X,r,k)); #Matrix(M); #Matrix([seq([0],ii=1..nops(tolist(M)))]); sol:=tolist(LinearSolve(Matrix(M),Matrix([seq([0],ii=1..nops(tolist(M)))]),free=x)); duacox:=[seq(coeff(op(sol[ii]),x[1,1]),ii=1..nops(sol))]; ll:=lcm(denom(duacox[1]),denom(duacox[2])): for i from 2 to nops(duacox) do ll:=lcm(ll,denom(duacox[i])): od: duacox:=ll*duacox; end: ################################################################################ #AffDiagMat(X,r,k): "affine diagonal matrix" produces the diagonal matrix D that #so that A=DB where B is symmetric and A is the affine Cartan matrix associated #to X^{(k)}_r. AffDiagMat:=proc(X,r,k) local cc,dc: cc:=AffLab(X,r,k): #print(cc): dc:=AffDuaLab(X,r,k): #print(dc): diag(seq(cc[ii]/dc[ii],ii=1..nops(cc))): end: ################################################################################ #AffBilForCoRoo(X,r,k): "bilinear form of the affine Lie algebra Cartan subalgebra" gives #the matrix of the bilinear form w.r.t. the basis alpha_0^v,alpha_1^v,...,alpha_r^v #in the Cartan subalgebra of the affine KM algebra of type X^{(k)}_r. AffBilForCoRoo:=proc(X,r,k): multiply(ACM(X,r,k),AffDiagMat(X,r,k)): end: ################################################################################ #AffBilForRoo(X,r,k): "bilinear form of the dual of the affine Lie algebra Cartan #subalgebra" gives the matrix of the bilinear form w.r.t. the basis alpha_0,alpha_1, #...,alpha_r in the dual of the Cartan subalgebra of the affine KM algebra of type #X^{(k)}_r. AffBilForRoo:=proc(X,r,k): multiply(inverse(AffDiagMat(X,r,k)),ACM(X,r,k)): end: ################################################################################ #FinAffBilForRoo(X,r,k): "bilinear form w.r.t. finite roots" gives the matrix of the #bilinear form on the span of alpha_1,alpha_2,...,alpha_r in the dual of the Cartan #subalgebra of the affine KM algebra of type X^{(k)}_r. FinAffBilForRoo:=proc(X,r,k) local AA,n: AA:=tolist(AffBilForRoo(X,r,k)): n:=nops(AA): [seq(AA[ii][2..n],ii=2..n)]: end: ################################################################################ #FinAffCart(X,r,k): "Cartan matrix of simple Lie algebra associated to affine Lie algebra" #gives the matrix of finite Cartan matrix corresponding to an affine Lie algebra of type #X^{(k)}_r. FinAffCart:=proc(X,r,k) local AA,n: AA:=ACM(X,r,k): n:=nops(AA): [seq(AA[ii][2..n],ii=2..n)]: end: ################################################################################ #Mbasis(X,l,r): outputs the basis of M, which is the \mathbb{Z}-span of the finite Weyl group #conugates of \theta^\vee, w.r.t. basis of root lattice alpha_1,alpha_2,...,alpha_r. Mbasis:=proc(X,l,r) local AL, AM, labs,dlabs: AL:=ACM(X,l,r): AM:=Matrix(AL): labs:=AffLab(X,l,r): dlabs:=AffDuaLab(X,l,r): if AM=transpose(AM) or r>labs[1] then RETURN([seq([0$(ii-1),1,0$(l-ii)],ii=1..l)]): else RETURN([seq([0$(ii-1),labs[ii+1]/dlabs[ii+1],0$(l-ii)],ii=1..l)]): fi: end: ################################################################################ #Aff2Fin(X,r,k): input X^(k)_r and outputs the associated finite root system #the output is of the form A1, A2,...,B2,B3,...,G2 Aff2Fin:=proc(X,r,k): if k=1 then RETURN(cat(X,r)): fi: if k=2 then if X=A and r=2 then RETURN(cat(A,1)): fi: if X=A and type(r/2,integer) then RETURN(cat(C,r/2)): fi: if X=A and type((r+1)/2,integer) then RETURN(cat(C,(r+1)/2)): fi: if X=D then RETURN(cat(B,r)): fi: if X=E and r=6 then RETURN(cat(F,4)): fi: fi: if k=3 then RETURN(cat(G,2)): fi: end: ################################################################################ #Aff2Fin2(X,r,k): input X^(k)_r and outputs the associated finite root system #the output is of the form A,1, A,2,...,B,2,B,3,...,G,2 Aff2Fin2:=proc(X,r,k): if k=1 then RETURN(X,r): fi: if k=2 then if X=A and r=2 then RETURN(A,1): fi: if X=A and type(r/2,integer) then RETURN(C,r/2): fi: if X=A and type((r+1)/2,integer) then RETURN(C,(r+1)/2): fi: if X=D then RETURN(B,r): fi: if X=E and r=6 then RETURN(F,4): fi: fi: if k=3 then RETURN(G,2): fi: end: ################################################################################ #HighestLongRoot(X,r): input a simple Lie algebra of type X and rank r #Outputs the highest root in terms of the basis of simple roots. HighestLongRoot:=proc(X,r): if X=A then RETURN([1$r]): fi: if X=B then RETURN([1,2$(r-1)]): fi: if X=C then RETURN([2$(r-1),1]): fi: if X=D then RETURN([1,2$(r-3),1,1]): fi: if X=E and r=6 then RETURN([1,2,2,3,2,1]): fi: if X=E and r=7 then RETURN([2,2,3,4,3,2,1]): fi: if X=E and r=8 then RETURN([2,3,4,6,5,4,3,2]): fi: if X=F and r=4 then RETURN([2,3,4,2]): fi: if X=G and r=2 then RETURN([3,2]): fi: end: ################################################################################ #HighestShortRoot(X,r): input a simple Lie algebra of type X and rank r #Outputs the highest short root in terms of the basis of simple roots. HighestShortRoot:=proc(X,r): if X=A then RETURN([1$r]): fi: if X=B then RETURN([1$(r)]): fi: if X=C then RETURN([1,2$(r-2),1]): fi: if X=D then RETURN([1,2$(r-3),1,1]): fi: if X=E and r=6 then RETURN([1,2,2,3,2,1]): fi: if X=E and r=7 then RETURN([2,2,3,4,3,2,1]): fi: if X=E and r=8 then RETURN([2,3,4,6,5,4,3,2]): fi: if X=F and r=4 then RETURN([1,2,3,2]): fi: if X=G and r=2 then RETURN([2,1]): fi: end: ################################################################################ #CoxeterNumber(X,r): input a simple Lie algebra of type X and rank r #Outputs its Coxeter number. CoxeterNumber:=proc(X,r): if X=A then RETURN(r+1): fi: if X=B then RETURN(2*r): fi: if X=C then RETURN(2*r): fi: if X=D then RETURN(2*r-2): fi: if X=E and r=6 then RETURN(12): fi: if X=E and r=7 then RETURN(18): fi: if X=E and r=8 then RETURN(30): fi: if X=F and r=4 then RETURN(12): fi: if X=G and r=2 then RETURN(6): fi: end: ################################################################################ #DualCoxeterNumber(X,r): input a simple Lie algebra of type X and rank r #Outputs its dual Coxeter number. DualCoxeterNumber:=proc(X,r): if X=A then RETURN(r+1): fi: if X=B then RETURN(2*r-1): fi: if X=C then RETURN(r+1): fi: if X=D then RETURN(2*r-2): fi: if X=E and r=6 then RETURN(12): fi: if X=E and r=7 then RETURN(18): fi: if X=E and r=8 then RETURN(30): fi: if X=F and r=4 then RETURN(9): fi: if X=G and r=2 then RETURN(4): fi: end: ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################ ################################################################################