Bitmasks, trie views, caller registers, and envelopes for trimmed Yates on the word RAM #
Shared data definitions and semantic invariants for the Word-RAM implementation of selected entries of covering product and ranked subset convolution ([CIMY26], Theorem 2.2):
setMask: unsignedd-bit word representation ofS : Finset (Fin d).HoldsTrie: read-only bounded view of depth-dbinary tries in flat word memory.numRegsandReg.*: caller-facing register ABI over the56-register bank.lowCount,highCount,highPeak,valueEnvelope,solveSpace: combinatorial domain counts and explicit space and word-width envelopes.
Main definitions #
Cslib.Algorithms.WordRAM.TrimmedYates.setMask:d-bit unsigned mask ofS : Finset (Fin d).Cslib.Algorithms.WordRAM.TrimmedYates.HoldsTrie: bounded read-only depth-dbinary trie predicate.Cslib.Algorithms.WordRAM.TrimmedYates.numRegs: total register count (56).Cslib.Algorithms.WordRAM.TrimmedYates.lowCount,highCount,highPeak,valueEnvelope,solveSpace: combinatorial table sizes and explicit space/width envelopes.
Main results #
Cslib.Algorithms.WordRAM.TrimmedYates.setMask_lt,testBit_setMask,setMask_injective,setMask_insert,setMask_erase,setMask_sdiff: bit-level characterizations ofsetMask.Cslib.Algorithms.WordRAM.TrimmedYates.HoldsTrie.mono_bound,HoldsTrie.congr_below,HoldsTrie.zero_root: address-bound monotonicity, memory framing, and empty-root rules.Cslib.Algorithms.WordRAM.TrimmedYates.lowCount_pos,sum_range_sub_eq_highCount,highCount_pos,le_highPeak_of_mem,highPeak_le_of_forall_card_eq: combinatorial bounds on low and high subset domains.
References #
Depth-d binary tries in flat word memory #
Caller-facing register ABI #
Total register count (47 algorithm registers above the 9-register WordRAM.Signed bank).
Input register holding universe dimension d for buildInputTrie and solveFromTries.
Input register holding trimming threshold s for solveFromTries.
Input/output register holding the bump-allocation pointer for buildInputTrie and
solveFromTries.
Output register holding the length-prefixed answer array header address.
Input register holding the base address of (setMask S, Signed.encode v) entry pairs for
buildInputTrie.
Input register holding the number of sparse (S, v) entries for buildInputTrie.
Output register receiving the allocated root address of buildInputTrie.
Input register holding the depth-d trie root for f (0 for the identically zero table).
Input register holding the depth-d trie root for g (0 for the identically zero table).
Input register holding the base address of the query-mask array.
Input register holding the number of queries.
Combinatorial counts and workspace/value envelopes #
Number of subsets of Fin d of size at most s: ∑_{j = 0}^s C(d, j).
Number of subsets of an m-element set of size at least s: ∑_{j = s}^m C(m, j).
Envelope for signed arithmetic and d-bit masks at universe dimension d and input weight
bound W: 8 * (8 ^ d * (W + 1) ^ 2) + 4.
Workspace upper bound for solveFromTries starting from bump pointer baseFree.