Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.ControlledRelativeCoefficient

Relative critical-value evaluation from a controlled source #

Controlled.relativeCoefficientValue fixes the retained parameters in the source query and computes an addressed critical-value coefficient. Controlled.relativeCoefficientValue_mem charges nine counting levels above the source evaluator. Controlled.relativeCoefficientValue_cast identifies the result with evaluation of the corresponding relative coefficient at the chosen penalty and parameters, over a prime satisfying the trace interpolation and source cutoffs.

Controlled.relativeValue sums these coefficients at the critical-value coordinate. Controlled.relativeValue_mem charges ten counting levels above the source evaluator, and Controlled.relativeValue_eq identifies its canonical residue with the flattened polynomial.

Adapted from PointBlocks, FinitePolynomialBlocks, FrozenPolynomialEvaluation, and FrozenCriticalCoefficients in lean-canny (970f28a5ecefc1327402ade16c068aa4b1b2c183). The full evaluator adapts RelativeCharacteristicEvaluation and RelativeCharacteristicCorrectness at the same commit. ControlledRelativeValue packages the evaluator with the source-based bounds for #6560.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.relativeCoefficientValue {α : Type} {n m : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {P : (w : α) → MvPolynomial (Fin (n w + m w)) ℤ} (C : Controlled P enc a) (p d u k : α → ℕ) (params : α → List ℕ) (w : α) :

Query one relative critical-value coefficient with both the penalty and the parameter coordinates supplied. Short point lists are read with zero padding.

Addressed coefficient access raises the source counting level by nine. Only the witness arity is needed in unary to place the parameter block after it.

theorem Cslib.Complexity.RealAlgebraic.Controlled.relativeCoefficientValue_cast {α : Type} {n m : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {P : (w : α) → MvPolynomial (Fin (n w + m w)) ℤ} (C : Controlled P enc a) (p d u k : α → ℕ) (params : α → List ℕ) (w : α) (hp : Nat.Prime (p w)) (hcut : C.cutoff w < p w) (hd : 1 ≤ d w) (hdeg : (P w).totalDegree ≤ d w + 1) (hgrid : (d w + 1) * ((d w + 1) ^ n w * (d w + 2) + n w * d w + 1) + 1 < p w) (hsize : (d w + 1) ^ n w * (d w + 1) ^ n w < p w - 1) :
↑(C.relativeCoefficientValue p d u k params w) = MvPolynomial.eval₂ (Int.castRingHom (ZMod (p w))) (fun (i : Option (Fin (m w))) => i.elim ↑(u w) fun (j : Fin (m w)) => ↑((params w)[↑j]?.getD 0)) ((MvPolynomial.CriticalSystem.relativeValuePolynomial ⋯ ((MvPolynomial.rename ⇑finSumFinEquiv.symm) (P w)) ⋯).coeff (k w))

The addressed query gives the evaluation of the actual relative coefficient at the specified penalty and parameters, provided the prime supports the source and trace evaluators.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.relativeValue {α : Type} {n m : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {P : (w : α) → MvPolynomial (Fin (n w + m w)) ℤ} (C : Controlled P enc a) (d : α → ℕ) (q : α × ℕ × List ℕ) :

Evaluate the relative critical-value polynomial from the controlled source. The point list starts with the critical value and penalty, then contains the retained parameters.

Summing over the binary quotient dimension uses one level above relative coefficient access.

theorem Cslib.Complexity.RealAlgebraic.Controlled.relativeValue_eq {α : Type} {n m : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {P : (w : α) → MvPolynomial (Fin (n w + m w)) ℤ} (C : Controlled P enc a) (d : α → ℕ) (w : α) (p : ℕ) (z : List ℕ) (hp : Nat.Prime p) (hcut : C.cutoff w < p) (hd : 1 ≤ d w) (hdeg : (P w).totalDegree ≤ d w + 1) (hgrid : (d w + 1) * ((d w + 1) ^ n w * (d w + 2) + n w * d w + 1) + 1 < p) (hsize : (d w + 1) ^ n w * (d w + 1) ^ n w < p - 1) :
C.relativeValue d (w, p, z) = (MvPolynomial.eval₂ (Int.castRingHom (ZMod p)) (fun (i : Option (Option (Fin (m w)))) => i.elim ↑(z[0]?.getD 0) fun (j : Option (Fin (m w))) => j.elim ↑(z[1]?.getD 0) fun (k : Fin (m w)) => ↑((List.drop 2 z)[↑k]?.getD 0)) (MvPolynomial.CriticalSystem.flattenedRelativeValuePolynomial ⋯ ((MvPolynomial.rename ⇑finSumFinEquiv.symm) (P w)) ⋯)).val

The evaluation is the canonical residue of the actual flattened relative polynomial. The first two list slots are the critical value and penalty. Remaining slots are read with the same zero-padding convention as the source evaluator.