Unary rules for sampling from an arbitrary distribution #
Event and success probabilities of a program that starts with sampleFrom d
average the continuation's probabilities against the weights d (some a).
Main results #
sampleFrom_bind_apply_some— the pointwise mass ofsampleFrom d >>= kprEvent_pure_indicator— event probability of a point massprEvent_sampleFrom_bind—Pr[E] = ∑' a, d a * Pr[E after k a]prTrue_bind_sampleFrom— the same for theprTrueof a Boolean gameprTrue_bind_sample_of_sampleFrom—Crypto.prTrue_bind_samplere-derived as the uniform instance, with the statement of the existing lemma verbatimmass_bind_sampleFrom— mass averages the same way
Pointwise mass #
The probability that sampleFrom d >>= k produces the outcome p is the
d-average of the continuation's probabilities of producing p.
The failure probability of sampleFrom d >>= k is the failure probability of
d plus the d-average of the continuations' failure probabilities.
Event probability #
Event probability of a point mass is the indicator of the event. Generalizes
Unary.prEvent_pure, whose event depends on the heap only.
prEvent_pure_indicator in the SPComp form used by the averaging rule.
Average-over-the-distribution characterisation of the event probability of a program that starts with a general sample.
Event probability of a bare general sample: the heap is unchanged, so the event is decided by the sampled value alone.
Success probability of a Boolean game #
Average-over-the-distribution characterisation of the success probability of a Boolean game that starts with a general sample.
Success probability of a bare general Boolean sample.
Mass #
If every continuation is lossless, the mass of sampleFrom d >>= k is the
mass of d.
The uniform instance #
Crypto.prTrue_bind_sample derived from prTrue_bind_sampleFrom.