Documentation

HexRealRootsMathlib.DescartesParity

eraseLead only removes the top coefficient, so it leaves the trailing coefficient unchanged (as long as it does not empty the polynomial).

Core (monic case): the number of positive roots of a monic real polynomial is congruent modulo two to the indicator of its trailing coefficient's sign.

The number of positive roots of a nonzero real polynomial is congruent modulo two to the end-sign indicator [sign leadingCoeff ≠ sign trailingCoeff].

The number of sign variations of a nonzero real polynomial is congruent modulo two to the end-sign indicator [sign leadingCoeff ≠ sign trailingCoeff].

Descartes parity. For a nonzero real polynomial the number of positive roots (with multiplicity) and the number of sign variations of the coefficients have the same parity.

No sign variations forces no positive roots.

Exactly one sign variation forces exactly one positive root.