# zetaPolynomial -- computes the zeta polynomial of a poset

## Synopsis

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

## Description

The zeta polynomial of $P$ is the polynomial $z$ such that for every $i > 1$, $z(i)$ is the number of weakly increasing chains of $i-1$ vertices in $P$.

The zeta polynomial of the $n$ booleanLattice is $q^n$.

 i1 : B = booleanLattice 3; i2 : z = zetaPolynomial B 3 o2 = q o2 : QQ[q]

Thus, $z(2)$ is the number of vertices of $P$, and $z(3)$ is the number of total relations in $P$.

 i3 : #B.GroundSet == sub(z, (ring z)_0 => 2) o3 = true i4 : #allRelations B == sub(z, (ring z)_0 => 3) o4 = true