`posets/text/mobius` := TEXT(
` `,
`FUNCTION:  mobius - Mobius function of a poset`,
` `,
`CALLING SEQUENCE:  mobius(P);    mobius(P,[a,b]);`,
`                   mobius(P,X);  mobius(P,X,[a,b]);`,
`                   mobius(P,n);  mobius(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 (optional)`,
`   `,
`SYNOPSIS:`,
`  The Mobius function of a poset P is an integer-valued function on the set`,
`  of pairs (a,b) such that a <= b in P (or equivalently, on the intervals`,
`  of P). Its defining property is that for all a <= b in P, the sum of`,
`  mobius(a,c)  over a <= c <= b is 0 for a < b, and 1 for a = b.`,
`   `,
`  mobius(P,X) returns the Mobius function of the poset P with vertex set X,`,
`  in the form of a 'sparse' table; indices of the table are the pairs (a,b)`,
`  such that a <= b in P.`,
`   `,
`  mobius(P,n) does the same, if the vertex set of P is {1,...,n}.`,
`  mobius(P) does the same, assuming that P has no isolated vertices.`,
`   `,
`  In the second form, if the final argument is a list [a,b] of two vertices`,
`  of P, the procedure returns the Mobius function of P at (a,b). If it is`,
`  not true that a <= b in P, then 0 is returned.`,
`   `,
`  If P has a minimum element 0 and maximum element 1, then`,
`    mobius(P,[0,1])=zeta(P,-1).`,
`   `,
`EXAMPLES:`,
`  mobius({[a,b],[a,c]},{a,b,c});         yields`,
`                  table(sparse,[(a,a)=1,(a,b)=-1,(a,c)=-1,(b,b)=1,(c,c)=1])`,
`  P:=({},1) &+ ({},4) &+ ({},1);`,
`  mobius(P,[1,6]);                       yields            3`,
`  mo:=mobius(J({},3));`,
`  mo[1,8], mo[2,3];                      yields          -1, 0`,
` `,
`SEE ALSO:  char_poly, eulerian, subinterval, zeta`,
NULL):

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