`posets/text/char_poly` := TEXT(
` `,
`FUNCTION:  char_poly - characteristic polynomial of a (graded) poset`,
` `,
`CALLING SEQUENCE:  char_poly(P,q);`,
`                   char_poly(P,X,q);`,
`                   char_poly(P,n,q);`,
` `,
`PARAMETERS:  P = a poset`,
`             X = a set (the vertex set)`,
`             n = a positive integer (the number of vertices)`,
`             q = a variable name or expression`,
`   `,
`SYNOPSIS:`,
`  Let P be a ranked poset with vertex set X and a minimum element`,
`  (call it 0) such that all maximal elements of P have rank r.`,
`  The characteristic polynomial of P is the generating series`,
`   `,
`                          r-rank(x)`,
`    F(q) = SUM  M[0,x] * q         ,`,
`   `,
`  summed over all vertices x in X, where M is the Mobius function of P.`,
`  The coefficients of the characteristic polynomial are known as the`,
`  Whitney numbers of P of the first kind.`,
`   `,
`  char_poly(P,X,q) returns the characteristic polynomial of the poset P.`,
`  char_poly(P,n,q) does the same, if the vertex set of P is {1,...,n}.`,
`  char_poly(P,q) does the same, assuming P has no isolated vertices.`,
`   `,
`  If P does not have a minimum element, an error is signaled. However,`,
`  no error is signaled if P is not ranked or not all maximal elements`,
`  have the same rank. In this case, the result is a fake characteristic`,
`  polynomial relative to the quasi-rank function provided by the`,
`  filtration of P (see 'filter').`,
`   `,
`EXAMPLES:`,
`  char_poly(J({},3),z);              yields     z^3 - 3*z^2 + 3*z - 1`,
`  P:=({},1) &+ ({},3) &+ ({},1);`,
`  factor(char_poly(P,5,q));          yields          (q-1)*(q-2)`,
` `,
`SEE ALSO:  filter, mobius, ranked`,
NULL):

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