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

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