Documentation

CslibFrontier.Computability.TreeEval.Ary.Packed.GateInterpolationSpace

Packed grid weights in native work space #

A grid assignment is consumed by repeated division by the alphabet cardinality. The coordinate counter, remaining assignment and modular accumulator are all stored in binary. Their sizes are bounded by the encoded inputs even if the requested coordinate count exceeds the supplied point's length, or the modulus or alphabet cardinality is zero.

Main definitions #

Main results #

The table-query sum and the full Tree Evaluation machine remain separate obligations.

@[reducible, inline]

Encode the modulus, alphabet size, coordinate count, assignment index and point in binary.

theorem Cslib.TreeEval.Ary.Packed.gridWeight_le (p s n k : ℕ) (x : List ℕ) :
gridWeight p s n k x ≤ p + 1

All intermediate products fit within the modulus plus one, including malformed zero moduli and the empty product.

All coordinates of one interpolation weight are evaluated in native work space linear in encGridWeightArgs ((p,s,n,k),x). No correctness or primality assumptions are needed for this total resource bound.