%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%
%A  weyl.tex                 GAP documentation                   Meinolf Geck
%%
%A  @(#)$Id: weyl.tex,v 3.9 1994/06/17 19:05:00 vfelsch Rel $
%%
%Y  Copyright 1990-1992,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
%%
%H  $Log: weyl.tex,v $
%H  Revision 3.9  1994/06/17  19:05:00  vfelsch
%H  examples adjusted to version 3.4
%H
%H  Revision 3.8  1994/06/10  13:29:00  vfelsch
%H  updated examples
%H
%H  Revision 3.7  1993/05/28  14:04:37  gap
%H  fixed a small typo: "A" must be |"A"| in plain text
%H
%H  Revision 3.6  1993/04/28  08:28:00  fceller
%H  a few minor updates
%H
%H  Revision 3.5  1993/02/19  10:48:42  gap
%H  adjustments in line length and spelling
%H
%H  Revision 3.4  1993/02/17  13:38:50  felsch
%H  examples fixed
%H
%H  Revision 3.3  1992/12/02  10:04:30  fceller
%H  fixed a few bad text alignments
%H
%H  Revision 3.2  92/11/30  13:49:52  fceller
%H  initial GAP 3.2 revision
%%
\Chapter{Weyl Groups and Hecke Algebras}

In  this chapter  we  describe  functions for  dealing  with finite  Weyl
groups, associated Hecke algebras over a ring of Laurent polynomials, and
their representations.

A finite Weyl group is a group with a presentation of the form
\begin{center}
$\langle
    s_1, ..., s_n\ \|\ (s_i s_j)^{m(i,j)}=1 $ for all $i, j
\rangle$
\end{center}
where the $m(i,j)$ are integers contained in $\{ 2, 3, 4, 6 \}$ and where
$m(i,i)=1$  for all  $i$. These groups play a significant role in various
areas  of mathematics such as reflection groups,  Lie algebras and linear
algebraic groups.  Each Weyl group is a direct product  of indecomposable
Weyl groups which  are  in turn classified  by  means of  the well--known
Dynkin diagrams.

The   Hecke  algebra  $H$  corresponding  to  a  finite  Weyl  group   as
above  is  defined  as  follows.  Let  $A$  be  a  commutative  ring  and
$q_1, ..., q_n \in A$  such  that  $q_i=q_j$  whenever  $s_i$  and  $s_j$
are  conjugate in   $W$.  Then   $H$  is   the  associative  $A$--algebra
with 1 with generators $a_1, ..., a_n$ and defining relations of the form
\begin{center}
    $a_i^2=q_i  1 + (q_i-1) a_i$ for all $i$
\end{center}
and
\begin{center}
   $a_i a_j a_i ... =  a_j a_i a_j ...\ \ \ m(i,j)$ factors on each side.
\end{center}

Usually, $A$ is  chosen  to  be  the ring  of  Laurent polynomials  in an
indeterminate $v$, and all $q_i$ are chosen to be  $v^2$. For each $w \in
W$ we  define an element $T_w  \in H$  as follows.  If $w=s_{i_1}  \cdots
s_{i_k}$  is  a   reduced  expression,  for  some   for   some  $i_j  \in
\{1,\ldots,n\}$, then we  let $T_w  \:=  T_{a_{i_1}} \cdots T_{a_{i_k}}$.
It  can be  shown that $T_w$ is indeed  independent of  the choice of the
reduced expression. The elements $T_w$, $w \in W$, form  an $A$--basis of
the algebra $H$.

A suitable reference for the general theory is,  for example, the book by
J.E.Humpreys  on  `Reflection Groups and  Coxeter  Groups\'{}  (Cambridge
Studies in advanced Mathematics 29). A good reference for applications of
Weyl groups  and Hecke  algebras  are  Chapters 1,2  in  the  book by Shi
Jian-Yi on `The Kazhdan-Lusztig  Cells  in Certain Affine Weyl Groups\'{}
(Springer Lecture Notes in Mathematics 1179).

At first, let us describe in an informal  way some examples of  how these
programs can be used.

The starting point for our programs is to specify  a Cartan matrix.  This
is a square  matrix corresponding to  a  (finite) root system $R$ in some
Euclidean space  $V$  with  $(i,j)$-entry given by $2(r_i,r_j)/(r_i,r_i)$
where $r_i$ and  $r_j$ are fundamental roots in $R$.  The Cartan matrices
for the indecomposable root  system of type $A_n$, $B_n$,  $C_n$,  $D_n$,
$G_2$, $F_4$, $E_6$,  $E_7$,  $E_8$  are accessible  through the function
'CartanMat'.

|    gap> RequirePackage( "weyl" );
    gap> C := CartanMat( "D", 4 );;
    gap> PrintArray( last );
    [ [   2,   0,  -1,   0 ],
      [   0,   2,  -1,   0 ],
      [  -1,  -1,   2,  -1 ],
      [   0,   0,  -1,   2 ] ]|

The Cartan matrices corresponding to the  non-crystallographic groups are
now also available under the names $H_3$, $H_4$ and $I_2(m)$.
Given two Cartan matrices,  their matrix direct sum (corresponding to the
orthogonal direct  sum  of the  root systems)  is produced  by using  the
function  'DirectSumCartanMat'. This Cartan  matrix conversely determines
the root  system  and hence also the corresponding  Weyl group $W$, i.e.,
the finite subgroup of the  full orthogonal group of $V$ generated by the
reflections along the vectors in $R$. We choose a basis of $V$ consisting
of the  fundamental  root vectors,  and  express  every  root vector as a
linear combination of and  every reflection  matrix with respect to  this
basis.  This   is   performed   by   the   functions   'RootSystem'   and
'SimpleReflectionMatrices'.

|    gap> S:=SimpleReflectionMatrices(C);
    [ [ [ -1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 1, 0, 1, 0 ], [ 0, 0, 0, 1 ] ],
      [ [ 1, 0, 0, 0 ], [ 0, -1, 0, 0 ], [ 0, 1, 1, 0 ], [ 0, 0, 0, 1 ] ],
      [ [ 1, 0, 1, 0 ], [ 0, 1, 1, 0 ], [ 0, 0, -1, 0 ], [ 0, 0, 1, 1 ] ],
      [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 0, 0, 0, -1 ] ] ]
    gap> R := Rootsystem(C);
    [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ],
      [ 1, 0, 1, 0 ], [ 0, 1, 1, 0 ], [ 0, 0, 1, 1 ], [ 1, 1, 1, 0 ],
      [ 1, 0, 1, 1 ], [ 0, 1, 1, 1 ], [ 1, 1, 1, 1 ], [ 1, 1, 2, 1 ] ]|

We notice that  the root vectors  in $R$ are ordered by increasing height
(and that  only  the positive root vectors  are  returned;  whenever  the
negative  roots are needed, they can be computed by simply typing  |-R|).
If we label the (positive) roots by their position in the above list, and
the  negative roots by  the  next  consecutive numbers, then we  can also
represent each fundamental reflection by the permutation which it induces
on the root vectors.

