The fold-built signed sums enumerate the 2ⁿ sign patterns.
Stated for an arbitrary g into an arbitrary commutative monoid, because the
induction step replaces g by fun s => g (s + x) * g (s - x): the last
radicand is consumed by the function, not by the list.
The two sign-pattern products are the same polynomial: the List.prod the
iterated norm computes and the Finset.prod the tower theorem is about.
The certificate is sound. A successful
Hex.QuadraticNormCertificate.check makes its input irreducible in
Polynomial ℤ.
No hypothesis is needed on f: the check pins f to an associate of the
iterated norm, and the iterated norm is monic whatever f was.
The production gate is sound. Whenever the budget-gated certificate reports
true, its input is irreducible.