# Rank of a partially ordered set

The maximum cardinality of a chain in a partially ordered set. If $(P,\le)$ is a partially ordered set then the rank of $b$ relative to $a$, where $a \le b$, is the rank of the interval $[a,b]$; if $P$ has a minimum element $0$, then the rank $\rho(x)$ of an element $x$ is the rank of $x$ relative to $0$. A chain $C$ in $P$ is maximal if no proper superset of $C$ is a chain. If all maximal chains have the same cardinality, then $P$ is said to be graded by rank.
If the rank of each element of the poset $(P,\le)$ is finite, and there is a finite number $p_n$ of elements of rank $n$ (in particular, if $P$ is finite) then the rank generating function of $P$ is the formal series $$\sum_{n=0}^\infty p_n z^n \ .$$
A lattice with a rank function $\rho$ is (upper) semi-modular if $$\rho(x) + \rho(y) \ge \rho(x \vee y) + \rho(x \wedge y)$$ and modular if $$\rho(x) + \rho(y) = \rho(x \vee y) + \rho(x \wedge y) \ .$$