Monotone limits of sub-distributions #
A sequence f : ℕ → SDistr α is a MonoSeq when the weight it assigns to each
value is non-decreasing in n. Its limit mlim f h assigns to each value the
supremum of the weights, and puts the residual mass on failure.
SDistr α is a probability mass function on Option α, of total mass exactly
one, so the failure component of the limit is determined: it is 1 minus the
total weight of the values, and constructing the limit needs the bound
∑' a, ⨆ n, f n (some a) ≤ 1.
Main definitions #
Main results #
tsum_iSup_of_monotone— summation commutes with a monotone supremummlim_bind— the limit commutes withbindon the leftbind_mlim— the limit commutes withbindon the rightmass_mlim— the mass of the limit is the supremum of the massesmlim_const— a constant sequence is its own limit
Correspondence with EasyCrypt #
mlim_bind and bind_mlim are the images of dlet_lim and dlim_let of the
Distr theory, the two laws that carry the denotation of while through a bind.
Summation against a monotone supremum #
The weight a bind assigns to a value #
The weight of a value under a bind is the average of its weights under the continuation. The failure branch contributes nothing.
Non-decreasing sequences #
A sequence of sub-distributions whose weight at every value is non-decreasing.
Equations
Instances For
The weight of a fixed value along a MonoSeq is a monotone function of the
index.
A constant sequence is non-decreasing.
Binding a non-decreasing sequence on the left keeps it non-decreasing.
Binding a pointwise non-decreasing family on the right gives a non-decreasing sequence.
The limit #
The limit of a non-decreasing sequence of sub-distributions: each value gets the supremum of its weights, and failure gets the rest.
Equations
Instances For
A constant sequence has itself as limit.
Interchange with bind #
The limit commutes with bind on the left: binding the limit of a
non-decreasing sequence is the limit of the binds.
The limit commutes with bind on the right: binding into the limit of a
pointwise non-decreasing family is the limit of the binds.