Total Variation Distance for SPMFs and Monadic Computations #
This file extends the TV distance from PMF (defined in
ToMathlib.ProbabilityTheory.TotalVariation) to:
SPMF.tvDist— on sub-probability mass functions (viatoPMF)tvDist— on any monad withHasEvalSPMF(viaevalDist)
SPMF.tvDist #
Monadic tvDist #
TV distance bounds #
TV distance for bind (left) #
TV distance for bind with a bad event #
Bound the weighted TV sum from tvDist_bind_left_le by the probability of a bad event
when the two continuations are distributionally equal off that event.
If two continuations are equal off a bad event, binding them over the same base computation changes TV distance by at most the probability of that bad event.
ENNReal form of tvDist_bind_left_event_le, matching the quantitative
identical-until-bad APIs.
Bind/event TV bound with different base computations: the base TV distance plus the bad-event probability controls the whole bind.
ENNReal form of tvDist_bind_event_le.
Bind/event TV bound with different base computations, charging the bad-event
probability under the right base computation. This is the symmetric orientation of
tvDist_bind_event_le, useful when the bad event is introduced by the simulated side.
ENNReal form of tvDist_bind_event_right_le.