Conditioning discrete joint distributions #
conditionalSnd joint a uses the upstream posterior distribution to recover the second component
after observing a in the first. At a zero-probability observation it defaults to the second
marginal. The joint law and all weighted averages are independent of this choice. No finiteness
assumption is needed
for the conditional distribution or its reconstruction law.
Main definitions #
Cslib.Probability.PMF.conditionalSnd: the second component after observing the first.
Main results #
Cslib.Probability.PMF.bind_conditionalSnd: reconstruct the complete joint distribution.Cslib.Probability.PMF.conditionalSnd_bind_pair: recover a supported conditional kernel.Cslib.Probability.PMF.conditionalSnd_uniform_map: uniformity on the observed fiber.
References #
Adapted from Probability/Conditioning.lean on the cslib crypto branch at
5ff69ca93402e7c947208dc56396d6d86203ccd8, reusing the upstream PMF operations.
Sampling the marginal and then the conditional distribution reconstructs the joint law.
A score can be averaged by first revealing a deterministic observation and then resampling the input conditionally. The score may depend on both the observation and the hidden input.
Conditioning a uniform input on its image gives the uniform distribution on that fiber. The nonempty assumption restricts this statement to observable images.