z = degreePolynomial P
The degree polynomial of $P$ is the sum over elements $v$ of $x^{\operatorname{in}(v)} y^{\operatorname{out}(v)}$, when the exponents are the incoming and outgoing valences of $v$ in the Hasse diagram.
This polynomial is multiplicative for Cartesian product of posets.


The object degreePolynomial is a method function.