Documentation

CslibFrontier.Computability.LogSpaceDerandomization.HeavyCount

Conditional rarity of retained heavy entries #

A row on a finite endpoint set S has first signal d and bounded mass a * ∑ w ∈ S, d w ≤ M. At a floor ρ > 0, its heavy-set cardinality satisfies #{w ∈ S | ρ / 4 < d w} * a * ρ ≤ 4 * M, including at zero scale a = 0. Suppose that, on a finite slice of draws, every heavy endpoint other than one specified endpoint is retained on at most a c * a fraction of the draws. The specified endpoint can contribute one retained entry. Markov's inequality then bounds the fraction of draws retaining at least n / 2 heavy entries by 2 * (1 + 4 * c * M) / (n * ρ) when ρ ≤ 1.

The slice is arbitrary: it may condition on a narrower endpoint channel and a start channel, provided its explicit pair bound holds. No independence among the heavy-entry hits is required. The division-free estimate also permits an empty slice or zero capacity. This is the counting part of [OpenAI2026LogSpace, Lemma 8.4]; weighting deterministic mean errors and the complete integrated compression bound are separate steps.

Main definitions #

Main results #

References #

def Cslib.Probability.heavyCountEvent {Ω : Type u_1} {V : Type u_2} (Y : Ω → V → Prop) (S : Finset V) (d : V → ℝ) (ρ : ℝ) (n : ℕ) (σ : Ω) :

A true heavy count at floor ρ: at least half the capacity n consists of retained endpoints in S whose deterministic first signal exceeds ρ / 4.

theorem Cslib.Probability.card_filter_heavy_mul_le {V : Type u_2} (S : Finset V) {a ρ M : ℝ} {d : V → ℝ} (ha : 0 ≤ a) (hd : ∀ w ∈ S, 0 ≤ d w) (hmass : a * ∑ w ∈ S, d w ≤ M) :
↑{w ∈ S | ρ / 4 < d w}.card * (a * ρ) ≤ 4 * M

The deterministic mass bounds the number of entries above a quarter of the floor. The multiplied form remains valid at zero scale and for every floor.

theorem Cslib.Probability.card_filter_heavyCountEvent_mul_le {Ω : Type u_1} {V : Type u_2} (Y : Ω → V → Prop) (T : Finset Ω) (S : Finset V) (y : V) {d : V → ℝ} {a ρ c M : ℝ} (ha : 0 ≤ a) (hρ : 0 < ρ) (hc : 0 ≤ c) (hd : ∀ w ∈ S, 0 ≤ d w) (hmass : a * ∑ w ∈ S, d w ≤ M) (hpair : ∀ w ∈ S, ρ / 4 < d w → w ≠ y → ↑{σ ∈ T | Y σ w}.card ≤ c * a * ↑T.card) (n : ℕ) :
↑{σ ∈ T | heavyCountEvent Y S d ρ n σ}.card * ↑n * ρ ≤ ↑T.card * (2 * (ρ + 4 * c * M))

Conditional rarity of a true heavy count, without division. The endpoint y may be forced by the conditioning slice, while only the other heavy endpoints need its pair-count bound. The slice and the capacity may be empty or zero.

theorem Cslib.Probability.card_filter_heavyCountEvent_le {Ω : Type u_1} {V : Type u_2} (Y : Ω → V → Prop) (T : Finset Ω) (S : Finset V) (y : V) {d : V → ℝ} {a ρ c M : ℝ} (ha : 0 ≤ a) (hρ : 0 < ρ) (hρ1 : ρ ≤ 1) (hc : 0 ≤ c) (hd : ∀ w ∈ S, 0 ≤ d w) (hmass : a * ∑ w ∈ S, d w ≤ M) (hpair : ∀ w ∈ S, ρ / 4 < d w → w ≠ y → ↑{σ ∈ T | Y σ w}.card ≤ c * a * ↑T.card) {n : ℕ} (hn : 0 < n) :
↑{σ ∈ T | heavyCountEvent Y S d ρ n σ}.card ≤ 2 * (1 + 4 * c * M) / (↑n * ρ) * ↑T.card

The conditional rarity factor 2 * (1 + 4 * c * M) / (n * ρ) for a positive capacity and a floor in (0, 1]. Empty slices require no special convention.

theorem Cslib.Probability.card_filter_heavyCountEvent_div_card_le {Ω : Type u_1} {V : Type u_2} (Y : Ω → V → Prop) (T : Finset Ω) (S : Finset V) (y : V) {d : V → ℝ} {a ρ c M : ℝ} (ha : 0 ≤ a) (hρ : 0 < ρ) (hρ1 : ρ ≤ 1) (hc : 0 ≤ c) (hd : ∀ w ∈ S, 0 ≤ d w) (hmass : a * ∑ w ∈ S, d w ≤ M) (hpair : ∀ w ∈ S, ρ / 4 < d w → w ≠ y → ↑{σ ∈ T | Y σ w}.card ≤ c * a * ↑T.card) {n : ℕ} (hn : 0 < n) :
↑{σ ∈ T | heavyCountEvent Y S d ρ n σ}.card / ↑T.card ≤ 2 * (1 + 4 * c * M) / (↑n * ρ)

The conditional true-heavy-count frequency bound. An empty conditioning slice has frequency zero, so no nonemptiness hypothesis is needed.

theorem Cslib.Probability.card_filter_heavyCountEvent_product_div_card_le {Ω : Type u_1} {V : Type u_2} {Γ : Type u_3} (Y : Ω → V → Prop) (R : Finset Γ) (T : Finset Ω) (S : Finset V) (y : V) {d : V → ℝ} {a ρ c M : ℝ} (ha : 0 ≤ a) (hρ : 0 < ρ) (hρ1 : ρ ≤ 1) (hc : 0 ≤ c) (hd : ∀ w ∈ S, 0 ≤ d w) (hmass : a * ∑ w ∈ S, d w ≤ M) (hpair : ∀ w ∈ S, ρ / 4 < d w → w ≠ y → ↑{σ ∈ T | Y σ w}.card ≤ c * a * ↑T.card) {n : ℕ} (hn : 0 < n) :
↑{σ ∈ R ×ˢ T | heavyCountEvent (fun (σ : Γ × Ω) (w : V) => Y σ.2 w) S d ρ n σ}.card / ↑(R ×ˢ T).card ≤ 2 * (1 + 4 * c * M) / (↑n * ρ)

Conditioning independently on a start seed preserves the heavy-count frequency bound. The actual product slice is used, and either of its two factors may be empty.