Documentation

Mathlib.Analysis.Polynomial.SignRight

The sign of a polynomial immediately to the right of a point #

A nonzero real polynomial has finitely many roots, so its sign is constant on a small interval (x, x + ε) to the right of any point x. This file defines that sign, Polynomial.signRight x p, as the limit of sign (p.eval y) as y → x from the right, and develops its basic properties: it vanishes only for p = 0, it is multiplicative, and it is computed by the recursion signRight x p = sign (p.eval x) if p.eval x ≠ 0 and signRight x p = signRight x (derivative p) otherwise.

This is the local invariant behind Sturm's theorem, where it determines the direction in which the sign of a Sturm sequence changes across a root.

Main definitions #

Main results #

Implementation notes #

The definition and all results are stated over ℝ, but they hold over any real closed field, and should eventually be generalised to IsRealClosed. Two ingredients stand in the way: the intermediate value theorem for polynomials over a real closed field, which Mathlib does not have yet and which is needed for exists_eventually_sign_eq (the proof here uses connectedness of intervals in ℝ), and the mean value theorem, used in signRight_of_eval_eq_zero, which can be replaced by an algebraic argument factoring the root out of p.

Immediately to the right of x, a polynomial has a constant sign.

noncomputable def Polynomial.signRight (x : ℝ) (p : Polynomial ℝ) :

The sign of p immediately to the right of x: the eventual value of sign (eval y p) as y → x from the right.

Equations
Instances For

    The equation sign (eval y p) = signRight x p holds for all y in some interval (x, x + ε).

    signRight x p is the unique sign s such that sign (eval y p) = s for all y in some interval (x, x + ε).

    @[simp]
    theorem Polynomial.signRight_ne_zero {x : ℝ} {p : Polynomial ℝ} (hp : p ≠ 0) :
    @[simp]

    signRight x p can only be 0 if p is 0.

    theorem Polynomial.signRight_mul (x : ℝ) (p q : Polynomial ℝ) :
    signRight x (p * q) = signRight x p * signRight x q

    signRight is a multiplicative function.

    signRight commutes with negation.

    @[simp]

    signRight of a constant equals the sign of the constant.

    theorem Polynomial.signRight_X_sub_C_pow (a : ℝ) (n : ℕ) :
    signRight a ((X - C a) ^ n) = 1
    theorem Polynomial.signRight_mul_self {x : ℝ} {p : Polynomial ℝ} (hp : p ≠ 0) :
    signRight x (p * p) = 1

    Away from its roots, the sign of p to the right of x is the sign of p x.

    At a root of p, the sign of p to the right of x is that of derivative p.

    theorem Polynomial.signRight_derivative_mul {x : ℝ} {p : Polynomial ℝ} (hp : p ≠ 0) (hev : eval x p = 0) :
    theorem Polynomial.signRight_add {x : ℝ} {p q : Polynomial ℝ} (hp : eval x p = 0) (hq : eval x q ≠ 0) :
    signRight x (p + q) = signRight x q
    theorem Polynomial.signRight_mod {x : ℝ} {p q : Polynomial ℝ} (hp : eval x p = 0) (hq : eval x q ≠ 0) :
    signRight x (q % p) = signRight x q