Documentation

CslibFrontier.Computability.LogSpaceDerandomization.FineProductMean

Fine-bin conditional product comparison #

For a fine bin, conditioning must change to its narrower terminal slice before taking an ordinary error power. The seed space here is the actual finite product Γ × Υ: source masks depend on Γ, and the nested terminal masks depend on Υ. Every value and error may depend on both coordinates. No independence of estimated factors is assumed.

The terminal hit probabilities are the actual uniform densities πa, πb. Changing slices inside the mean cancels the importance coefficient πa / πb; changing the integrated endpoint mask leaves exactly one factor πa / πb outside the power. Thus the scale factor is (b / a) ^ s * (πa / πb), bounded by a fixed constant times (b / a) ^ (s - 1) when the actual hit probabilities are comparable to their rates.

The product comparison bounds each concrete product using the left row cap in each version, then applies the existing ordinary-versus-root and coupled product estimates. Source release still costs exactly f / u. Positive terminal densities are stated explicitly; source slices and the source seed type may be empty.

This proves the fine-product comparison in the proof of [OpenAI2026LogSpace, Lemma 7.3]. Copy projections, detectors, rewards, clipped residual domination and the recursive estimator remain separate.

Main results #

References #

theorem Cslib.abs_expect_pow_le {Ω : Type u_1} (S : Finset Ω) {s : ℕ} (hs : s ≠ 0) (v : Ω → ℝ) :
|S.expect fun (σ : Ω) => v σ| ^ s ≤ S.expect fun (σ : Ω) => |v σ| ^ s

The ordinary absolute error power contracts through a finite mean, including an empty mean when the exponent is positive.

