Lagrange's theorem
"f" has degree at most "p" − 2 (since the leading terms cancel), and modulo "p" also has the roots 1, 2, ..., . But Lagrange's theorem says it cannot have more than "p" − 2 roots. Therefore, "f" must be identically zero (mod "p"), so its constant term is . This is Wilson's theorem.