Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.FingerprintRootLabelEvaluation

Modular evaluation of a prescribed-root fingerprint label #

Binary-addressed derivative residues and a qualifying residue give the integer label's value at an evaluation prime. The weights are computed by modular powers in the fingerprint modulus, which is independent of the evaluation prime.

Adapted from FingerprintRootLabelEvaluation and PrescribedRootLabelEvaluation in lean-canny at commit 970f28a5ecefc1327402ade16c068aa4b1b2c183.

noncomputable def Cslib.Complexity.RealAlgebraic.fingerprintRootLabelResidue (p D b μ t : ℕ) (target : ℤ) (qualifier : ℕ) (derivativeValue : ℕ → ℕ) :

Evaluate the fingerprint label modulo p using weights modulo μ. Slot zero uses the qualifying value. Slot i > 0 uses the residue of derivative order i. The signed target is reduced modulo the evaluation modulus.

A level-a source for the qualifying and addressed derivative residues gives an evaluator at level a + 7. All scalar parameters have binary encodings.

theorem Cslib.Complexity.RealAlgebraic.fingerprintRootLabelResidue_cast {p : ℕ} [Fact (Nat.Prime p)] (f q : Polynomial ℤ) (D b μ t : ℕ) (hμ : μ ≠ 0) (target : ℤ) (z : ZMod p) (qualifier : ℕ) (derivativeValue : ℕ → ℕ) (hq : ↑qualifier = Polynomial.eval₂ (Int.castRingHom (ZMod p)) z q) (hderivative : ∀ (i : Fin D), ↑(derivativeValue (↑i + 1)) = Polynomial.eval₂ (Int.castRingHom (ZMod p)) z ((⇑Polynomial.derivative)^[↑i + 1] f)) :
↑(fingerprintRootLabelResidue p D b μ t target qualifier derivativeValue) = Polynomial.eval₂ (Int.castRingHom (ZMod p)) z (f.fingerprintIntegerRootLabel q D b μ t target)

At a prime the modular evaluator agrees with the actual integer root label when the qualifying test and addressed derivatives are supplied at the evaluation point. Only positive derivative orders up through D are queried.