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) :
Extract the coefficient in coordinate zero, retaining the other coordinates. The binary prime cutoff exceeds the source cutoff, degree bound, and queried index.
theorem Cslib.Complexity.RealAlgebraic.Controlled.cutoff_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) (w : α) :
(C.firstVariableCoefficient E hn k hk).cutoff w = max (C.cutoff w) (max (C.degreeBound w) (k w)) + 1
The evaluator needs the source cutoff and enough field elements for coefficient recovery.