Documentation

CslibFrontier.Probability.PMF.Union

Additivity and the union bound for discrete outer measures #

The outer measure of a discrete distribution is additive on disjoint events: every set is Carathéodory-measurable for it (PMF.toOuterMeasure_caratheodory). For arbitrary events it is subadditive; since every probability is finite, the union bound also holds for the real-valued probabilities (p.toOuterMeasure s).toReal. The counting bound sum_toReal_indicator_le generalizes the disjoint case to events that overlap at most Q times.

Main results #

theorem Cslib.Probability.PMF.toOuterMeasure_union_of_disjoint {α : Type u_1} (p : PMF α) {s t : Set α} (h : Disjoint s t) :

The probability of a union of two disjoint events is the sum of their probabilities.

theorem Cslib.Probability.PMF.toOuterMeasure_biUnion_finset {α : Type u_1} {ι : Type u_2} (p : PMF α) (J : Finset ι) {B : ι → Set α} (hB : (↑J).PairwiseDisjoint B) :
p.toOuterMeasure (⋃ j ∈ J, B j) = ∑ j ∈ J, p.toOuterMeasure (B j)

The probability of a union of finitely many pairwise disjoint events is the sum of their probabilities.

theorem Cslib.Probability.PMF.sum_toOuterMeasure_le_one {α : Type u_1} {ι : Type u_2} (p : PMF α) (J : Finset ι) {B : ι → Set α} (hB : (↑J).PairwiseDisjoint B) :
∑ j ∈ J, p.toOuterMeasure (B j) ≤ 1

The probabilities of finitely many pairwise disjoint events add up to at most 1.

theorem Cslib.Probability.PMF.toOuterMeasure_toReal_biUnion_finset_le {α : Type u_1} {ι : Type u_2} (p : PMF α) (J : Finset ι) (B : ι → Set α) :
(p.toOuterMeasure (⋃ j ∈ J, B j)).toReal ≤ ∑ j ∈ J, (p.toOuterMeasure (B j)).toReal

Union bound for real-valued probabilities: the probability of a union of finitely many events is at most the sum of their probabilities.

theorem Cslib.Probability.PMF.sum_toReal_indicator_le {α : Type u_1} {M : Type u_2} [Fintype M] (p : PMF α) (pred : α → M → Bool) (Q : ℕ) (hcard : ∀ x ∈ p.support, {m : M | pred x m = true}.card ≤ Q) :
∑ m : M, ((PMF.map (fun (x : α) => pred x m) p) true).toReal ≤ ↑Q

If each outcome in the support of p : PMF α satisfies pred x m = true for at most Q indices m : M, then the sum over m : M of Pr_{x ← p}[pred x m = true] is at most Q.

theorem Cslib.Probability.PMF.toOuterMeasure_mem_list_le {α : Type u_1} {κ : Type u_2} (p : PMF α) (f : α → κ) {δ : ENNReal} (hpoint : ∀ (k : κ), p.toOuterMeasure {a : α | f a = k} ≤ δ) (keys : List κ) :
p.toOuterMeasure {a : α | f a ∈ keys} ≤ ↑keys.length * δ

A sample hits a list of keys with probability at most its length times the largest allowed point mass. Repeated keys are allowed.

theorem Cslib.Probability.PMF.toOuterMeasure_lookup_isSome_le {α : Type u_1} {κ : Type u_2} {V : Type u_3} [BEq κ] [LawfulBEq κ] (p : PMF α) (f : α → κ) {δ : ENNReal} (hpoint : ∀ (k : κ), p.toOuterMeasure {a : α | f a = k} ≤ δ) (cache : List (κ × V)) :
p.toOuterMeasure {a : α | (List.lookup (f a) cache).isSome = true} ≤ ↑cache.length * δ

Union bound for association-list lookups: if a key f a of an outcome a ← p equals any fixed key with probability at most δ, then it is found in an association list cache with probability at most cache.length * δ.