`coxeter/text/stab_chain` := TEXT(`    `,
`FUNCTION:  stab_chain - stabilizer chain for a Coxeter group`,`    `,
`CALLING SEQUENCE:  stab_chain(pg);`,`    `,
`PARAMETERS:  pg = a permutation representation of a Coxeter group`,`   `,
`SYNOPSIS:   `,
`  For a finite permutation group W, a stabilizer chain is a sequence of`,
`  subgroups  W = W_0 > W_1 > W_2 > ... > W_m = {1} with the property that`,
`  W_i is the subgroup of W_(i-1) that stabilizes some point b_i. Given a`,
`  set of (right) coset representatives X_i for W_i\\W_{i-1}, each element`,
`  of W can be factored uniquely in the form w_m * ... * w_2 * w_1 with`,
`  w_i in X_i. (By convention, permutations act on the right.)`,`   `,
`  Let pg be a permutation representation of a Coxeter group W acting on `,
`  cosets of a (proper) parabolic subgroup, in the format produced by the`,
`  function perm_rep. That is, pg should be an unevaluated procedure call`,
`  of the form`,`               permgroup(n, {s1=<perm1>, s2=<perm2>,...}),`,
`  where each expression <perm_i> is a permutation of 1,...,n in disjoint`,
`  cycle format. For a description of this format, see group[permgroup].`,`   `
,`  stab_chain(pg) computes a stabilizer chain for pg with the property that`,
`  each point-stabilizer in the chain is a parabolic subgroup. The output`,
`  format is a list [[b_1,O_1,X_1],[b_2,O_2,X_2],...], where b_1,b_2,... are`,
`  base points as above, O_1 is the list of points in the W-orbit of b_1,`,
`  and X_1 is the corresponding list of minimum-length coset representatives`,
`  for W modulo the stabilizer W_1 of b_1. More precisely, the j-th member`,
`  of X_1 is a word of minimum length such that the corresponding product`,
`  in W is a permutation sending b_1 to the j-th member of O_1. Similarly,`,
`  O_2 is the list of points in the W_1-orbit of b_2, and X_2 is the list`,
`  of minimum-length coset representatives for W_1 modulo the stabilizer W_2`,
`  of b_2 in W_1, and so on.`,`   `,`EXAMPLES:   `,
`  pg:=perm_rep(B3); sc:=stab_chain(pg);`,
`  sc[1];            yields                 [1, [1,2,3,4,5,6],`,
`                            [[],[3],[3,2],[3,2,1],[3,2,1,2],[3,2,1,2,3]]]`,
`  sc[2];            yields     [2, [2,3,4,5], [[],[2],[2,1],[2,1,2]]]`,
`  sc[3];            yields              [3, [3,4], [[],[1]]]`,`    `,
`SEE ALSO:  multperm, perm2word, perm_rep, group[permgroup]`):

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