Finite thin-product correctness and cardinality bounds #
Main results #
thin_product_spec: exact queried entries for arbitrary signed integer matrices.encodings_total_le,total_leaves_le,total_passed_sets_le: explicit finite totals.
Correctness holds for arbitrary signed integer matrices and any layout. For D = 4^m,
L = 19m, D^18 ≤ N and W.card * 2^m ≤ N², the encoding entry count is at most
4 * D^(-1/18) * N², the sum of contributing-leaf cardinalities is at most
33 * D^(-1/18) * N², and the sum of passed request-set cardinalities is at most
(19m + 1) * 33 * D^(-1/18) * N². Here N is the original matrix dimension.
The definitions permit zero parameters and empty request sets; the bounds retain their
stated size and sparsity hypotheses. No native program or instruction bound is proved.
References #
Adapted selectively from [AlmanWilliams2026, Section 2] and
Anthropic's pinned formal source.
Source pin: 16a5ce41304fcdaea4e0be7c132e1c361dc26da5. These are finite mathematical
counts and identities; they give no native program or instruction-cost certificate.
For arbitrary signed integer matrices of shapes N × D m and D m × N, the pruned result
at any position in W equals the corresponding entry of X * Y. The encodings and
request set are those for that position's row and column bands. This holds for every
Layout L m, which includes m ≤ L, without the size or sparsity conditions used in the
counting bounds (cf. [AlmanWilliams2026, Theorem 5]).
At L = 19 * m with D m ^ 18 ≤ N, the encodings of all row-band and column-band arrays
have at most 4 * D^(-1/18) * N² entries in total, where D = D m. The counted quantity
is 2 * numBands L m N * 10 ^ L, and N is the original dimension. This is an entry
count, not a bound on instructions or encoding time.
At L = 19 * m, bound the sum of contributing-leaf cardinalities for the tile request
sets by saving m * (2 ^ m * W.card + 2 * ∑ T ∈ tiles L m N, M L m). A leaf used in
distinct tiles is counted once for each such tile.
At L = 19 * m, assume D m ^ 18 ≤ N and W.card * 2 ^ m ≤ N ^ 2. The sum of
contributing-leaf cardinalities over all tiles is then at most 33 * D^(-1/18) * N²,
where D = D m and N is the original dimension. This counts leaves with their tile
multiplicities, not executed instructions.
At L = 19 * m, assume D m ^ 18 ≤ N and W.card * 2 ^ m ≤ N ^ 2. Summing
Pruned.totalSize over all tiles gives at most (19 * m + 1) * (33 * D^(-1/18) * N²),
where D = D m and N is the original dimension. The quantity sums request-set
cardinalities through the pruned recursions; it is not an instruction count.