Early-word reciprocal and normalized smooth estimators on signed-digit streams #
This module formalizes the reciprocal algorithm of [OpenAI2026LogSpace, Section 10.4, Lemma 10.5]
together with the normalized stream decompositions of Cslib.polynomialTransition4,
Cslib.polynomialSwitch4, Cslib.rationalRamp4Unit, and the clipped stochastic-atom reciprocal
1 / (2 * max (1 / 2) (min 1 q)).
Main definitions #
Cslib.SignedDigitStream.recipCutoff: early-word truncation placet / 2 + 7at clockt.Cslib.SignedDigitStream.recipPrefixRat,recipAlpha,recipBeta: rational early prefixx^{[t / 2 + 7]}and normalized first-order Taylor coefficients for1 / (64 * x)onx ∈ [1 / 4, 1].Cslib.SignedDigitStream.recip64Approx,recip64Stream: scaled integer approximations and exact signed-digit stream for1 / (64 * streamVal x)whenstreamVal x ∈ [1 / 4, 1].Cslib.SignedDigitStream.dyadicSwitch,dyadicWeight: smooth dyadic partition of unity on[1, 2 ^ (m + 1)]built fromCslib.polynomialSwitch4, reducing1 / (1 + max 0 t)inCslib.rationalRamp4Unitto a balanced sum of reciprocals evaluated solely on[1 / 4, 1].
Main results #
Cslib.SignedDigitStream.recipCutoff_clock_payment: forj ≤ recipCutoff t,recipCutoff t + 1 ≤ 22 + 2 * (t - j)(early-word suspended-record payment).Cslib.SignedDigitStream.recip64Approx_isScaledApprox,streamVal_recip64Stream: Lemma 10.5 for normalized reciprocals on[1 / 4, 1].Cslib.SignedDigitStream.shiftClipVal_clippedAtomInv: exact recovery of1 / (2 * max (1 / 2) (min 1 q))from1 / (64 * max (1 / 4) (max (1 / 2) (min 1 q))).Cslib.SignedDigitStream.polynomialTransition4_eq_shiftClip: normalized[-1, 1]stream decomposition ofCslib.polynomialTransition4.Cslib.SignedDigitStream.rationalRamp4Unit_eq_poly_add_invandinv_eq_sum_dyadicWeight: smooth dyadic partition-of-unity reduction ofCslib.rationalRamp4Unitto[1 / 4, 1]reciprocals andCslib.polynomialTransition4.
References #
- OpenAI, Exact Derandomization of Logarithmic Space: L = RL = BPL,
Section 10.4, Equations (10.13)--(10.16), and Lemma 10.5 (23 September 2026,
revision
7ef5c0cc, not peer reviewed).
Early-word truncation cutoff k(t) = t / 2 + 7 for 1 / (64 * x) on [1 / 4, 1]
[OpenAI2026LogSpace, Lemma 10.5].
Early-word clock payment [OpenAI2026LogSpace, (10.16)]: every query j ≤ recipCutoff t
during formation of the (recipCutoff t + 1)-place integer prefix is paid for by 2 * (t - j)
with constant additive slack.
Also t + 1 itself is bounded by 15 + 2 * (t - j) on every early-word query
j ≤ recipCutoff t [OpenAI2026LogSpace, (10.16)].
Rational early prefix x^{[recipCutoff t]} formed from digits 0 .. recipCutoff t.
Lemma 10.5 (early-word scaled reciprocal) [OpenAI2026LogSpace, Lemma 10.5]: for any
signed-digit stream x with streamVal x ∈ [1 / 4, 1], recip64Approx x approximates
1 / (64 * streamVal x) within scaled error < 2.
Normalized [-1, 1] stream decomposition of Cslib.polynomialTransition4 via pairAvg
and shiftClipVal 7.
Smooth dyadic transition polynomialSwitch4 (2 ^ r) (2 ^ (r + 1)) w.
Smooth dyadic partition-of-unity weight ω_{m, r}(w) across scales 0 ≤ r ≤ m.
Division-free normalized evaluation of dyadicSwitch r w from wNorm = w / 2 ^ (m + 1)
whenever 0 ≤ w and r ≤ m.
Whenever dyadicWeight m r w ≠ 0 on w ∈ [1, 2 ^ (m + 1)], the scaled argument
w / 2 ^ (r + 1) automatically lies in [1 / 4, 1].
Smooth dyadic partition-of-unity reciprocal formula: for every w ∈ [1, 2 ^ (m + 1)],
1 / w equals a weighted sum of m + 1 reciprocals whose arguments are all clamped to the
fixed interval [1 / 4, 1].