Documentation

CslibFrontier.Computability.LogSpaceDerandomization.HeavyCountTail

Rare mean tails and correlated first-overflow noise #

Conditional rarity contracts deterministic endpoint mean errors before finite Minkowski sums are formed. The resulting weighted mean-tail budget contains the p-th root of each rarity factor. Correlated noise instead uses the existing unconditional actual first-overflow budget. A pointwise comparison connects their sum to the actual true-overflow mask in compression.

These are finite, exponent-parametric versions of the mean and noise aggregation in [OpenAI2026LogSpace, Section 8.4, proof of Proposition 8.5], source labels buf-true-sum and buf-noise-sum, revision 7ef5c0cc (23 September 2026, not peer reviewed). Fourth moments are included. Conditional rarity and the individual mean/noise budgets remain hypotheses; this module does not derive them for the recursive estimator or choose convergent schedules.

Main results #

References #

noncomputable def Cslib.eventTail {Ω : Type u_1} {V : Type u_2} (m : ℕ) (Θ : ℕ → Ω → V → Prop) (w : ℕ → ℝ) (β : ℕ → Ω → V → ℝ) (σ : Ω) (x : V) :

A finite weighted tail selected by each row event.

theorem Cslib.vertexNormPow_eventTail_le {Ω : Type u_1} {V : Type u_2} [Fintype Ω] [Fintype V] {p : ℕ} (hp : p ≠ 0) {N u : ℝ} (hNu : 0 ≤ N * u) (X Y : Ω → V → Prop) [(σ : Ω) → (x : V) → Decidable (X σ x)] [(σ : Ω) → (y : V) → Decidable (Y σ y)] (m : ℕ) (Θ : ℕ → Ω → V → Prop) [(j : ℕ) → (σ : Ω) → (x : V) → Decidable (Θ j σ x)] (q w ε : ℕ → ℝ) (b : ℕ → V → V → ℝ) (hq : ∀ j < m, 0 ≤ q j) (hw : ∀ i < m, 0 ≤ w i) (hε : ∀ i < m, 0 ≤ ε i) (hrare : ∀ j < m, ∀ (x y : V), ↑{σ : Ω | X σ x ∧ Y σ y ∧ Θ j σ x}.card ≤ q j * ↑{σ : Ω | X σ x ∧ Y σ y}.card) (hmean : ∀ i < m, (rowNormPow p N u X Y fun (x : Ω) (x_1 y : V) => b i x_1 y) ≤ ε i ^ p) :
vertexNormPow p N u X (eventTail m Θ w fun (i : ℕ) (σ : Ω) (x : V) => Finset.kthLargest 1 {y : V | Y σ y} fun (y : V) => |b i x y|) ≤ (∑ j ∈ Finset.range m, q j ^ (↑p)⁻¹ * ∑ i ∈ Finset.Ico j m, w i * ε i) ^ p

Conditional rarity for deterministic endpoint errors gives a rooted rarity factor for each weighted tail. All retained sets and row events may depend on the same environment.

theorem Cslib.vertexNormPow_heavyCountTail_le {Ω : Type u_1} {V : Type u_2} [Fintype Ω] [Fintype V] {p : ℕ} (hp : p ≠ 0) {N u : ℝ} (hNu : 0 ≤ N * u) (X Y Yt : Ω → V → Prop) [(σ : Ω) → (x : V) → Decidable (X σ x)] [(σ : Ω) → (y : V) → Decidable (Yt σ y)] (m : ℕ) (d : V → V → ℝ) (ρ : ℕ → ℝ) (n : ℕ → ℕ) (q w ε : ℕ → ℝ) (b : ℕ → V → V → ℝ) (hq : ∀ j < m, 0 ≤ q j) (hw : ∀ i < m, 0 ≤ w i) (hε : ∀ i < m, 0 ≤ ε i) (hrare : ∀ j < m, ∀ (x y : V), ↑{σ : Ω | X σ x ∧ Yt σ y ∧ Probability.heavyCountEvent Y Finset.univ (d x) (ρ j) (n j) σ}.card ≤ q j * ↑{σ : Ω | X σ x ∧ Yt σ y}.card) (hmean : ∀ i < m, (rowNormPow p N u X Yt fun (x : Ω) (x_1 y : V) => b i x_1 y) ≤ ε i ^ p) :
vertexNormPow p N u X (eventTail m (fun (j : ℕ) (σ : Ω) (x : V) => Probability.heavyCountEvent Y Finset.univ (d x) (ρ j) (n j) σ) w fun (i : ℕ) (σ : Ω) (x : V) => Finset.kthLargest 1 {y : V | Yt σ y} fun (y : V) => |b i x y|) ≤ (∑ j ∈ Finset.range m, q j ^ (↑p)⁻¹ * ∑ i ∈ Finset.Ico j m, w i * ε i) ^ p