|    gap> P := PermRepresentationRoots( S, R );
    [ ( 1,13)( 3, 5)( 6, 8)( 7, 9)(10,11)(15,17)(18,20)(19,21)(22,23),
      ( 2,14)( 3, 6)( 5, 8)( 7,10)( 9,11)(15,18)(17,20)(19,22)(21,23),
      ( 1, 5)( 2, 6)( 3,15)( 4, 7)(11,12)(13,17)(14,18)(16,19)(23,24),
      ( 3, 7)( 4,16)( 5, 9)( 6,10)( 8,11)(15,19)(17,21)(18,22)(20,23) ]|

This is maybe the most fundamental command, and  in fact,  every function
which has to perform computations with group elements in $W$,  does so by
working  with this  (faithful)  permutation representation  of $W$.   The
procedure up to now can be abbreviated by one command, namely

|    gap> W := Weyl(C);;|

which produces a record with entries\:

'isWeylGroup':\\
        is set to 'true'.

'cartan':\\
        contains the Cartan matrix 'C'.

'dim':\\
        contains the length of 'C'.

'degree':\\
        number of positive and negative roots.

'N':\\
        number of positive roots.

'roots':\\
        contains the root system 'R'.

'matgens':\\
        contains the matrix generators 'S'.

'permgens':\\
        contains the permutation generators 'P'.

This record is all that the following programs and commands  need.  For a
given element $w \in  W$, the  length $l(w)$  is  defined to  be smallest
integer $k$ such that $w$ can be written as  a product of $k$ fundamental
reflections. Such an  expression  of shortest  possible  length  will  be
called a reduced word for $w$. A user might be interested to think of the
elements of $W$ as such words in the generating fundamental  reflections.
For  these  programs, we represent  a word  simply as  a list of integers
corresponding  to the  fundamental  roots, e.g.,  |[]|  is  the  identity
element, and  |[1], [2]|,  etc. represent the reflection along the first,
the second etc. fundamental root vector. For  other purposes, it might be
better to see the permutation of an element  $w$ on the root vectors. The
functions 'WeylWordPerm' and 'PermWeylWord' will do the conversion of one
form into the other.

|    gap> PermWeylWord( W, [ 1, 3, 2, 1, 3 ] );
    ( 1,14,13, 2)( 3,17, 8,18)( 4,12)( 5,20, 6,15)( 7,10,11, 9)(16,24)
    (19,22,23,21)
    gap> WeylWordPerm( W, last );
    [ 1, 3, 1, 2, 3 ]|

We notice that the word  we started  with  and  the one that  we ended up
with, are not the same. But of course, they represent the same element of
$W$. The reason for this difference is  that  the function 'WeylWordPerm'
always computes  a reduced word which  is the lexicographically  smallest
among all possible  expressions of  an element  of $W$  as a word  in the
fundamental reflections! The function 'ReducedWeylWord' does the same but
with  an  arbitrary  word as input  (and  not with  a  permutation).   In
particular,  the  element  used  in  the  above  example  has  length  5.
Sometimes, it  is not necessary to compute a  reduced word for an element
$w$ and one is only interested in the length $l(w)$. The crucial point of
working with  the permutation representation of $W$ on $R$ is that $l(w)$
can  be computed very fast and effectively from the permutation, since it
also given by the number of  positive  roots mapped to negative roots  by
$w$, i.e., by the number of $i \in \{ 1,... ,N \}$ such that $i^w > N$.

|    gap> LongestWeylWord( W );  & the (unique) longest element in W
    [ 1, 2, 3, 1, 2, 3, 4, 3, 1, 2, 3, 4 ]
    gap> PermWeylWord( W, last );
    ( 1,13)( 2,14)( 3,15)( 4,16)( 5,17)( 6,18)( 7,19)( 8,20)( 9,21)(10,22)
    (11,23)(12,24)
    gap> WeylLengthPerm( W, last );
    12|

These are the most  basic  functions available. We now give an example of
how the other commands do work.

|    gap> WeylReflections( W );  & all reflections in W
    [ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 1, 3, 1 ], [ 2, 3, 2 ], [ 3, 4, 3 ],
      [ 1, 2, 3, 1, 2 ], [ 1, 3, 4, 3, 1 ], [ 2, 3, 4, 3, 2 ],
      [ 1, 2, 3, 4, 3, 1, 2 ], [ 3, 1, 2, 3, 4, 3, 1, 2, 3 ] ]
    gap> WeylElements( W );;
    &I  Order = 192
    gap> List( last, Length );
    [ 1, 4, 9, 16, 23, 28, 30, 28, 23, 16, 9, 4, 1 ]|

The last  line tells us that there is 1 element of  length 0, there are 4
elements of length 4, etc.

|    gap> WeylConjugacyClasses( W );
    &I  Number of cosets = 8
    &I  Number of cosets = 6
    &I  Number of cosets = 2
    &I  30 elements to consider
    &I  Still 18 elements to consider
    &I  13 conjugacy classes found
    [ [  ], [ 1 ], [ 1, 2 ], [ 1, 3 ], [ 1, 4 ], [ 2, 4 ], [ 1, 2, 3 ],
      [ 1, 2, 4 ], [ 1, 3, 4 ], [ 2, 3, 4 ], [ 1, 2, 3, 4 ],
      [ 1, 3, 1, 2, 3, 4 ], [ 1, 2, 3, 1, 2, 3, 4, 3, 1, 2, 3, 4 ] ]|

This are the representatives of the conjugacy classes of minimal length.

|    gap> LeftCells( W );;
    &I  Order = 192
    &I  R(w) = [  ] :  Size = 1,  1 new cell
    &I  R(w) = [ 1 ] :  Size = 7,  2 new cells
    &I  R(w) = [ 1, 2 ] :  Size = 17,  2 new cells
    &I  R(w) = [ 1, 2, 3 ] :  Size = 7,  2 new cells
    &I  R(w) = [ 1, 2, 3, 4 ] :  Size = 1,  1 new cell
    &I  R(w) = [ 1, 2, 4 ] :  Size = 23,  5 new cells
    &I  R(w) = [ 1, 3 ] :  Size = 17,  2 new cells
    &I  R(w) = [ 1, 3, 4 ] :  Size = 7,  2 new cells
    &I  R(w) = [ 1, 4 ] :  Size = 17,  2 new cells
    &I  R(w) = [ 2 ] :  Size = 7,  2 new cells
    &I  R(w) = [ 2, 3 ] :  Size = 17,  2 new cells
    &I  R(w) = [ 2, 3, 4 ] :  Size = 7,  2 new cells
    &I  R(w) = [ 2, 4 ] :  Size = 17,  2 new cells
    &I  R(w) = [ 3 ] :  Size = 23,  5 new cells
    &I  R(w) = [ 3, 4 ] :  Size = 17,  2 new cells
    &I  R(w) = [ 4 ] :  Size = 7,  2 new cells
    gap> last[3];
    [ [ [ 2, 4, 3, 1 ], [ 3, 2, 4, 3, 1 ], [ 1, 3, 2, 4, 3, 1 ] ],
      [ [ 0 ], [ 1, 0 ], [ 0, 1, 0 ] ] ]|

