Documentation

CslibFrontier.Probability.PMF.Independence

Independent observables of a PMF #

Two observables X and Y of ν : PMF Ω are independent exactly when the law of (X, Y) is the law of X paired with an independent draw from the law of Y. For countable codomains, this factorization is equivalent to Mathlib's IndepFun X Y ν.toMeasure.

IndepUniform ν X Y is the special case in which the law of Y is uniform. Security statements use it for a value that is uniform and independent of an adversary's view.

Main definitions #

Main results #

theorem Cslib.Probability.PMF.indepFun_iff_map_pair_eq_bind {Ω : Type u_1} {α : Type u_2} {β : Type u_3} [MeasurableSpace Ω] [MeasurableSpace α] [MeasurableSpace β] [MeasurableSingletonClass α] [MeasurableSingletonClass β] [Countable α] [Countable β] (p : PMF Ω) {f : Ω → α} {g : Ω → β} (hf : Measurable f) (hg : Measurable g) :
ProbabilityTheory.IndepFun f g p.toMeasure ↔ PMF.map (fun (ω : Ω) => (f ω, g ω)) p = (PMF.map f p).bind fun (a : α) => PMF.map (fun (b : β) => (a, b)) (PMF.map g p)

A factorization of the joint PMF is Mathlib's measure-theoretic independence.

structure Cslib.Probability.PMF.IndepUniform {Ω : Type u_1} {α : Type u_2} {β : Type u_3} [Fintype β] [Nonempty β] (ν : PMF Ω) (X : Ω → α) (Y : Ω → β) :

Y is uniform and independent of X under ν: drawing ω ← ν and reporting (X ω, Y ω) is the same as drawing X ω and then an independent uniform Y.

theorem Cslib.Probability.PMF.IndepUniform.map_snd {Ω : Type u_1} {α : Type u_2} {β : Type u_3} [Fintype β] [Nonempty β] {ν : PMF Ω} {X : Ω → α} {Y : Ω → β} (h : IndepUniform ν X Y) :

The second observable of IndepUniform ν X Y is uniform.

theorem Cslib.Probability.PMF.indepUniform_iff {Ω : Type u_1} {α : Type u_2} {β : Type u_3} [MeasurableSpace Ω] [MeasurableSpace α] [MeasurableSpace β] [MeasurableSingletonClass α] [MeasurableSingletonClass β] [Countable α] [Fintype β] [Nonempty β] {ν : PMF Ω} {X : Ω → α} {Y : Ω → β} (hX : Measurable X) (hY : Measurable Y) :

IndepUniform ν X Y is Mathlib's independence of X and Y together with a uniform law for Y.