`posets/text/h_poly` := TEXT(
` `,
`FUNCTION:  f_poly - f-polynomial of a bounded poset`,
`           h_poly - h-polynomial of a bounded poset`,
` `,
`CALLING SEQUENCE:  f_poly(P,z);      h_poly(P,z);`,
`                   f_poly(P,X,t);    h_poly(P,X,t);`,
`                   f_poly(P,n,t);    h_poly(P,n,t);`,
` `,
`PARAMETERS:  P = a bounded poset`,
`             X = a set (the vertex set)`,
`             n = a positive integer (the number of vertices)`,
`             t = a variable name or expression`,
`   `,
`SYNOPSIS:`,
`  Let P be a poset with vertex set X, and assume that P is bounded;`,
`  i.e., P has a minimum and a maximum element. The f-polynomial of P is`,
`  defined to be the sum of f_k * t^k, where f_k denotes the number of`,
`  chains of length k from the minimum element to the maximum element`,
`  (i.e., 0 < x[1] < ... < x[k-1] < 1, if 0 is the minimum and 1 is the`,
`  maximum). In particular, f_2 is the number of non-extreme vertices,`,
`  and except for the case of a singleton poset, f_1=1 and f_0=0.`,
`   `,
`  The h-polynomial of P is related to the f-polynomial f(P,t) by the`,
`  rule h(P,t) = (1-t)^d * f(P,t/(1-t)), where d = degree(f).`,
`   `,
`  f_poly(P,X,t) returns the f-polynomial of the poset P, evaluated at t.`,
`  f_poly(P,n,t) does the same, if the vertex set of P is {1,...,n}.`,
`  f_poly(P,t) does the same, assuming that P has no isolated vertices.`,
`   `,
`  The syntax for computing the h-polynomial is the same.`,
`   `,
`  If the poset is not bounded, an error is signaled. In particular, a`,
`  poset with isolated vertices and nops(X)>1 always triggers an error.`,
`   `,
`  The f-polynomial f(P,t) and the chain polynomial C(P,t) (see 'chains') `,
`  are related: (1+t)^2 * f(P,t) = t * C(P,t), unless P is a singleton.`,
`  The f-polynomial is also related to the zeta polynomial (see 'zeta').`,
`   `,
`  The h-polynomial of J(P) at t is the W-polynomial of P at (q,t)=(1,t).`,
`  That is, h_poly(J(P,X),t) = W(P,X,1,t) (see 'W').`,
`   `,
`EXAMPLES:`,
`  P:=({},1) &+ (chain(2) &u chain(3)) &+ ({},1);`,
`  f_poly(P,t);                           yields       t+5*t^2+4*t^3+t^4`,
`  h_poly(J({},3),z);                     yields          z+4*z^2+z^3`,
` `,
`SEE ALSO:  chains, flag_f, flag_h, W, zeta`,
NULL):

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