This is a left cell  consisting of  three elements with the corresponding
matrix  of  $\mu_{x,y}$,  the coefficient  of $v^{(l(y)-l(x)-1)}$  in the
Kazhdan-Lusztig polynomial $P_{x,y}(v^2)$.

|    gap> LeftCellRepresentation( W, last, E(4) );;
    gap> PrintArray( last );
    [ [        [ -1, 0, 0 ],        [ 0, -1, 0 ],     [ 0, E(4), -1 ] ],
      [     [ -1, E(4), 0 ],        [ 0, -1, 0 ],        [ 0, 0, -1 ] ],
      [        [ -1, 0, 0 ],  [ E(4), -1, E(4) ],        [ 0, 0, -1 ] ],
      [     [ -1, E(4), 0 ],        [ 0, -1, 0 ],        [ 0, 0, -1 ] ] ]|

The  corresponding  left cell representation  with  the indeterminate $v$
replaced by 'E(4)'.

Of course, the user should observe  limitations  on storage  for  working
with  these programs, e.g., the command 'WeylElements'  applied to a Weyl
group  of  type $E_8$  will try  to compute  all elements as words in the
fundamental reflections. Every computer will run out of memory!

Some  good  examples  to  see  how  long  the  programs   will  take  for
computations in big Weyl groups are the following.

|    LeftCells( Weyl( CartanMat( "F", 4 ) ) );|

(which takes roughly 5 hours cpu time on a HP computer)

or

|    WeylConjugacyClasses( Weyl( CartanMat( "E", 8 ) ) ) ;|

(which takes a few days...)

Finally, we give an example  of some computations with Hecke algebras. We
start with the Weyl group of type $A_4$.

|    gap> W := Weyl( CartanMat("A",4) );;|

We wish to work over the ring of Laurent polynomials  in an indeterminate
$v$, and  we want to  have  $u=v^2$ as a parameter  for the generic Hecke
algebra $H$ of $W$.


|    gap> v := Indeterminate( Rationals );;  v.name := "v";;
    gap> Hecke( W, v^2 );|

From  $v$ we  can  build  arbitrary  Laurent  polynomials  by  using  the
operations |+|, |-|, |*|, and |^|.

|    gap> 2*v+3*v^-2-7*(v+v^-1)*(3*v^2-1);
    -21*v^3 - 12*v + 7*v^(-1) + 3*v^(-2)|

The command 'Hecke' produces an additional component 'T' in the record of
$W$ which  gives,  for  an element  $w  \in  W$, the  corresponding basis
element $T_w$ in $H$. Computations like the following are possible.

|    gap> W.T([1]);
    (v^0)*T([ 1 ])
    gap> last^2;  & the quadratic relation for a standard base element
    (v^2)*T([  ])+(v^2 - 1)*T([ 1 ])
    gap> h := W.T([1,2,3,4]);
    (v^0)*T([ 1, 2, 3, 4 ])
    gap> inv := h^-1;
    (1 - 4*v^(-2) + 6*v^(-4) - 4*v^(-6) + v^(-8))*T([  ])+(-v^(-2) + 3*v^(
    -4) - 3*v^(-6) + v^(-8))*T([ 1 ])+(-v^(-2) + 3*v^(-4) - 3*v^(-6) + v^(
    -8))*T([ 2 ])+(-v^(-2) + 3*v^(-4) - 3*v^(-6) + v^(-8))*T([ 3 ])+(-v^(
    -2) + 3*v^(-4) - 3*v^(-6) + v^(-8))*T([ 4 ])+(v^(-4) - 2*v^(-6) + v^(
    -8))*T([ 1, 3 ])+(v^(-4) - 2*v^(-6) + v^(-8))*T([ 1, 4 ])+(v^(-4) -
    2*v^(-6) + v^(-8))*T([ 2, 1 ])+(v^(-4) - 2*v^(-6) + v^(-8))*T(
    [ 2, 4 ])+(v^(-4) - 2*v^(-6) + v^(-8))*T([ 3, 2 ])+(v^(-4) - 2*v^(
    -6) + v^(-8))*T([ 4, 3 ])+(-v^(-6) + v^(-8))*T([ 1, 4, 3 ])+(-v^(
    -6) + v^(-8))*T([ 2, 1, 4 ])+(-v^(-6) + v^(-8))*T([ 3, 2, 1 ])+(-v^(
    -6) + v^(-8))*T([ 4, 3, 2 ])+(v^(-8))*T([ 4, 3, 2, 1 ])
    gap> h*inv;
    (v^0)*T([  ])|

More clearly arranged, <h> is

|    (1 - 4*v^(-2) + 6*v^(-4) - 4*v^(-6) + v^(-8))*T([  ])
    +(-v^(-2) + 3*v^(-4) - 3*v^(-6) + v^(-8))*T([ 1 ])
    +(-v^(-2) + 3*v^(-4) - 3*v^(-6) + v^(-8))*T([ 2 ])
    +(-v^(-2) + 3*v^(-4) - 3*v^(-6) + v^(-8))*T([ 3 ])
    +(-v^(-2) + 3*v^(-4) - 3*v^(-6) + v^(-8))*T([ 4 ])
    +(v^(-4) - 2*v^(-6) + v^(-8))*T([ 1, 3 ])
    +(v^(-4) - 2*v^(-6) + v^(-8))*T([ 1, 4 ])
    +(v^(-4) - 2*v^(-6) + v^(-8))*T([ 2, 1 ])
    +(v^(-4) - 2*v^(-6) + v^(-8))*T([ 2, 4 ])
    +(v^(-4) - 2*v^(-6) + v^(-8))*T([ 3, 2 ])
    +(v^(-4) - 2*v^(-6) + v^(-8))*T([ 4, 3 ])
    +(-v^(-6) + v^(-8))*T([ 1, 4, 3 ])
    +(-v^(-6) + v^(-8))*T([ 2, 1, 4 ])
    +(-v^(-6) + v^(-8))*T([ 3, 2, 1 ])
    +(-v^(-6) + v^(-8))*T([ 4, 3, 2 ])
    +(v^(-8))*T([ 4, 3, 2, 1 ])|

Now  we  turn to some aspects  about the representation  theory of  Hecke
algebras.  At first we compute the left cells of $W$.

