Documentation

CslibFrontier.Computability.LogSpaceDerandomization.EstimatorPrecision

Precision pays for scale and source changes #

This module proves the precision calculation in [OpenAI2026LogSpace, Section 7.4, p. 38]. A task with budget M, rank i, endpoint rate a, and source rate u has precision M / K + (log₂ a + log₂ u) / 2 - A * i. This is the source's formula with the two logarithms of inverse rates rewritten. Subtracting two task precisions gives the exact budget, rate, and rank contributions; budget-zero tasks with rates in (0, 1] are inactive when A ≥ 0.

For a moment exponent s > 2, the norm costs of coarse and fine bins have exponents 1/s and (s-1)/s. The half-logarithmic precision weight leaves the positive margin 1/2 - 1/s in both directions. The same weight pays for source release when the child source rate is at least the parent source rate. In particular the margin is 1/4 for the fourth-moment route of issue #1721, and 3/8 for the pinned preprint's exponent eight.

The theorems establish the scalar precision and scale/domain compensation calculation. They do not choose the global precision constant or walk length, construct an additive sampler, or assert its recursive error bound.

Main definitions #

Main results #

References #

noncomputable def Cslib.LogSpaceEstimation.precision (K A : ℝ) (M i : ℕ) (a u : ℝ) :

Implicit precision at budget M and dependency rank i. Rates are positive in applications.

theorem Cslib.LogSpaceEstimation.precision_eq_inv_rates (K A : ℝ) (M i : ℕ) (a u : ℝ) :
precision K A M i a u = ↑M / K - Real.logb 2 (1 / a) / 2 - Real.logb 2 (1 / u) / 2 - A * ↑i

The equivalent convention written using inverse rates in the source.

theorem Cslib.LogSpaceEstimation.precision_dyadic_rates (K A : ℝ) (M i : ℕ) (α υ : ℝ) :
precision K A M i (2 ^ (-α)) (2 ^ (-υ)) = ↑M / K - (α + υ) / 2 - A * ↑i

Dyadic rates give the affine formula without logarithms. The offsets can be real, so this also covers exact powers of two outside the discrete hierarchy.

theorem Cslib.LogSpaceEstimation.precision_child_sub (K A : ℝ) (M m i i' : ℕ) {a a' u u' : ℝ} (ha : 0 < a) (ha' : 0 < a') (hu : 0 < u) (hu' : 0 < u') :
precision K A m i' a' u' - precision K A M i a u = -(↑M - ↑m) / K + Real.logb 2 (a' / a) / 2 + Real.logb 2 (u' / u) / 2 + A * (↑i - ↑i')

The exact child-precision identity, before imposing any rank decrease or budget cutoff.

theorem Cslib.LogSpaceEstimation.precision_mono_budget {K A a u : ℝ} (hK : 0 < K) (i : ℕ) :
Monotone fun (M : ℕ) => precision K A M i a u

Increasing the integer budget cannot decrease precision for a positive precision constant.

theorem Cslib.LogSpaceEstimation.precision_zero_nonpos {K A a u : ℝ} (hA : 0 ≤ A) (ha : 0 < a) (ha1 : a ≤ 1) (hu : 0 < u) (hu1 : u ≤ 1) (i : ℕ) :
precision K A 0 i a u ≤ 0

Budget-zero tasks at rates in (0, 1] are inactive.

The geometric margin from the half-logarithmic precision weight at moment exponent s.

noncomputable def Cslib.LogSpaceEstimation.binNormCost (s h : ℝ) :

Norm cost for a bin with rate ratio 2 ^ h: coarse exponent 1/s, fine exponent (s-1)/s. This names the costs supplied by the separate scale/domain norm comparisons.

theorem Cslib.LogSpaceEstimation.binNormCost_mul_accuracy {s : ℝ} (hs : s ≠ 0) (h : ℝ) :
binNormCost s h * 2 ^ (-h / 2) = 2 ^ (-scaleMargin s * |h|)

The same positive margin controls both coarse and fine scales. This is an exact identity.

theorem Cslib.LogSpaceEstimation.source_cost_mul_accuracy {s r : ℝ} (hr : 0 < r) :
r ^ (1 / s) * r ^ (-(1 / 2)) = r ^ (-scaleMargin s)

The half-logarithmic source precision weight cancels more than the source-release cost.

theorem Cslib.LogSpaceEstimation.source_cost_mul_accuracy_le_one {s r : ℝ} (hs : 2 < s) (hr : 1 ≤ r) :
r ^ (1 / s) * r ^ (-(1 / 2)) ≤ 1

Resetting the source to a broader rate costs at most one after its precision gain, for every moment exponent strictly above two.

theorem Cslib.LogSpaceEstimation.child_cost_mul_accuracy {s K A a a' u u' : ℝ} (hs : s ≠ 0) (M m i i' : ℕ) (ha : 0 < a) (ha' : 0 < a') (hu : 0 < u) (hu' : 0 < u') :
binNormCost s (Real.logb 2 (a' / a)) * 2 ^ (Real.logb 2 (u' / u) / s) * 2 ^ (-precision K A m i' a' u') = 2 ^ (-precision K A M i a u + (↑M - ↑m) / K - A * (↑i - ↑i')) * 2 ^ (-scaleMargin s * |Real.logb 2 (a' / a)|) * 2 ^ (-scaleMargin s * Real.logb 2 (u' / u))

The scale cost, source cost and actual child accuracy split into the parent accuracy, the budget/rank payment and two explicit geometric margins. This identity uses no independence or probabilistic assumptions.

theorem Cslib.LogSpaceEstimation.child_cost_mul_accuracy_le {s K A a a' u u' : ℝ} (hs : 2 < s) (hA : 0 ≤ A) (M m i i' : ℕ) (hi : i' + 1 ≤ i) (ha : 0 < a) (ha' : 0 < a') (hu : 0 < u) (huu' : u ≤ u') :
binNormCost s (Real.logb 2 (a' / a)) * 2 ^ (Real.logb 2 (u' / u) / s) * 2 ^ (-precision K A m i' a' u') ≤ 2 ^ (-precision K A M i a u - A + (↑M - ↑m) / K) * 2 ^ (-scaleMargin s * |Real.logb 2 (a' / a)|)

A dependency rank decrease pays one rank unit. Broadening the source costs no additional factor, and both directions of the endpoint scale retain the positive geometric margin.

theorem Cslib.LogSpaceEstimation.child_cost_mul_accuracy_le_of_rate_le {s K A a a' b c u u' : ℝ} (hs : 2 < s) (hA : 0 ≤ A) (M m i i' : ℕ) (hi : i' + 1 ≤ i) (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) (hba' : c * b ≤ a') (hu : 0 < u) (huu' : u ≤ u') :
binNormCost s (Real.logb 2 (b / a)) * 2 ^ (Real.logb 2 (u' / u) / s) * 2 ^ (-precision K A m i' a' u') ≤ 2 ^ (-Real.logb 2 c / 2) * (2 ^ (-precision K A M i a u - A + (↑M - ↑m) / K) * 2 ^ (-scaleMargin s * |Real.logb 2 (b / a)|))

A child rate only needs to dominate a fixed multiple of the bin rate. The resulting constant is exactly 2 ^ (-log₂ c / 2); the geometric decay is still measured at the actual bin offset. This is the form needed when a correction child uses the broad stage rate rather than the bin.