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 #
Cslib.TreeEval.Ary.Packed.encGridWeightArgs: encode((p,s,n,k),x).
Main results #
Cslib.TreeEval.Ary.Packed.gridWeight_inSpace: the complete product of coordinate weights is computed in native work space linear in the encoded arguments, without a unary charge for the coordinate count or alphabet cardinality.
The table-query sum and the full Tree Evaluation machine remain separate obligations.
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.