The Coxeter and Weyl Packages, Version 2.4

Help Texts for the Vanilla Edition

For a detailed introduction to the packages, consult the TeX document
"A Maple Package for Root Systems and Finite Coxeter Groups."

After loading the vanilla editions of coxeter and weyl, each package function
may be accessed using the calling sequences coxeter[functionname](arguments)
or weyl[functionname](arguments). In order to use the abbreviated form
functionname(arguments), run the commands 'withcoxeter()' or 'withweyl()'.
If there is a conflict between the names of one of the package functions and
a previously assigned name, a warning is printed.

To enable the abbreviated form for a subset of the functions in one of the
packages (e.g., to avoid conflicts), use 'withcoxeter(name1,name2,...)' or
'withweyl(name1,name2,...)'.

The names A1,A2,..., B1,B2,..., C1,C2,..., D2,D3,..., E3,E4,...,E8, F4, G2, H3,
H4, I2, e1,e2,..., and s1,s2,... play special roles as global variables in both
packages, and should not be assigned values by the user. In addition, the names
M and X are special global variables used by the weyl package.

For a description of the available means for specification of root systems,
see coxeter[structure].

The Coxeter Package

The Weyl Package



FUNCTION:  base - simple roots of a root system
           co_base - simple co-roots of a root system

CALLING SEQUENCE:  base(R);
                   co_base(R);
  
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  base(R) returns a list of simple roots for R, expressed as linear
  combinations of the standard orthonormal basis e1,e2,e3,...

  If R is not crystallographic, floating-point coordinates are used.

  If R is a root system name, the list of roots is ordered canonically in a
  way that does not vary with each Maple session. The base vectors for each
  irreducible component of R are listed consecutively, sorted first by
  series name (A,B,...,I), and then by rank within each series (so A2
  precedes A3, A10 precedes B2,...). The diagram function can be used to
  display the ordering of base vectors within a given irreducible component.

  If R is a Coxeter or Cartan matrix, the ordering of the rows and columns
  of the matrix dictates the ordering of the simple roots.

  If R is a list, it is assumed that R itself is a list of simple roots and
  base(R) simply returns R.

  co_base(R) returns the list of co-roots corresponding to the simple roots
  listed by base(R). The co-root corresponding to root r is 2*r/iprod(r,r).

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  S:=base(A2*B2);             yields         [e2-e1, e3-e2, e4, e5-e4]
  base(S);                    yields         [e2-e1, e3-e2, e4, e5-e4]
  co_base(S);                 yields        [e2-e1, e3-e2, 2*e4, e5-e4]
  base(I2[5]);                yields    [e1, -.8090169945*e1+.5877852520*e2]
  CoxMat:=array([[1,3,2],[3,1,4],[2,4,1]]);
  base(CoxMat);               yields             [e3-e2, e2-e1, e1]

SEE ALSO:  cartan_matrix, cox_matrix, diagram, iprod, name_of, structure


FUNCTION:  cartan_matrix - Cartan matrix of a crystallographic root system

CALLING SEQUENCE:  cartan_matrix(R);
 
PARAMETERS:  R = a crystallographic root system data structure

SYNOPSIS:
  The Cartan matrix of a crystallographic root system with simple roots
  [r_1,...,r_n] is the n x n integer matrix whose (i,j)-entry is

                  2 * iprod(r_i,r_j) / iprod(r_j,r_j).

  An error is generated if these quantities do not evaluate to integers.
  The Cartan "matrix" of the empty root system is the empty list [].

  If R is a Coxeter matrix, cartan_matrix(R) returns the Cartan matrix for
  some crystallographic root system with Coxeter matrix R, if one exists.

  If R is a matrix of integers whose (1,1)-entry is 2, it is assumed that
  R is itself a Cartan matrix and cartan_matrix(R) returns R.
 
  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  cartan_matrix(F4)[3,2];                 yields            -2
  a:=cartan_matrix([e1-e2,2*e2]);         yields   array([[2,-1],[-2,2]])
  cartan_matrix(a);                       yields   array([[2,-1],[-2,2]])
  m:=array([[1,2,3],[2,1,3],[3,3,1]]);
  cartan_matrix(m)[1,3];                  yields            -1

SEE ALSO:  base, cox_matrix, iprod, diagram, name_of, structure

 
FUNCTION:  char_poly - characteristic polynomial of a group element
 
CALLING SEQUENCE:  char_poly(w,R); 
                   char_poly(w,R,t);
 
PARAMETERS:  R = a root system data structure
             w = a list of integers representing a member of W(R)
             t = a variable or expression (optional)

SYNOPSIS:
  If R is a root system of rank n, members of the Coxeter group W(R) are
  represented as lists of integers in the range 1..n. The group element
  corresponding to w = [i_1,...,i_l] is the product of the generators
  indexed by i_1,...,i_l. The indexing follows base(R).

  If w is such a group element, char_poly(w,R,t) computes the determinant
  of 1 - t*w, as a linear transformation of the space spanned by base(R).
  If the third argument is omitted, q is the default.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  char_poly([1,3,2,3],B3);        yields           1-q+q^2-q^3
  char_poly([1,2,3,4],D4,1);      yields                4
  f:=char_poly([1,2,3,2],H3,z);
  evalf(f,3);                     yields   1.-1.62*z+1.62*z^2-1.00*z^3
 
SEE ALSO:  base, rank, reflect, structure

 
FUNCTION:  class_rep - determine conjugacy class representatives
 
CALLING SEQUENCE:  class_rep(w,R);
                   class_rep(R);
 
PARAMETERS:  R = a root system data structure
             w = a list of integers representing an element of W(R)

SYNOPSIS:
  If R is a root system of rank n, elements of the Coxeter group W(R) are
  represented as lists of integers in the range 1..n. The group element
  corresponding to w = [i_1,...,i_l] is the product of the generators
  indexed by i_1,...,i_l. The indexing follows base(R).

  class_rep(w,R) produces a canonical representative of the conjugacy class
  of W(R) that contains w. Two elements w1 and w2 of W(R) are conjugate if
  and only if class_rep(w1,R) = class_rep(w2,R).

  class_rep(R) returns the list of canonical representatives for every
  conjugacy class of W(R). The ordering of the list is consistent with the
  ordering used by the functions class_size, cprod, induce, irr_chars,
  perm_char, and restrict. The identity element [] is always first.

  The conjugacy class representatives for the exceptional groups E-F-H are
  read from prestored lists in the coxeter/lib subdirectory. The lists for
  the remaining irreducible cases are generated "on demand".

  The algorithm for finding the representative for a particular w proceeds
  by breaking R into irreducible components, and then separately determining
  the canonical representative for each component of w. For types I2 and G2,
  brute force is used. For the groups of type H3 and H4, it uses the
  characteristic polynomial of w. For all other groups, it uses a faithful
  representation of W(R) as a subgroup of a hyperoctahedral group G with the
  property that distinct conjugacy classes of W(R) map to distinct conjugacy
  classes of G. Some extra parity tricks are also necessary to separate
  certain conjugacy classes of type D.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  class_rep([1,2,3,4,3,4,1],A2^2);     yields             [1,3,4]
  w0:=longest_elt(D4);
  class_rep(w0,D4);                    yields    [1,2,3,1,2,3,4,3,1,2,3,4]
  class_rep(I2[5]);                    yields     [[],[1],[1,2],[1,2,1,2]]
 
SEE ALSO:  base, class_size, char_poly, cprod, perm_char, induce, irr_chars,
           restrict, structure

 
FUNCTION:  class_size - determine sizes of conjugacy classes
 
CALLING SEQUENCE:  class_size(w,R);
                   class_size(R);
 
PARAMETERS:  R = a root system data structure
             w = a list of integers representing an element of W(R)

SYNOPSIS:
  If R is a root system of rank n, elements of the Coxeter group W(R) are
  represented as lists of integers in the range 1..n. The group element
  corresponding to w = [i_1,...,i_l] is the product of the generators
  indexed by i_1,...,i_l. The indexing follows base(R).

  class_size(w,R) returns the size of the conjugacy class of w in W(R).
  class_size(R) returns a list of the sizes of all W(R)-conjugacy classes,
  following the same ordering used by the functions class_rep, cprod,
  induce, irr_chars, perm_char, and restrict.

  The conjugacy class sizes for the exceptional groups E-F-H are read
  from prestored lists in the coxeter/lib subdirectory. The lists for the
  remaining irreducible cases are generated "on demand".

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  class_size([4,3,2,1,2,1],H4);       yields               720
  w0:=longest_elt(A2*G2);
  class_size(w0,A2*G2);               yields                3
  class_size(C3);                     yields       [1,6,8,3,6,3,6,1,6,8]
 
SEE ALSO:  base, class_rep, cprod, perm_char, induce, irr_chars,
           restrict, structure


FUNCTION:  cox_matrix - Coxeter matrix of a root system or Coxeter group
 
