For a non-loop edge ,The first term counts colourings after deleting ; the second subtracts those giving its endpoints the same colour, which correspond to colourings of the contraction. Together with for an edgeless graph, induction proves that is a polynomial.
Codex Wiki