Field parameters and encoded storage for packed Cook–Mertz #
For positive fan-in d and Boolean value length b, choose chunk width m = (d*b).size,
chunk count r = ⌈b/m⌉, and the least prime p ≥ d*r*(2^m-1)+2. The chunk alphabet embeds
in ZMod p, and the packed gate's degree is strictly below p-1.
Bertrand's postulate bounds the bit length of p by 2m+2. The framed binary list encoding
of (d+1)*r residues therefore has length at most 9*(d+1)*(b+m). For fixed fan-in this is
affine in b; no uniform constant independent of d is asserted.
Main definitions #
Cslib.TreeEval.Ary.Packed.chunkWidth,Cslib.TreeEval.Ary.Packed.chunkCount: chunk sizes.Cslib.TreeEval.Ary.Packed.gateDegree: the packed interpolation degree bound.Cslib.TreeEval.Ary.Packed.fieldModulus: a sufficient prime modulus.Cslib.TreeEval.Ary.Packed.alphabetEmbedding: the chunk alphabet in that prime field.
Main results #
Cslib.TreeEval.Ary.Packed.gateDegree_lt: the strict unmasking threshold.Cslib.TreeEval.Ary.Packed.fieldModulus_size_le: field elements use at most2m+2bits.Cslib.TreeEval.Ary.Packed.chunkCount_mul_framed_fieldModulus_size_le: shared framed-cell bound.Cslib.TreeEval.Ary.Packed.chunkCount_mul_parameter_sizes_le: modulus/alphabet bank cost.Cslib.TreeEval.Ary.Packed.length_encList_residues_le: encoded global-register storage.
References #
- R. Williams, Simulating Time With Square-Root Space, Appendix A, equation (6) and the final storage calculation. The source uses characteristic-two fields; this prime-field parameter choice is an original variant for the signed unmasking identity.
These are parameter and representation-length bounds. No native prime-search, arithmetic, packed evaluator or implicit gate-query space certificate is proved here.
Bits per chunk: the binary length of the total Boolean input width of a gate.
Number of chunks, with a possibly incomplete final chunk.
Total-degree bound for interpolation on the chunk alphabet.
The least prime strictly above the packed degree plus one. Its search cost is not certified.
The chosen modulus is prime.
Two units of slack keep the degree strictly below the unit-group order.
The sufficient degree threshold is strict, including the smallest parameters.
Bertrand's postulate bounds the least sufficient prime.
Nonempty gates and values have positive chunk width.
The chunks cover all bits of the value.
Padding adds less than one chunk.
Positive-width chunks are no more numerous than the original bits.
A nonempty value occupies at least one chunk.
The whole chunk alphabet fits below the modulus, not just the encoded Boolean values.
Embed a chunk as its unsigned value in the selected prime field.
The prime field has at most twice the chunk width plus two bits per residue.
One packed register has linear payload size, including a partial final chunk.
Framing each residue with c payload copies and one cell marker preserves linear storage.
The cases c = 2 and c = 4 account for the flat and padded bank layouts respectively.
Explicit output-count and alphabet/modulus storage fit one linear bank allowance.
Actual framed binary storage for the d+1 global registers. All residues, including zero,
and their list framing are charged. Any list with at most the full register count is allowed.
For a fixed machine's fan-in, the width term is affine in the value length.
An explicit affine bound on the encoded global registers when the fan-in is fixed.