Event probabilities of discrete distributions #
The probability p.toOuterMeasure s of an event under a discrete distribution is finite and at
most one (toOuterMeasure_ne_top, toOuterMeasure_le_one); on a finite type its real value is the
sum of the masses of the event's members (toOuterMeasure_apply_toReal), and an event and its
complement have total probability one (toOuterMeasure_toReal_add_compl). Conditioning keeps the
event's masses and divides them by its probability (filter_apply_toReal).
After a random first stage, an event's probability is the average of its conditional
probabilities (toOuterMeasure_bind_toReal). Failure bounds compose without independence: a
randomized continuation fails because its precondition already failed or because it fails from a
valid input (toOuterMeasure_bind_failure_le), and average bias turns into the probability of
good first stages (toOuterMeasure_rate_ge). The real-valued masses of true and false under a
Boolean distribution sum to one (toReal_true_add_toReal_false).
Main results #
Cslib.Probability.PMF.toOuterMeasure_ne_top,Cslib.Probability.PMF.toOuterMeasure_le_one: events have probability at most one.Cslib.Probability.PMF.toOuterMeasure_apply_toReal,Cslib.Probability.PMF.toOuterMeasure_toReal_add_compl,Cslib.Probability.PMF.toOuterMeasure_toReal_pos_iff: real-valued event probabilities.Cslib.Probability.PMF.filter_apply_toReal: conditioned masses.Cslib.Probability.PMF.toOuterMeasure_bind_toReal: averaging over a first stage.Cslib.Probability.PMF.toOuterMeasure_bind_failure_le,Cslib.Probability.PMF.toOuterMeasure_bind_failure_toReal_le: composing failure bounds.Cslib.Probability.PMF.toOuterMeasure_rate_ge: average bias as the probability of good inputs.Cslib.Probability.PMF.toReal_true_add_toReal_false,Cslib.Probability.PMF.toReal_false_eq_one_sub,Cslib.Probability.PMF.toReal_true_eq_one_sub: Boolean outcome masses.
References #
Adapted in part from Probability/PMF.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8.
Every event has finite probability, including on an infinite ambient type.
Adapted from the cslib crypto branch at 5ff69ca.
An event has probability at most one.
An event and its complement have total probability one, in real-valued probability units.
Event probability after a finite random choice is the average conditional probability.
A randomized continuation can fail because its precondition was already false or because it fails from a valid input. No independence or finite-state assumption is needed.
The real-valued error rule for a randomized continuation.
If a randomized test beats a threshold on average, at least its excess probability mass consists of inputs whose conditional acceptance probability reaches that threshold.