Average lemmas for finite-support distributions #
This module contains the finite-sum and uniform-average lemmas for the project
Distribution type. The primitive distribution definitions, uniform
distributions, and total variation distance live in
MIPStarRE.LDT.Basic.Distribution.
Main declarations #
The main results are the algebraic rules for avgOver, scalar and
operator-valued forms of the module-valued finite-sum rules for uniform
distributions, and the comparison between finite uniform averages and Mathlib
uniform probability mass functions.
References #
These are formalization-internal finite probability lemmas for the low individual degree test development.
Averaging infrastructure #
Linearity proofs use Distribution.weightedSumLinearMap; order and support
estimates use Mathlib's Finset.sum API.
Averaging the zero function gives zero.
Averaging preserves order when weights are nonneg.
Averaging a nonneg function with nonneg weights gives a nonneg result.
Pull a finite outcome sum through an average.
Pull a finite-set sum through an average.
Fubini swap for two nested finite-support distribution averages.
If f = g pointwise, their averages agree.
If two scalar functions agree on a distribution's explicit support, their averages agree. This support-restricted form is useful for distributions whose support carries an invariant not available for all ambient values.
Averaging preserves supportwise order when weights are nonnegative. This is
the support-restricted analogue of avgOver_mono.
The average of a constant scalar is the total mass times that scalar.
Averaging a constant against a probability distribution returns that constant.
A scalar average against a sub-probability distribution is bounded by any nonnegative pointwise upper bound.
Fixed left and right multiplications factor through an operator average.
Averaging against a probabilistic project distribution is the finite sum over its stored support against the associated Mathlib probability mass function.
Averaging against a probabilistic project distribution is the finite sum against its associated Mathlib probability mass function.
Averaging against a probabilistic project distribution is integration against its associated Mathlib probability mass function.
Operator-valued averaging against a probabilistic project distribution is the finite operator sum over the stored support against the associated Mathlib probability mass function.
Operator-valued averaging against a probabilistic project distribution is the finite sum against its associated Mathlib probability mass function.
A supportwise upper bound also bounds the average of a probability distribution.
This packages the paper convention that expectations are taken against genuine
probability distributions, while still allowing Distribution itself to carry a
larger ambient type than its explicit support.
For two probability distributions, total variation is the total positive
part of the signed weight difference ν - μ.
This is the finite-distribution identity
(1 / 2) * ∑ |μ(a)-ν(a)| = ∑ max 0 (ν(a)-μ(a)), written for the
project Distribution representation.
A [0,1]-valued function has expectations over two probability
distributions differing by at most their total variation distance.
The statement is oriented for replacement estimates: averaging against ν is
bounded by averaging against μ, plus the finite total-variation distance
between the two distributions.
Averaging a constant against the uniform distribution on a nonempty finite type returns that constant.
Finite-sum expression for the uniform average, stated without measurable-space assumptions.
A finite-support uniform average is the corresponding Mathlib uniform PMF sum.
A finite-support uniform average is the finite integral with respect to the corresponding Mathlib uniform probability mass function.
The uniform average with respect to uniformDistribution is the finite integral
with respect to the uniform probability mass function.
A uniform average over a finite support is the same as the uniform average over the corresponding finite subtype.
The uniform operator average is the finite operator sum weighted by
PMF.uniformOfFintype.
A finite-support uniform operator average is the corresponding Mathlib uniform PMF sum.
Reindexing a uniform operator average along an equivalence preserves its value.
A uniform operator average over a finite support is the same as the uniform operator average over the corresponding finite subtype.
A uniform operator average over a finite support may be reindexed by any finite type equivalent to that support subtype.
A uniform operator average over a filtered finite support is the uniform operator average over the finite subtype satisfying the predicate.
A uniform operator average over a filtered finite type may be reindexed by any finite seed type equivalent to the predicate subtype.
A uniform average of effects is again bounded above by the identity operator.
A uniform average is bounded by any supportwise upper bound.
A uniform average is bounded by any pointwise upper bound.
Reindexing a uniform average along an equivalence preserves its value.
A uniform average over a finite support may be reindexed by any finite type equivalent to that support subtype.
A uniform average over a finite filtered support is the uniform average over the finite subtype satisfying the predicate.
A uniform average over a filtered finite type may be reindexed by any finite seed type equivalent to the predicate subtype.
Split a uniform average over a product into iterated uniform averages.
Swap two nested uniform averages over finite nonempty types.
Split a uniform average over a product into iterated uniform averages, with the second coordinate averaged first.
Pull a finite sum through a uniform average and express it as a uniform average over the product, with the cardinality of the summed type as the normalizing factor.
Transport a uniform average through an equivalence whose target is a product, then split the product average into iterated uniform averages.
Transport a uniform average through an equivalence whose target is a product, then split the product average with the second coordinate averaged first.
A function depending only on the first coordinate of a product equivalence has the corresponding first-coordinate uniform marginal.
A function depending only on the second coordinate of a product equivalence has the corresponding second-coordinate uniform marginal.
Averaging a function depending only on the first coordinate marginalizes a uniform product.
Averaging a function depending only on the second coordinate marginalizes a uniform product.