Documentation

CslibFrontier.Computability.Complexity.RealAlgebraic.ControlledFirstCoefficient

Controlled first-variable coefficients #

Extracting a binary-indexed coefficient in the first variable leaves a controlled family in the remaining variables. Its evaluator uses one additional counting level, and the original degree and coefficient norm bounds still apply.

Adapted from ControlledFirstCoefficient in lean-canny at 970f28a5ecefc1327402ade16c068aa4b1b2c183.

noncomputable def Cslib.Complexity.RealAlgebraic.Controlled.firstVariableCoefficient {α : Type} {n : α → ℕ} {enc : α ↪ List Bool} {a : ℕ} {P : (w : α) → MvPolynomial (Fin (n w + 1)) ℤ} (C : Controlled P enc a) (E : Turing.MultiTapeTM.Decoder enc) (hn : Turing.MultiTapeTM.ComputableInPolyTime n enc Turing.MultiTapeTM.encUnary) (k : α → ℕ) (hk : Turing.MultiTapeTM.ComputableInPolyTime k enc Turing.MultiTapeTM.encNat) :
Controlled (fun (w : α) => ((MvPolynomial.finSuccEquiv ℤ (n w)) (P w)).coeff (k w)) enc (a + 1)

Extract the coefficient in coordinate zero, retaining the other coordinates. The binary prime cutoff exceeds the source cutoff, degree bound, and queried index.

The evaluator needs the source cutoff and enough field elements for coefficient recovery.