Documentation

Ratpoints.Mathlib.Analysis.Polynomial.Order

The signs of a polynomial near a point and near infinity #

Candidates for Mathlib.Analysis.Polynomial.Order: over a linearly ordered normed field with the order topology, such as โ„, a nonzero polynomial has, far right, the sign of its leading coefficient and, far left, that sign times (-1) ^ deg (Polynomial.eventually_atTop_sign_eval, Polynomial.eventually_atBot_sign_eval); near a point it keeps a nonzero sign (Polynomial.eventually_sign_eval_eq), near a root x where its derivative does not vanish it has the sign of (y - x) p'(x) at y (Polynomial.eventually_sign_eval_eq_sign_sub_mul), and just right of a point x where it or its derivative does not vanish it has the sign of p(x), or of p'(x) when p(x) = 0, and just left of x that of p(x), or of -p'(x) when p(x) = 0 (Polynomial.eventually_sign_eval_nhdsGT, Polynomial.eventually_sign_eval_nhdsLT). By the intermediate value theorem, opposite signs of a real polynomial at two points give a root between them (Polynomial.exists_isRoot_of_eval_mul_eval_neg), a negative sign just right of the left end of an interval without a root holds on the whole interval (Polynomial.eval_neg_of_forall_not_isRoot), and a nonzero real polynomial of degree n changes its sign at most n times along increasing points (Polynomial.length_le_natDegree_add_one_of_isChain).

Implementation notes #

The file imports its sibling Mathlib.Analysis.Polynomial.Order, the sibling's private import Mathlib.Topology.Algebra.Polynomial for the continuity of polynomials, and, publicly, Mathlib.Algebra.Polynomial.Derivative, which the statements just right and just left of a point name and the sibling's public imports lack.

The lemmas that rest on the intermediate value theorem are stated over โ„, as the sibling's are: they need a conditionally complete, densely ordered field.

The signs just right and just left of a point are stated by the case distinction on p(x) = 0, without a definition of their own; compare Polynomial.signRight of Mathlib pull request #44248, the sign just right of a point as a limit, for every p.

theorem Polynomial.eventually_sign_eval_eq {๐•œ : Type u_1} [NormedField ๐•œ] [LinearOrder ๐•œ] [OrderTopology ๐•œ] {p : Polynomial ๐•œ} {x : ๐•œ} (h : eval x p โ‰  0) :

Near a point where it does not vanish, a polynomial keeps its sign.

theorem Polynomial.eventually_atTop_sign_eval {๐•œ : Type u_1} [NormedField ๐•œ] [LinearOrder ๐•œ] [OrderTopology ๐•œ] [IsStrictOrderedRing ๐•œ] {p : Polynomial ๐•œ} (hp : p โ‰  0) :

Far right, a nonzero polynomial has the sign of its leading coefficient.

theorem Polynomial.eventually_atBot_sign_eval {๐•œ : Type u_1} [NormedField ๐•œ] [LinearOrder ๐•œ] [OrderTopology ๐•œ] [IsStrictOrderedRing ๐•œ] {p : Polynomial ๐•œ} (hp : p โ‰  0) :

Far left, a nonzero polynomial has the sign of (-1) ^ deg times its leading coefficient.

theorem Polynomial.eventually_sign_eval_eq_sign_sub_mul {๐•œ : Type u_1} [NormedField ๐•œ] [LinearOrder ๐•œ] [OrderTopology ๐•œ] [IsStrictOrderedRing ๐•œ] {p : Polynomial ๐•œ} {x : ๐•œ} (h0 : eval x p = 0) (h : eval x (derivative p) โ‰  0) :

Near a root x of p with p'(x) โ‰  0, p(y) has the sign of (y - x) p'(x).

theorem Polynomial.eventually_sign_eval_nhdsGT {๐•œ : Type u_1} [NormedField ๐•œ] [LinearOrder ๐•œ] [OrderTopology ๐•œ] [IsStrictOrderedRing ๐•œ] {p : Polynomial ๐•œ} {x : ๐•œ} (h : eval x p โ‰  0 โˆจ eval x (derivative p) โ‰  0) :

Just right of a point x where p(x) โ‰  0 or p'(x) โ‰  0, a polynomial p has the sign of p(x), or of p'(x) when p(x) = 0.

theorem Polynomial.eventually_sign_eval_nhdsLT {๐•œ : Type u_1} [NormedField ๐•œ] [LinearOrder ๐•œ] [OrderTopology ๐•œ] [IsStrictOrderedRing ๐•œ] {p : Polynomial ๐•œ} {x : ๐•œ} (h : eval x p โ‰  0 โˆจ eval x (derivative p) โ‰  0) :

Just left of a point x where p(x) โ‰  0 or p'(x) โ‰  0, a polynomial p has the sign of p(x), or of -p'(x) when p(x) = 0.

theorem Polynomial.exists_isRoot_of_eval_mul_eval_neg {p : Polynomial โ„} {a b : โ„} (hab : a < b) (h : eval a p * eval b p < 0) :
โˆƒ z โˆˆ Set.Ioo a b, p.IsRoot z

A real polynomial with values of opposite signs at a < b has a root strictly between.

theorem Polynomial.eval_neg_of_forall_not_isRoot {p : Polynomial โ„} {l r : โ„} (hroot : โˆ€ (x : โ„), l < x โ†’ x < r โ†’ ยฌp.IsRoot x) (hneg : โˆ€แถ  (y : โ„) in nhdsWithin l (Set.Ioi l), eval y p < 0) {x : โ„} (hlx : l < x) (hxr : x < r) :
eval x p < 0

An interval (l, r) without a root of a real polynomial p, on which p is negative just right of l, holds no x with p(x) โ‰ฅ 0.

A nonzero real polynomial p of degree n changes its sign at most n times along a strictly increasing list of points.