The actual heavy-count events may be substituted directly in the weighted mean bound. The rarity premise is conditional on the source and usage endpoint; it does not require independence and may be supplied by Probability.card_filter_heavyCountEvent_le.

theorem Cslib.RowCompression.trueOverflowTail_le_add {ι : Type u_3} (S : Finset ι) (n K : ℕ → ℕ) (ρ : ℕ → ℝ) (Δ : ℕ → ι → Fin 2 → ℝ) (a : State ι) (m : ℕ) (heavy : ℕ → Prop) (w β γ : ℕ → ℝ) (hw : ∀ i < m, 0 ≤ w i) (hβ : ∀ i < m, 0 ≤ β i) (hγ : ∀ i < m, 0 ≤ γ i) :
(∑ j ∈ Finset.range m, if IsFirstOverflow S n K ρ Δ a j ∧ heavy j then ∑ i ∈ Finset.Ico j m, w i * (β i + γ i) else 0) ≤ (∑ j ∈ Finset.range m, if heavy j then ∑ i ∈ Finset.Ico j m, w i * β i else 0) + firstOverflowNoiseTail S n K ρ Δ a m w γ

The actual true-overflow tail is bounded by the enlarged heavy mean tail plus the unique actual first-overflow noise tail. This is pointwise and requires no independence.

theorem Cslib.vertexNormPow_trueOverflowTail_le {Ω : Type u_1} {V : Type u_2} [Fintype Ω] [Fintype V] {ι : Type u_3} {p : ℕ} (hp : p ≠ 0) {N u : ℝ} (hNu : 0 ≤ N * u) (X Y Yt : Ω → V → Prop) [(σ : Ω) → (x : V) → Decidable (X σ x)] [(σ : Ω) → (y : V) → Decidable (Yt σ y)] (m : ℕ) (d : V → V → ℝ) (ρ : ℕ → ℝ) (n : ℕ → ℕ) (q w ε δ : ℕ → ℝ) (b : ℕ → V → V → ℝ) (hq : ∀ j < m, 0 ≤ q j) (hw : ∀ i < m, 0 ≤ w i) (hε : ∀ i < m, 0 ≤ ε i) (hδ : ∀ i < m, 0 ≤ δ i) (hrare : ∀ j < m, ∀ (x y : V), ↑{σ : Ω | X σ x ∧ Yt σ y ∧ Probability.heavyCountEvent Y Finset.univ (d x) (ρ j) (n j) σ}.card ≤ q j * ↑{σ : Ω | X σ x ∧ Yt σ y}.card) (hmean : ∀ i < m, (rowNormPow p N u X Yt fun (x : Ω) (x_1 y : V) => b i x_1 y) ≤ ε i ^ p) (S : Ω → V → Finset ι) (capacity : ℕ → ℕ) (floor : ℕ → ℝ) (Δ : Ω → V → ℕ → ι → Fin 2 → ℝ) (a : Ω → V → RowCompression.State ι) (γ : ℕ → Ω → V → ℝ) (hγ : ∀ i < m, ∀ (σ : Ω) (x : V), X σ x → 0 ≤ γ i σ x) (hnoise : ∀ i < m, vertexNormPow p N u X (γ i) ≤ δ i ^ p) :
(vertexNormPow p N u X fun (σ : Ω) (x : V) => ∑ j ∈ Finset.range m, if RowCompression.IsFirstOverflow (S σ x) n capacity floor (Δ σ x) (a σ x) j ∧ Probability.heavyCountEvent Y Finset.univ (d x) (ρ j) (n j) σ then ∑ i ∈ Finset.Ico j m, w i * ((Finset.kthLargest 1 {y : V | Yt σ y} fun (y : V) => |b i x y|) + γ i σ x) else 0) ≤ (∑ j ∈ Finset.range m, q j ^ (↑p)⁻¹ * ∑ i ∈ Finset.Ico j m, w i * ε i + ∑ i ∈ Finset.range m, w i * δ i) ^ p

The actual true-first-overflow mixed tail has a rare deterministic-mean budget and a correlated-noise budget with no rarity discount. This matches the tail mask consumed by the compression assembly, after a pointwise mean/noise envelope has been supplied.