`posets/text/subinterval` := TEXT(
`   `,
`FUNCTION:  subinterval - extract a subinterval from a poset`,
` `,
`CALLING SEQUENCE:  subinterval(P,[a,b]);`,
`                   subinterval(P,X,[a,b]);`,
`                   subinterval(P,n,[a,b]);`,
` `,
`PARAMETERS:  P  = a poset`,
`             X  = a set (the vertex set)`,
`             n  = a positive integer (the number of vertices)`,
`            a,b = vertices of P, or a = -infinity, or b = infinity`,
`   `,
`SYNOPSIS:`,
`  Let P be a poset with vertex set X. If a and b are vertices in X such`,
`  that a <= b in P, then subinterval(P,X,[a,b]) returns the subposet of P`,
`  formed by the vertices c in X such that a <= c <= b.`,
`   `,
`  If a = -infinity (resp., b = +infinity), then the subposet formed by`,
`  the vertices c <= b (resp., c >= a) is returned.`,
`   `,
`  Otherwise, if either a or b is not a vertex in X, or if it is not true`,
`  that a <= b in P, then NULL is returned.`,
`   `,
`  If the subposet Q to be returned has no relations (and thus has a single`,
`  vertex c), then the poset structure {},{c} is returned.`,
`   `,
`  subinterval(P,n,[a,b]) does the same, if P has vertex set {1,...,n}.`,
`  subinterval(P,[a,b]) does the same, if P has no isolated vertices.`,
` `,
`EXAMPLES:`,
`  P:=chain(2) &* chain(3);`,
`  subinterval(P,[1,4]);            yields     {[1,2],[1,3],[2,4],[3,4]}`,
`  subinterval(P,[-infinity,5]);    yields           {[1,3],[3,5]}`,
`  subinterval(P,[2,5]);            yields               NULL`,
`  subinterval(P,7,[7,infinity]);   yields              {}, {7}`,
` `,
`SEE ALSO:  subposet`,
NULL):

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