Two-stage experiments #
A two-stage experiment μ.bind f gives an outcome b the probability c when every possible
second stage does (bind_apply_of_forall), and some possible first stage gives b at least the
probability of the whole experiment (exists_bind_apply_le). Continuations need agree, or be
compared, only on outcomes the first stage can produce (bind_congr_on_support,
le_bind_apply_on_support, bind_apply_mono_on_support). Averages of bounded values are bounded
(tsum_mul_le_of_forall_le, tsum_mul_le_card_mul_add), and the pairing law holds for dependent
second samples (bind_sigma_apply).
Main results #
Cslib.Probability.PMF.bind_congr_on_support: continuations need agree only on possible inputs.Cslib.Probability.PMF.bind_apply_of_forall,Cslib.Probability.PMF.exists_bind_apply_le: outcome probabilities of two-stage experiments.Cslib.Probability.PMF.le_bind_apply_on_support,Cslib.Probability.PMF.bind_apply_mono_on_support: comparing continuations at one outcome.Cslib.Probability.PMF.tsum_mul_le_of_forall_le,Cslib.Probability.PMF.tsum_mul_le_card_mul_add: averages of bounded values.Cslib.Probability.PMF.bind_sigma_apply: the pairing law for dependent second samples.
References #
Adapted in part from Probability/PMF.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8.
The pairing law also holds when the second sample's type depends on the first.
Adapted from the cslib crypto branch at 5ff69ca.
Increasing an outcome's probability on every possible first-stage result increases its probability in the whole experiment. The sample spaces may be infinite.
Values at most 1 on a finite set T and at most B elsewhere average to at most
|T| * ε + B under a distribution giving every point probability at most ε.