`posets/text/autgroup` := TEXT(
`   `,
`FUNCTION:  autgroup - automorphism group of a poset (or directed graph)`,
` `,
`CALLING SEQUENCE:  autgroup(P,<options>);`,
`                   autgroup(P,X,<options>);`,
`                   autgroup(P,n,<options>);`,
` `,
`PARAMETERS:  P     = a poset (or directed graph)`,
`             X     = a set (the vertex set)`,
`             n     = a positive integer (the number of vertices)`,
`         <options> = 'permgroup' or 'gap'`,
`   `,
`SYNOPSIS:`,
`  An automorphism of a poset P with vertex set X is a bijection x -> x'`,
`  from X to X such that x < y in P if and only if x' < y' in P.`,
`   `,
`  autgroup(P,X) returns a list of generators of the automorphism group`,
`  of P. Each automorphism is expressed as a set of equations of the form`,
`  {x_1=y_1, x_2=y_2,...}, meaning that x_1 -> y_1, x_2 -> y_2,... is an`,
`  automorphism.`,
`   `,
`  autgroup(P,n) does the same, if the vertex set of P is {1,...,n}.`,
`  autgroup(P) does the same, assuming there are no isolated vertices.`,
`   `,
`  If the last argument is 'permgroup' and the vertex set is {1,...,n},`,
`  then the output is expressed as a "permgroup" (see group[permgroup]).`,
`  More explicitly, the result is an unevaluated procedure call`,
`   `,
`    permgroup(n, {<perm1>, <perm2>,...}),`,
`   `,
`  where the terms <perm_i> are generators of the automorphism group of P,`,
`  expressed as permutations in disjoint cycle format. For a description`,
`  of this format, see group[permgroup].`,
`   `,
`  If the last argument is 'gap' and the vertex set is {1,...,n}, then a`,
`  sequence of commands that defines the automorphism group of P in the`,
`  GAP language is output via printf. These commands may be pasted into a`,
`  GAP session. For more on GAP, see <http://www-gap.dcs.st-and.ac.uk/>.`,
`   `,
`  More generally, P may be the edge set of any directed graph without`,
`  multiple edges.`,
` `,
`EXAMPLES:`,
`  P:=({},3) &+ ({},2);`,
`  autgroup(P,6);                  yields   [{2=3,3=2},{1=2,2=1},{5=4,4=5}]`,
`  P:=J({},3);`,
`  G:=autgroup(P,'permgroup');     yields`,
`                                permgroup(8,{[[2,3],[6,7]],[[3,5],[4,6]]})`,
`  group[grouporder](G);           yields                   6`,
` `,
`SEE ALSO:  canon, isom, group[permgroup]`,
NULL):

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