Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.SparseRootLabelEvaluation

Modular evaluation of the sparse integer root label #

Binary degree and coefficient norm bounds determine the shared dyadic precision. The qualifying value, binary derivative orders and addressed coefficients supply the test values for the cleared sign label. Only the number of tests uses a unary encoding.

Adapted from SparseRootLabelEvaluation and NativeRootLabelBounds in lean-canny at commit 970f28a5ecefc1327402ade16c068aa4b1b2c183, using the frontier precision and score formulas.

noncomputable def Cslib.Complexity.RealAlgebraic.sparseRootLabelResidue (p D N b z base : ℕ) (c : ℕ → ℕ) (orders : List ℕ) (target : ℕ → ℕ) :

Evaluate the sparse root label from the qualifying residue, addressed source coefficients, binary derivative orders and addressed target residues. The qualifying test is included in addition to the N derivative slots.

The uniform sparse evaluator has level F_(max a 3 + 4) for coefficient access at level F_a, with the qualifying value available at the derivative evaluator's level.

theorem Cslib.Complexity.RealAlgebraic.sparseRootLabelResidue_cast {p D N : ℕ} [Fact (Nat.Prime p)] (q b₀ : Polynomial ℤ) (b z base : ℕ) (c target : ℕ → ℕ) (L : List (Fin D × SignType)) (hD : q.natDegree ≤ D) (hprime : D < p) (hc : ∀ j ≤ D, ↑(c j) = (Polynomial.map (Int.castRingHom (ZMod p)) q).coeff j) (hbase : ↑base = Polynomial.eval₂ (Int.castRingHom (ZMod p)) (↑z) b₀) (ht : ∀ (i : Fin (N + 1)), ↑(target ↑i) = ↑↑(q.sparseRootLabelTests b₀ N L i).2) :
↑(sparseRootLabelResidue p D N b z base c (List.map (fun (t : Fin D × SignType) => ↑t.1 + 1) L) target) = Polynomial.eval₂ (Int.castRingHom (ZMod p)) (↑z) (q.sparseIntegerRootLabel b₀ N b L)

The native evaluator agrees with the sparse integer label in the determinant criterion when the inputs supply the addressed coefficients and signs modulo a prime greater than the degree bound. The qualifying value may come from a separate evaluator.