Documentation

CslibFrontier.Foundations.Algebra.Polynomial.RealRoot.FingerprintIntegerRootLabel

Integer fingerprint labels for prescribed real roots #

The test at slot zero is the qualifying polynomial. The other slots are the positive derivative orders of the source, weighted by the modular powers used in its derivative fingerprint. At a real root the resulting integer polynomial has a uniform sign margin. A bounded fingerprint selects any prescribed root at which the qualifying test is positive.

Adapted from FingerprintIntegerRootLabels in lean-canny at commit 970f28a5ecefc1327402ade16c068aa4b1b2c183.

noncomputable def Polynomial.fingerprintRootLabelTests (p q : Polynomial ℤ) (D : ℕ) :
Fin (D + 1) → Polynomial ℤ

Slot zero qualifies a root. Slot i.succ tests derivative order i.val + 1.

noncomputable def Polynomial.fingerprintIntegerRootLabel (p q : Polynomial ℤ) (D b μ t : ℕ) (target : ℤ) :

Clear the weighted derivative-sign label for a prescribed integer fingerprint. D bounds the degrees, b bounds the base-two norm exponents, and the weights are the least residues of powers of t modulo μ.

theorem Polynomial.fingerprintIntegerRootLabel_bounds {D b μ : ℕ} {p q : Polynomial ℤ} (t : ℕ) {target : ℤ} (hμ : 0 < μ) (hpD : p.natDegree ≤ D) (hqD : q.natDegree ≤ D) (hpb : p.coeffNorm1 ≤ 2 ^ b) (hqb : q.coeffNorm1 ≤ 2 ^ b) (ht : target.natAbs ≤ D * μ) :

Degree and coefficient norm bounds for every label with a bounded target fingerprint.

theorem Polynomial.eval₂_fingerprintIntegerRootLabel_margin {D b μ : ℕ} {p q : Polynomial ℤ} (hp : p ≠ 0) (t : ℕ) (target : ℤ) (hμ : 0 < μ) (hpD : p.natDegree ≤ D) (hqD : q.natDegree ≤ D) (hpb : p.coeffNorm1 ≤ 2 ^ b) (hqb : q.coeffNorm1 ≤ 2 ^ b) {x : ℝ} (hx : eval₂ (Int.castRingHom ℝ) x p = 0) :
have y := eval₂ (Int.castRingHom ℝ) x (p.fingerprintIntegerRootLabel q D b μ t target); (1 / 2 ≤ y ∨ y ≤ -1 / 2) ∧ (0 < y ↔ (map (Int.castRingHom ℝ) p).derivativeFingerprint D μ t x = target ∧ 0 < eval₂ (Int.castRingHom ℝ) x q)

At a real root the label has magnitude at least one half. Its sign is positive exactly when the qualifying polynomial is positive and the derivative fingerprint equals the target.

theorem Polynomial.exists_fingerprintIntegerRootLabel {D b : ℕ} {p q : Polynomial ℤ} (hp : p ≠ 0) (hpD : p.natDegree ≤ D) (hqD : q.natDegree ≤ D) (hpb : p.coeffNorm1 ≤ 2 ^ b) (hqb : q.coeffNorm1 ≤ 2 ^ b) {x : ℝ} (hx : eval₂ (Int.castRingHom ℝ) x p = 0) (hxq : 0 < eval₂ (Int.castRingHom ℝ) x q) :
∃ (μ : ℕ) (t : ℕ) (target : ℤ), Nat.Prime μ ∧ 2 < μ ∧ μ ≤ 2 * (D ^ 3 + 2) ∧ t < μ ∧ target.natAbs ≤ D * μ ∧ 1 / 2 ≤ eval₂ (Int.castRingHom ℝ) x (p.fingerprintIntegerRootLabel q D b μ t target) ∧ ∀ (y : ℝ), eval₂ (Int.castRingHom ℝ) y p = 0 → y ≠ x → eval₂ (Int.castRingHom ℝ) y (p.fingerprintIntegerRootLabel q D b μ t target) ≤ -1 / 2

A bounded fingerprint and its integer label give a positive margin at any prescribed qualifying root and a negative margin at every other real root of the source.