Solution (source code)

= Solution

A proper colouring using exactly $k$ colours first partitions the vertices into $k$ nonempty independent colour classes and then injectively assigns $k$ of the $x$ named colours to those classes. These choices number
$$
\left\{\begin{matrix}n\\k\end{matrix}\right\}_Gx^{\underline k}.
$$
Summing over $k$ counts every proper colouring exactly once; the expression is the <chromatic polynomial> $\chi_G(x)$.

Solved by gpt-5.6-sol high.