  
  [1X2 [33X[0;0YRoot Systems and Weyl Groups[133X[101X
  
  [33X[0;0YThis  chapter  contains the description of some functions for the objects in
  the title of the chapter.[133X
  
  
  [1X2.1 [33X[0;0YRoot Systems[133X[101X
  
  [1X2.1-1 ExtendedCartanMatrix[101X
  
  [33X[1;0Y[29X[2XExtendedCartanMatrix[102X( [3XR[103X ) [32X operation[133X
  
  [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
  
  [33X[1;0Y[29X[2XCartanType[102X( [3XC[103X ) [32X operation[133X
  
  [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( enumeration := [ [ 3, 1 ], [ 2, 4 ] ], [128X[104X
    [4X[28X  types := [ [ "G", 2 ], [ "A", 2 ] ] )[128X[104X
  [4X[32X[104X
  
  [1X2.1-3 DisplayDynkinDiagram[101X
  
  [33X[1;0Y[29X[2XDisplayDynkinDiagram[102X( [3XC[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XDisplayDynkinDiagram[102X( [3XR[103X ) [32X operation[133X
  
  [33X[0;0YHere  [3XC[103X is a Cartan matrix. This function displays the Dynkin diagram of the
  Cartan matrix. (Remark: this just works for Cartan matrices of root systems,
  not for extended Cartan matrices.)[133X
  
  [33X[0;0YIn the second form [3XR[103X is a root system. We display its Dynkin diagram.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XC:=[[2,0,-1,0,0,0],[0,2,0,0,-3,0],[-1,0,2,0,0,-1],[0,0,0,2,0,-1],[127X[104X
    [4X[25X>[125X [27X[0,-1,0,0,2,0],[0,0,-2,-1,0,2]];;[127X[104X
    [4X[25Xgap>[125X [27XDisplayDynkinDiagram(C); [127X[104X
    [4X[28XF4:  4---6=>=3---1[128X[104X
    [4X[28XG2:  5#<#2[128X[104X
  [4X[32X[104X
  
  
  [1X2.2 [33X[0;0YWeyl groups[133X[101X
  
  [1X2.2-1 WeylTransversal[101X
  
  [33X[1;0Y[29X[2XWeylTransversal[102X( [3XR[103X, [3Xinds[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XWeylTransversal[102X( [3XR[103X, [3Xroots[103X ) [32X operation[133X
  
  [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.2-2 SizeOfWeylGroup[101X
  
  [33X[1;0Y[29X[2XSizeOfWeylGroup[102X( [3XR[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XSizeOfWeylGroup[102X( [3Xtype[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XSizeOfWeylGroup[102X( [3XX[103X, [3Xn[103X ) [32X operation[133X
  
  [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-3 WeylGroupAsPermGroup[101X
  
  [33X[1;0Y[29X[2XWeylGroupAsPermGroup[102X( [3XR[103X ) [32X operation[133X
  
  [33X[0;0YHere [3XR[103X is a root system. This function returns a permutation group whose set
  of elements is in bijection with the set of elements of the Weyl group of [3XR[103X.
  More precisely, this bijection works as follows.[133X
  
  [33X[0;0YLet  [22Xn[122X  be  the number of positive roots of [3XR[103X. We list the positive roots in
  the  order  in  which  they apppear in [3XPositiveRootsNF( R )[103X. To this list we
  append  the negative roots, listed in the same order. Thus the list of roots
  is  [22X{α_1,...,α_2n}[122X,  where  [22Xα_i+n  = -α_i[122X for [22X1≤ i≤ n[122X. Then a reflection [22Xs_α[122X
  corresponding  to  the root [22Xα[122X corresponds to the permutation [22Xπ_α[122X, where [22Xs_α(
  α_i  )  =  α_i^π_α}[122X. Note, however, that [22Xs_α[122X acts from the [13Xleft[113X, whereas [22Xπ_α[122X
  acts from the [13Xright[113X. Let [22XW[122X denote the Weyl group of [3XR[103X and let [22XG[122X be the group
  generated  by the permutations [22Xπ_α[122X for [22Xα[122X in the fixed set of simple roots of
  [3XR[103X.  Then mapping [22Xs_α[122X to [22Xπ_α[122X extends to an [13Xanti-isomorphism[113X [22XW-> G[122X. The reason
  for  doing  it  like  this is that in the vast majority of literature on Lie
  theory  the Weyl group acts from the left, but in [5XGAP[105X permutation groups act
  from the right. When applying the group that is output by this function this
  difference  has to be kept in mind. For example, the orbit of a root [22Xβ[122X under
  [22XW[122X equals the set of images of [22Xβ[122X under the representatives of the left cosets
  of  the stabilizer of [22Xβ[122X. But when we use the group [22XG[122X we have to consider the
  right cosets for this.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("E",6);[127X[104X
    [4X[28X<root system of type E6>[128X[104X
    [4X[25Xgap>[125X [27XG:= WeylGroupAsPermGroup( R );[127X[104X
    [4X[28X<permutation group with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(G);[127X[104X
    [4X[28X51840[128X[104X
  [4X[32X[104X
  
  [1X2.2-4 ApplyWeylPermToWeight[101X
  
  [33X[1;0Y[29X[2XApplyWeylPermToWeight[102X( [3XR[103X, [3Xp[103X, [3Xw[103X ) [32X operation[133X
  
  [33X[0;0YHere  [3XR[103X  is  a  root  system,  [3Xp[103X  is  an  element  of  the group returned by
  [2XWeylGroupAsPermGroup[102X ([14X2.2-3[114X) with input [3XR[103X. Here [3Xw[103X is a weight, that the list
  of  coefficients  of  a  weight  when  written  as  a  linear combination of
  fundamental  weights.  This  function  returns the result of acting with the
  element of the Weyl group corresponding to [3Xp[103X on [3Xw[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("D",4);;[127X[104X
    [4X[25Xgap>[125X [27XG:= WeylGroupAsPermGroup(R);[127X[104X
    [4X[28X<permutation group with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27Xwt:= ApplyWeylPermToWeight( R, Random(G), [1,1,1,1] );;[127X[104X
    [4X[25Xgap>[125X [27XConjugateDominantWeight( WeylGroup(R), wt );[127X[104X
    [4X[28X[ 1, 1, 1, 1 ] [128X[104X
  [4X[32X[104X
  
  [1X2.2-5 WeylWordAsPerm[101X
  
  [33X[1;0Y[29X[2XWeylWordAsPerm[102X( [3XR[103X, [3Xu[103X ) [32X operation[133X
  
  [33X[0;0YHere  [3XR[103X  is  a root system, and [3Xu[103X is an element of the Weyl group given as a
  (not  necessarily  reduced)  word,  that is, [3Xu[103X is given by a list of indices
  between  1  and  the  rank  of  [3XR[103X.  This  function  returns  the permutation
  corresponding  to  [3Xu[103X,  that  is,  the  image of [3Xu[103X under the anti-iromorphism
  discussed in [2XWeylGroupAsPermGroup[102X ([14X2.2-3[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("D",4);;[127X[104X
    [4X[25Xgap>[125X [27XWeylWordAsPerm( R, [1,2,1,3,4,2,3,4,1] );[127X[104X
    [4X[28X(1,23,12,17)(2,10,14,22)(3,19,16,6)(4,18,15,7)(5,13,11,24)(8,21)(9,20)[128X[104X
  [4X[32X[104X
  
  [1X2.2-6 PermAsWeylWord[101X
  
  [33X[1;0Y[29X[2XPermAsWeylWord[102X( [3XR[103X, [3Xp[103X ) [32X operation[133X
  
  [33X[0;0YThis  is  the  inverse  operation  to  the  one  discussed in [2XWeylWordAsPerm[102X
  ([14X2.2-5[114X).  That is, the element of the Weyl group (this time given as reduced
  expression) corresponding to the permutation [3Xp[103X is returned.[133X
  
  [33X[0;0YIn the next example we compute generators of the stabilizer of a subset of a
  root system. The generators are given as reduced words.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR:= RootSystem("D",4);;[127X[104X
    [4X[25Xgap>[125X [27Xrts:= [1,3,4,12,13,15,16,24];;[127X[104X
    [4X[25Xgap>[125X [27XG:= WeylGroupAsPermGroup(R);;[127X[104X
    [4X[25Xgap>[125X [27XS:= Stabilizer( G, rts, OnSets );[127X[104X
    [4X[28X<permutation group of size 64 with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X64[128X[104X
    [4X[25Xgap>[125X [27XList( GeneratorsOfGroup(S), g -> PermAsWeylWord( R, g ) );[127X[104X
    [4X[28X[ [ 3 ], [ 3, 4 ], [ 2, 1, 3, 2, 4, 2, 1, 3, 2, 4 ], [ 2, 1, 3, 2 ], [128X[104X
    [4X[28X  [ 2, 1, 4, 2 ], [ 1, 3 ] ][128X[104X
  [4X[32X[104X
  
