Relabeling discrete distributions #
Main results #
Cslib.Probability.PMF.map_equiv_apply: point masses after an equivalence.Cslib.Probability.PMF.map_congr_on_support: only supported inputs need equal outputs.Cslib.Probability.PMF.map_apply_le_mul: relabeling preserves a pointwise ratio bound.Cslib.Probability.PMF.map_apply_toReal: finite fiber sums.Cslib.Probability.PMF.uniformOfFintype_map_apply: uniform image masses from fiber sizes.Cslib.Probability.PMF.bind_map_prodMk_apply: point masses of a pairing bind.Cslib.Probability.PMF.map_injective: injective encodings preserve equality of distributions.Cslib.Probability.PMF.map_apply_of_injective: an injective map preserves point masses.Cslib.Probability.PMF.forall_map_apply_le_mul_iff: domination of an image at every outcome is domination on the support of the dominating law together with preservation of supports.
References #
Adapted from Probability/PMF.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, reusing Mathlib's support-sensitive bind congruence.
theorem
Cslib.Probability.PMF.uniformOfFintype_map_apply
{α : Type u_1}
{β : Type u_2}
[Fintype α]
[Nonempty α]
(f : α → β)
(b : β)
:
The mass of an image of a uniform input is its fiber size divided by the input size.
theorem
Cslib.Probability.PMF.map_injective
{α : Type u_1}
{β : Type u_2}
{f : α → β}
(hf : Function.Injective f)
:
An injective representation of outcomes also embeds their complete probability laws.
theorem
Cslib.Probability.PMF.map_apply_of_injective
{α : Type u_1}
{β : Type u_2}
(p : PMF α)
{f : α → β}
(hf : Function.Injective f)
(a : α)
:
An injective map preserves the mass of each outcome.