The areas / V15. Real analysis in one variable
Mathlib.Analysis.Polynomial.SignRight
20 declarations and 1 deprecated aliases. Mathlib docs · Source
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 sign of the trailing coefficient of the taylor polynomial of p around x, 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
Polynomial.signRight x p: the sign ofpimmediately to the right ofx.
Main results
Polynomial.eventually_sign_eq_signRight,Polynomial.signRight_eq_iff: the defining property,sign (p.eval y) = signRight x pfor allyin some interval(x, x + ε).Polynomial.signRight_eq_zero_iff:signRight x p = 0if and only ifp = 0.Polynomial.signRight_mul,Polynomial.signRight_neg,Polynomial.signRight_C:signRight xis multiplicative and compatible with negation and constants.Polynomial.signRight_of_eval_ne_zero: away from the roots ofp,signRight x pis the sign ofp.eval x.Polynomial.signRight_of_eval_eq_zero: at a root ofp,signRight x pissignRight xof the derivative ofp.
def Polynomial.signRight E1 #
{R : Type u_1} → [inst : CommRing R] → [LinearOrder R] → R → Polynomial R → SignType
The sign of p immediately to the right of x: the sign of the trailing coefficient of
the Taylor polynomial of p centered at x.
theorem Polynomial.signRight_zero E0 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] (x : R), Polynomial.signRight x 0 = 0
theorem Polynomial.signRight_eq_zero_iff E3 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] {x : R} {p : Polynomial R},
Polynomial.signRight x p = 0 ↔ p = 0
signRight x p can only be 0 if p is 0.
theorem Polynomial.signRight_C E3 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] (x c : R),
Polynomial.signRight x (Polynomial.C c) = SignType.sign c
signRight of a constant equals the sign of the constant.
theorem Polynomial.signRight_neg E3 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] [IsOrderedRing R] (x : R) (p : Polynomial R),
Polynomial.signRight x (-p) = -Polynomial.signRight x p
signRight commutes with negation.
theorem Polynomial.signRight_X_sub_C_pow E1 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] [IsOrderedRing R] [Nontrivial R] (a : R) (n : ℕ),
Polynomial.signRight a ((Polynomial.X - Polynomial.C a) ^ n) = 1
theorem Polynomial.signRight_X_sub_C E1 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] [IsOrderedRing R] [Nontrivial R] (a : R),
Polynomial.signRight a (Polynomial.X - Polynomial.C a) = 1
theorem Polynomial.signRight_mul E3 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] (x : R) (p q : Polynomial R),
Polynomial.signRight x (p * q) = Polynomial.signRight x p * Polynomial.signRight x q
signRight is a multiplicative function.
theorem Polynomial.signRight_C_mul E1 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] (x c : R) (p : Polynomial R),
Polynomial.signRight x (Polynomial.C c * p) = SignType.sign c * Polynomial.signRight x p
theorem Polynomial.signRight_mul_self E1 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] {x : R} {p : Polynomial R},
p ≠ 0 → Polynomial.signRight x (p * p) = 1
theorem Polynomial.signRight_of_eval_ne_zero E3 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] {x : R} {p : Polynomial R},
Polynomial.eval x p ≠ 0 → Polynomial.signRight x p = SignType.sign (Polynomial.eval x p)
Away from its roots, the sign of p to the right of x is the sign of p x.
theorem Polynomial.signRight_of_eval_eq_zero E3 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] {x : R} {p : Polynomial R},
Polynomial.eval x p = 0 → Polynomial.signRight x p = Polynomial.signRight x (Polynomial.derivative p)
At a root of p, the sign of p to the right of x is that of derivative p.
theorem Polynomial.signRight_derivative_mul E1 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] [IsStrictOrderedRing R] {x : R} {p : Polynomial R},
p ≠ 0 → Polynomial.eval x p = 0 → Polynomial.signRight x (Polynomial.derivative p * p) = 1
theorem Polynomial.signRight_eq_of_eval_eq E0 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] {x : R} {p q : Polynomial R},
Polynomial.eval x p = Polynomial.eval x q →
Polynomial.eval x q ≠ 0 → Polynomial.signRight x p = Polynomial.signRight x q
Away from the roots, signRight x only depends on the value at x.
theorem Polynomial.signRight_add E1 #
∀ {R : Type u_1} [inst : CommRing R] [inst_1 : LinearOrder R] {x : R} {p q : Polynomial R},
Polynomial.eval x p = 0 → Polynomial.eval x q ≠ 0 → Polynomial.signRight x (p + q) = Polynomial.signRight x q
theorem Polynomial.signRight_mod E1 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] {x : K} {p q : Polynomial K},
Polynomial.eval x p = 0 → Polynomial.eval x q ≠ 0 → Polynomial.signRight x (q % p) = Polynomial.signRight x q
theorem Polynomial.eventually_sign_eq_signRight E3 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsStrictOrderedRing K] [inst_3 : TopologicalSpace K]
[OrderTopology K] (x : K) (p : Polynomial K),
∀ᶠ (y : K) in nhdsWithin x (Set.Ioi x), SignType.sign (Polynomial.eval y p) = Polynomial.signRight x p
The equation sign (eval y p) = signRight x p holds for all y in some interval
(x, x + ε).
theorem Polynomial.exists_eventually_sign_eq E0 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsStrictOrderedRing K] [inst_3 : TopologicalSpace K]
[OrderTopology K] (x : K) (p : Polynomial K),
∃ s, ∀ᶠ (y : K) in nhdsWithin x (Set.Ioi x), SignType.sign (Polynomial.eval y p) = s
Immediately to the right of x, a polynomial has a constant sign.
theorem Polynomial.signRight_eq_of_eventually E1 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsStrictOrderedRing K] [inst_3 : TopologicalSpace K]
[OrderTopology K] {x : K} {p : Polynomial K} {s : SignType},
(∀ᶠ (y : K) in nhdsWithin x (Set.Ioi x), SignType.sign (Polynomial.eval y p) = s) → Polynomial.signRight x p = s
theorem Polynomial.signRight_eq_iff E3 #
∀ {K : Type u_2} [inst : Field K] [inst_1 : LinearOrder K] [IsStrictOrderedRing K] [inst_3 : TopologicalSpace K]
[OrderTopology K] {x : K} {p : Polynomial K} {s : SignType},
Polynomial.signRight x p = s ↔ ∀ᶠ (y : K) in nhdsWithin x (Set.Ioi x), SignType.sign (Polynomial.eval y p) = s
signRight x p is the unique sign s such that sign (eval y p) = s for all y in some
interval (x, x + ε).
Deprecated aliases
| Name | New name | Since |
|---|---|---|
Polynomial.signRight_ne_zero | Polynomial.signRight_eq_zero_iff | 2026-11-16 |