EasyCrypt's DInterval (theories/distributions/DInterval.ec) #
dinter i j (EC's [i..j]): the uniform distribution on the integers from i to j. Only
what ported developments use is here. Names are EasyCrypt's.
The elements of range m n are distinct.
theorem
GaudisCrypt.EC.duniform_ll
{α : Type}
[DecidableEq α]
(s : List α)
(hs : s ≠ [])
:
is_lossless (duniform s)
duniform s is lossless for a list with an element.
op dinter (i j : int) = duniform (range i (j + 1)): EC's [i..j].
Equations
- GaudisCrypt.EC.dinter i j = GaudisCrypt.EC.duniform (GaudisCrypt.EC.range i (j + 1))
Instances For
theorem
GaudisCrypt.SubProbability.ext_singleton
{α : Type}
{μ ν : SubProbability α}
(h : ∀ (x : α), ↑μ {x} = ↑ν {x})
:
Sub-distributions with the same point masses are equal.
theorem
GaudisCrypt.EC.dexcepted_apply
{α : Type}
(d : SubProbability α)
(P : α → Prop)
[DecidablePred P]
(hd : is_lossless d)
(hex : ∃ (a : α), ¬P a ∧ ↑d {a} ≠ 0)
(x : α)
:
lemma dexcepted1E, as a point mass: the mass of x under d \ P is 0 on P, else
that under d divided by the mass d gives to ¬ P.
The uniform distribution on an interval, conditioned on a sub-interval, is the uniform
distribution on the sub-interval (what EC computes with dexcepted1E, weight_dinter,
dinter1E, dinterE in Dice4_6.ec's D4_Sample).