CALLING SEQUENCE:  cox_matrix(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  The Coxeter matrix of R is the n x n matrix whose (i,j) entry is the
  order of s_i * s_j in W(R), where [s_1,...,s_n] denote the simple
  reflections. Equivalently, the (i,j)-entry is m if (1-1/m)*Pi is the
  angle between the i-th and j-th simple roots of R.

  If R is a matrix whose (1,1) entry is 1, it is assumed that R is itself
  a Coxeter matrix and cox_matrix(R) returns R. Any other matrix is assumed
  to be the Cartan matrix of a (not necessarily finite) root system.

  The Coxeter "matrix" of the empty root system is the empty list [].

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  cox_matrix(H4)[1,2];             yields                 5
  m:=cox_matrix([e1-e3,-e1-e2+2*e3]);
                                   yields       array([[1,6],[6,1]])
  cox_matrix(m);                   yields       array([[1,6],[6,1]])
  m:=array([[2,-2,0],[-1,2,-1],[0,-2,2]]);
  cox_matrix(m);                  yields   array([[1,4,2],[4,1,4],[2,4,1]])
 
SEE ALSO:  base, cartan_matrix, diagram, name_of, presentation, structure


FUNCTION:  cox_number - Coxeter number of a Coxeter group

CALLING SEQUENCE:  cox_number(R);

PARAMETERS:  R = a root system data structure

SYNOPSIS:
  A Coxeter element of a Coxeter group W(R) is obtained by taking the
  product of the simple reflections of W(R), in any order. The Coxeter
  number is the order of any Coxeter element.

  cox_number(R) computes the Coxeter number by using the fact that for
  irreducible R, the Coxeter number is the largest member of degrees(R).
  The Coxeter number is also expressible as 2*num_refl(R)/rank(R), again
  assuming R is irreducible.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  cox_number(E6);                     yields             12
  cox_number(A3^2*A1);                yields              4
 
SEE ALSO:  degrees, num_refl, rank, structure

 
FUNCTION:  cprod - inner product of characters or class functions
 
CALLING SEQUENCE:  cprod(f,g,R); 
 
PARAMETERS:  R  = a root system data structure
            f,g = lists representing class functions on W(R)

SYNOPSIS:
  A character or class function on W(R) is represented as a list of values
  [a_1,...,a_l], where a_i is the function value on an element in the i-th
  conjugacy class. A consistent ordering of the conjugacy classes is used
  by each of the functions class_rep, class_size, cprod, induce, irr_chars,
  perm_char, and restrict. In particular, the value at the identity element
  (the degree, in the case of characters) is always listed first.

  If f and g are two such class functions, cprod(f,g,R) computes the
  standard (real) inner product of f and g; namely, the sum over i of
  (1/m)*f[i]*g[i]*N_i, where N_i is the size of the i-th conjugacy class
  and m=size(R). Note that this is not a complex Hermitian inner product.

  The irreducible characters of W(R) are orthonormal with respect to cprod.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  chi:=perm_char([2,3],B3);
  # compute the number of (A2,A2)-double cosets in B3:
  cprod(chi,chi,B3);                       yields              4
  # compute the multiplicities of irreducible characters in chi:
  map(cprod,irr_chars(B3),chi,B3);         yields    [1,0,0,1,0,1,0,1,0,0]
 
SEE ALSO:  class_rep, class_size, perm_char, induce, irr_chars, restrict,
           size, structure

 
FUNCTION:  diagram - Dynkin diagram of a root system
 
CALLING SEQUENCE:  diagram(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  diagram(R) displays the Dynkin diagram of the root system R, with the
  nodes numbered according to the ordering of simple roots used by base(R).

  The displays for G2, H3, H4 and I2[m] are ugly.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  diagram(E8);         yields

                    2
                    |
            1---3---4---5---6---7---8

  diagram(B3*D4);      yields

                1=<=2---3

                    5
                    |
                4---6---7
 
SEE ALSO:  base, name_of, structure

 
FUNCTION:  degrees - degrees of the basic polynomial invariants 
           exponents - exponents of a root system
 
CALLING SEQUENCE:  degrees(R);
                   exponents(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  degrees(R) returns a sorted list of the degrees of the basic polynomial
  invariants of the Coxeter group W(R).

  exponents(R) returns a sorted list of the exponents of R. The exponents
  [e_1,...,e_n] have several equivalent definitions, one being that if m
  is the Coxeter number of R and z is a primitive m-th root of unity, then
  they are the unique positive integers < m such that z^(e_1),...,z^(e_n)
  are the eigenvalues of a Coxeter element.

  The exponents e_i and degrees d_i are related:  d_i = e_i + 1.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  degrees(D6);                        yields        [2,4,6,6,8,10]
  exponents(H4);                      yields         [1,11,19,29]
 
SEE ALSO:  cox_number, length_gf, structure

 
FUNCTION:  highest_root - highest root in an irreducible root system
 
CALLING SEQUENCE:  highest_root(R);

PARAMETERS:  R = a root system data structure

SYNOPSIS:
  A vector v is dominant if it belongs to the closure of the fundamental
  chamber; i.e., iprod(r,v) >= 0 for all simple roots r.

  highest_root(R) returns a dominant root of R of maximum length. If R
  is crystallographic and irreducible, there is a unique such root, the
  so-called "highest root".

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  highest_root(C4);                   yields          2*e4
  r:=highest_root(I2[5]);
  evalf(r,3);                         yields   .309*e1 + .951*e2
 
SEE ALSO:  base, pos_roots, vec2fc, structure


FUNCTION:  index - index of connection for a crystallographic root system

CALLING SEQUENCE:  index(R);
 
PARAMETERS:  R = a crystallographic root system data structure

SYNOPSIS:
  The index of connection of a crystallographic root system R is the
  index of the root lattice in the weight lattice. Equivalently, it is
  the determinant of the Cartan matrix. It is also expressible as
  char_poly(w,R,1), where w is a Coxeter element, or 1 + the number of
  dominant minuscule weights, or (if R is irreducible) 1 + the number of
  1's in the root coordinates of highest_root(R).

  If the given root system is not crystallographic, an error is generated. 
  
  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  index(D4);                         yields             4 
  index([e1-e2,2*e2]);               yields             2

SEE ALSO:  cartan_matrix, char_poly, highest_root, root_coords, structure,
           weyl[minuscule]


FUNCTION:  induce - induce characters from reflection subgroups
           perm_char - permutation characters induced by reflection subgroups

CALLING SEQUENCE:  induce(f,J,R);    perm_char(J,R);
                   induce(f,S0,R);   perm_char(S0,R);
 
PARAMETERS:  R = a root system data structure
             J = a list of integers in the range 1..n, where n=rank(R)
            S0 = a list of simple roots for a root subsystem R' of R
             f = a list representing a class function on W(R')

SYNOPSIS:
  A character or class function on W(R) is represented as a list of values
  [a_1,...,a_l], where a_i is the function value on an element in the i-th
  conjugacy class. A consistent ordering of the conjugacy classes is used
  by each of the functions class_rep, class_size, cprod, induce, irr_chars,
  perm_char, and restrict. In particular, the value at the identity element
  (the degree, in the case of characters) is always listed first.

  If S0 is a list of simple roots for some (not necessarily parabolic)
  root subsystem R' of R, and f is a list of values for some class function
  on W(R'), then induce(f,S0,R) returns the class function on W(R) induced
  by f, and perm_char(S0,R) returns the class function on W(R) induced by
  the trivial character of W(R'); i.e., the character of the permutation
  representation of W(R) on W(R)/W(R').

  Similarly, if J is a sublist of [1,...,n] (where n = rank(R)), then
  induce(f,J,R) and perm_char(J,R) perform the same calculations relative
  to the parabolic subsystem of R whose base is obtained by selecting the
  members of base(R) in positions indexed by J.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  perm_char([1,2],C3);                     yields    [6,2,0,4,0,2,2,0,0,0]
  S:=base(C3); r:=highest_root(C3);
  perm_char([S[1],S[2],-r],C3);            yields    [3,1,0,3,1,3,1,3,1,0] 
  S:=base(H3); J:=[S[2],S[3]];
  f:=[seq((-1)^nops(w),w=class_rep(J))];  # the sign character
  induce(f,J,H3);                          yields   [20,0,-4,0,2,0,0,0,0,0]
  S:=base(A4); J:=[S[1],S[2],S[4]];
  # the character of the reflection representation
  f:=[seq(coeff(char_poly(w,J,-q),q),w=class_rep(J))];
  induce(f,J,A4);                          yields     [30,4,-2,0,-2,0,0]

SEE ALSO:  base, class_rep, class_size, cprod, irr_chars, rank, restrict,
           perm_rep, structure


FUNCTION:  interior_pt - find an interior point of the fundamental chamber
 
CALLING SEQUENCE:  interior_pt(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  interior_pt(R) returns a point in the interior of the fundamental chamber
  defined by R; i.e., a vector v in the span of base(R) with the property
  that iprod(r,v)>0 for all positive roots r. The vector v is chosen so
  that iprod(r,v)=1 for each simple root r. For crystallographic R, this
  is the same as weyl[co_rho](R).

  More generally, if S is any list of independent vectors expressed as 
  linear combinations of the standard orthonormal basis e1,e2,...,
  interior_pt(S) returns the vector v in the linear span of S such that
  iprod(r,v)=1 for all members r of S.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  interior_pt(F4);                 yields   e1+2*e2+3*e3+8*e4
  interior_pt([e1,e2,e1-e3]);      yields        e1+e2
 
SEE ALSO:  base, iprod, structure, vec2fc, weyl[co_rho]

 
FUNCTION:  iprod - inner product of vectors 
 
CALLING SEQUENCE:  iprod(u,v);
 
PARAMETERS:  u,v = linear combinations of e1,e2,...

SYNOPSIS:
  A "vector" (distinct from the vector data structure used by Maple) is a
  linear combination of the standard orthonormal basis e1,e2,e3,..., with
  coefficients that are rational or floating-point.

  If u and v are vectors, iprod(u,v) returns the inner product of u and v.

  While u must have coefficients that are rational or floating-point, this
  requirement is not necessary for v. All that is required for v is that
  the function calls coeff(v,e1), coeff(v,e2),...  return valid answers. 

EXAMPLES:
  iprod(e1+e2,e1-2*e2+e3);           yields                -1
  iprod(e1+e2,a*e1+b*e2+c*e3);       yields                a+b
  r:=highest_root(D4);
  map(iprod,base(D4),r);             yields             [0,0,1,0]
 
SEE ALSO:  reflect, root_coords, weyl[weight_coords]

 
FUNCTION:  irr_chars - irreducible characters of a Coxeter group
 
CALLING SEQUENCE:  irr_chars(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  A character of W(R) is represented as a list of values [a_1,...,a_l],
  where a_i is the value of the character on an element in the i-th
  conjugacy class. A consistent ordering of the conjugacy classes is used
  by each of the functions class_rep, class_size, cprod, induce, irr_chars,
  perm_char, and restrict. In particular, the degree of the character is
  always the first value listed.

  irr_chars(R) returns the list of irreducible characters of W(R).

  The characters of the exceptional groups E-F-H are read from prestored
  tables in the coxeter/lib directory. The characters for the remaining
  irreducible groups are generated "on demand".

  The characters of the group W(A.(n-1)) are listed in the same order as in
  combinat[character](n). In particular, the ordering of the corresponding
  Young diagrams is the reverse of combinat[partition](n).

  The character values of the non-crystallographic groups H3 and H4 are
  stored as expressions of the form  a + b * sqrt(5), where a and b are
  rational. Arithmetic operations involving these expressions are not
  automatically simplified by Maple, but can be simplified through the use
  of the expand and rationalize functions. The non-integer character values
  of the groups I2[m] are generated as expressions of the form  2*cos(b*Pi)
  with b rational. For certain values of b these expressions are subject
  to automatic simplification by Maple as radical expressions.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  irr_chars(A2);                    yields   [[1,1,1], [2,0,-1], [1,-1,1]]
  map(x->op(1,x),irr_chars(H3));    yields       [1,1,3,3,3,3,4,4,5,5]
 
SEE ALSO:  class_rep, class_size, combinat[character], combinat[partition],
           cprod, perm_char, induce, restrict, structure

 
FUNCTION:  length_gf - length generating function for a Coxeter group
 
CALLING SEQUENCE:  length_gf(R);
                   length_gf(R,z);
 
PARAMETERS:  R = a root system data structure
             z = a variable or expression (optional)

SYNOPSIS:
  The length of an element w in W(R) is the minimum length of an expression
  for w as a product of simple reflections. The length generating function
  (or Poincare polynomial) P(q) for W(R) is the sum of q^length(w) for all
  w in W(R).

  length_gf(R,z) returns the length generating function for W(R) using the
  formula P(z) = product((1-z^d[i])/(1-z),i=1..rank(R)), where d[1],d[2],...
  are the degrees of the basic polynomial invariants for W(R). If the second
  argument is omitted, q is used by default.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  length_gf(A2,z);                  yields        z^3+2*z^2+2*z+1
  f:=length_gf(B3)/length_gf(A2);
  normal(f);                        yields   q^6+q^5+q^4+2*q^3+q^2+q+1
 
SEE ALSO:  degrees, rank, structure

 
FUNCTION:  longest_elt - longest element of a Coxeter group
 
CALLING SEQUENCE:  longest_elt(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  If R is a root system of rank n, members of the Coxeter group W(R) are
  represented as lists of integers in the range 1..n. The group element
  corresponding to w = [i_1,...,i_l] is the product of the generators
  indexed by i_1,...,i_l. The indexing follows base(R).

  longest_elt(R) returns a reduced expression for the longest element w0
  of W(R); i.e., a minimum-length representation of w0. Among all reduced
  expressions for w0, the one returned is the first in lexicographic order.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  longest_elt(H3);                 yields   [1,2,1,2,1,3,2,1,2,1,3,2,1,2,3]
  S:=base(A3);
  longest_elt([S[1],S[3],S[2]]);   yields            [1,2,3,1,2,3]
 
SEE ALSO:  base, length_gf, num_refl, reduce, structure

 
FUNCTION:  multperm - multiply permutations
 
CALLING SEQUENCE:  multperm(w,P);
                   multperm(w,P,m);
                   multperm(w,pg);
 
PARAMETERS:  w = a list of integers representing a group element
             P = a set (or list) of equations {s1=<perm1>,s2=<perm2>,...}
             m = (optional) the common degree of the permutations in P
            pg = a permutation group with generators s1,s2,...

SYNOPSIS:
  Let w be a list [i_1,i_2,...,i_l] of positive integers. Normally w will
  represent a product of generators in some Coxeter group.

  Let P be a set (or list) of equations {s1=<perm1>,s2=<perm2>,...}, where
  each expression <perm_i> is a permutation of 1,2,...,m in disjoint cycle
  format. For a description of this format, see group[permgroup]. Normally
  P will describe the action of the simple reflections in some permutation
  representation of a Coxeter group.

  multperm(w,P) returns the product of the permutations s.i_1 ,..., s.i_l,
  using the convention that permutations act on the right. The result is
  expressed in disjoint cycle format, canonically arranged so that (1) the
  first listed element of each cycle is smallest, and (2) the cycles are
  sorted by increasing first elements. Fixed points are omitted. A third
  argument m indicates that each generator is a permutation of 1,...,m.

  If pg is an expression of the form permgroup(m,P) (see group[permgroup]),
  where m and P are as above, then multperm(w,pg) produces the same result.

  For any root system R, the operation perm_rep(R) produces a permutation
  representation of W(R) in this format.

  To convert from permutations to reduced words in W(R) (i.e., the inverse
  of multperm), use the function perm2word.

EXAMPLES:
  P:={s1=[[6,7]],s2=[[7,8]]};
  multperm([1,2],P);                   yields             [[6,8,7]]
  multperm([2,1],P,8);                 yields             [[6,7,8]]
  pg:=perm_rep(D4); w0:=longest_elt(D4);
  multperm(w0,pg);                     yields     [[1,8],[2,7],[3,6],[4,5]]
 
SEE ALSO:  perm2word, perm_rep, group[permgroup]

 
FUNCTION:  name_of - name of a root system or Coxeter group
 
CALLING SEQUENCE:  name_of(R);
                   name_of(R,'pi');
 
PARAMETERS:  R = a root system data structure
            pi = (optional) a name

SYNOPSIS:
  name_of(R) returns the name of the isomorphism type of the root system
  or Coxeter group specified by R; i.e., a monomial in the names of the
  irreducible root systems. If a second argument is specified, it will be
  assigned a permutation [p_1,...,p_n] of [1,2,..,n] (n=rank(R)). This
  permutation indicates an ordering of base(R) that is isomorphic to the
  ordering used by base(N) and diagram(N), where N = name_of(R). Thus if
  the permutation is [2,3,1] and S=base(R), then [S[2],S[3],S[1]] will be
  an ordered base isomorphic to base(name_of(R)).

  If R is a Coxeter matrix, then the assigned permutation (if requested)
  indicates a re-ordering of the rows and columns of R that agrees with
  cox_matrix(N), where N = name_of(R). Note also that in this case, the
  name_of function cannot distinguish between B.n and C.n, or G2 and I2[6],
  or B2 and I2[4]. In these cases, the name returned will be the first
  member of each of these pairs.

  If R is a list of simple roots, the name_of function will confirm that
  R is a base for some root system, but in most cases does not attempt to
  distinguish between crystallographic and non-crystallographic bases that
  generate the same reflection group. Exceptions occur in rank two: if the
  list uses floating-point coordinates and generates a reflection group of
  order 8 or 12, then the name returned is I2[4] or I2[6], respectively.

  If R is not a matrix or list, it is assumed that R itself is a root
  system name and name_of(R) simply returns R. The assigned permutation
  (if requested) is [1,2,...,n], where n=rank(R).
  
  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  name_of([e1+e2,e1-e2]);                    yields       A1^2
  S:=base(F4); r:=highest_root(F4);
  name_of([-r,S[2],S[3],S[4]],'pi'), pi;     yields   B4, [2,3,4,1]
  m:=array([[1,5],[5,1]]);
  name_of(m);                                yields       I2[5] 
  name_of(E5);                               yields        E5
  m:=cartan_matrix(E5); name_of(m);          yields        D5

SEE ALSO:  base, cartan_matrix, cox_matrix, diagram, rank, structure


FUNCTION:  num_refl - number of reflections in a Coxeter group
 
CALLING SEQUENCE:  num_refl(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  num_refl(R) returns the number of reflections in the Coxeter group W(R),
  or equivalently the number of positive roots. The result is obtained by
  evaluating the sum of the exponents of R.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  num_refl(B3*A3);                   yields              15
 
SEE ALSO:  exponents, pos_roots, structure

 
FUNCTION:  orbit - orbit of a vector under the action of a reflection group
 
CALLING SEQUENCE:  orbit(v,R);
 
PARAMETERS:  R = a root system data structure
             v = a linear combination of e1,e2,...

SYNOPSIS:
  A "vector" (distinct from the vector data structure used by Maple) is a
  linear combination of the standard orthonormal basis e1,e2,e3,..., with
  coefficients that are rational or floating-point.

  If v is a vector, orbit(v,R) returns a list consisting of all vectors u
  that can be obtained from W(R) acting on v by reflections. If any
  floating-point coordinates occur in v or base(R), then the result is only
  approximate in the sense that vectors u1 and u2 whose L^1 distance is
  at most epsilon ( = 0.001, by default) are considered to be equal. Also,
  vectors u such that iprod(r,u) <= epsilon are considered to not be on
  the positive side of the hyperplane orthogonal to r.

  To adjust epsilon, assign a new value to `coxeter/default`[epsilon].

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  orbit(e1+e2+e3,D3);       yields  [e1+e2+e3, e3-e1-e2, e2-e1-e3, e1-e2-e3]
  with(weyl,weights); w:=weights(C4);
  orbit(w[4],C4);           yields       [e4,e3,e2,e1,-e1,-e2,-e3,-e4]
 
SEE ALSO:  base, iprod, orbit_size, structure, vec2fc

 
FUNCTION:  orbit_size - size of a reflection group orbit
 
CALLING SEQUENCE:  orbit_size(v,R);
                   orbit_size(v,R,-1);
 
PARAMETERS:  R = a root system data structure
             v = a linear combination of e1,e2,...

SYNOPSIS:
  A "vector" (distinct from the vector data structure used by Maple) is a
  linear combination of the standard orthonormal basis e1,e2,e3,..., with
  coefficients that are rational or floating-point.

  If v is a vector, orbit_size(v,S) returns the size of the orbit of W(R)
  acting on v by reflections. This number is determined by finding a set
  of reflections that generate the stabilizer of v. If any floating-point
  coordinates occur in v or base(R), then there is a (small) potential for
  error, in that the reflection corresponding to a root r is considered to
  fix v if abs(iprod(r,v)) is at most epsilon ( = 0.001, by default).

  If a third argument is present, the number returned is the size of the
  union of the orbits of v and -v, or equivalently the size of the orbit
  of v under the action of the group generated by -1 and W(R).

  To adjust epsilon, assign a new value to `coxeter/default`[epsilon].

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  with(weyl,weights); w:=weights(D5);
  orbit_size(w[1],D5);                        yields         16
  orbit_size(w[1],D5,-1);                     yields         32
  v:=base(H4)[2];
  orbit_size(v,H4);                           yields         120
 
SEE ALSO:  base, iprod, orbit, size, structure, vec2fc

 
FUNCTION:  perm2word - convert a permutation to a reduced word
 
CALLING SEQUENCE:  perm2word(pi,pg);
                   perm2word(pi,pg,sc);
 
PARAMETERS:  pi = a permutation in disjoint cycle notation
             pg = a permutation representation of a reflection group
             sc = a stabilizer chain for pg (optional)

SYNOPSIS:
  Let pi be a permutation of the integers 1,...,n for some n, in disjoint
  cycle format. For a description of this format, see group[permgroup].

  Let pg be a permutation representation of a reflection group in the
  format produced by the function perm_rep. That is, pg should be an
  unevaluated procedure call of the form
               permgroup(n, {s1=<perm1>, s2=<perm2>,...}),
  where each expression <perm_i> is a permutation of the integers 1,...,n
  in disjoint cycle format.

  perm2word(pi,pg) computes a reduced expression for the permutation pi
  in terms of the generators of pg. More precisely, the result is a list
  [i_1,...,i_l] of minimum length with the property that pi is the product
  of the permutations s.i_1 ,..., s.i_l. If pi does not belong to the
  permutation group specified by pg, FAIL is returned.

  The first step of the algorithm is to use the stab_chain function to
  determine a stabilizer chain for pg. To avoid repeating this step for
  function calls involving the same permgroup, a precomputed stabilizer
  chain can be supplied as a third argument. For a description of the
  stabilizer chain format, see coxeter[stab_chain].

EXAMPLES:
  pg:=permgroup(8, {s1=[[6,7]], s2=[[7,8]]});
  sc:=stab_chain(pg);
  perm2word([[6,8,7]],pg,sc);                 yields       [1,2]
  perm2word([[6,7,8]],pg,sc);                 yields       [2,1]
  pg:=perm_rep(H3); pi:=multperm([3,2,1,2,3],pg);
  perm2word(pi,pg);                           yields    [3,2,1,2,3]
 
SEE ALSO:  multperm, perm_rep, stab_chain, group[permgroup]

 
FUNCTION:  perm_rep - permutation representation of a Coxeter group
 
CALLING SEQUENCE:  perm_rep(R);    perm_rep(R,'gap');
                   perm_rep(J,R);  perm_rep(J,R,'gap');
 
PARAMETERS:  R = a root system data structure
             J = a list or set of integers in the range 1..n (n = rank(R))

SYNOPSIS:
  perm_rep(R) returns the permutation representation of W(R) on cosets
  of the parabolic subgroup generated by all but the last of the simple
  reflections, where "last" is determined by the ordering of base(R).
  This representation is faithful if and only if R is irreducible.

  More generally, if J is any list or set of distinct integers in the range
  from 1 to n (where n = rank(R)), then perm_rep(J,R) returns the
  permutation representation of W(R) on cosets of the parabolic subgroup
  generated by the simple reflections indexed by J.

  The output is expressed as a "permgroup" (see group[permgroup]). More
  specifically, the result returned is an unevaluated procedure call
                permgroup(m, {s1=<perm1>, s2=<perm2>,...})
  where m is the degree of the permutation representation, and the
  expression <perm_i> is a permutation of the integers 1,...,m in disjoint
  cycle format that describes the action of the i-th simple reflection.
  For a description of disjoint cycle format, see group[permgroup].

  If the last argument is the name 'gap', then the output is a sequence of
  commands that define the permutation group in the GAP language. For more
  information about GAP, see <http://www.ccs.neu.edu/mirrors/GAP/NEU/>.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  perm_rep(B3);            yields  
                permgroup(6,{s1=[[3,4]],s2=[[2,3],[4,5]],s3=[[1,2],[5,6]]})
  perm_rep({1,3},A3);      yields
          permgroup(6,{s1=[[2,3],[4,5]],s2=[[1,2],[5,6]],s3=[[2,4],[3,5]]})
  # a non-faithful permrep
  perm_rep(A3*G2);         yields       permgroup(6,{s1=[],s2=[],s3=[],
                                  s4=[[2,3],[4,5]],s5=[[1,2],[3,4],[5,6]]})
  # a faithful permrep
  pg:=perm_rep({1,2,4},A3*G2); with(group,grouporder);
  grouporder(pg);          yields                      288
 
SEE ALSO:  base, multperm, perm2word, perm_char, presentation, stab_chain,
           structure, group[permgroup], group[permrep]

 
FUNCTION:  pos_roots - positive roots of a root system
 
CALLING SEQUENCE:  pos_roots(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  pos_roots(R) returns the list of all positive roots in the root system
  specified by R. A root is positive if it is in the nonnegative linear
  span of the simple roots.

  If any floating-point coordinates occur in base(R), then the result is
  only approximate in the sense that roots r1 and r2 whose L^1 distance
  is at most epsilon ( = 0.001, by default) are considered to be equal.

  To adjust epsilon, assign a new value to `coxeter/default`[epsilon].

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  pos_roots(B2);                      yields     [e1, e2-e1, e2, e2+e1]
  r:=highest_root(B2); S:=base(B2);
  S:=[S[1],-r]; pos_roots(S);         yields    [e1, -e2-e1, -e2, e1-e2]
 
SEE ALSO:  base, highest_root, num_refl, orbit, structure, weyl[rho]

 
FUNCTION:  presentation - generators and relations for a Coxeter group
 
CALLING SEQUENCE:  presentation(R);
                   presentation(R,'gap');
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  presentation(R) returns the Coxeter presentation of W(R). The output is
  a "grelgroup" (see group[grelgroup]). More specifically, the result
  returned is an unevaluated procedure call
               grelgroup({s1,s2,...}, {<rel1>, <rel2>,...})
  where s1,s2,... are names for the simple reflections, and each expression
  <rel_i> is a relation (i.e., a sequence of generators and inverses of
  generators whose product in W(R) is the identity element).

  If 'gap' is specified as a second argument, then a sequence of commands
  that specify the Coxeter presentation of W(R) in the GAP language is
  output via lprint(). These commands may be pasted into a GAP session.
  For more on GAP, see <http://www.ccs.neu.edu/mirrors/GAP/NEU/>.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  presentation(A2);                     yields  
                   grelgroup({s1,s2},{[s1,s1],[s2,s2],[s1,s2,s1,s2,s1,s2]})
  #Is W(H3) generated by s1 and s2*s3 ?
  g:=presentation(H3); with(group,cosets);
  sg:=subgrel({t1=[s1],t2=[s2,s3]},g);
  cosets(sg);                           yields         {[]}

SEE ALSO:  base, cox_matrix, perm_rep, structure, group[grelgroup]

 
FUNCTION:  rank - rank of a root system or Coxeter group
 
CALLING SEQUENCE:  rank(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  rank(R) returns the rank of the root system R; i.e., the dimension of the
  vector space spanned by the roots of R, or equivalently, the number of
  simple reflections in W(R).

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  rank(I2[7]);                           yields             2
  rank(A3^2*B3*D10);                     yields             19
  m:=cartan_matrix(C4); rank(m);         yields             4
 
SEE ALSO:  base, diagram, structure

 
FUNCTION:  reduce - find a reduced expression for a group element
 
CALLING SEQUENCE:  reduce(w,R);
                   reduce(w,R,'subword');
 
PARAMETERS:  R = a root system data structure
             w = a list of integers representing a member of W(R)

SYNOPSIS:
  If R is a root system of rank n, members of the Coxeter group W(R) are
  represented as lists of integers in the range 1..n. The group element
  corresponding to w = [i_1,...,i_l] is the product of the generators
  indexed by i_1,...,i_l. The indexing follows base(R).

  reduce(w,R) returns a reduced expression for w; i.e., a minimum-length
  representation of w. Among all reduced expressions for w, the one
  returned is the first in lexicographic order. In particular, two
  sequences w1 and w2 represent the same element of W(R) if and only if
                      reduce(w1,R) = reduce(w2,R).

  If a third argument is present, the result returned is a reduced subword;
  i.e., a reduced expression that can be obtained as a SUBSEQUENCE of w.
  The algorithm for finding reduced subwords is based on the exchange
  property, and has a running time that is quadratic in the length of w.
  The default algorithm is linear with respect to length.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  reduce([1,2,3,1,2,3],A3);              yields        [2,1,3,2]
  reduce([1,2,3,1,2,3],A3,'subword');    yields        [2,3,1,2]
 
SEE ALSO:  base, structure, vec2fc

 
FUNCTION:  reflect - apply reflections to a vector
 
CALLING SEQUENCE:  reflect(r,v);
                   reflect(r1,r2,...,v);
 
PARAMETERS:  r,r1,r2,...,v = linear combinations of e1,e2,...

SYNOPSIS:
  A "vector" (distinct from the vector data structure used by Maple) is a
  linear combination of the standard orthonormal basis e1,e2,e3,..., with
  coefficients that are rational or floating-point.

  If r and v are vectors then reflect(r,v) will return the vector obtained
  by reflecting v across the hyperplane orthogonal to r.

  Although r is required to have coefficients that are rational or
  floating-point, this requirement is not necessary for v. All that is
  required for v is that the function calls coeff(v,e1), coeff(v,e2),...
  return valid answers. 

  In the second form, if r1,r2,... is a sequence of zero or more vectors,
  then reflect(r1,r2,...,v) returns the result of successively reflecting
  v across the hyperplanes ...,r2,r1, in that order. In particular,
  reflect(r1,r2,v) is equivalent to reflect(r1,reflect(r2,v)).

EXAMPLES:
  reflect(e1+e2, e1+2*e2);              yields         -2*e1-e2
  v:=reflect(e1+e2, a*e1+b*e2);
  collect(v,{e1,e2});                   yields        -b*e1-a*e2
  w0:=longest_elt(B4); S:=base(B4); v:=interior_pt(B4);
  reflect(seq(S[i],i=w0),v);            yields    -e1-2*e2-3*e3-4*e4
 
SEE ALSO:  interior_pt, iprod, orbit, vec2fc


FUNCTION:  restrict - restrict characters to reflection subgroups

CALLING SEQUENCE:  restrict(f,J,R);
                   restrict(f,S0,R);
 
PARAMETERS:  R = a root system data structure
             f = a list representing a class function on W(R)
             J = a list of integers in the range 1..n, where n=rank(R)
            S0 = a list of simple roots for a root subsystem of R

SYNOPSIS:
  A character or class function on W(R) is represented as a list of values
  [a_1,...,a_l], where a_i is the function value on an element in the i-th
  conjugacy class. A consistent ordering of the conjugacy classes is used
  by each of the functions class_rep, class_size, cprod, induce, irr_chars,
  perm_char, and restrict. In particular, the value at the identity element
  (the degree, in the case of characters) is always listed first.

  If S0 is a list of simple roots for some (not necessarily parabolic)
  root subsystem R' of R, and f is a list of values for some class function
  on W(R), then restrict(f,SO,R) returns the class function obtained by
  restricting f to W(R').

  Similarly, if J is a sublist of [1,...,n] (where n = rank(R)), then
  restrict(f,J,R) returns the restriction of f to W(R'), where R' denotes
  the parabolic subsystem of R whose base is obtained by selecting the
  members of base(R) in positions indexed by J.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  f:=[$1..nops(class_rep(C3))];
  restrict(f,[1,2],C3);                    yields        [1,4,2,6,7]
  S:=base(C3); r:=highest_root(C3);
  restrict(f,[S[1],S[2],-r],C3);           yields   [1,4,4,6,2,5,6,8,7,9]

SEE ALSO:  base, class_rep, class_size, cprod, induce, irr_chars, rank,
           perm_char, perm_rep, structure

 
FUNCTION:  root_coords - coordinates of a vector w.r.t. simple roots
 
CALLING SEQUENCE:  root_coords(v,R);
 
PARAMETERS:  R = a root system data structure
             v = a linear combination of e1,e2,...

SYNOPSIS:
  A "vector" (distinct from the vector data structure used by Maple) is a
  linear combination of the standard orthonormal basis e1,e2,e3,..., with
  coefficients that are rational or floating-point.

  If v is a vector in the span of base(R), root_coords(v,R) returns
  the list of coordinates of v relative to the simple roots in base(R).

  More generally, the second argument can be any list of independent vectors
  and v can be any linear combination of e1,e2,... in their span, provided
  that the function calls coeff(v,e1),coeff(v,e2),... return valid answers.
  That is, the coefficients of v need not be rational or floating-point.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  root_coords(highest_root(G2),G2);      yields              [3,2]
  root_coords(a*e1+b*e2+c*e3,B3);        yields         [a+b+c, b+c, c]
  rc:=root_coords(2*e2,H3);
  evalf(rc,3);                           yields       [2.62, 3.24, 1.62]
 
SEE ALSO:  base, structure, weyl[weight_coords]

 
FUNCTION:  size - size of a Coxeter group
 
CALLING SEQUENCE:  size(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  size(R) computes the size of the Coxeter group W(R) by evaluating the
  product of the degrees of the basic polynomial invariants of W(R).

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  size(E8);                       yields              696729600
 
SEE ALSO:  degrees, length_gf, orbit_size, structure

 
FUNCTION:  stab_chain - stabilizer chain for a Coxeter group
 
CALLING SEQUENCE:  stab_chain(pg);
 
PARAMETERS:  pg = a permutation representation of a Coxeter group

SYNOPSIS:
  For a finite permutation group W, a stabilizer chain is a sequence of
  subgroups  W = W_0 > W_1 > W_2 > ... > W_m = {1} with the property that
  W_i is the subgroup of W_(i-1) that stabilizes some point b_i. Given a
  set of (right) coset representatives X_i for W_i\W_{i-1}, each element
  of W can be factored uniquely in the form w_m * ... * w_2 * w_1 with
  w_i in X_i. (By convention, permutations act on the right.)

  Let pg be a permutation representation of a Coxeter group W acting on 
  cosets of a (proper) parabolic subgroup, in the format produced by the
  function perm_rep. That is, pg should be an unevaluated procedure call
  of the form
               permgroup(n, {s1=<perm1>, s2=<perm2>,...}),
  where each expression <perm_i> is a permutation of 1,...,n in disjoint
  cycle format. For a description of this format, see group[permgroup].

  stab_chain(pg) computes a stabilizer chain for pg with the property that
  each point-stabilizer in the chain is a parabolic subgroup. The output
  format is a list [[b_1,O_1,X_1],[b_2,O_2,X_2],...], where b_1,b_2,... are
  base points as above, O_1 is the list of points in the W-orbit of b_1,
  and X_1 is the corresponding list of minimum-length coset representatives
  for W modulo the stabilizer W_1 of b_1. More precisely, the j-th member
  of X_1 is a word of minimum length such that the corresponding product
  in W is a permutation sending b_1 to the j-th member of O_1. Similarly,
  O_2 is the list of points in the W_1-orbit of b_2, and X_2 is the list
  of minimum-length coset representatives for W_1 modulo the stabilizer W_2
  of b_2 in W_1, and so on.

EXAMPLES:
  pg:=perm_rep(B3); sc:=stab_chain(pg);
  sc[1];            yields                 [1, [1,2,3,4,5,6],
                            [[],[3],[3,2],[3,2,1],[3,2,1,2],[3,2,1,2,3]]]
  sc[2];            yields     [2, [2,3,4,5], [[],[2],[2,1],[2,1,2]]]
  sc[3];            yields              [3, [3,4], [[],[1]]]
 
SEE ALSO:  multperm, perm2word, perm_rep, group[permgroup]


HELP FOR:  root system data structures

SYNOPSIS:
  A root system data structure is any one of the following: a name, a list
  of simple roots (i.e., a base), a Cartan matrix, or a Coxeter matrix.

  Names:
  The irreducible crystallographic root systems are named A1,A2,...,
  B2,B3,..., C3,C4,..., D4,D5,..., E6,E7,E8,F4,G2. The irreducible 
  non-crystallographic root systems are named I2[4],I2[5],...., H3,H4.

  A reducible root system name is obtained by forming a monomial out of
  the names of the irreducible root systems. For example, a root system
  consisting of the orthogonal direct sum of two copies of A2 and one
  copy of D4 would be named A2^2*D4.

  For convenience, B1,C1,C2,D2,D3,E3,E4,E5,I2[2],I2[3] are also allowed
  as names of root systems, even though they are isomorphic to others
  previously named.  Also, the integer 1 is allowed as the name of the
  empty root system.

  Bases:
  A root system can also be specified by a list of simple roots; i.e.,
  a base. The names e1,e2,e3,... are reserved as an orthonormal basis for
  the space containing the root system, and a root is a linear combination
  of these basis vectors. For example, the list [e2-e1,e3-e2] is a base
  for the root system A2. In a crystallographic root system, the
  coefficients must be rational, but in a non-crystallographic root system,
  the coefficients can be rational or floating-point (or a mix of the two).

  Cartan matrices:
  A crystallographic root system can also be specified by a Cartan matrix.
  If [r_1,....,r_n] is a list of simple roots, then the corresponding 
  Cartan matrix is the n x n integer matrix whose (i,j)-entry is
  2*iprod(r_i,r_j)/iprod(r_j,r_j). Since Maple does not support 0 x 0
  matrices, the empty list [] is used as the Cartan matrix of the empty
  root system.

  Coxeter matrices:
  A root system can also be (imperfectly) specified by a Coxeter matrix.
  If s_1,...,s_n are the reflections corresponding to the simple roots of
  a root system, then the associated Coxeter matrix is the n x n matrix
  whose (i,j) entry is the order of s_i * s_j. (The Coxeter "matrix" of
  the empty root system is the empty list [].) This matrix completely
  specifies the Coxeter group generated by s_1,...,s_n, but non-isomorphic
  root systems can have the same Coxeter matrix. In circumstances where
  this distinction matters, a root system (crystallographic, if possible)
  with this Coxeter matrix will be chosen by the function called.

EXAMPLE:
  The root system A3 can be specified in any of the following four ways:
  A3                                    # by name
  [e2-e1,e3-e2,e1+e2]                   # a list of simple roots
  array([[2,-1,0],[-1,2,-1],[0,-1,2]])  # a Cartan matrix
  array([[1,3,2],[3,1,3],[2,3,1]])      # a Coxeter matrix

SEE ALSO:  base, cartan_matrix, cox_matrix, name_of

 
FUNCTION:  vec2fc - map a vector to the fundamental chamber by reflections
 
CALLING SEQUENCE:  vec2fc(v,R);
                   vec2fc(v,R,'w');
 
PARAMETERS:  R = a root system data structure
             v = a linear combination of e1,e2,...
             w = (optional) a name

SYNOPSIS:
  A "vector" (distinct from the vector data structure used by Maple) is a
  linear combination of the standard orthonormal basis e1,e2,e3,..., with
  coefficients that are rational or floating-point. A vector v is dominant
  relative to a set of simple roots S if it belongs to the closure of the
  fundamental chamber defined by S; i.e., iprod(r,v) >= 0 for all r in S.

  If v is a vector, vec2fc(v,R) returns the unique dominant vector (relative
  to base(R)) that can be reached from v by a series of reflections.
  
  If there is a third argument, it will be assigned the list of indices of
  the simple reflections that were used to bring v into the fundamental
  chamber. The list is ordered so that the first item in the list indexes
  the first reflection applied to v. Therefore if S = base(R) and u is
  the result returned by the function call  vec2fc(v,R,'w'), then
  v = reflect(seq(S[i],i=w),u).

  Among all the possible sequences of simple reflections that send v to u,
  the one assigned to the third argument has minimum length, and is first
  in lexicographic order among all such minimum-length expressions.

  WARNING: If any floating-point coordinates occur in v or base(R), then
  the result is only approximate in the sense that a vector u is considered
  to be on the negative side of the hyperplane orthogonal to r if and only
  if iprod(r,u) < -epsilon ( = -0.001, by default).

  To adjust epsilon, assign a new value to `coxeter/default`[epsilon].

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  vec2fc(-e1+2*e2,D4);             yields          2*e4+e3
  S:=base(F4);
  vec2fc(-S[2],S,'w'),w;           yields   e4, [2,1,3,2,4,3,2,1]
 
SEE ALSO:  base, interior_pt, iprod, orbit, rank, reflect, structure

 
FUNCTION:  branch - restrict representations to reductive subalgebras
 
CALLING SEQUENCE:  branch(v,J,R);
                   branch(v,J,R,<option>);
 
PARAMETERS:  R = a crystallographic root system data structure
             v = a dominant integral weight (linear combin. of e1,e2,...)
             J = a list or set of integers in the range 1..n (n = rank(R))
      <option> = one of the names 'klimyk' or 'mchain'

SYNOPSIS:
  In a crystallographic root system R, weights are represented as rational
  linear combinations of the standard orthonormal basis e1,e2,... A weight
  v is integral if it is in the integer span of the fundamental weights
  (i.e., weight_coords(v,R) is integral), and it is dominant if it is in
  the nonnegative span of the fundamental weights. The irreducible finite-
  dimensional representations ("irreps") of LieAlg(R) are indexed by
  dominant integral weights.

  If v is a dominant integral weight and J is a list or set of distinct
  integers in the range 1..n (where n = rank(R)), branch(v,J,R) computes
  the irreducible multiplicities that occur when the irrep indexed by v is
  restricted to the (reductive) subalgebra of LieAlg(R) generated by a
  Cartan subalgebra of LieAlg(R) and the root subspaces corresponding to
  the simple roots indexed by J. The output is expressed as a linear
  combination of the form m1*X[w1] + m2*X[w2] + ... , where w1,w2,... are
  the weight coordinates of the highest weights of the irreducible summands
  that occur, and m1,m2,... are their multiplicities.

  Note that the highest weights of the irreducible summands that occur will
  be dominant relative to the parabolic subsystem indexed by J, but not
  necessarily dominant relative to J, so the terms X[..] that appear may
  have negative coordinates in the positions not indexed by J.

  In the extreme case J={}, computing branch(v,J,R) amounts to restricting
  the irrep indexed by v to a Cartan subalgebra, and the coefficients in
  the expansion are weight multiplicities. This is similar to computing
  weight_mults(v,R), except that the latter uses a faster algorithm and
  expresses the result in a compact form involving only dominant weights.

  An optional fourth argument may be used to specify one of two available
  algorithms for computing branching multiplicities:

  'klimyk' (the default)
    This algorithm is based on the Brauer-Klimyk Rule, and entails an
    efficient search through the set of distinct weights that occur in the
    irrep indexed by v. It has negligible space requirements, and is most
    effective in the classical cases (types A-B-C-D) and in low rank.
    The running time is nearly independent of J, and is largely a function
    of the size of the search space; i.e., the sum of the terms in
    map(orbit_size,weight_sys(v,R),R).
     
  'mchain'   
    The Minuscule Chain algorithm entails an efficient search through the
    crystal graph for the irrep indexed by v. The graph is embedded in a
    product of minuscule or quasi-minuscule graphs (a "minuscule chain").
    The algorithm has minimal space requirements, and the running time is
    bounded by a factor proportional to the sum of the multiplicities in
    the output. However, the proportion can vary drastically according to
    how well the algorithm prunes the search tree.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  w:=weights(F4);
  branch(w[1],{1,2,3},F4);          yields
                                     X[1,0,0,0] + X[0,1,0,-1] + X[1,0,0,-1]
  w:=weights(A3); v:=2*w[1]+w[3];
  branch(v,[2,3],A3,'mchain');      yields
         X[2,0,1] + X[-2,2,1] + X[-1,1,0] + X[-3,2,0] + X[0,1,1] + X[1,0,0]
 
SEE ALSO:  tensor, weight_mults, weights, coxeter[structure]

 
FUNCTION:  minuscule - list minuscule and quasi-minuscule weights
 
CALLING SEQUENCE:  minuscule(R);
                   minuscule(R,'quasi');
 
PARAMETERS:  R = a crystallographic root system data structure

SYNOPSIS:
  In a crystallographic root system R, weights are represented as rational
  linear combinations of the standard orthonormal basis e1,e2,... A weight
  v is integral if it is in the integer span of the fundamental weights
  (i.e., weight_coords(v,R) is integral), and it is dominant if it is in
  the nonnegative span of the fundamental weights.

  A nonzero integral weight v is minuscule if and only if iprod(cr,v) <= 1
  for all roots r, where cr = 2*r/iprod(r,r) denotes the co-root
  corresponding to r. If R is irreducible, then v is quasi-minuscule if and
  only if v satisfies iprod(cr,v) <= 2 for all co-roots cr and equality
  occurs for some (unique) co-root cr. Alternatively, the short dominant
  root is the unique dominant quasi-minuscule weight.

  minuscule(R) returns the list of minuscule fundamental weights for R.
  Note that if R is reducible, then there may be additional dominant
  minuscule weights that are not fundamental weights.

  minuscule(R,'quasi') returns the list of fundamental minuscule weights
  for R, followed by the dominant quasi-minuscule weights for each
  irreducible component of R.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  minuscule(C4);                    yields             [e4]
  minuscule(C4,'quasi');            yields          [e4, e3+e4]
  minuscule(F4*G2);                 yields              []
  minuscule(F4*G2,'quasi');         yields          [e4, e7-e5]
 
SEE ALSO:  weights, weight_coords, coxeter[pos_roots], coxeter[structure]

 
FUNCTION:  rho - half the sum of the positive roots
           co_rho - half the sum of the positive co-roots
 
CALLING SEQUENCE:  rho(R);
                   co_rho(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  rho(R) returns half the sum of the positive roots of the root system R,
  or equivalently, the sum of the fundamental weights of R.

  co_rho(R) returns half the sum of the positive co-roots, or equivalently,
  the unique vector v in the span of base(R) such that iprod(r,v)=1 for
  each simple root r.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  rho(C3);                      yields              e1+2*e2+3*e3
  2*co_rho(C3);                 yields              e1+3*e2+5*e3
 
SEE ALSO:  weights, coxeter[base], coxeter[pos_roots], coxeter[structure]

 
FUNCTION:  tensor - decompose tensor products of representations
 
CALLING SEQUENCE:  tensor(u,v,R);
                   tensor(u,v,R,<option>);
 
PARAMETERS:  R  = a crystallographic root system data structure
            u,v = dominant integral weights (linear combins. of e1,e2,...)
       <option> = one of the names 'klimyk', 'mchain', or 'qtensor'

SYNOPSIS:
  In a crystallographic root system R, weights are represented as rational
  linear combinations of the standard orthonormal basis e1,e2,... A weight
  v is integral if it is in the integer span of the fundamental weights
  (i.e., weight_coords(v,R) is integral), and it is dominant if it is in
  the nonnegative span of the fundamental weights. The irreducible finite-
  dimensional representations ("irreps") of LieAlg(R) are indexed by
  dominant integral weights.

  If u and v are dominant integral weights, tensor(u,v,R) computes the
  multiplicities in the irreducible decomposition of the tensor product of
  the irreps indexed by u and v. The output is expressed as a linear
  combination of the form m1*X[w1] + m2*X[w2] + ... , where w1,w2,... are
  the weight coordinates of the dominant weights indexing the irreps that
  occur in the tensor product, and m1,m2,... are their multiplicities.

  An optional fourth argument may be used to specify one of three available
  algorithms for computing tensor product multiplicities:

  'klimyk' (the default)
    This algorithm is based on the Brauer-Klimyk Rule, and entails an
    efficient search through the set of distinct weights that occur in the
    irrep indexed by u. It has negligible space requirements, and is most
    effective in the classical cases (types A-B-C-D) and in low rank.
    The running time is nearly independent of v, and is largely a function
    of the size of the search space; i.e., the sum of the terms in
    map(orbit_size,weight_sys(u,R),R).
  
  'mchain'
    The Minuscule Chain algorithm entails an efficient search through the
    crystal graph for the irrep indexed by u. The graph is embedded in a
    product of minuscule or quasi-minuscule graphs (a "minuscule chain").
    The algorithm has minimal space requirements, and the running time is
    bounded by a factor proportional to the sum of the multiplicities in
    the output. However, the proportion can vary drastically according to
    how well the algorithm prunes the search tree. If the irrep indexed
    by v is significantly smaller than that of u, faster results will be
    obtained by interchanging u and v.

  'qtensor'
    This algorithm uses q-specializations and interpolation methods to
    compute tensor product multiplicities. It is most effective in the
    exceptional cases, especially E6, E7, and E8, and least effective
    in the type A cases. The main computational bottleneck amounts to
    generating and solving a linear system whose dimension is roughly the
    number of distinct irreducible constituents in the tensor product.
    In particular, the space requirements will grow with both u and v,
    and interchanging u and v will not affect the performance.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  w:=weights(G2);
  tensor(w[2],w[2],G2);                 yields
                                 X[0,2] + X[3,0] + X[0,1] + X[2,0] + X[0,0]
  w:=weights(A3); u:=2*w[1]; v:=w[1]+w[3];
  tensor(u,v,A3,'mchain');              yields
                                  X[3,0,1] + X[1,1,1] + X[2,0,0] + X[0,1,0]
  w:=weights(F4);
  tensor(w[1],w[4],F4,'qtensor');       yields
                                    X[1,0,0,1] + X[0,1,0,0] + X[1,0,0,0]
 
SEE ALSO:  branch, toM, toX, weight_mults, weights, coxeter[structure]

 
FUNCTION:  toM - convert polynomial expressions into orbit sums
           toX - convert polynomial expressions into Weyl character sums
 
CALLING SEQUENCE:  toM(f,R);
                   toX(f,R);
 
PARAMETERS:  R = a crystallographic root system data structure
             f = a polynomial expression in the character ring

SYNOPSIS:
  If R is a crystallographic root system, the ring of characters for the
  finite-dimensional representations of LieAlg(R) may be identified with
  the W(R)-invariant part of the group ring of the weight lattice.

  If v is a dominant integral weight whose fundamental weight coordinates
  are [a_1,...,a_n] (n = rank(R)), then the expression X[a_1,...,a_n]
  represents a Weyl character -- the element of the character ring
  corresponding to the irreducible representation indexed by v.

  Similarly, the expression M[a_1,...,a_n] represents an orbit sum -- the
  element of the character ring obtained by adding the distinct members
  of the W(R)-orbit of v.

  If f is any polynomial expression in the Weyl characters X[..] and orbit
  sums M[..], the function toX(f,R) converts f into a linear combination of
  Weyl characters X[..]. Similarly, the function toM(f,R) converts f into a
  linear combination of orbit sums M[..]. The underlying algorithms involve
  the Brauer-Klimyk Rule (see weyl[tensor]), and a similar rule for
  multiplying orbit sums.

  Every variable that is not an indexed name of the form M[..] or X[..] is
  regarded as part of the ground field, and the output is 'collect'ed with
  respect to the variables X[..] (for 'toX') or M[..] (for 'toM').

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  f:=X[2,0,0]*(a*X[0,1,0]+b*X[0,0,2]);
  toX(f,A3);                      yields
                      a*X[2,1,0] + b*X[2,0,2] + (a+b)*X[1,0,1] + b*X[0,0,0]
  toX(M[0,1,0,0],F4);             yields
                    X[0,1,0,0] - 2*X[0,0,0,1] - 3*X[1,0,0,0] + 5*X[0,0,0,0]
  toM(M[0,1,0]*X[1,0,0],C3);      yields
                            M[1,1,0] + 3*M[0,1,1] + 3*M[1,0,0] + 8*M[0,0,1]
  toM(M[1,0]*M[0,1],G2);          yields       M[1,1] + 2*M[2,0] + 2*M[1,0]
 
SEE ALSO:  tensor, weight_coords, weight_mults, coxeter[structure]

 
FUNCTION:  weight_coords - coords of a vector w.r.t. fundamental weights
 
CALLING SEQUENCE:  weight_coords(v,R);
 
PARAMETERS:  R = a root system data structure
             v = a linear combination of e1,e2,...

SYNOPSIS:
  A "vector" (distinct from the vector data structure used by Maple) is a
  linear combination of the standard orthonormal basis e1,e2,e3,..., with
  coefficients that are rational or floating-point.

  If v is a vector in the span of base(R), weight_coords(v,R) returns the
  list of coordinates of v relative to the fundamental weights (weights(R)).

  More generally, v can be any linear combination of e1,e2,..., provided
  that the function calls coeff(v,e1),coeff(v,e2),... return valid answers.
  That is, the coefficients of v need not be rational or floating-point.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  weight_coords(rho(F4),F4);             yields           [1,1,1,1]
  weight_coords(a*e1+b*e2+c*e3,B3);      yields       [2*a, -a+b, -b+c]
 
SEE ALSO:  weights, coxeter[root_coords], coxeter[structure]

 
FUNCTION:  weight_sys - dominant weights below a given dominant weight
 
CALLING SEQUENCE:  weight_sys(v,R);
                   weight_sys(v,R,'wc');
 
PARAMETERS:  R = a crystallographic root system data structure
             v = a dominant integral weight (linear combin. of e1,e2,...)
            wc = (optional) a name

SYNOPSIS:
  In a crystallographic root system R, weights are represented as rational
  linear combinations of the standard orthonormal basis e1,e2,... A weight
  v is integral if it is in the integer span of the fundamental weights
  (i.e., weight_coords(v,R) is integral), and it is dominant if it is in
  the nonnegative span of the fundamental weights. The irreducible finite-
  dimensional representations ("irreps") of LieAlg(R) are indexed by
  dominant integral weights.

  If v is a dominant integral weight, weight_sys(v,R) returns the list of
  all dominant integral weights that are less than or equal to v in the
  partial ordering for which v1 < v2 whenever v2-v1 is an integral sum of
  positive roots. These are the dominant weights that occur with nonzero
  multiplicity in the irrep of LieAlg(R) indexed by v.

  The output is sorted in order of decreasing height (the height of u is
  defined to be iprod(u,co_rho(R)). In particular, the first listed weight
  will be v, and the last weight will be minuscule or 0.

  If a third argument is present, it is assigned a list consisting of 
  weight_coords(u,R) for each weight u appearing in weight_sys(v,R).

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  w:=weights(C3); v:=w[1]+w[3];
  weight_sys(v,C3);               yields    [e1+e2+2*e3, 2*e3, e2+e3, 0]
  w:=weights(G2); v:=3*w[1];
  weight_sys(v,G2,'wc'): wc;      yields
                                      [[3,0],[1,1],[2,0],[0,1],[1,0],[0,0]]
 
SEE ALSO:  minuscule, weight_coords, weight_mults, weights, weyl_dim,
           coxeter[pos_roots], coxeter[structure]

 
FUNCTION:  weight_mults - weight multiplicities in representations
 
CALLING SEQUENCE:  weight_mults(v,R);
                   weight_mults(v,u,R);
 
PARAMETERS:  R  = a crystallographic root system data structure
            u,v = dominant integral weights (linear combins. of e1,e2,...)

SYNOPSIS:
  In a crystallographic root system R, weights are represented as rational
  linear combinations of the standard orthonormal basis e1,e2,... A weight
  v is integral if it is in the integer span of the fundamental weights
  (i.e., weight_coords(v,R) is integral), and it is dominant if it is in
  the nonnegative span of the fundamental weights. The irreducible finite-
  dimensional representations ("irreps") of LieAlg(R) are indexed by
  dominant integral weights.

  If v is a dominant integral weight, weight_mults(v,R) computes the
  dimensions of the weight spaces in the irrep indexed by v. The output is
  expressed as a linear combination of the form c1*M[w1] + c2*M[w2] + ...,
  where w1,w2,... are the weight coordinates of the dominant weights that
  occur in the representation (see weyl[weight_sys]), and c1,c2,... are
  their multiplicities. This may also be viewed as a formal expansion in
  the character ring for LieAlg(R) in which each term M[..] represents an
  orbit sum (see weyl[toM]).

  In the second form, if u is an integral weight (possibly not dominant),
  weight_mults(v,u,R) computes the multiplicity of the weight u in the
  irrep indexed by v.

  The algorithm used is essentially the same as the one given by Moody and
  Patera (Bull. Amer. Math. Soc. 7 (1982), 237--242), which in turn is
  based on Freudenthal's algorithm. 

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  w:=weights(C3); v:=w[1]+w[3];
  weight_mults(v,C3);               yields
                              M[1,0,1] + M[0,0,2] + 3*M[0,1,0] + 4*M[0,0,0]
  u:=e1+e3;
  weight_mults(v,u,C3);             yields                3
  weight_coords(u,C3);              yields             [1,-1,1]
 
SEE ALSO:  tensor, toM, weight_sys, weights, weyl_dim, coxeter[structure]

 
FUNCTION:  weights - fundamental weights for a root system
 
CALLING SEQUENCE:  weights(R);
 
PARAMETERS:  R = a root system data structure

SYNOPSIS:
  weights(R) returns the list of fundamental weights for R.

  If cr_1,...,cr_n are the simple co-roots for R, then the i-th fundamental
  weight is the unique vector v_i in the span of base(R) such that

                  iprod(v_i,cr_j) = Kronecker_Delta(i,j).

  If r is a root, then cr = 2*r/iprod(r,r) is the corresponding co-root.

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  weights([2*e1,2*(e2-e1)]);    yields              [e1+e2, 2*e2]
  weights(G2);                  yields           [-e1+e3,-e2-e1+2*e3]
 
SEE ALSO:  rho, weight_coords, coxeter[co_base], coxeter[iprod],
           coxeter[structure]

 
FUNCTION:  weyl_dim - dimension of an irreducible representation
 
CALLING SEQUENCE:  weyl_dim(v,R);
                   weyl_dim(v,R,q);
 
PARAMETERS:  R = a crystallographic root system data structure
             v = a dominant integral weight (linear combin. of e1,e2,...)
             q = (optional) a variable or expression

SYNOPSIS:
  In a crystallographic root system R, weights are represented as rational
  linear combinations of the standard orthonormal basis e1,e2,... A weight
  v is integral if it is in the integer span of the fundamental weights
  (i.e., weight_coords(v,R) is integral), and it is dominant if it is in
  the nonnegative span of the fundamental weights. The irreducible finite-
  dimensional representations ("irreps") of LieAlg(R) are indexed by
  dominant integral weights.

  If v is a weight vector (not necessarily  dominant or integral),
  weyl_dim(v,R) returns the Weyl product

                                iprod(r,v+rho(R))
                           prod -----------------,
                            r    iprod(r,rho(R))

  where r ranges over pos_roots(R). If v is dominant integral, this is
  the dimension of the irrep of LieAlg(R) indexed by v.

  If a third argument q is present, then the result is a "q-analogue" of
  the Weyl dimension formula; namely,

           -iprod(co_rho(R),v)        1-q^iprod(cr,v+rho(R))
          q                    * prod ----------------------,
                                  r    1-q^iprod(cr,rho(R))  

  where cr = 2*r/iprod(r,r) denotes the co-root corresponding to r. This
  may be viewed as a formal substitution of q^co_rho(R) into the character
  of the representation indexed by v. As a formal series in q^(1/2), the
  coefficients represent weight multiplicities for the principal embedding
  of sl(2) in LieAlg(R).

  For a description of root system data structures, see coxeter[structure].

EXAMPLES:
  weyl_dim(weights(F4)[2],F4);    yields                273
  w:=weights(C2); v:=expand(a*w[1]+b*w[2]);
  normal(weyl_dim(v,C2));         yields  1/6*(1+a)*(1+b)*(2+a+b)*(3+2*a+b)
  weyl_dim(2*e2+e1,B2,q);         yields   q^(-5)*(1-q^7)*(1-q^5)/(1-q)^2
 
SEE ALSO:  co_rho, rho, weight_coords, weights, coxeter[base],
           coxeter[iprod], coxeter[pos_roots], coxeter[structure]

© 2004 John R. Stembridge