Uniform distributions and resampling #
Every value of a nonempty finite type has positive uniform mass (mem_support_uniformOfFintype),
and the uniform probability or measure of an event under uniformOfFinset or uniformOfFintype is
the fraction of members in the event (toOuterMeasure_uniformOfFinset,
toOuterMeasure_uniformOfFinset_toReal, toMeasure_uniformOfFinset,
toOuterMeasure_uniformOfFintype, toOuterMeasure_uniformOfFintype_toReal,
toMeasure_uniformOfFintype).
Draw a uniformly from α and, independently, b uniformly from β. For any equivalence
e : α × β ≃ γ × δ, the pair e (a, b) is uniform on γ × δ, so its first component is uniform
on γ (uniformOfFintype_bind_map_fst_equiv). This is the resampling step of hybrid arguments:
overwriting part of a uniform string a by independent uniform values b leaves it uniform, since
the overwritten string and the old part together determine (a, b).
Main results #
Cslib.Probability.PMF.mem_support_uniformOfFintype: every value has positive uniform mass.Cslib.Probability.PMF.uniformOfFintype_finset_map_val: subtype and finite-set uniform laws agree.Cslib.Probability.PMF.uniformOfFintype_bind_equiv: reparametrizing a uniform draw by a bijection leaves an experiment unchanged.Cslib.Probability.PMF.uniformOfFintype_prod_map_fst,Cslib.Probability.PMF.uniformOfFintype_bind_map: the first component of a uniform pair is uniform, and mapping over two independent uniform draws is mapping over a uniform pair.Cslib.Probability.PMF.uniformOfFintype_pi_map_restrict,Cslib.Probability.PMF.uniformOfFintype_pi_bind_restrict: restricting a uniform dependent function to a finite subset gives the uniform distribution on that subset.Cslib.Probability.PMF.uniformOfFintype_bind_bind_adaptiveUpdate: resampling the value at a point chosen from the function itself.Cslib.Probability.PMF.uniformOfFintype_bind_map_fst_equiv,Cslib.Probability.PMF.uniformOfFintype_bind_bind_fst_equiv: resampling along an equivalence.Cslib.Probability.PMF.toOuterMeasure_uniformOfFinset,Cslib.Probability.PMF.toOuterMeasure_uniformOfFinset_toReal,Cslib.Probability.PMF.toMeasure_uniformOfFinset,Cslib.Probability.PMF.toOuterMeasure_uniformOfFintype,Cslib.Probability.PMF.toOuterMeasure_uniformOfFintype_toReal,Cslib.Probability.PMF.toMeasure_uniformOfFintype: the uniform probability of an event is the fraction of its members.
Every value of a nonempty finite type is in the uniform distribution's support.
Forgetting membership proofs in a uniform draw from a finset subtype gives its uniform finite-set law.
Mapping a curried binary function over two independent uniform draws is equivalent to
mapping the uncurried function over a uniform pair. Iterating this rewrite collapses n-ary
chains of independent uniform draws into a single uniformOfFintype over a nested product.
Restricting a uniform dependent function on ι to I : Finset ι gives the uniform
distribution on (i : I) → π i.
Binding a uniform dependent function on ι to a continuation that depends only on its
restriction to I : Finset ι is equivalent to sampling uniformly on (i : I) → π i.
Resampling: for independent uniform a and b and an equivalence e : α × β ≃ γ × δ,
the first component of e (a, b) is uniform.
Resampling inside an experiment: running f on the first component of e (a, b), for
independent uniform a and b, is running f on a uniform input.
Adaptive resampling: a uniform function whose value at a point p f, chosen from the
function itself, is replaced by a fresh uniform value is uniform, provided that replacing that
value does not move the point. (f, v) ↦ (Function.update f (p f) v, f (p f)) is an involution.
The uniform distribution on a nonempty finite set gives an event the fraction of the set's members in the event, as an extended nonnegative real.
The probability of an event under the uniform distribution on a nonempty finite set is the fraction of the set's members in the event.
The measure of a measurable event under the uniform distribution on a nonempty finite set is the fraction of the set's members in the event.
The uniform distribution on a finite type gives an event the fraction of its members, as an extended nonnegative real.
The probability of an event under the uniform distribution on a finite type is the fraction of its members.
The measure of a measurable event under the uniform distribution on a finite type is the fraction of its members.