Documentation

HexRealRootsMathlib.ChainCorrespond

@[reducible, inline]

Compatibility alias for the rational cast, now shared by integer-polynomial companions.

Equations
Instances For

    Compatibility alias for the shared rational squarefreeness bridge.

    Dyadic.toReal is additive.

    Dyadic.toReal is multiplicative.

    @[simp]

    Dyadic.toReal sends 0 to 0.

    Evaluation correspondence. The exact dyadic Horner evaluation of an integer polynomial, cast to , agrees with the Mathlib evaluation of its real cast at the real value of the dyadic point.

    Sign correspondence. The exact integer sign of a dyadic value has, as a real number, the same SignType.sign as the real value of the dyadic.

    Exact dyadic Horner evaluation has zero sign exactly at a real root.

    Sign-variation count correspondence. The executable integer sign-variation count of a list equals the abstract real sign-variation count of the list cast to .

    Sign-variation correspondence. The executable Sturm sign-variation count of a chain at a dyadic point equals the abstract Sturm.sturmVar of the mapped real chain at the real value of the point. Positive scaling of chain elements is irrelevant: sturmVar reads only signs, which the exact dyadic evaluation and the Mathlib evaluation agree on.

    toPolynomial turns the executable scalar multiply into C-multiplication.

    toPolynomial turns the executable x^k shift into X^k-multiplication.

    The real cast of a scalar multiple.

    The real cast is additive.

    The real cast of an x^k shift.

    The real cast of a difference.

    The real cast preserves the leading coefficient.

    The spem correspondence. For a nonconstant divisor g (positive degree, hence nonzero leading coefficient), the executable sign-managed pseudo-remainder spem f g is a positive real multiple of the field remainder of f by g: there is c > 0 and a quotient Q with C c · toPolyℝ f = Q · toPolyℝ g + toPolyℝ (spem f g). Evaluating at a zero x of g collapses this to c · f(x) = (spem f g)(x), the sign-transfer identity the chain axioms consume.

    The real cast of a negation.

    The real cast is multiplicative.

    @[simp]

    The real cast of the zero polynomial.

    The real cast is zero exactly when the executable polynomial is.

    The real value of the content of a nonzero polynomial is positive: the executable content is a nonnegative integer, nonzero for nonzero input.

    Gauss decomposition of the real cast: a polynomial is its (positive integer) content times its primitive part.

    The primitive part of a nonzero polynomial is nonzero.

    Squarefree-to-separable transfer. If the rational cast toPolyℚ p is squarefree, its real cast toPolyℝ p is separable. Over the perfect field , squarefree means separable, and separability is preserved by the field extension ℚ → ℝ.

    The real cast of a nonzero p is the positive-content multiple of the cast of its primitive part, so the two share exactly the same real roots.

    Head of the mapped chain. For a positive-degree p, the real-cast Sturm chain has head toPolyℝ (primitivePart p), matching the IsSturmChain.head field (stated at the primitive part, per the design note: the executable chain's first element is primitivePart p, not p, since the content is stripped).

    Nonemptiness of the mapped chain for a positive-degree p.

    theorem HexRealRootsMathlib.coprime_step_rev {p q r : Polynomial } {a b : } {d : Polynomial } (hb : b 0) (hid : Polynomial.C a * p = d * q - Polynomial.C b * r) (h : IsCoprime q r) :

    Reverse of coprime_step. The three-term relation C c₀ · a = Q · b − C k · c' (with k ≠ 0) transports IsCoprime b c' back to IsCoprime a b: solving the relation for c' and substituting into a Bezout combination for (b, c') yields one for (a, b).

    theorem HexRealRootsMathlib.flank_of_key {s₀ s₁ : Polynomial } {γ : } ( : 0 < γ) (hkey : Polynomial.derivative s₀ = Polynomial.C γ * s₁) {r : } (h0 : Polynomial.eval r s₀ = 0) (h1 : Polynomial.eval r s₁ 0) :
    (∀ᶠ (x : ) in nhdsWithin r (Set.Iio r), Polynomial.eval x (s₀ * s₁) < 0) ∀ᶠ (x : ) in nhdsWithin r (Set.Ioi r), 0 < Polynomial.eval x (s₀ * s₁)

    The head-pair flank. If s₀ vanishes at r, s₁ does not, and s₀' = C γ · s₁ with γ > 0 (the executable seeds: the primitive parts of p and p'), then s₀ · s₁ is negative just left of r and positive just right: its derivative at r is γ · s₁(r)² > 0.

    Coprime polynomials never vanish together.

    The executable Sturm chain is a Sturm chain. For a positive-degree, rationally squarefree p, the real cast of Hex.ZPoly.sturmChain p satisfies all the Sturm.IsSturmChain sign axioms for toPolyℝ (primitivePart p).

    Stated at the primitive part: the executable chain's head is primitivePart p (the content is stripped), so an IsSturmChain (toPolyℝ p) … conclusion would have the wrong head; p and its primitive part have the same real roots (roots_toPolyℝ_eq_primitivePart), so the counting consequences are unaffected.

    The Sturm squarefree certificate is sound. If the executable Hex.ZPoly.hasSquarefreeSturmChain p is truep has positive degree and the terminal element of its Sturm chain is a nonzero constant — then p is squarefree over . This is the converse packaging of sturmChain_isSturmChain: it lets a concrete SquareFreeRat p be discharged by by decide on the executable chain, sidestepping the non-kernel-reducible rational gcd inside SquareFreeRat itself.

    Dyadic order transfers to the real values.

    Nonstrict dyadic order transfers to the real values.

    Dyadic order coincides with the order of the real values.

    The real value of an interval's exact dyadic midpoint.

    The midpoint is strictly above the lower endpoint.

    The midpoint is strictly below the upper endpoint.

    Sturm count correspondence. For positive-degree, rationally squarefree p, the executable Hex.ZPoly.sturmCount p I equals the number of real roots of toPolyℝ p in the half-open interval (I.lower, I.upper].

    The executable +∞ variation count matches the abstract one: both read the signs of the leading coefficients.

    The executable −∞ variation count matches the abstract one: both read sign(lc) · (−1)^degree.

    Root count correspondence. For positive-degree, rationally squarefree p, the executable Hex.ZPoly.rootCount p equals the total number of real roots of toPolyℝ p.

    theorem HexRealRootsMathlib.sepPrec_separates' (p : Hex.ZPoly) (hp : p 0) (hsq : p.SquareFreeRat) (z₁ z₂ : ) :
    (toPolyℂ p).IsRoot z₁(toPolyℂ p).IsRoot z₂z₁ z₂2 ^ (-(Hex.sepPrec p)) < z₁ - z₂ / 4

    Separation with the executable squarefreeness test. The public, SquareFreeRat-facing form of sepPrec_separates: for nonzero p passing the executable rational-gcd squarefreeness test, distinct complex roots of toPolyℂ p are more than 4 · 2^{−sepPrec p} apart.