  
  [1X2 [33X[0;0YAuxiliary Functions[133X[101X
  
  [33X[0;0YThis  chapter  contains the description of some functions that do not fit in
  any other chapter.[133X
  
  
  [1X2.1 [33X[0;0YRoot Systems[133X[101X
  
  [1X2.1-1 ExtendedCartanMatrix[101X
  
  [29X[2XExtendedCartanMatrix[102X( [3XR[103X ) [32X operation
  
  [33X[0;0YHere [3XR[103X is a root system. This function returns the extended Cartan matrix of
  [3XR[103X. That is the Cartan matrix correponding to the lowest root (coming first),
  and the simple roots of [3XR[103X.[133X
  
  [33X[0;0YThe  output is a record with components [3XECM[103X (the extended Cartan matrix) and
  [3Xlabels[103X (the labels of the corresponding Dynkin diagram; they are the integer
  coefficients  of  a  linear  dependency  of  the  roots corresponding to the
  nodes).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("F",4);;[127X[104X
    [4X[25Xgap>[125X [27XExtendedCartanMatrix(R);[127X[104X
    [4X[28Xrec( ECM := [ [ 2, -1, 0, 0, 0 ], [ -1, 2, -1, 0, 0 ], [ 0, -1, 2, -2, 0 ], [128X[104X
    [4X[28X      [ 0, 0, -1, 2, -1 ], [ 0, 0, 0, -1, 2 ] ], labels := [ 1, 2, 3, 4, 2 ] )[128X[104X
  [4X[32X[104X
  
  [1X2.1-2 CartanType[101X
  
  [29X[2XCartanType[102X( [3XC[103X ) [32X operation
  
  [33X[0;0YHere [3XC[103X is a Cartan matrix (i.e., an integer matrix with 2-s on the diagonal,
  non-positive entries otherwise, and there exists a diagonal integer matrix [3XD[103X
  such that [3XCD[103X is a positive definite symmetric matrix). This function returns
  a  record  with  two  components:  [3Xtypes[103X, a list containing the types of the
  simple  components  of  the  corresponding  root  system, and [3Xenumeration[103X, a
  standard enumeration of the vertices of the Dynkin diagram of [3XC[103X. So this can
  be used to construct isomorphisms of root systems.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XC:= [[2,0,-3,0],[0,2,0,-1],[-1,0,2,0],[0,-1,0,2]];[127X[104X
    [4X[28X[ [ 2, 0, -3, 0 ], [ 0, 2, 0, -1 ], [ -1, 0, 2, 0 ], [ 0, -1, 0, 2 ] ][128X[104X
    [4X[25Xgap>[125X [27XCartanType(C);[127X[104X
    [4X[28Xrec( types := [ [ "G", 2 ], [ "A", 2 ] ], [128X[104X
    [4X[28X  enumeration := [ [ 3, 1 ], [ 2, 4 ] ] )[128X[104X
  [4X[32X[104X
  
  [1X2.1-3 WeylTransversal[101X
  
  [29X[2XWeylTransversal[102X( [3XR[103X, [3Xinds[103X ) [32X operation
  [29X[2XWeylTransversal[102X( [3XR[103X, [3Xroots[103X ) [32X operation
  
  [33X[0;0YHere  [3XR[103X  is a root system, and [3Xinds[103X a list of indices of [13Xpositive[113X roots of [3XR[103X
  that  form  a  set of simple roots of a root subsystem of [3XR[103X (the system does
  not  check  this).  Here  an index of a positive root is its position in the
  list [3XPositiveRootsNF( R )[103X.[133X
  
  [33X[0;0YThis function returns a list of shortest representatives of the right cosets
  of  the  corresponding Weyl subgroup of the Weyl group of [3XR[103X. The elements of
  the Weyl group are given as reduced expressions.[133X
  
  [33X[0;0YIn  the  second  form [3Xrts[103X is a list of roots of [3XR[103X, that form a set of simple
  roots  of  a  root subsystem of [3XR[103X (again, this is not checked). In this form
  the  roots  so  not  have  to  be positive. They have to be represented with
  respect   to  the  basis  of  simple  roots,  i.e.,  they  are  elements  of
  [3XPositiveRootsNF(R)[103X or of [3XNegativeRootsNF(R)[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("A",3);;[127X[104X
    [4X[25Xgap>[125X [27XWeylTransversal( R, [2,6] );[127X[104X
    [4X[28X[ [  ], [ 1 ], [ 3 ], [ 1, 2 ], [ 1, 3 ], [ 3, 2 ] ][128X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("E",8);;[127X[104X
    [4X[25Xgap>[125X [27Xp:= PositiveRootsNF(R);;[127X[104X
    [4X[25Xgap>[125X [27Xa:= WeylTransversal( R, [p[1],p[3],p[4],p[5],p[6],p[7],p[8],-p[120]] );;[127X[104X
    [4X[25Xgap>[125X [27XLength(a);[127X[104X
    [4X[28X1920[128X[104X
  [4X[32X[104X
  
  [1X2.1-4 SizeOfWeylGroup[101X
  
  [29X[2XSizeOfWeylGroup[102X( [3XR[103X ) [32X operation
  [29X[2XSizeOfWeylGroup[102X( [3Xtype[103X ) [32X operation
  [29X[2XSizeOfWeylGroup[102X( [3XX[103X, [3Xn[103X ) [32X operation
  
  [33X[0;0YIn  the  first from [3XR[103X is a root system. In the second form [3Xtype[103X is a list of
  lists    describing    the   type   of   a   root   system.   For   example:
  [3X[["A",3],["B",5],["G",2]][103X.  In the third form [3XX[103X is a letter (i.e., a string)
  and  [3Xn[103X  a positive integer, so that [3X Xn[103X is the type of a root system. In all
  cases the number of elements of the Weyl group is returned.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem( SimpleLieAlgebra("E",6,Rationals) );;[127X[104X
    [4X[25Xgap>[125X [27XSizeOfWeylGroup(R);                [127X[104X
    [4X[28X51840[128X[104X
    [4X[25Xgap>[125X [27XSizeOfWeylGroup( [["E",6]] );[127X[104X
    [4X[28X51840[128X[104X
    [4X[25Xgap>[125X [27XSizeOfWeylGroup( "E", 6 );   [127X[104X
    [4X[28X51840[128X[104X
  [4X[32X[104X
  
  
  [1X2.2 [33X[0;0YLie Algebras and Their Modules[133X[101X
  
  [1X2.2-1 IsomorphismOfSemisimpleLieAlgebras[101X
  
  [29X[2XIsomorphismOfSemisimpleLieAlgebras[102X( [3XL1[103X, [3XL2[103X ) [32X operation
  
  [33X[0;0YHere  [3XL1[103X  and  [3XL2[103X  are  two  semisimple  Lie  algebras  that are known to be
  isomorphic  (i.e.,  they  have  the  same  type).  This  function returns an
  isomorphism.[133X
  
  [1X2.2-2 AdmissibleLattice[101X
  
  [29X[2XAdmissibleLattice[102X( [3XV[103X ) [32X operation
  
  [33X[0;0YHere  [3XV[103X  is  a  [13Xsimple[113X  module  over a semisimple Lie algebra. This function
  returns  a basis of [3XV[103X that spans an admissible lattice in [3XV[103X. This means that
  for  a  root  vector  [22Xx[122X  of  the  acting Lie algebra the matrix [22Xexp( mx )[122X is
  integral,  where  [22Xmx[122X  denotes  the  matrix  of  [22Xx[122X relative to the admissible
  lattice.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XL:= SimpleLieAlgebra("G",2,Rationals);;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( L, [2,0] );[127X[104X
    [4X[28X<27-dimensional left-module over <Lie algebra of dimension 14 over Rationals>>[128X[104X
    [4X[25Xgap>[125X [27XB:=AdmissibleLattice(V);;[127X[104X
    [4X[25Xgap>[125X [27Xx:= L.1;[127X[104X
    [4X[28Xv.1[128X[104X
    [4X[25Xgap>[125X [27Xmx:= MatrixOfAction( B, x );;[127X[104X
    [4X[25Xgap>[125X [27XIsZero(mx^4); IsZero(mx^5);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xexp:=Sum( List( [0..4], i -> mx^i/Factorial(i) ) );;[127X[104X
    [4X[25Xgap>[125X [27XForAll( Flat(exp), IsInt );[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X2.2-3 DirectSumDecomposition[101X
  
  [29X[2XDirectSumDecomposition[102X( [3XV[103X ) [32X operation
  
  [33X[0;0YHere  [3XV[103X  is a module over a semisimple Lie algebra; this function computes a
  list of sub-modules such that [3XV[103X is their direct sum.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XL:= SimpleLieAlgebra("G",2,Rationals);;[127X[104X
    [4X[25Xgap>[125X [27XV:= HighestWeightModule( L, [1,0] );;[127X[104X
    [4X[25Xgap>[125X [27XW:= TensorProductOfAlgebraModules( V, V );[127X[104X
    [4X[28X<49-dimensional left-module over <Lie algebra of dimension 14 over Rationals>>[128X[104X
    [4X[25Xgap>[125X [27XDirectSumDecomposition( W );[127X[104X
    [4X[28X[ <left-module over <Lie algebra of dimension 14 over Rationals>>, [128X[104X
    [4X[28X  <left-module over <Lie algebra of dimension 14 over Rationals>>, [128X[104X
    [4X[28X  <left-module over <Lie algebra of dimension 14 over Rationals>>, [128X[104X
    [4X[28X  <left-module over <Lie algebra of dimension 14 over Rationals>> ][128X[104X
    [4X[25Xgap>[125X [27XList( last, Dimension );[127X[104X
    [4X[28X[ 14, 7, 1, 27 ][128X[104X
  [4X[32X[104X
  
