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

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