`weyl/text/toM` := TEXT(`    `,
`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]`):

if `+`(0)=0 then # Maple V.4 or later
  print(INTERFACE_HELP(insert, topic=`weyl/toM`,
  helpfile=HomeLib, text=`weyl/text/toM`))
elif ceil(0)=0 then # Maple V.2 or V.3
  `help/weyl/text/toM`:=`weyl/text/toM`:
  save `help/weyl/text/toM`, cat(HomeLib,`/help/weyl/text/toM.m`);
fi:
