Documentation

Formalizations.Analysis.Polynomial.RealRoots.Descartes

Descartes' sign variations as the Budan–Fourier count at zero #

The number of sign variations of the derivative tower of p at 0 equals the number of sign variations of the coefficients of p, the quantity Polynomial.signVariations p of Mathlib's Descartes rule of signs. The tower evaluated at 0 has the signs of the coefficients (p^(k)(0) = k! a_k) listed from low to high degree, and the number of sign variations is invariant under reversal.

Main results #

signChanges is reversal-invariant #

filter (· ≠ 0) commutes with reverse.

theorem BudanFourier.destutter_ne_length_reverse (L : List SignType) :
(List.destutter (fun (x1 x2 : SignType) => x1 ≠ x2) L.reverse).length = (List.destutter (fun (x1 x2 : SignType) => x1 ≠ x2) L).length

The number of maximal ≠-runs is the same forwards and backwards: destutter (· ≠ ·) returns a maximal ≠-chain sublist, and reversal bijects chain sublists.

signChanges does not depend on the orientation of the list.

The tower at 0 reads the coefficient signs #

sign (p^{(k)}(0)) = sign (a_k), since p^{(k)}(0) = k!\,a_k and k! > 0.

The tower's signs at 0, as a list, are the coefficient signs [sign a_0, …, sign a_n].

Mathlib's coefficient sign list is the reverse of the tower's sign list (high-to-low vs low-to-high).

Descartes' count is the engine's V(0) #

Descartes through the engine. The Budan–Fourier sign-variation count of p at 0 equals the coefficient sign-variation count Polynomial.signVariations p of Descartes' rule of signs.