`posets/text/isom` := TEXT(
` `,
`FUNCTION:  isom - test posets (or directed graphs) for isomorphism`,
` `,
`CALLING SEQUENCE:  isom(S1,S2);`,
`                   isom(S1,S2,'f');`,
` `,
`PARAMETERS:  S1,S2 = poset structures (or directed graphs)`,
`               f   = a name (optional)`,
`   `,
`  A poset structure S is any one of the following:`,
`      P    where P is a poset--i.e., a set of covering relations`,
`    (P,X)  where P is a poset with vertex set X`,
`    (P,n)  where P is a poset with vertex set {1,2,...,n} `,
`   `,
`SYNOPSIS:`,
`  Two posets P and Q with vertex sets X and Y are isomorphic if there is`,
`  a bijection x -> x' from X to Y so that [x,y] is a relation in P if and`,
`  only if [x',y'] is a relation in Q.`,
`   `,
`  isom(P,X,Q,Y) returns true or false according to whether the posets P`,
`  and Q are isomorphic. More generally, P and Q may be edge sets of`,
`  arbitrary directed graphs without multiple edges. If the vertex set of`,
`  P (or Q) is {1,...,n}, then one may substitute n for X (or Y) in the`,
`  argument list. If P (or Q) has no isolated vertices, then X (or Y) may`,
`  be omitted.`,
`   `,
`  isom(P,X,Q,Y,'f') does the same, and additionally, if P and Q do turn`,
`  out to be isomorphic, assigns to f an isomorphism X -> Y. The isomorphism`,
`  is expressed as a set of equations {x_1=y_1, x_2=y_2, ...}, meaning that`,
`  x_1 -> y_1, x_2 -> y_2,... is an isomorphism. In particular, subs(f,P)=Q.`,
`   `,
`  The algorithm works by repeatedly refining ordered partitions of X`,
`  and Y so that P and Q are isomorphic only if there is an isomorphism`,
`  that respects the partitions. It terminates when the blocks of the`,
`  partitions are singletons. It is similar to the algorithm used in Nauty`,
`  (see <http://cs.anu.edu.au:80/people/bdm/nauty/>).`,
`   `,
`  Reference: B. McKay, Congressus Numerantium 30 (1981), 45--87.`,
`   `,
`EXAMPLES:`,
`  P:=chain(2) &* chain(3); Q:=chain(3) &* chain(2);`,
`  isom(P,Q);                    yields                 true`,
`  isom(P,Q,8);                  yields                 false`,
`  isom(P,7,Q,7,'f'): f;         yields     {1=1,2=4,3=2,5=3,4=5,6=6,7=7}`,
`  P:=J({[a,b],[a,c]});`,
`  isom(P,dual(P));              yields                 false`,
` `,
`SEE ALSO:  autgroup, canon, rm_isom`,
NULL):

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