|    gap> ce := LeftCells(W);;
    &I  Order = 120
    &I  R(w) = [  ] :  Size = 1,  1 new cell
    &I  R(w) = [ 1 ] :  Size = 4,  1 new cell
    &I  R(w) = [ 1, 2 ] :  Size = 6,  1 new cell
    &I  R(w) = [ 1, 2, 3 ] :  Size = 4,  1 new cell
    &I  R(w) = [ 1, 2, 3, 4 ] :  Size = 1,  1 new cell
    &I  R(w) = [ 1, 2, 4 ] :  Size = 9,  2 new cells
    &I  R(w) = [ 1, 3 ] :  Size = 16,  3 new cells
    &I  R(w) = [ 1, 3, 4 ] :  Size = 9,  2 new cells
    &I  R(w) = [ 1, 4 ] :  Size = 11,  2 new cells
    &I  R(w) = [ 2 ] :  Size = 9,  2 new cells
    &I  R(w) = [ 2, 3 ] :  Size = 11,  2 new cells
    &I  R(w) = [ 2, 3, 4 ] :  Size = 4,  1 new cell
    &I  R(w) = [ 2, 4 ] :  Size = 16,  3 new cells
    &I  R(w) = [ 3 ] :  Size = 9,  2 new cells
    &I  R(w) = [ 3, 4 ] :  Size = 6,  1 new cell
    &I  R(w) = [ 4 ] :  Size = 4,  1 new cell |

We  use  'LeftCellRepresentation'  to  get  the  corresponding  left cell
representations.

|    gap> l := List( last, i -> LeftCellRepresentation(W,i,v) );;
    gap> c := WeylConjugacyClasses(W);
    [ [  ], [ 1 ], [ 1, 3 ], [ 1, 2 ], [ 1, 2, 4 ], [ 1, 2, 3 ],
      [ 1, 2, 3, 4 ] ]
    gap> ch := List( l, i -> CharHeckeRepresentation(i,c) );;|

The  last  command computes the  character  values on  representatives of
minimal length in the conjugacy classes.

|    gap> Set(last);
    [ [ v^0, -v^0, v^0, v^0, -v^0, -v^0, v^0 ],
      [ v^0, v^2, v^4, v^4, v^6, v^6, v^8 ],
      [ 4*v^0, v^2 - 3, -2*v^2 + 2, -v^2 + 2, 2*v^2 - 1, v^2 - 1, -v^2 ],
      [ 4*v^0, 3*v^2 - 1, 2*v^4 - 2*v^2, 2*v^4 - v^2, v^6 - 2*v^4,
          v^6 - v^4, -v^6 ],
      [ 5*v^0, 2*v^2 - 3, v^4 - 2*v^2 + 2, -2*v^2 + 1, -v^4 + v^2 - 1,
          v^2, 0*v^0 ],
      [ 5*v^0, 3*v^2 - 2, 2*v^4 - 2*v^2 + 1, v^4 - 2*v^2, v^6 - v^4 + v^2,
          -v^4, 0*v^0 ],
      [ 6*v^0, 3*v^2 - 3, v^4 - 4*v^2 + 1, v^4 - 2*v^2 + 1,
          -2*v^4 + 2*v^2, -v^4 + v^2, v^4 ] ]|

'HeckeCharTable' constructs  a record of a character table, which  can be
displayed using 'DisplayCharTable'.

|    gap> t := HeckeCharTable( W, c, last );;
    gap> DisplayCharTable(t);
    H()

         2  3      2           3          1           1        2    .
         3  1      1           .          1           1        .    .
         5  1      .           .          .           .        .    1

           1a     2a          2b         3a          6a       4a   5a

    X.1     1     -1           1          1          -1       -1    1
    X.2     1    v^2         v^4        v^4         v^6      v^6  v^8
    X.3     4  v^2-3     -2v^2+2     -v^2+2      2v^2-1    v^2-1 -v^2
    X.4     4 3v^2-1   2v^4-2v^2   2v^4-v^2    v^6-2v^4  v^6-v^4 -v^6
    X.5     5 2v^2-3  v^4-2v^2+2    -2v^2+1  -v^4+v^2-1      v^2    0
    X.6     5 3v^2-2 2v^4-2v^2+1   v^4-2v^2 v^6-v^4+v^2     -v^4    0
    X.7     6 3v^2-3  v^4-4v^2+1 v^4-2v^2+1  -2v^4+2v^2 -v^4+v^2  v^4|

To compute character values on other elements, we proceed as follows.

|    gap> w0 := LongestWeylWord(W);
    [ 1, 2, 1, 3, 2, 1, 4, 3, 2, 1 ]
    gap> wcl := WeylClassPolynomials( W, c, last );
    [ 0, 0, v^8, v^10 - 2*v^8 + v^6, v^10 - v^8 + v^6 - v^4,
      v^12 - v^10 + v^4 - v^2, v^12 - v^10 - v^2 + 1 ]|

In order to get the values of the irreducible characters on $T_{w_0}$, we
have to postmultiply the character table of $H$  by  'wcl' regarded  as a
column vector:

|    gap> tr := TransposedMat([wcl]) * v^0;;
    gap> t.irreducibles * tr;
    [ [ v^0 ], [ v^20 ], [ 0*v^0 ], [ 0*v^0 ], [ v^8 ], [ v^12 ],
      [ -2*v^10 ] ]|

For any comments, suggestions of improvements I would be very grateful,

\hfill                                 Aachen, November 1992, Meinolf Geck


\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{CartanMat}%
\index{Cartan matrices}

'CartanMat( <type>, <n> )'

returns the Cartan matrix of Dynkin type <type> and rank <n>. Admissable
types are the strings |"A"|,  |"B"|,  |"C"|, |"D"|, |"E"|, |"F"|, |"G"|,
|"H"|, |"I2"|.

|    gap> CartanMat( "F", 4 );;
    gap> PrintArray( last );
    [ [   2,  -1,   0,   0 ],
      [  -1,   2,  -1,   0 ],
      [   0,  -2,   2,  -1 ],
      [   0,   0,  -1,   2 ] ]|

|    gap> CartanMat( "I2", 5 );
    [ [ 2, E(5)^2+E(5)^3 ], [ E(5)^2+E(5)^3, 2 ] ]|

(this gives the dihedral group of order 10, so the integer 5 is not the
rank in this case.)

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{DirectSumCartanMat}%
\index{Cartan matrices!direct sum of}

'DirectSumCartanMat( <mat1>, <mat2> )'

returns the block  diagonal  direct sum of the Cartan matrices <mat1> and
<mat2>.

