Minimum-index dyadic band multiplication of signed-digit streams #
This module formalizes the minimum-index dyadic band multiplication algorithm of [OpenAI2026LogSpace, Section 10.3, Lemma 10.4].
Grouping cross-terms x_i y_j 2^{-(i+j)} by min i j into a zero band (min i j = 0) and
positive dyadic bands 2 ^ k ≤ min i j < 2 ^ (k + 1) with band-specific truncation margin
bandMargin k = 16 + bandStart k / 4 achieves three properties simultaneously:
- Scaled accuracy
< 2(mulApprox_isScaledApprox): folding the retained band sums frommaxBand tdown to0by signed floor shifts approximates2 ^ t * (streamVal x * streamVal y)within< 2. - Diagonal residue locality (
mulResidue_eq_mulApprox_emod): modulo2 ^ q,mulApprox x y tdepends in bandkonly on diagonalst - q < i + j ≤ t + bandMargin k, propagated downward by exact signed floor shifts of residues (ediv_two_pow_emod_eq). - Clock-drop latency payment (
three_mul_bandStart_le_four_mul_drop): for any retained pair(i, j)in a positive bandk + 1(D = 2 ^ k), both indices satisfy4 * j + 3 * D ≤ 4 * (t + 16), soD ≤ (4 / 3) * (t - j + 16)pays for the band circuit depth out of the clock dropt - j.
Main definitions #
Cslib.SignedDigitStream.mulBaseMargin,Cslib.SignedDigitStream.bandStart,Cslib.SignedDigitStream.bandEnd,Cslib.SignedDigitStream.bandIdx,Cslib.SignedDigitStream.bandMargin,Cslib.SignedDigitStream.maxBand: dyadic band geometry.Cslib.SignedDigitStream.bandPairs,Cslib.SignedDigitStream.bandSum,Cslib.SignedDigitStream.bandFold,Cslib.SignedDigitStream.mulApprox: exact integer band recursion and scaled product approximation.Cslib.SignedDigitStream.bandWindowPairs,Cslib.SignedDigitStream.bandWindowSum,Cslib.SignedDigitStream.bandFoldMod,Cslib.SignedDigitStream.mulResidue: windowed modular product residue computation.
Main results #
Cslib.SignedDigitStream.mulApprox_isScaledApprox:< 2scaled error bound forx * y.Cslib.SignedDigitStream.mulResidue_eq_mulApprox_emod: equivalence of the windowed residue fold withmulApprox x y t % 2 ^ q.Cslib.SignedDigitStream.three_mul_bandStart_le_four_mul_drop,Cslib.SignedDigitStream.index_le_clock_add_baseMargin: clock-drop latency inequalities.
References #
- OpenAI, Exact Derandomization of Logarithmic Space: L = RL = BPL,
Section 10.3, Equations (10.6)--(10.12), and Lemma 10.4 (23 September 2026, revision
7ef5c0cc, not peer reviewed).
Base margin h_∘ = 16 for minimum-index dyadic band multiplication.
Lower inclusive endpoint of dyadic band k (0 at k = 0, 2 ^ k at k + 1).
Upper exclusive endpoint of dyadic band k (1 at k = 0, 2 ^ (k + 1) at k + 1).
Band margin h_k = h_∘ + ⌊bandStart k / 4⌋ [OpenAI2026LogSpace, Section 10.3].
Logarithmic cutoff band count above which all retained bands at clock t are empty.
Exact mathematical integer sum S_k for band k at scale 2 ^ (t + bandMargin k)
[OpenAI2026LogSpace, (10.6)].
Diagonal-windowed band pairs satisfying t - q < i + j ≤ t + bandMargin k
[OpenAI2026LogSpace, (10.10)].
Windowed integer sum omitting terms divisible by 2 ^ (q + bandMargin k).
Modular downward band fold maintaining only the canonical (q + bandMargin k)-bit residue.
Clock-drop latency inequality [OpenAI2026LogSpace, (10.12)]: for any retained pair (i, j)
in a positive band k + 1 (D = 2 ^ k), 4 * j + 3 * D ≤ 4 * (t + mulBaseMargin) (and
symmetrically for i).
Every retained operand index i or j across all bands k obeys
i ≤ t + mulBaseMargin and j ≤ t + mulBaseMargin.
Windowed modular product residue theorem [OpenAI2026LogSpace, Lemma 10.4]:
mulResidue x y t q computes the exact mod-2^q Euclidean residue of mulApprox x y t while
retaining only diagonals t - q < i + j ≤ t + bandMargin k in each band.
Lemma 10.4 (scaled product approximation) [OpenAI2026LogSpace, Lemma 10.4]: for any two
signed-digit streams x, y, mulApprox x y approximates streamVal x * streamVal y within
scaled error < 2.