`posets/text/closure` := TEXT(
` `,
`FUNCTION:  closure - transitive closure of an acyclic digraph`,
` `,
`CALLING SEQUENCE:  closure(R);`,
`                   closure(R,X);`,
`                   closure(R,n);`,
` `,
`PARAMETERS:  R = an acyclic relation or digraph`,
`             X = a set (the vertex set)`,
`             n = a positive integer (the number of vertices)`,
`   `,
`SYNOPSIS:`,
`  If R is a set of ordered pairs [a,b] representing the edge set of an`,
`  acyclic digraph, then closure(R) returns the transitive closure of R;`,
`  i.e., the smallest set S containing R such that whenever [a,b] and`,
`  [b,c] belong to S, then so does [a,c].`,
`   `,
`  More generally, if R is the edge set of any digraph D, then closure(R)`,
`  returns the transitive closure of the acyclic subgraph of D induced by`,
`  the vertices that cannot reach a cycle of D via some directed path.`,
`   `,
`  closure(R,X) does the same, if the vertex set of R is X.`,
`  closure(R,n) does the same, if the vertex set of R is {1,...,n}.`,
`   `,
`EXAMPLES:`,
`  closure({[1,2],[2,4],[1,3],[3,5],[4,6]});    yields`,
`                  {[3,5],[1,2],[2,6],[1,4],[1,3],[4,6],[2,4],[1,5],[1,6]}`,
`  closure({[a,b],[a,c]},{a,b,c,d});            yields      {[a,b],[a,c]}`,
` `,
`SEE ALSO:  covers`,
NULL):

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