Uniform output measures #
EvalDist.IsUniformOn mx s states that the computation mx is a uniform draw from the set s:
in every measurable structure on its outputs with measurable singletons, its output measure is
Mathlib's ProbabilityTheory.uniformOn s. EvalDist.IsUniform mx is the case s = Set.univ.
The predicate names no sampler, so it applies to a computation in any monad with a measure
semantics. On a finite type the measurable structure is irrelevant, and one output measure
suffices to establish the predicate (EvalDist.IsUniformOn.of_evalDist_eq).
Main statements #
Under lawful semantics:
EvalDist.IsUniformOn.map_of_injOn: a map injective onsturns a uniform draw fromsinto a uniform draw from the image ofs. In particular a bijection keeps a uniform draw uniform (EvalDist.IsUniform.map_of_bijective), and an injection makes it uniform on its range (EvalDist.IsUniform.map_of_injective).EvalDist.IsUniformOn.prFail_eq_zero: a uniform draw from a finite nonempty set never fails.EvalDist.IsUniform.pair: two independent uniform draws are a uniform draw from the product.EvalDist.IsUniformOn.evalDistEq: two uniform draws from the same set, possibly in different monads, are equal in distribution, and equality in distribution preserves uniformity (EvalDistEq.isUniformOn_iff).EvalDist.IsUniformOn.prEvent_eqandEvalDist.IsUniform.prEvent_eq: an event of a uniform draw has the probability of the fraction of outputs that satisfy it.EvalDist.IsUniform.evalDistEq_bind_comp: reindexing a uniform draw by a bijection does not change the distribution of any continuation.
Event probabilities and equality in distribution are stated for outputs in Type.
The computation mx is a uniform draw from s: in every measurable structure on its outputs
with measurable singletons, its output measure is the uniform measure on s. The uniform measure
on an infinite set is zero, so a uniform draw from an infinite set always fails.
- evalDist_eq [MeasurableSpace α] [MeasurableSingletonClass α] : evalDist mx = ProbabilityTheory.uniformOn s
The output measure is the uniform measure on
sin every structure with measurable singletons.
Instances For
The computation mx is a uniform draw from all of its output type.
Equations
Instances For
On a finite type, the output measure in one structure with measurable singletons determines uniformity, because every such structure is discrete.
On a finite type, uniformity is the uniform output measure in any one structure with measurable singletons.
A map injective on s turns a uniform draw from s into a uniform draw from the image of
s.
A uniform draw from a finite nonempty set never fails.
A uniform draw from an infinite or empty set always fails.
A bijection keeps a uniform draw uniform.
An injection turns a uniform draw into a uniform draw from its range.
An equivalence keeps a uniform draw uniform.
A uniform draw from a finite nonempty type never fails.
Two independent uniform draws from finite types are a uniform draw from their product.
Events and equality in distribution #
Two uniform draws from the same set are equal in distribution.
An event of a uniform draw from a finite set has the probability of the fraction of the set that satisfies it.
A uniform draw from a finite set returns a given element of the set with probability
1 / #s, and an element outside the set with probability zero.
An event of a uniform draw from a finite set has probability zero exactly when no element of the set satisfies it.
An event of a uniform draw from a finite set has positive probability exactly when some element of the set satisfies it.
An event of a uniform draw from a finite nonempty set has probability one exactly when every element of the set satisfies it.
Equality in distribution preserves uniformity.
An event of a uniform draw from a finite type has the probability of the fraction of outputs that satisfy it.
A uniform draw from a finite type returns any given output with probability 1 / |α|.
An event of a uniform draw from a finite type has probability zero exactly when no output satisfies it.
An event of a uniform draw from a finite type has positive probability exactly when some output satisfies it.
An event of a uniform draw from a finite nonempty type has probability one exactly when every output satisfies it.
A bijection between the outputs of two uniform draws transports their events.
Reindexing a uniform draw by a bijection onto the outputs of another uniform draw does not change the distribution of a continuation.