Documentation

CslibFrontier.Computability.LogSpaceDerandomization.SamplerPrefix

Mean and noise budgets for finite additive sampler prefixes #

A row has two raw channels. Its noise envelope is the fourth root of the sum of fourth powers of its channel errors over the endpoints in a finite set. This explicit envelope bounds the noise at each retained endpoint; its fourth moment is exactly the corresponding summed channel moment. The clipped mean/noise comparison requires only a nonnegative true first channel.

For a finite weighted prefix of actual walk averages, the deterministic mean is the same weighted sum of full-environment means. Finite Minkowski turns centered input moment budgets into a noise-envelope budget with no factor counting the groups. The graph and walk length may vary by group; all groups use the same environment and may be arbitrarily correlated. A separate result instantiates the single-row bound with the concrete retention-component walk.

These are finite fourth-moment assembly steps toward [OpenAI2026LogSpace, Sections 7.5–7.6, Lemma 7.8 and Section 8.1, (8.3)]. The source uses exponent eight; here the exponent is four. The adaptive budget/slack schedule, exact endpoint grouping, and verification that the walks vary every sample-dependent coordinate remain obligations of the recursive estimator. The endpoint set and slice/environment are fixed throughout a prefix. The component result conditions on one fixed retention tuple; it does not identify each row endpoint with its own conditioning slice. Integrating different endpoint slices is a separate obligation, and their actual densities are not identified with nominal retention rates.

Main definitions #

Main results #

References #

noncomputable def Cslib.RowCompression.rowNoiseEnvelope {ι : Type u_1} (S : Finset ι) (raw mean : ι → Fin 2 → ℝ) :

A two-channel row noise envelope, with zero value for an empty endpoint set.

theorem Cslib.RowCompression.rowNoiseEnvelope_nonneg {ι : Type u_1} (S : Finset ι) (raw mean : ι → Fin 2 → ℝ) :
0 ≤ rowNoiseEnvelope S raw mean

The row noise envelope is nonnegative.

theorem Cslib.RowCompression.rowNoiseEnvelope_pow_four {ι : Type u_1} (S : Finset ι) (raw mean : ι → Fin 2 → ℝ) :
rowNoiseEnvelope S raw mean ^ 4 = ∑ y ∈ S, ∑ ν : Fin 2, |raw y ν - mean y ν| ^ 4

Taking the fourth power recovers exactly the summed channel errors.

theorem Cslib.RowCompression.abs_sub_le_rowNoiseEnvelope {ι : Type u_1} (S : Finset ι) (raw mean : ι → Fin 2 → ℝ) {y : ι} (hy : y ∈ S) (ν : Fin 2) :
|raw y ν - mean y ν| ≤ rowNoiseEnvelope S raw mean

Every retained endpoint and channel is bounded by the same explicit row envelope.

theorem Cslib.RowCompression.clippedError_le_mean_add_rowNoiseEnvelope {ι : Type u_1} (S : Finset ι) (raw mean : ι → Fin 2 → ℝ) {y : ι} (hy : y ∈ S) {d v : ℝ} (hd : 0 ≤ d) :
clippedError d v (raw y) ≤ clippedError d v (mean y) + rowNoiseEnvelope S raw mean

Clipped raw error is at most its actual mean error plus the derived row noise envelope. No bound on the raw output discrepancy is assumed.

theorem Cslib.RotationMap.expect_rowNoiseEnvelope_walk_le {Ω : Type u_1} {D : Type u_2} {ι : Type u_3} [Fintype Ω] [Fintype D] [Nonempty D] (G : RotationMap Ω D) (S : Finset ι) (F : ι → Fin 2 → Ω → ℝ) (t : ℕ) :
(Finset.univ.expect fun (σ : Ω) => (RowCompression.rowNoiseEnvelope S (fun (y : ι) (ν : Fin 2) => (G.walk ^ (2 * t)) (F y ν) σ) fun (y : ι) (ν : Fin 2) => Finset.univ.expect fun (τ : Ω) => F y ν τ) ^ 4) ≤ 2 * G.spectralExpansion ^ (2 * t) * ∑ y ∈ S, ∑ ν : Fin 2, Finset.univ.expect fun (σ : Ω) => (F y ν σ - Finset.univ.expect fun (τ : Ω) => F y ν τ) ^ 4

A walk's actual centered channel errors supply a row-noise moment bound.

theorem Cslib.RotationMap.expect_rowNoiseEnvelope_prefix_le {Ω : Type u_1} {D : Type u_2} {ι : Type u_3} {I : Type u_4} [Fintype Ω] [Fintype D] [Nonempty D] [Finite ι] (s : Finset I) (S : Finset ι) (G : I → RotationMap Ω D) (t : I → ℕ) (F : I → ι → Fin 2 → Ω → ℝ) (w ε : I → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hε : ∀ i ∈ s, 0 ≤ ε i) (hbudget : ∀ i ∈ s, (2 * (G i).spectralExpansion ^ (2 * t i) * ∑ y ∈ S, ∑ ν : Fin 2, Finset.univ.expect fun (σ : Ω) => (F i y ν σ - Finset.univ.expect fun (τ : Ω) => F i y ν τ) ^ 4) ≤ ε i ^ 4) :
(Finset.univ.expect fun (σ : Ω) => (RowCompression.rowNoiseEnvelope S (fun (y : ι) (ν : Fin 2) => ∑ i ∈ s, w i * ((G i).walk ^ (2 * t i)) (F i y ν) σ) fun (y : ι) (ν : Fin 2) => ∑ i ∈ s, w i * Finset.univ.expect fun (τ : Ω) => F i y ν τ) ^ 4) ≤ (∑ i ∈ s, w i * ε i) ^ 4

Finite additive-prefix noise. The same-seed endpoint functions are averaged before measuring their errors. Individual centered input budgets imply the fourth power of the sum of the weighted budgets, with no factor counting the groups and no independence premise.

theorem Cslib.Probability.expect_rowNoiseEnvelope_componentMove_le {ι : Type u_1} {H M J : ℕ} {P L : Fin J → ℕ} [∀ (j : Fin J), Fact (Nat.Prime (P j))] [∀ (j : Fin J), NeZero (L j)] [NeZero M] (hH : 3 ≤ H) (hL : ∀ (j : Fin J), L j ≤ P j) (y : (j : Fin J) → ZMod (P j)) (S : Finset ι) (F : ι → Fin 2 → ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M) → ℝ) (t : ℕ) :
(Finset.univ.expect fun (A : ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M)) => (RowCompression.rowNoiseEnvelope S (fun (z : ι) (ν : Fin 2) => (((RotationMap.ofPerms (componentMove H M P L)).lazy.reindex (componentEquiv M hL y).symm).walk ^ (2 * t)) (F z ν) A) fun (z : ι) (ν : Fin 2) => Finset.univ.expect fun (B : ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M)) => F z ν B) ^ 4) ≤ 2 * (1 - 1 / (155648 * (↑J + 1) * ↑H ^ 4)) ^ (2 * t) * ∑ z ∈ S, ∑ ν : Fin 2, Finset.univ.expect fun (A : ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M)) => (F z ν A - Finset.univ.expect fun (B : ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M)) => F z ν B) ^ 4

The actual lazy component walk supplies the explicit conditional row-noise budget. All endpoint/channel samples may use the same environment and need not be independent.