Documentation

CslibFrontier.Probability.PMF.Option

Joint laws with an optional second outcome #

The first marginal and the projection that erases the first outcome on none determine the whole joint law. This recovers an aborted commitment's mass without discarding that commitment.

Main results #

theorem Cslib.Probability.PMF.map_option_prod_apply_some {α : Type u_1} {β : Type u_2} (p : PMF (α × Option β)) (a : α) (b : β) :
(PMF.map (fun (pair : α × Option β) => Option.map (fun (b : β) => (pair.1, b)) pair.2) p) (some (a, b)) = p (a, some b)

Erasing the first component only on none preserves every successful point mass.

theorem Cslib.Probability.PMF.ext_prod_option {α : Type u_1} {β : Type u_2} {p q : PMF (α × Option β)} (hfst : PMF.map Prod.fst p = PMF.map Prod.fst q) (herase : PMF.map (fun (pair : α × Option β) => Option.map (fun (b : β) => (pair.1, b)) pair.2) p = PMF.map (fun (pair : α × Option β) => Option.map (fun (b : β) => (pair.1, b)) pair.2) q) :
p = q

A joint law with an optional outcome is determined by its first marginal and the law that erases the first component on none. The finite total mass makes cancellation legitimate.