`coxeter/text/length_gf` := TEXT(`    `,
`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`):

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