Documentation

CslibFrontier.Probability.IID.Distinct

Distinct independent samples #

A noninjective sample tuple has at least one colliding pair. The first moment of the existing collision count therefore bounds the probability of repetitions by choose k 2 * collisionProbability μ. A bound on each point mass gives the usual birthday union bound without a uniformity assumption. This is the sampling estimate used in [CKMS26], proof of Lemma 5.2, printed p. 10 (PDF p. 11).

Main results #

A sample tuple has no colliding pair precisely when all entries are distinct.

The probability of any repetition is at most the expected number of colliding pairs.

theorem Cslib.Probability.PMF.iid_not_injective_le_of_mass_le {α : Type u_1} [Finite α] (μ : PMF α) (k : ℕ) {bound : ℝ} (h : ∀ (a : α), (μ a).toReal ≤ bound) :
((iid μ k).toOuterMeasure {x : Fin k → α | ¬Function.Injective x}).toReal ≤ ↑(k.choose 2) * bound

If every atom has mass at most bound, repetitions among k independent draws have probability at most choose k 2 * bound, even for a nonuniform source.

theorem Cslib.Probability.PMF.iid_injective_ge_of_mass_le {α : Type u_1} [Finite α] (μ : PMF α) (k : ℕ) {bound : ℝ} (h : ∀ (a : α), (μ a).toReal ≤ bound) :
1 - ↑(k.choose 2) * bound ≤ ((iid μ k).toOuterMeasure {x : Fin k → α | Function.Injective x}).toReal

A lower bound for receiving an injective tuple, in real probability units.

theorem Cslib.Probability.PMF.iid_injective_pair_ge {α : Type u_1} [Finite α] {β : Type u_2} [Finite β] (μ : PMF α) (ν : PMF β) (k : ℕ) (hk : 0 < k) (hμ : ∀ (a : α), (μ a).toReal ≤ (↑k ^ 2)⁻¹) (hν : ∀ (b : β), (ν b).toReal ≤ (↑k ^ 2)⁻¹) :

The two distinct-tuple probabilities in the light-atom case of submission 865. Their sum exceeds one by at least 1/k; the source subsequently telescopes k hybrid steps.

theorem Cslib.Probability.PMF.expect_embedding_le_expect_add {α : Type u_1} [Finite α] [Fintype α] [Nonempty α] (k : ℕ) [Nonempty (Fin k ↪ α)] (f : (Fin k → α) → ℝ) (h₀ : ∀ (a : Fin k → α), 0 ≤ f a) (h₁ : ∀ (a : Fin k → α), f a ≤ 1) :
(Finset.univ.expect fun (x : Fin k ↪ α) => f ⇑x) ≤ (Finset.univ.expect fun (a : Fin k → α) => f a) + ↑(k.choose 2) / ↑(Fintype.card α)

Averaging a bounded score over ordered distinct draws can increase its expectation by at most the birthday bound for independent uniform draws.

theorem Cslib.Probability.PMF.expect_le_expect_embedding_add {α : Type u_1} [Finite α] [Fintype α] [Nonempty α] (k : ℕ) [Nonempty (Fin k ↪ α)] (f : (Fin k → α) → ℝ) (h₀ : ∀ (a : Fin k → α), 0 ≤ f a) (h₁ : ∀ (a : Fin k → α), f a ≤ 1) :
(Finset.univ.expect fun (a : Fin k → α) => f a) ≤ (Finset.univ.expect fun (x : Fin k ↪ α) => f ⇑x) + ↑(k.choose 2) / ↑(Fintype.card α)

Conditioning on distinct draws can decrease a bounded expectation by at most the birthday bound for independent uniform draws.