EasyCrypt's excepted distributions (theories/distributions/Dexcepted.ec) #
d \ P is dexcepted d P (Distr.lean). Only what ported developments use is here: its
expectation, losslessness, and the two-step sampling identity of the theory TwoStepSampling
(stated on distributions; EasyCrypt's module S and its procedures direct/indirect are
replaced by the distributions they sample).
theorem
GaudisCrypt.EC.dexcepted_expected
{α : Type}
(d : SubProbability α)
(P : α → Prop)
(hd : is_lossless d)
(hex : ∃ (a : α), ¬P a ∧ ↑d {a} ≠ 0)
(F : α → ENNReal)
:
The expectation under d \ P: the restriction of d to ¬ P, normalized.
theorem
GaudisCrypt.EC.dexcepted_ll
{α : Type}
(d : SubProbability α)
(P : α → Prop)
(hd : is_lossless d)
(hex : ∃ (a : α), ¬P a ∧ ↑d {a} ≠ 0)
:
is_lossless (dexcepted d P)
lemma dexcepted_ll: d \ P is lossless when d is and some ¬ P outcome has positive
probability (EC's mu d P < mu d predT).
theorem
GaudisCrypt.EC.dexcepted_indirect
{α : Type}
(d : SubProbability α)
(P : α → Prop)
(hd : is_lossless d)
:
EC's TwoStepSampling.ll_direct_indirect_eq (for dt _ = d), as an equality of
distributions: sampling d, and resampling from d \ P if the draw is in P, is sampling
d \ P (d lossless).