|    gap> C1 := CartanMat( "A", 4 );;
    gap> PrintArray( last );
    [ [   2,  -1,   0,   0 ],
      [  -1,   2,  -1,   0 ],
      [   0,  -1,   2,  -1 ],
      [   0,   0,  -1,   2 ] ]
    gap> C2 := CartanMat( "D", 4 );;
    gap> PrintArray( last );
    [ [   2,   0,  -1,   0 ],
      [   0,   2,  -1,   0 ],
      [  -1,  -1,   2,  -1 ],
      [   0,   0,  -1,   2 ] ]
    gap> DirectSumCartanMat( C1, C2 );;
    gap> PrintArray( last );
    [ [   2,  -1,   0,   0,   0,   0,   0,   0 ],
      [  -1,   2,  -1,   0,   0,   0,   0,   0 ],
      [   0,  -1,   2,  -1,   0,   0,   0,   0 ],
      [   0,   0,  -1,   2,   0,   0,   0,   0 ],
      [   0,   0,   0,   0,   2,   0,  -1,   0 ],
      [   0,   0,   0,   0,   0,   2,  -1,   0 ],
      [   0,   0,   0,   0,  -1,  -1,   2,  -1 ],
      [   0,   0,   0,   0,   0,   0,  -1,   2 ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{SimpleReflectionMatrices}

'SimpleReflectionMatrices( <mat> )'

returns the matrices (in row convention) of the simple reflections of the
Weyl  group determined by  the Cartan  matrix <mat>  with respect  to the
basis  consisting  of  the fundamental  root vectors corresponding to the
rows of <mat>. (This function is only used in the function 'Weyl'.)

|    gap> C := CartanMat( "A", 4 );;
    gap> PrintArray( last );
    [ [   2,  -1,   0,   0 ],
      [  -1,   2,  -1,   0 ],
      [   0,  -1,   2,  -1 ],
      [   0,   0,  -1,   2 ] ]
    gap> SimpleReflectionMatrices( C );
    [ [ [ -1, 0, 0, 0 ], [ 1, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ],
      [ [ 1, 1, 0, 0 ], [ 0, -1, 0, 0 ], [ 0, 1, 1, 0 ], [ 0, 0, 0, 1 ] ],
      [ [ 1, 0, 0, 0 ], [ 0, 1, 1, 0 ], [ 0, 0, -1, 0 ], [ 0, 0, 1, 1 ] ],
      [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 1 ], [ 0, 0, 0, -1 ] ]
     ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Rootsystem}

'Rootsystem( <mat> )'

returns the positive roots  of the  root system  determined by the Cartan
matrix  <mat>,  given  by their  coefficients  when expressed  as  linear
combinations  of fundamental roots. Thus the  fundamental roots  are  the
standard  basis vectors $e_i$, corresponding to the rows  $i=1,... ,n$ of
<mat>. The roots  are ordered by increasing height.  Note that we use the
convention  that   '<mat>[i,j]'  equals  $2(e_i,e_j)/(e_i,e_i)$.    (This
function is only used in the function 'Weyl'.)

|    gap> C := CartanMat( "A", 4 );;
    gap> PrintArray( last );
    [ [   2,  -1,   0,   0 ],
      [  -1,   2,  -1,   0 ],
      [   0,  -1,   2,  -1 ],
      [   0,   0,  -1,   2 ] ]
    gap> Rootsystem( C );
    [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ],
      [ 1, 1, 0, 0 ], [ 0, 1, 1, 0 ], [ 0, 0, 1, 1 ], [ 1, 1, 1, 0 ],
      [ 0, 1, 1, 1 ], [ 1, 1, 1, 1 ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{PermRepresentationRoots}

'PermRepresentationRoots( <mats> , <roots> )'

returns the permutations induced by the fundamental reflections <mats> of
a given Weyl group  on the corresponding root system <roots>.   If  there
are $2N$ roots  in total,  then $1,...  ,N$  correspond  to the  positive
roots, and $N+1,... ,2N$ to the negative roots.  (This  function is  only
used in the function 'Weyl'.)

|    gap> C := CartanMat( "A", 4 );;
    gap> S := SimpleReflectionMatrices( C );;
    gap> R := Rootsystem( C );;
    gap> PermRepresentationRoots( S, R );
    [ ( 1,11)( 2, 5)( 6, 8)( 9,10)(12,15)(16,18)(19,20),
      ( 1, 5)( 2,12)( 3, 6)( 7, 9)(11,15)(13,16)(17,19),
      ( 2, 6)( 3,13)( 4, 7)( 5, 8)(12,16)(14,17)(15,18),
      ( 3, 7)( 4,14)( 6, 9)( 8,10)(13,17)(16,19)(18,20) ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Weyl}

'Weyl( <mat> )'

returns  a record containing the basic  information about  the Weyl group
determined by  the Cartan  matrix  <mat>.  This record has  the following
entries.

'cartan':\\
        the Cartan matrix <mat>

'dim':\\
        the size of <mat>

'degree':\\
        the number of positive roots

'N':\\
        the total number of roots

'roots':\\
        the root vectors

'matgens':\\
        the matrices of the simple reflections

'permgens':\\
        the permutations on the root vectors


|    gap> W := Weyl( CartanMat("G",2) );
    Weyl( [ [ 2, -1 ], [ -3, 2 ] ] )
    gap> PrintRec( W ); Print( "\n" );
    rec(
      isDomain    := true,
      isWeylGroup := true,
      cartan      := [ [ 2, -1 ], [ -3, 2 ] ],
      dim         := 2,
      degree      := 12,
      N           := 6,
      roots       := [ [ 1, 0 ], [ 0, 1 ], [ 1, 1 ], [ 1, 2 ], [ 1, 3 ],
      [ 2, 3 ] ],
      matgens     := [ [ [ -1, 0 ], [ 1, 1 ] ], [ [ 1, 3 ], [ 0, -1 ] ] ],
      permgens    := [ ( 1, 7)( 2, 3)( 5, 6)( 8, 9)(11,12),
      ( 1, 5)( 2, 8)( 3, 4)( 7,11)( 9,10) ],
      parameter   := [ 1, 1 ],
      operations  := ... )|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{PermWeylWord}

'PermWeylWord( <W> , <w> )'

returns the  permutation  on the root vectors determined  by  an  element
which is  given  as a  list  <w> of integers  representing  the  standard
generators of the Weyl group <W>.

|    gap> W := Weyl( CartanMat("G",2) );;
    gap> PermWeylWord( W, [1,2,1] );
    ( 1,12)( 2, 4)( 3, 9)( 6, 7)( 8,10)|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{WeylWordPerm}

'WeylWordPerm( <W> , <w> )'

returns a reduced word in the standard generators  of the  Weyl group <W>
determined by the permutation <w> on the root vectors.

|    gap> W := Weyl( CartanMat("G",2) );;
    gap> WeylWordPerm( W, ( 1,12)( 2, 4)( 3, 9)( 6, 7)( 8,10) );
    [ 1, 2, 1 ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{WeylLengthPerm}

'WeylLengthPerm( <W> , <w> )'

returns  the  length  of the  permutation <w>, which corresponds to an
element in the Weyl group <W>, as a reduced expression in the standard
generators.

|    gap> W := Weyl( CartanMat("F",4) );;
    gap> p := PermWeylWord( W, [1,2,3,4,2] );
    ( 1,44,38,25,20,14)( 2, 5,40,47,48,35)( 3, 7,13,21,19,15)
    ( 4, 6,12,28,30,36)( 8,34,41,32,10,17)( 9,18)(11,26,29,16,23,24)
    (27,31,37,45,43,39)(33,42)
    gap> WeylLengthPerm( W, p );
    5
    gap> WeylWordPerm( W, p );
    [ 1, 2, 3, 2, 4 ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{ReducedWeylWord}

'ReducedWeylWord( <W> , <w> )'

returns  a reduced expression for an element of the Weyl group <W>, which
is  given as a list  <w> of  integers  where each entry 'i'  in this list
represents the 'i'-th standard generator of <W>.

|    gap> W := Weyl( CartanMat("E",6) );;
    gap> ReducedWeylWord( W, [1,1,1,1,1,2,2,2,3] );
    [ 1, 2, 3 ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{LongestWeylWord}

'LongestWeylWord( <W> )'

returns  a  reduced expression  in the standard generators  of the unique
element of maximal length of the Weyl group <W>.

|    gap> W := Weyl( CartanMat("E",6) );;
    gap> w0 := LongestWeylWord(W);
    [ 1, 2, 3, 1, 4, 2, 3, 1, 4, 3, 5, 4, 2, 3, 1, 4, 3, 5, 4, 2, 6, 5,
      4, 2, 3, 1, 4, 3, 5, 4, 2, 6, 5, 4, 3, 1 ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{WeylReflections}

'WeylReflections( <W> )'

returns a list of reduced expressions in the standard generators for  the
set of reflections in  the Weyl group <W>. The 'i'-th  entry in this list
is the reflection along the 'i'-th root in '<W>.roots'.

|    gap> W := Weyl( CartanMat("B",2) );;
    gap> W.roots;
    [ [ 1, 0 ], [ 0, 1 ], [ 1, 1 ], [ 2, 1 ] ]
    gap> WeylReflections(W);
    [ [ 1 ], [ 2 ], [ 2, 1, 2 ], [ 1, 2, 1 ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{WeylRightCosetRepresentatives}

'WeylRightCosetRepresentatives( <W>, <I>, <J> )'

returns  a  list  of  reduced  words  in  the  Weyl group  <W> which  are
distinguished representatives for the  right cosets of  $W(J)$ in  $W(I)$
where,  for  each sublist  'K' of  '[1..W.dim]', $W(K)$ is the  parabolic
subgroup generated by the simple reflections corresponding to elements in
'K'.

|    gap> W := Weyl( CartanMat("F",4) );;
    gap> WeylRightCosetRepresentatives( W, [1,2,3], [1,2] );
    &I  Number of cosets = 8
    [ [  ], [ 3 ], [ 3, 2 ], [ 3, 2, 1 ], [ 3, 2, 3 ], [ 3, 2, 1, 3 ],
      [ 3, 2, 1, 3, 2 ], [ 3, 2, 1, 3, 2, 3 ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{WeylCosetPermRepresentation}

'WeylCosetPermRepresentation( <W>, <J> )'

returns the list of  permutations  induced  by the standard generators of
the Weyl group  <W> on the cosets  of the parabolic subgroup generated by
the  elements in the  set <J>. The cosets are in the order determined  by
the  result  of   the   function   'WeylRightCosetRepresentatives(   <W>,
[1..<W>.dim], <J> )'

|    gap> W := Weyl( CartanMat("F",4) );;
    gap> WeylCosetPermRepresentation( W, [1,2,3] );
    &I  Number of cosets = 24
    [ ( 4, 5)( 6, 7)( 8,10)(16,18)(17,19)(20,21),
      ( 3, 4)( 7, 9)(10,12)(14,16)(15,17)(21,22),
      ( 2, 3)( 4, 6)( 5, 7)( 9,11)(12,14)(13,15)(17,20)(19,21)(22,23),
      ( 1, 2)( 6, 8)( 7,10)( 9,12)(11,13)(14,15)(16,17)(18,19)(23,24) ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{WeylElements}

'WeylElements( <W> )'

returns a list of  which the 'i' - th entry  is the list of reduced words
of length 'i-1' in the Weyl group <W>.

|    gap> W := Weyl( CartanMat("G",2) );;
    gap> WeylElements(W);
    &I  Order = 12
    [ [ [  ] ], [ [ 1 ], [ 2 ] ], [ [ 1, 2 ], [ 2, 1 ] ],
      [ [ 1, 2, 1 ], [ 2, 1, 2 ] ], [ [ 1, 2, 1, 2 ], [ 2, 1, 2, 1 ] ],
      [ [ 1, 2, 1, 2, 1 ], [ 2, 1, 2, 1, 2 ] ], [ [ 1, 2, 1, 2, 1, 2 ] ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{WeylConjugacyClasses}

'WeylConjugacyClasses( <W> )'

returns  a list  of representatives of the conjugacy  classes of the Weyl
group <W>. Each element  in this list is  given as a word in the standard
generators, and it  has the property that  it is of minimal length in its
conjugacy class.

|    gap> W := Weyl( CartanMat("F",4) );;
    gap> WeylConjugacyClasses(W);
    &I  Number of cosets = 24
    &I  Number of cosets = 8
    &I  Number of cosets = 3
    &I  108 elements to consider
    &I  Still 34 elements to consider
    &I  25 conjugacy classes found
    [ [  ], [ 1 ], [ 3 ], [ 1, 2 ], [ 1, 3 ], [ 2, 3 ], [ 3, 4 ],
      [ 1, 2, 3 ], [ 1, 2, 4 ], [ 1, 3, 4 ], [ 2, 3, 4 ], [ 1, 2, 3, 4 ],
      [ 2, 3, 2, 3 ], [ 1, 2, 3, 2, 3 ], [ 2, 3, 2, 3, 4 ],
      [ 1, 2, 3, 2, 3, 4 ], [ 1, 3, 2, 1, 3, 2, 3, 4 ],
      [ 1, 2, 1, 3, 2, 1, 3, 2, 3 ], [ 2, 3, 2, 3, 4, 3, 2, 3, 4 ],
      [ 1, 2, 1, 3, 2, 1, 3, 2, 3, 4 ], [ 1, 2, 3, 2, 3, 4, 3, 2, 3, 4 ],
      [ 1, 2, 1, 3, 2, 1, 3, 4, 3, 2, 3, 4 ],
      [ 1, 2, 1, 3, 2, 1, 3, 2, 3, 4, 3, 2, 3, 4 ],
      [ 1, 2, 3, 2, 1, 3, 2, 3, 4, 3, 2, 1, 3, 2, 3, 4 ],
      [ 1, 2, 1, 3, 2, 1, 3, 2, 3, 4, 3, 2, 1, 3, 2, 3, 4, 3, 2, 1, 3, 2,
          3, 4 ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{ParametersCentralizers}

'ParametersCentralizers( <W> )'

returns a  list  of  pairs which  parametrizes the  conjugacy classes  of
centralizers of semisimple elements in  a Chevalley group with Weyl group
<W>. Each  pair consists of  a subset which contains fundamental roots or
the highest  root  in  the root  system of  <W>, and  an  element in  the
normalizer in <W> of the subgroup generated by the reflections along  the
roots in the given subset.

|    gap> W := Weyl( CartanMat( "A", 4 ) );;
    gap> ParametersCentralizers( W );
    &I  Number of Psi's = 7
    &I  7 conjugacy classes
    &I  3 conjugacy classes
    &I  2 conjugacy classes
    &I  2 conjugacy classes
    &I  1 conjugacy classes
    &I  1 conjugacy classes
    &I  1 conjugacy classes
    &I  Number of Pairs = 17
    [ [ [  ], [  ] ], [ [  ], [ 4 ] ], [ [  ], [ 4, 3 ] ],
      [ [  ], [ 4, 3, 2, 1 ] ], [ [  ], [ 3, 2, 1 ] ],
      [ [  ], [ 2, 1, 4 ] ], [ [  ], [ 2, 1, 3, 2 ] ], [ [ 1 ], [  ] ],
      [ [ 1 ], [ 4 ] ], [ [ 1 ], [ 4, 3 ] ], [ [ 1, 2 ], [  ] ],
      [ [ 1, 2 ], [ 4 ] ], [ [ 1, 3 ], [  ] ],
      [ [ 1, 3 ], [ 2, 1, 3, 2 ] ], [ [ 1, 2, 3 ], [  ] ],
      [ [ 1, 2, 4 ], [  ] ], [ [ 1, 2, 3, 4 ], [  ] ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Bruhat}

'Bruhat( <W>, <y>, <w> )'

returns true, if the element <y> is less than or equal to the element <w>
of  the Weyl  group <W>, and false otherwise. Both <y>  and <w>  must  be
given as permutations on the root vectors of <W>.

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{KazhdanLusztigPolynomial}

'KazhdanLusztigPolynomial( <W>, <y>, <w>, <u> )'

returns  the  Kazhdan  -  Lusztig  polynomial  in the  indeterminate  <u>
corresponding  to the elments <y> and  <w> (given as reduced expressions in
the standard generators) of the Weyl group <W>.

|    gap> W := Weyl( CartanMat("B",4) );;
    gap> y := [1,2,3,4,3,2,1];;
    gap> x := [1];;
    gap> u := Indeterminate(Rationals);;  u.name := "u";;
    gap> KazhdanLusztigPolynomial( W, x, y, u );
    &I  Order = 384
    u^2 + 2*u + 1|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{KLCoefficient}

'KLCoefficient( <W>, <y>, <w>, <k> )'

returns  the <k>-th  coefficient  of  the  Kazhdan  -  Lusztig polynomial
corresponding  to  the  elments  <y> and  <w>, which  must  be  given  as
permutations on the root vectors, of the Weyl  group <W>.  (This function
does  not use the polynomial  arithmetic  and is  slightly more efficient
than the function 'KazhdanLusztigPolynomial'.)

|    gap> W := Weyl( CartanMat("B",4) );;
    gap> y := [1,2,3,4,3,2,1];;
    gap> py := PermWeylWord( W, y );
    ( 1,28)( 2,15)( 4,27)( 6,16)( 7,24)( 8,23)(11,20)(12,17)(14,30)(18,31)
    (22,32)
    gap> x := [1];;
    gap> px := PermWeylWord( W, x );
    ( 1,17)( 2, 8)( 6,11)(10,14)(18,24)(22,27)(26,30)
    gap> Bruhat( W, px, py );
    true
    gap> List( [0..3], i -> KLCoefficient( W, px, py, i ) );
    &I  Order = 384
    [ 1, 2, 1, 0 ]|

So  the  Kazhdan-Lusztig polynomial  corresponding  to  $x$  and  $y$  is
$1+2u+u^2$.

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{WeylMueMat}

'WeylMueMat( <W>, <list> )'

returns  the list of  highest coefficients  $\mu_{y,w}$  of the  Kazhdan-
Lusztig polynomials corresponding to  pairs of elements of the Weyl group
<W>  from a  list  <list>.   The  elements  in  <list>  must  be  reduced
expressions in  the  standard  generators, ordered by  increasing length.
E.g., <list> is the result of
'Iterated(WeylElements(<W>),Concatenation)'.
(See the  next  section for an example.)

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{DecomposedLeftCells}

'DecomposedLeftCells( <W>, <c>, <mue> )'

given  a   list  <c>  of  reduced  words  in  the  Weyl  group  <W>  with
corresponding matrix <mue>  of highest coefficients of the  corresponding
Kazhdan-Lusztig  polynomials,  it  returns a  list  of  pairs. The  first
component of each pair  consists of the reduced  words  in  the  list <c>
which lie in one  left  cell  $C$, the  second component consists of  the
corresponding matrix of highest coefficients $\mu_{y,w}$, where $y,w$ are
in $C$.

|    gap> W := Weyl( CartanMat("G",2) );;
    gap> WeylElements(W);;
    &I  Order = 12
    gap> c := Iterated( last, Concatenation );
    [ [  ], [ 1 ], [ 2 ], [ 1, 2 ], [ 2, 1 ], [ 1, 2, 1 ], [ 2, 1, 2 ],
      [ 1, 2, 1, 2 ], [ 2, 1, 2, 1 ], [ 1, 2, 1, 2, 1 ],
      [ 2, 1, 2, 1, 2 ], [ 1, 2, 1, 2, 1, 2 ] ]
    gap> mue := WeylMueMat( W, c );
    &I  Order = 12
    [ [ 0 ], [ 1, 0 ], [ 1, 0, 0 ], [ 0, 1, 1, 0 ], [ 0, 1, 1, 0, 0 ],
      [ 0, 0, 0, 1, 1, 0 ], [ 0, 0, 0, 1, 1, 0, 0 ],
      [ 0, 0, 0, 0, 0, 1, 1, 0 ], [ 0, 0, 0, 0, 0, 1, 1, 0, 0 ],
      [ 0, 0, 0, 0, 0, 0, 0, 1, 1, 0 ],
      [ 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0 ],
      [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0 ] ]
    gap> DecomposedLeftCells( W, c, mue );
    [ [ [ [  ] ], [ [ 0 ] ] ],
      [ [ [ 1 ], [ 2, 1 ], [ 1, 2, 1 ], [ 2, 1, 2, 1 ], [ 1, 2, 1, 2, 1 ]
             ],
          [ [ 0 ], [ 1, 0 ], [ 0, 1, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1, 0
                 ] ] ],
      [ [ [ 2 ], [ 1, 2 ], [ 2, 1, 2 ], [ 1, 2, 1, 2 ], [ 2, 1, 2, 1, 2 ]
             ],
          [ [ 0 ], [ 1, 0 ], [ 0, 1, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1, 0
                 ] ] ], [ [ [ 1, 2, 1, 2, 1, 2 ] ], [ [ 0 ] ] ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{LeftCells}

'LeftCells( <W> )'

returns a list of pairs. The first component of each pair consists of the
reduced words  in the Weyl group <W> which lie in one left  cell $C$, the
second  component  consists  of  the  corresponding   matrix  of  highest
coefficients $\mu_{y,w}$, where $y,w$ are in $C$.

|    gap> W := Weyl( CartanMat("G",2) );;
    gap> LeftCells(W);
    &I  Order = 12
    &I  R(w) = [  ] :  Size = 1,  1 new cell
    &I  R(w) = [ 1 ] :  Size = 5,  1 new cell
    &I  R(w) = [ 1, 2 ] :  Size = 1,  1 new cell
    &I  R(w) = [ 2 ] :  Size = 5,  1 new cell
    [ [ [ [  ] ], [ [ 0 ] ] ],
      [ [ [ 1 ], [ 2, 1 ], [ 1, 2, 1 ], [ 2, 1, 2, 1 ], [ 1, 2, 1, 2, 1 ]
             ],
          [ [ 0 ], [ 1, 0 ], [ 0, 1, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1, 0
                 ] ] ], [ [ [ 1, 2, 1, 2, 1, 2 ] ], [ [ 0 ] ] ],
      [ [ [ 2 ], [ 1, 2 ], [ 2, 1, 2 ], [ 1, 2, 1, 2 ], [ 2, 1, 2, 1, 2 ]
             ],
          [ [ 0 ], [ 1, 0 ], [ 0, 1, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1, 0
                 ] ] ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{LeftCellRepresentation}

'LeftCellRepresentation( <W> , <cell>, <v> )'

returns a  list of matrices giving  the left cell representation  of  the
Hecke algebra with parameter <v>$^2$  associated with the Weyl group <W>.
The  argument <cell> is a pair  with first  component  a list  of reduced
words which  form  a  left  cell, and second component  the corresponding
matrix  of  highest  coefficients  of the  corresponding  Kazhdan-Lusztig
polynomials.   Typically,   <cell>  is   the  result   of  the   function
'WeylMueMat'.

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{Hecke}

'Hecke( <W>, <arg> )'

adds to the  record of the Weyl  group  <W> a  component 'T'  which  is a
function that  produces, for each  element $w \in  W$, the  corresponding
basis  element $T_w$  in the generic Hecke algebra. <arg>  specifies  the
index parameters corresponding to the standard  generators. If <arg> is a
single field element or a polynomial,  then all parameters are assumed to
be  equal  to  this element.  Alternatively, <arg>  may be a list of such
numbers or polynomials. Accordingly,  a component 'parameter' is added to
the record of <W>.

|    gap> W := Weyl( CartanMat("B",3) );;
    gap> q := Indeterminate(Rationals);;  q.name := "q";;
    gap> Hecke( W, 1 );|

or

|    gap> Hecke( W, [q,q^2,q^2] );|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{WeylClassPolynomials}

'WeylClassPolynomials( <W>, <reps>, <w> )'

returns  the  class  polynomials of  the  element  <w>  with  respect  to
representatives <reps> of minimal lengths in the conjugacy classes of the
Weyl   group   <W>.   Typically,   <reps>   is    the   result   of   the
'WeylConjugacyClasses' and <w> is  a reduced  expression in  the standard
generators of  <W>.  (For  the definition of  these polynomials, see  the
article by G.Pfeiffer and M.Geck in Advances in Mathematics (to appear).)

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{HeckeReflectionRepresentation}

'HeckeReflectionRepresentation( <W> )'

returns a list of  matrices which give  the  reflection representation of
the  Hecke  algebra  corresponding  to the Weyl  group <W>. The  function
'Hecke' must have been applied to the record <W>.

|    gap> W := Weyl( CartanMat("F",4) );;
    gap> Hecke(W,1);   & the parameters are set to 1, so that the
    gap>               & Hecke algebra is isomorphic to the
    gap>               & group algebra of the Weyl group.
    gap> HeckeReflectionRepresentation(W);
    [ [ [ -1, 0, 0, 0 ], [ -1, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ],
      [ [ 1, -1, 0, 0 ], [ 0, -1, 0, 0 ], [ 0, -1, 1, 0 ], [ 0, 0, 0, 1 ]
         ],
      [ [ 1, 0, 0, 0 ], [ 0, 1, -2, 0 ], [ 0, 0, -1, 0 ], [ 0, 0, -1, 1 ]
         ],
      [ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, -1 ], [ 0, 0, 0, -1 ]
         ] ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{CheckHeckeDefiningRelations}

'CheckHeckeDefiningRelations( <W> , <t> )'

returns true or false, according to whether a given  set  <t>  of  matrices
corresponding to the standard generators of the  Weyl group  <W>  defines a
representation of the associated Hecke algebra  or not.

|    gap> W := Weyl( CartanMat("F",4) );;
    gap> Hecke( W, 1 );
    gap> HeckeReflectionRepresentation(W);;
    gap> CheckHeckeDefiningRelations( W, last );
    true|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{CharHeckeRepresentation}

'CharHeckeRepresentation( <rep> , <elts> )'

given a list <rep>  of matrices corresponding to the standard  generators
of  a  finite Weyl  group  and  a  list  <elts> of words in  the standard
generators   it  returns   the  list   of  traces  of  the  corresponding
representation on the elements in <elts>.

|    gap> W := Weyl( CartanMat("F",4) );;
    gap> Hecke( W, 1 );
    gap> r := WeylConjugacyClasses(W);;
    &I  Number of cosets = 24
    &I  Number of cosets = 8
    &I  Number of cosets = 3
    &I  108 elements to consider
    &I  Still 34 elements to consider
    &I  25 conjugacy classes found
    gap> t := HeckeReflectionRepresentation(W);;
    gap> CharHeckeRepresentation( t, r );
    [ 4, 2, 2, 1, 0, 2, 1, 1, -1, -1, 1, 0, 0, 0, 0, 0, 2, -2, -2, -1,
      -1, 0, -2, -2, -4 ]|

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\Section{HeckeCharTable}

'HeckeCharTable( <W>, <rep>, <elts>)'

given a Weyl group <W>,  a list  <rep> of characters and a list <elts> of
representatives of minimal lengths in  the conjugacy classes it returns a
character table record.

This function requires the package \"weyl\" (see "RequirePackage").

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%E  Emacs . . . . . . . . . . . . . . . . . . . . . local Emacs variables
%%
%%  Local Variables:
%%  mode:               outline
%%  outline-regexp:     "\\\\Chapter\\|\\\\Section\\|%E"
%%  fill-column:        73
%%  eval:               (hide-body)
%%  End:
%%

