Documentation

CslibFrontier.Foundations.Combinatorics.TailSum

Truncated second moments from Gaussian tails #

A nonnegative integer quantity Y on a finite type whose upper tails are Gaussian, #{ω | j ≤ Y ω} ≤ M exp (-j² / c) for every j > R, has truncated second moment ∑ ω, Y ω ^ 2 [R < Y ω] ≤ M ((R + 1)² + c) exp (-(R + 1)² / c) (sum_sq_ite_lt_le_of_tail). This is the discrete counterpart of integrating the tail ∫ 2 t exp (-t² / c) dt = c exp (-a² / c): the layer-cake identity y² [R < y] = (R + 1)² [R + 1 ≤ y] + ∑_{R + 1 < j ≤ y} (2 j - 1) reduces the sum to the tails, and (2 j - 1) exp (-j² / c) ≤ c (exp (-(j - 1)² / c) - exp (-j² / c)) telescopes (sum_Ioc_two_mul_sub_one_mul_exp_le).

Main results #

theorem Cslib.sum_Ioc_two_mul_sub_one_mul_exp_le {c : ℝ} (hc : 0 < c) (a K : ℕ) :
∑ j ∈ Finset.Ioc a K, (2 * ↑j - 1) * Real.exp (-(↑j ^ 2 / c)) ≤ c * Real.exp (-(↑a ^ 2 / c))

Discrete Gaussian tail sum. For c > 0, ∑_{a < j ≤ K} (2 j - 1) exp (-j² / c) ≤ c exp (-a² / c).

theorem Cslib.sum_sq_ite_lt_le_of_tail {Ω : Type u_1} [Fintype Ω] (Y : Ω → ℕ) (R : ℕ) {M c : ℝ} (hc : 0 < c) (htail : ∀ (j : ℕ), R < j → ↑{ω : Ω | j ≤ Y ω}.card ≤ M * Real.exp (-(↑j ^ 2 / c))) :
(∑ ω : Ω, if R < Y ω then ↑(Y ω) ^ 2 else 0) ≤ M * ((↑R + 1) ^ 2 + c) * Real.exp (-((↑R + 1) ^ 2 / c))

Truncated second moment from Gaussian tails. If Y : Ω → ℕ on a finite type satisfies #{ω | j ≤ Y ω} ≤ M exp (-j² / c) for every j > R, then ∑ ω, Y ω ^ 2 [R < Y ω] ≤ M ((R + 1)² + c) exp (-(R + 1)² / c).