# hPolynomial -- computes the h-polynomial of a poset

## Synopsis

• Usage:
h = hPolynomial P
h = hPolynomial(P, VariableName => symbol)
• Inputs:
• P, an instance of the type Poset,
• Optional inputs:
• VariableName => , default value q
• Outputs:
• h, , the h-polynomial of $P$

## Description

Suppose $f$ is the fPolynomial of $P$, and $d$ is the degree of $f$. Then the h-polynomial of $P$ is the polynomial $(1-q)^d f(q/(1-q))$.

 i1 : hPolynomial booleanLattice 3 2 o1 = q + 4q + 1 o1 : ZZ[q]

The h-polynomial of the $n$ chain is $1$.

 i2 : hPolynomial chain 5 o2 = 1 o2 : ZZ[q]