Hitting a point with a draw #
Testing a draw from p with an arbitrary decidable predicate P accepts with probability
p.toOuterMeasure {x | P x} (bind_pure_decide_apply_true). Testing a draw from μ for
equality with a fixed point a accepts with probability μ a
(bind_pure_decide_eq_apply_true, map_decide_eq_apply_true). The unprimed bind form and the
uniform form test a = x; bind_pure_decide_eq_apply_true' and the map form test x = a. For a
uniform draw from a nonempty finite type α this is (Fintype.card α)⁻¹
(uniformOfFintype_bind_decide_eq_apply_true). More generally, a Boolean test that accepts at most
one value accepts a uniform draw with probability at most (Fintype.card α)⁻¹
(uniformOfFintype_bind_pure_apply_true_le), and so does a set with at most one member
(toOuterMeasure_uniformOfFintype_le_of_subsingleton). Guessing games use this bound: an
adversary whose view is independent of a uniform secret guesses it with probability at most
1 / |α|, and so does any test comparing the secret with an injective image of the draw.
Main results #
Cslib.Probability.PMF.bind_pure_decide_apply_true,Cslib.Probability.PMF.bind_pure_decide_eq_apply_true,Cslib.Probability.PMF.map_decide_eq_apply_true: predicate and point-equality acceptance probabilities.Cslib.Probability.PMF.uniformOfFintype_bind_decide_eq_apply_true: a uniform draw equals a fixed point with probability(Fintype.card α)⁻¹.Cslib.Probability.PMF.uniformOfFintype_bind_pure_apply_true_le: a test accepting at most one value accepts a uniform draw with probability at most(Fintype.card α)⁻¹.Cslib.Probability.PMF.toOuterMeasure_uniformOfFintype_le_of_subsingleton: a uniform draw lands in a set with at most one member with probability at most(Fintype.card α)⁻¹.
bind_pure_decide_eq_apply_true with the comparison written the other way round.
bind_pure_decide_eq_apply_true for the pushforward of μ under the equality test.
A uniform draw from α equals a fixed a with probability (Fintype.card α)⁻¹.
A uniform draw from α lands in a set with at most one member with probability at most
(Fintype.card α)⁻¹.