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

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