Documentation

CslibFrontier.Probability.PMF.Support

Support-conditioned facts about PMF.map, PMF.bind and StateT.lift #

A distribution's pushforward or two-stage experiment is deterministic when it is so on the support: p.map f = PMF.pure b exactly when f is constantly b on p.support (map_eq_pure_iff), and p.bind f = PMF.pure b when every possible continuation is (bind_eq_pure_of_forall_mem_support). Pushforwards to different point masses distinguish their inputs (ne_of_map_eq_pure).

Pairing with a constant second coordinate pins that coordinate on the support (snd_eq_of_mem_support_map_pair). Lifting a state-free PMF into StateT is such a pairing, so it keeps the state on its support (snd_eq_of_mem_support_lift) and cannot reach a bad state from a good one (toOuterMeasure_lift_eq_zero).

Main results #

theorem Cslib.Probability.PMF.map_eq_pure_iff {α : Type u_1} {β : Type u_2} {p : PMF α} {f : α → β} {b : β} :
PMF.map f p = PMF.pure b ↔ ∀ a ∈ p.support, f a = b

A pushforward is the point mass at b exactly when the map sends every possible outcome to b.

theorem Cslib.Probability.PMF.ne_of_map_eq_pure {α : Type u_1} {β : Type u_2} {p q : PMF α} {f : α → β} {b c : β} (hp : PMF.map f p = PMF.pure b) (hq : PMF.map f q = PMF.pure c) (hbc : b ≠ c) :
p ≠ q

Distributions whose pushforwards along one map are different point masses are different.

theorem Cslib.Probability.PMF.bind_eq_pure_of_forall_mem_support {α : Type u_1} {β : Type u_2} {p : PMF α} {f : α → PMF β} {b : β} (h : ∀ a ∈ p.support, f a = PMF.pure b) :

A two-stage experiment is the point mass at b when every possible continuation is.

theorem Cslib.Probability.PMF.forall_mem_support_bind {α : Type u_1} {β : Type u_2} {p : PMF α} {f : α → PMF β} {P : β → Prop} :
(∀ b ∈ (p.bind f).support, P b) ↔ ∀ a ∈ p.support, ∀ b ∈ (f a).support, P b

A mixture stays in a set exactly when every continuation from a supported input stays in it.

theorem Cslib.Probability.PMF.snd_eq_of_mem_support_map_pair {α : Type u_1} {σ : Type u_3} {μ : PMF α} {t : σ} {x : α × σ} (hx : x ∈ (PMF.map (fun (x : α) => (x, t)) μ).support) :
x.2 = t

Pairing every outcome with a fixed second coordinate pins that coordinate on the support.

theorem Cslib.Probability.PMF.snd_eq_of_mem_support_lift {α σ : Type u_4} {p : PMF α} {s : σ} {z : α × σ} (hz : z ∈ (StateT.lift p s).support) :
z.2 = s

Lifting a state-free PMF into StateT preserves the state on the entire support.

theorem Cslib.Probability.PMF.toOuterMeasure_lift_eq_zero {α σ : Type u_4} {bad : σ → Prop} (p : PMF α) (s : σ) (hs : ¬bad s) :
(StateT.lift p s).toOuterMeasure {x : α × σ | bad x.2} = 0

Lifting a state-free PMF from a good state reaches a bad state with probability zero.