theorem Cslib.conditionalTableMean_mul_sub {Ω : Type u_1} {V : Type u_2} [Fintype Ω] (X Y : Ω → V → Prop) [(σ : Ω) → (x : V) → Decidable (X σ x)] [(σ : Ω) → (y : V) → Decidable (Y σ y)] (c : ℝ) (H H' : Ω → V → V → ℝ) (x y : V) :
conditionalTableMean X Y (fun (σ : Ω) (x y : V) => c * (H σ x y - H' σ x y)) x y = c * conditionalTableMean X Y H x y - c * conditionalTableMean X Y H' x y

The conditional mean of a scaled difference is exactly the difference of the two scaled conditional means. Thus the product-difference integrand below is the actual mean error.

theorem Cslib.rowNormPow_conditionalTableMean_le {Ω : Type u_1} {V : Type u_2} [Fintype Ω] [Fintype V] {s : ℕ} {N u : ℝ} (hs : s ≠ 0) (hNu : 0 ≤ N * u) (X Y : Ω → V → Prop) [(σ : Ω) → (x : V) → Decidable (X σ x)] [(σ : Ω) → (y : V) → Decidable (Y σ y)] (D : Ω → V → V → ℝ) :
(rowNormPow s N u X Y fun (x : Ω) (x_1 y : V) => conditionalTableMean X Y D x_1 y) ≤ rowNormPow s N u X Y D

The integrated ordinary error of the actual conditional mean is at most the original integrated ordinary error. The density of each conditioning slice cancels exactly.

theorem Cslib.rowNormPow_const_eq_dens_sum {Ω : Type u_1} {V : Type u_2} [Fintype Ω] [Fintype V] (s : ℕ) (N u : ℝ) (X Y : Ω → V → Prop) [(σ : Ω) → (x : V) → Decidable (X σ x)] [(σ : Ω) → (y : V) → Decidable (Y σ y)] (v : V → V → ℝ) :
(rowNormPow s N u X Y fun (x : Ω) => v) = (N * u)⁻¹ * ∑ x : V, ∑ y : V, ↑{σ : Ω | X σ x ∧ Y σ y}.dens * |v x y| ^ s

A deterministic table is weighted by the actual joint source/endpoint densities.

theorem Cslib.rowNormPow_mul {Ω : Type u_1} {V : Type u_2} [Fintype Ω] [Fintype V] {s : ℕ} {N u c : ℝ} (hc : 0 ≤ c) (X Y : Ω → V → Prop) [(σ : Ω) → (x : V) → Decidable (X σ x)] [(σ : Ω) → (y : V) → Decidable (Y σ y)] (D : Ω → V → V → ℝ) :
(rowNormPow s N u X Y fun (σ : Ω) (x y : V) => c * D σ x y) = c ^ s * rowNormPow s N u X Y D

A nonnegative constant scales the integrated row moment by its power.

theorem Cslib.dens_source_terminal {V : Type u_2} {Γ : Type u_3} {Υ : Type u_4} [Fintype Γ] [Fintype Υ] (X : Γ → V → Prop) (Ya : Υ → V → Prop) [(γ : Γ) → (x : V) → Decidable (X γ x)] [(τ : Υ) → (y : V) → Decidable (Ya τ y)] (x y : V) :
↑{σ : Γ × Υ | X σ.1 x ∧ Ya σ.2 y}.dens = ↑{γ : Γ | X γ x}.dens * ↑{τ : Υ | Ya τ y}.dens

Source and terminal masks on separate seed coordinates have the product of their actual uniform densities. Empty seed spaces and slices are included.

theorem Cslib.conditionalTableMean_change_terminal {V : Type u_2} {Γ : Type u_3} {Υ : Type u_4} [Fintype Γ] [Fintype Υ] (X : Γ → V → Prop) (Ya Yb : Υ → V → Prop) [(γ : Γ) → (x : V) → Decidable (X γ x)] [(τ : Υ) → (y : V) → Decidable (Ya τ y)] [(τ : Υ) → (y : V) → Decidable (Yb τ y)] {πa πb : ℝ} (hπb : 0 < πb) (hYaπ : ∀ (y : V), ↑{τ : Υ | Ya τ y}.dens = πa) (hYbπ : ∀ (y : V), ↑{τ : Υ | Yb τ y}.dens = πb) (hsub : ∀ (τ : Υ) (y : V), Yb τ y → Ya τ y) (D : Γ × Υ → V → V → ℝ) (hD : ∀ (σ : Γ × Υ) (x y : V), ¬Yb σ.2 y → D σ x y = 0) (x y : V) :
conditionalTableMean (fun (σ : Γ × Υ) (x : V) => X σ.1 x) (fun (σ : Γ × Υ) (y : V) => Ya σ.2 y) (fun (σ : Γ × Υ) (x y : V) => πa / πb * D σ x y) x y = conditionalTableMean (fun (σ : Γ × Υ) (x : V) => X σ.1 x) (fun (σ : Γ × Υ) (y : V) => Yb σ.2 y) D x y

Change actual terminal conditioning before any error power is taken. The source can have an empty slice; only the narrower terminal density is required to be positive.

theorem Cslib.rowNormPow_const_change_terminal {V : Type u_2} [Fintype V] {Γ : Type u_3} {Υ : Type u_4} [Fintype Γ] [Fintype Υ] (X : Γ → V → Prop) (Ya Yb : Υ → V → Prop) [(γ : Γ) → (x : V) → Decidable (X γ x)] [(τ : Υ) → (y : V) → Decidable (Ya τ y)] [(τ : Υ) → (y : V) → Decidable (Yb τ y)] (s : ℕ) (N u : ℝ) {πa πb : ℝ} (hπb : 0 < πb) (hYaπ : ∀ (y : V), ↑{τ : Υ | Ya τ y}.dens = πa) (hYbπ : ∀ (y : V), ↑{τ : Υ | Yb τ y}.dens = πb) (v : V → V → ℝ) :
(rowNormPow s N u (fun (σ : Γ × Υ) (x : V) => X σ.1 x) (fun (σ : Γ × Υ) (y : V) => Ya σ.2 y) fun (x : Γ × Υ) => v) = πa / πb * rowNormPow s N u (fun (σ : Γ × Υ) (x : V) => X σ.1 x) (fun (σ : Γ × Υ) (y : V) => Yb σ.2 y) fun (x : Γ × Υ) => v

For a deterministic table, changing the integrated terminal mask leaves one exact density ratio outside the error power. This follows from finite product cardinalities.

theorem Cslib.rowNormPow_fineMean_le {V : Type u_2} [Fintype V] {Γ : Type u_3} {Υ : Type u_4} [Fintype Γ] [Fintype Υ] (X : Γ → V → Prop) (Ya Yb : Υ → V → Prop) [(γ : Γ) → (x : V) → Decidable (X γ x)] [(τ : Υ) → (y : V) → Decidable (Ya τ y)] [(τ : Υ) → (y : V) → Decidable (Yb τ y)] {s : ℕ} {N u c πa πb : ℝ} (hs : s ≠ 0) (hNu : 0 ≤ N * u) (hc : 0 ≤ c) (hπa : 0 < πa) (hπb : 0 < πb) (hYaπ : ∀ (y : V), ↑{τ : Υ | Ya τ y}.dens = πa) (hYbπ : ∀ (y : V), ↑{τ : Υ | Yb τ y}.dens = πb) (hsub : ∀ (τ : Υ) (y : V), Yb τ y → Ya τ y) (D : Γ × Υ → V → V → ℝ) (hD : ∀ (σ : Γ × Υ) (x y : V), ¬Yb σ.2 y → D σ x y = 0) :
(rowNormPow s N u (fun (σ : Γ × Υ) (x : V) => X σ.1 x) (fun (σ : Γ × Υ) (y : V) => Ya σ.2 y) fun (x : Γ × Υ) (x_1 y : V) => conditionalTableMean (fun (σ : Γ × Υ) (x : V) => X σ.1 x) (fun (σ : Γ × Υ) (y : V) => Ya σ.2 y) (fun (σ : Γ × Υ) (x y : V) => c * (πa / πb) * D σ x y) x_1 y) ≤ c ^ s * (πa / πb) * rowNormPow s N u (fun (σ : Γ × Υ) (x : V) => X σ.1 x) (fun (σ : Γ × Υ) (y : V) => Yb σ.2 y) D

Fine conditioning before powers. The supported sample has importance factor πa / πb inside the broad-slice mean. After changing to the fine slice, Jensen contributes c ^ s, while the integrated mask change contributes only one πa / πb. The function may couple both seed coordinates arbitrarily.

theorem Cslib.rowNormPow_product_sub_le {Ω : Type u_1} {V : Type u_2} [Fintype Ω] [Fintype V] {s Kf Kr Kc : ℕ} {N u f CF CB : ℝ} {X Z Y : Ω → V → Prop} [(σ : Ω) → (x : V) → Decidable (X σ x)] [(σ : Ω) → (z : V) → Decidable (Z σ z)] [(σ : Ω) → (y : V) → Decidable (Y σ y)] (hs : s ≠ 0) (hN : 0 < N) (hu : 0 < u) (hf : 0 < f) (hCF : 0 ≤ CF) (hCB : 0 ≤ CB) {F F' B B' : Ω → V → V → ℝ} (hF : ∀ (σ : Ω) (x z : V), 0 ≤ F σ x z) (hF' : ∀ (σ : Ω) (x z : V), 0 ≤ F' σ x z) (hB : ∀ (σ : Ω) (z y : V), 0 ≤ B σ z y) (hB' : ∀ (σ : Ω) (z y : V), 0 ≤ B' σ z y) (hFbound : ∀ (σ : Ω) (x z : V), F σ x z ≤ CF) (hF'bound : ∀ (σ : Ω) (x z : V), F' σ x z ≤ CF) (hBbound : ∀ (σ : Ω) (z y : V), B σ z y ≤ CB) (hB'bound : ∀ (σ : Ω) (z y : V), B' σ z y ≤ CB) (hleft : ∀ (σ : Ω) (x : V), X σ x → {z ∈ {z : V | Z σ z} | F σ x z ≠ 0}.card ≤ Kf) (hleft' : ∀ (σ : Ω) (x : V), X σ x → {z ∈ {z : V | Z σ z} | F' σ x z ≠ 0}.card ≤ Kf) (hrow : ∀ (σ : Ω) (z : V), Z σ z → {y ∈ {y : V | Y σ y} | B σ z y ≠ 0}.card ≤ Kr) (hcol : ∀ (σ : Ω) (z : V), Z σ z → {x ∈ {x : V | X σ x} | F' σ x z ≠ 0}.card ≤ Kc) :
(rowNormPow s N u X Y fun (σ : Ω) (x y : V) => ∑ z : V with Z σ z, F σ x z * B σ z y - ∑ z : V with Z σ z, F' σ x z * B' σ z y) ≤ (↑s * (↑Kf * CF * CB) ^ ((↑s - 1) / ↑s)) ^ s * (2 ^ (2 * (s - 1)) * ↑s ^ s) * (CB * ↑Kr * rootDistPow s N u X Z F F' + CF * ↑Kc * (f / u) * rootDistPow s N f Z Y B B')

Ordinary coupled product errors. Both left row caps bound each actual product by Kf * CF * CB. The resulting ordinary-versus-root factor is explicit, and the remaining product estimate retains the exact source-release factor f / u.

theorem Cslib.fineScaleCost_le {s : ℕ} (hs : s ≠ 0) {a b πa πb Ca cb : ℝ} (ha : 0 < a) (hb : 0 < b) (hπb : 0 < πb) (hCa : 0 ≤ Ca) (hcb : 0 < cb) (hupper : πa ≤ Ca * a) (hlower : cb * b ≤ πb) :
(b / a) ^ s * (πa / πb) ≤ Ca / cb * (b / a) ^ (s - 1)

The exact terminal-density factor becomes the fine-scale power s - 1 when the actual hit probabilities are bounded above and below by fixed multiples of their positive rates.

theorem Cslib.rowNormPow_fineProductMean_le {V : Type u_2} [Fintype V] {Γ : Type u_3} {Υ : Type u_4} [Fintype Γ] [Fintype Υ] {s Kf Kr Kc : ℕ} {N u a b f πa πb πf Ca cb CF CB : ℝ} (X : Γ → V → Prop) (Ya Yb : Υ → V → Prop) (Z : Γ × Υ → V → Prop) [(γ : Γ) → (x : V) → Decidable (X γ x)] [(τ : Υ) → (y : V) → Decidable (Ya τ y)] [(τ : Υ) → (y : V) → Decidable (Yb τ y)] [(σ : Γ × Υ) → (z : V) → Decidable (Z σ z)] (hs : s ≠ 0) (hN : 0 < N) (hu : 0 < u) (hb : 0 < b) (hba : b ≤ a) (hf : 0 < f) (hπa : 0 < πa) (hπb : 0 < πb) (hπf : 0 < πf) (hCa : 0 ≤ Ca) (hcb : 0 < cb) (hupper : πa ≤ Ca * a) (hlower : cb * b ≤ πb) (hYaπ : ∀ (y : V), ↑{τ : Υ | Ya τ y}.dens = πa) (hYbπ : ∀ (y : V), ↑{τ : Υ | Yb τ y}.dens = πb) (hsub : ∀ (τ : Υ) (y : V), Yb τ y → Ya τ y) (hCF : 0 ≤ CF) (hCB : 0 ≤ CB) {F F' B B' : Γ × Υ → V → V → ℝ} (hF : ∀ (σ : Γ × Υ) (x z : V), 0 ≤ F σ x z) (hF' : ∀ (σ : Γ × Υ) (x z : V), 0 ≤ F' σ x z) (hB : ∀ (σ : Γ × Υ) (z y : V), 0 ≤ B σ z y) (hB' : ∀ (σ : Γ × Υ) (z y : V), 0 ≤ B' σ z y) (hFbound : ∀ (σ : Γ × Υ) (x z : V), F σ x z ≤ CF) (hF'bound : ∀ (σ : Γ × Υ) (x z : V), F' σ x z ≤ CF) (hBbound : ∀ (σ : Γ × Υ) (z y : V), B σ z y ≤ CB) (hB'bound : ∀ (σ : Γ × Υ) (z y : V), B' σ z y ≤ CB) (hleft : ∀ (σ : Γ × Υ) (x : V), X σ.1 x → {z ∈ {z : V | Z σ z} | F σ x z ≠ 0}.card ≤ Kf) (hleft' : ∀ (σ : Γ × Υ) (x : V), X σ.1 x → {z ∈ {z : V | Z σ z} | F' σ x z ≠ 0}.card ≤ Kf) (hrow : ∀ (σ : Γ × Υ) (z : V), Z σ z → {y ∈ {y : V | Yb σ.2 y} | B σ z y ≠ 0}.card ≤ Kr) (hcol : ∀ (σ : Γ × Υ) (z : V), Z σ z → {x ∈ {x : V | X σ.1 x} | F' σ x z ≠ 0}.card ≤ Kc) (hBsupport : ∀ (σ : Γ × Υ) (z y : V), ¬Yb σ.2 y → B σ z y = 0) (hB'support : ∀ (σ : Γ × Υ) (z y : V), ¬Yb σ.2 y → B' σ z y = 0) :
have E := fun (σ : Γ × Υ) (x y : V) => ∑ z : V with Z σ z, F σ x z * B σ z y - ∑ z : V with Z σ z, F' σ x z * B' σ z y; (rowNormPow s N u (fun (σ : Γ × Υ) (x : V) => X σ.1 x) (fun (σ : Γ × Υ) (y : V) => Ya σ.2 y) fun (x : Γ × Υ) (x_1 y : V) => conditionalTableMean (fun (σ : Γ × Υ) (x : V) => X σ.1 x) (fun (σ : Γ × Υ) (y : V) => Ya σ.2 y) (fun (σ : Γ × Υ) (x y : V) => b / a * (f / πf) * (πa / πb) * E σ x y) x_1 y) ≤ (f / πf) ^ s * (Ca / cb) * (b / a) ^ (s - 1) * ((↑s * (↑Kf * CF * CB) ^ ((↑s - 1) / ↑s)) ^ s * (2 ^ (2 * (s - 1)) * ↑s ^ s) * (CB * ↑Kr * rootDistPow s N u (fun (σ : Γ × Υ) (x : V) => X σ.1 x) Z F F' + CF * ↑Kc * (f / u) * rootDistPow s N f Z (fun (σ : Γ × Υ) (y : V) => Yb σ.2 y) B B'))

Fine-bin conditional product comparison [OpenAI2026LogSpace, proof of Lemma 7.3]. Both sample products are concrete finite sums. The actual terminal density ratio is removed inside the conditional mean and paid once outside the power. The two left row caps prove the product bound used in the ordinary-versus-root comparison. All estimated factors may be coupled.

The rates satisfy 0 < b ≤ a, and the actual densities satisfy πa ≤ Ca * a and cb * b ≤ πb. The explicit scale factor is therefore (f / πf) ^ s * (Ca / cb) * (b / a) ^ (s - 1); the right child still costs exactly f / u. This is an ordinary mean-error bound, so clipped relative error is no larger when its normalized denominator is at least one.