Documentation

CslibFrontier.Probability.Split

Split distributions #

Given counts c : α → ℕ, the split distribution Cslib.Probability.PMF.split p c lives on Σ i, Fin (c i + 1): a sample is ⟨i, j⟩ with i drawn from p and j uniform among the c i + 1 cells of i Diakonikolas–Kane, Definition 2.4 (numbering of arXiv:1601.05557v1). So the cell ⟨i, j⟩ has mass p(i) / (c i + 1) (split_apply), and the domain has |α| + ∑ c points (card_sigma_split). A sample of split p c is a sample of p passed through the kernel splitKernel c (split_eq_bind), and splitting preserves statistical distance (dist_split). These are the two parts of Diakonikolas–Kane, Fact 2.5.

Splitting lowers the collision probability: it equals ∑ p(i)² / (c i + 1) (collisionProbability_split), and is antitone in c (collisionProbability_split_antitone), the first part of Diakonikolas–Kane, Lemma 2.6. When c counts the occurrences in m independent samples of p itself, the expected collision probability is at most 1 / (m + 1) (sum_iid_mul_collisionProbability_split_le). This is the second part of Diakonikolas–Kane, Lemma 2.6, which takes a Poisson number of samples with mean m and gets 1 / m, in the fixed-sample-size form used by the flattening closeness tester.

Main definitions #

Main results #

References #

noncomputable def Cslib.Probability.PMF.splitKernel {α : Type u_1} (c : α → ℕ) (i : α) :
PMF ((i : α) × Fin (c i + 1))

The split kernel: i goes to a uniformly random cell ⟨i, j⟩ among its c i + 1 cells.

noncomputable def Cslib.Probability.PMF.split {α : Type u_1} (p : PMF α) (c : α → ℕ) :
PMF ((i : α) × Fin (c i + 1))

The split distribution of p with c i + 1 cells for each i Diakonikolas–Kane, Definition 2.4.

theorem Cslib.Probability.PMF.split_eq_bind {α : Type u_1} (p : PMF α) (c : α → ℕ) :

A sample of the split distribution is a sample of p passed through the split kernel.

theorem Cslib.Probability.PMF.split_apply {α : Type u_1} (p : PMF α) (c : α → ℕ) (z : (i : α) × Fin (c i + 1)) :
(split p c) z = p z.fst / ↑(c z.fst + 1)

The cell ⟨i, j⟩ has mass p(i) / (c i + 1).

theorem Cslib.Probability.PMF.split_apply_toReal {α : Type u_1} (p : PMF α) (c : α → ℕ) (z : (i : α) × Fin (c i + 1)) :
((split p c) z).toReal = (p z.fst).toReal / (↑(c z.fst) + 1)

The real mass of the cell ⟨i, j⟩ is p(i) / (c i + 1).

theorem Cslib.Probability.PMF.card_sigma_split {α : Type u_1} [Fintype α] (c : α → ℕ) :
Fintype.card ((i : α) × Fin (c i + 1)) = Fintype.card α + ∑ i : α, c i

The split domain has |α| + ∑ c points.

theorem Cslib.Probability.PMF.dist_split {α : Type u_1} [Fintype α] (p q : PMF α) (c : α → ℕ) :
dist (split p c) (split q c) = dist p q

Splitting preserves statistical distance Diakonikolas–Kane, Fact 2.5.

theorem Cslib.Probability.PMF.collisionProbability_split {α : Type u_1} [Fintype α] (p : PMF α) (c : α → ℕ) :
collisionProbability (split p c) = ∑ i : α, (p i).toReal ^ 2 / (↑(c i) + 1)

The collision probability of a split distribution.

theorem Cslib.Probability.PMF.collisionProbability_split_antitone {α : Type u_1} [Finite α] (p : PMF α) {c c' : α → ℕ} (h : ∀ (i : α), c i ≤ c' i) :

More cells give a smaller collision probability Diakonikolas–Kane, Lemma 2.6.

theorem Cslib.Probability.PMF.sum_iid_mul_collisionProbability_split_le {α : Type u_1} [Fintype α] [DecidableEq α] (μ : PMF α) (m : ℕ) :
∑ x : Fin m → α, ((iid μ m) x).toReal * collisionProbability (split μ (occurrenceCount x)) ≤ 1 / (↑m + 1)

Flattening. Splitting μ along the occurrence counts of m independent samples of μ gives expected collision probability at most 1 / (m + 1): the fixed-sample-size form of Diakonikolas–Kane, Lemma 2.6.