Uniform measures on finite sets #
Mathlib's ProbabilityTheory.uniformOn s is the counting measure conditioned on s. It is a
probability measure when s is finite and nonempty, and zero when s is infinite and singletons
are measurable. This file adds the facts that finite uniform sampling uses. It computes the mass of
a point and of a decidable event under the uniform measure on a finite type or a finite set, and
integrals against it. The coordinates of a uniform pair are independent and uniform, and
bijections preserve uniform measures.
Main statements #
MeasurableEquiv.map_uniformOn: a measurable equivalence carries the uniform measure onsto the uniform measure on the image ofs. It needs no finiteness and no measurable singletons.ProbabilityTheory.map_uniformOn_of_injOn: a measurable map injective onscarries the uniform measure onsto the uniform measure on the image, when singletons are measurable.ProbabilityTheory.map_uniformOn_univ_of_bijectiveandProbabilityTheory.uniformOn_univ_map_equiv: a bijection preserves the uniform measure on the whole space.ProbabilityTheory.uniformOn_univ_prod: the uniform measure on a product of finite types is the product of the uniform measures.
The measurable-space assumptions stay explicit. The results ask for measurable singletons where they need them and install no discrete measurable-space instance.
Invariance under measurable equivalences #
A measurable equivalence carries the uniform measure on s to the uniform measure on the image
of s. The statement holds for every set: the counting measure, and so its conditioning on a set,
is invariant under measurable equivalences.
A measurable equivalence preserves the uniform measure on the whole space.
Finite types #
A measurable space on a finite type with measurable singletons is discrete.
Every point in a finite space has mass 1 / |α| under its uniform measure.
The uniform measure of a predicate on a finite type is its normalized cardinality.
Integrating over a finite uniform space averages the values of the integrand. The formula also holds for the empty space.
The uniform measure on a product of finite spaces is the product of their uniform measures. Thus the two coordinates are independent uniform draws.
Finite sets #
Under the uniform measure on a finite set, a point of the set has mass 1 / #s and a point
outside it has mass zero.
The uniform measure on a finite set gives a predicate the fraction of the set that satisfies it.
Invariance under injective maps and bijections #
A measurable map injective on s carries the uniform measure on s to the uniform measure on
the image of s. When s is infinite, both measures are zero.
Pushing the uniform measure on the whole space through a measurable bijection gives the uniform measure on its codomain. Only forward measurability is needed.
An equivalence of countable types carries the uniform measure on its domain to the uniform measure on its codomain. Countability with measurable singletons makes the equivalence measurable.