Documentation

MIPRE.Background.LIDT.MIPStarRE.LDT.Basic.DistributionUniformSums

Module-valued uniform finite sums for project distributions #

This module contains the module-valued finite-sum algebra for the project Distribution type. The statements keep the paper-facing uniformDistribution notation, but their proofs reduce the probability calculation to the finite-expectation API for Mathlib probability mass functions.

Main declarations #

References #

These are formalization-internal finite probability lemmas for the low individual degree test development.

theorem MIPStarRE.LDT.Distribution.sum_smul_eq_toPMF_support_sum {α : Type u_1} {M : Type u_2} [AddCommMonoid M] [Module Error M] (𝒟 : Distribution α) (h𝒟 : 𝒟.IsProbability) (f : αM) :
a𝒟.support, 𝒟.weight a f a = a𝒟.support, ((𝒟.toPMF h𝒟) a).toReal f a

A module-valued finite weighted sum against a probabilistic project distribution may be written with the real weights of the associated Mathlib probability mass function, over the stored support.

theorem MIPStarRE.LDT.Distribution.sum_smul_eq_toPMF_sum {α : Type u_1} {M : Type u_2} [Fintype α] [AddCommMonoid M] [Module Error M] (𝒟 : Distribution α) (h𝒟 : 𝒟.IsProbability) (f : αM) :
a𝒟.support, 𝒟.weight a f a = a : α, ((𝒟.toPMF h𝒟) a).toReal f a

A module-valued finite weighted sum against a probabilistic project distribution may be written as a full finite sum with the real weights of the associated Mathlib probability mass function.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_eq_pmf_sum {α : Type u_1} {M : Type u_2} [Fintype α] [DecidableEq α] [Nonempty α] [AddCommMonoid M] [Module Error M] (f : αM) :
a(uniformDistribution α).support, (uniformDistribution α).weight a f a = a : α, ((PMF.uniformOfFintype α) a).toReal f a

Module-valued finite-sum expression for the uniform distribution, stated without measurable-space assumptions.

theorem MIPStarRE.LDT.uniformOnFinset_sum_smul_eq_pmf_sum {α : Type u_1} {M : Type u_2} [AddCommMonoid M] [Module Error M] (s : Finset α) (hs : s.Nonempty) (f : αM) :

A finite-support uniform weighted sum is the corresponding Mathlib uniform PMF-weighted sum.

A constant family has uniform module-valued average equal to that constant. This is the project-distribution form of PMF.sum_const_smul.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_equiv {α : Type u_1} {β : Type u_2} {M : Type u_3} [Fintype α] [DecidableEq α] [Nonempty α] [Fintype β] [DecidableEq β] [Nonempty β] [AddCommMonoid M] [Module Error M] (e : α β) (f : αM) :

Reindex a uniform module-valued average along an equivalence.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_prod {α : Type u_1} {β : Type u_2} {M : Type u_3} [Fintype α] [DecidableEq α] [Nonempty α] [Fintype β] [DecidableEq β] [Nonempty β] [AddCommMonoid M] [Module Error M] (f : αβM) :
ab(uniformDistribution (α × β)).support, (uniformDistribution (α × β)).weight ab f ab.1 ab.2 = a(uniformDistribution α).support, (uniformDistribution α).weight a b(uniformDistribution β).support, (uniformDistribution β).weight b f a b

Split a uniform module-valued average over a product into iterated uniform module-valued averages.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_comm {α : Type u_1} {β : Type u_2} {M : Type u_3} [Fintype α] [DecidableEq α] [Nonempty α] [Fintype β] [DecidableEq β] [Nonempty β] [AddCommMonoid M] [Module Error M] (f : αβM) :

Swap two nested uniform module-valued averages over finite nonempty types.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_prod_swap {α : Type u_1} {β : Type u_2} {M : Type u_3} [Fintype α] [DecidableEq α] [Nonempty α] [Fintype β] [DecidableEq β] [Nonempty β] [AddCommMonoid M] [Module Error M] (f : αβM) :
ab(uniformDistribution (α × β)).support, (uniformDistribution (α × β)).weight ab f ab.1 ab.2 = b(uniformDistribution β).support, (uniformDistribution β).weight b a(uniformDistribution α).support, (uniformDistribution α).weight a f a b

Split a uniform module-valued average over a product into iterated uniform module-valued averages, with the second coordinate averaged first.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_equiv_prod {γ : Type u_1} {α : Type u_2} {β : Type u_3} {M : Type u_4} [Fintype γ] [DecidableEq γ] [Nonempty γ] [Fintype α] [DecidableEq α] [Nonempty α] [Fintype β] [DecidableEq β] [Nonempty β] [AddCommMonoid M] [Module Error M] (e : γ α × β) (f : γM) :

Transport a uniform module-valued average through an equivalence whose target is a product, then split the product average.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_equiv_prod_swap {γ : Type u_1} {α : Type u_2} {β : Type u_3} {M : Type u_4} [Fintype γ] [DecidableEq γ] [Nonempty γ] [Fintype α] [DecidableEq α] [Nonempty α] [Fintype β] [DecidableEq β] [Nonempty β] [AddCommMonoid M] [Module Error M] (e : γ α × β) (f : γM) :

Transport a uniform module-valued average through an equivalence whose target is a product, then split the product average in the other order.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_equiv_fst {γ : Type u_1} {α : Type u_2} {β : Type u_3} {M : Type u_4} [Fintype γ] [DecidableEq γ] [Nonempty γ] [Fintype α] [DecidableEq α] [Nonempty α] [Finite β] [Nonempty β] [AddCommMonoid M] [Module Error M] (e : γ α × β) (f : αM) :

A function depending only on the first coordinate of a product equivalence has the first-coordinate uniform module-valued marginal.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_equiv_snd {γ : Type u_1} {α : Type u_2} {β : Type u_3} {M : Type u_4} [Fintype γ] [DecidableEq γ] [Nonempty γ] [Finite α] [Nonempty α] [Fintype β] [DecidableEq β] [Nonempty β] [AddCommMonoid M] [Module Error M] (e : γ α × β) (f : βM) :

A function depending only on the second coordinate of a product equivalence has the second-coordinate uniform module-valued marginal.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_factor_equiv {α : Type u_1} {β : Type u_2} {γ : Type u_3} {M : Type u_4} [Fintype α] [DecidableEq α] [Nonempty α] [Fintype γ] [DecidableEq γ] [Nonempty γ] [AddCommMonoid M] [Module Error M] (m : αβ) (g : βγ) (e : α γ) (h : ∀ (a : α), g (m a) = e a) (f : γM) :

A uniformly sampled seed has the uniform module-valued average of an equivalent observed coordinate.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_factor_equiv_fst {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {M : Type u_5} [Fintype α] [DecidableEq α] [Nonempty α] [Fintype γ] [DecidableEq γ] [Nonempty γ] [Finite δ] [Nonempty δ] [AddCommMonoid M] [Module Error M] (m : αβ) (g : βγ) (e : α γ × δ) (h : ∀ (a : α), g (m a) = (e a).1) (f : γM) :

A uniformly sampled seed has the first-coordinate uniform module-valued marginal when the observed coordinate factors through a product equivalence.

theorem MIPStarRE.LDT.uniformDistribution_sum_smul_factor_equiv_snd {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {M : Type u_5} [Fintype α] [DecidableEq α] [Nonempty α] [Finite γ] [Nonempty γ] [Fintype δ] [DecidableEq δ] [Nonempty δ] [AddCommMonoid M] [Module Error M] (m : αβ) (g : βδ) (e : α γ × δ) (h : ∀ (a : α), g (m a) = (e a).2) (f : δM) :

A uniformly sampled seed has the second-coordinate uniform module-valued marginal when the observed coordinate factors through a product equivalence.

theorem MIPStarRE.LDT.uniformDistribution_map_sum_smul_eq_uniform_of_factor_equiv {α : Type u_1} {β : Type u_2} {γ : Type u_3} {M : Type u_4} [Fintype α] [DecidableEq α] [Nonempty α] [DecidableEq β] [Fintype γ] [DecidableEq γ] [Nonempty γ] [AddCommMonoid M] [Module Error M] (m : αβ) (g : βγ) (e : α γ) (h : ∀ (a : α), g (m a) = e a) (f : γM) :
b((uniformDistribution α).map m).support, ((uniformDistribution α).map m).weight b f (g b) = c(uniformDistribution γ).support, (uniformDistribution γ).weight c f c

A uniform push-forward has the uniform module-valued average induced by an equivalent observed coordinate.

theorem MIPStarRE.LDT.uniformDistribution_map_sum_smul_eq_uniform_fst_of_factor_equiv {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {M : Type u_5} [Fintype α] [DecidableEq α] [Nonempty α] [DecidableEq β] [Fintype γ] [DecidableEq γ] [Nonempty γ] [Finite δ] [Nonempty δ] [AddCommMonoid M] [Module Error M] (m : αβ) (g : βγ) (e : α γ × δ) (h : ∀ (a : α), g (m a) = (e a).1) (f : γM) :
b((uniformDistribution α).map m).support, ((uniformDistribution α).map m).weight b f (g b) = c(uniformDistribution γ).support, (uniformDistribution γ).weight c f c

A uniform push-forward has the first-coordinate uniform module-valued marginal when the observed coordinate factors through a product equivalence.

theorem MIPStarRE.LDT.uniformDistribution_map_sum_smul_eq_uniform_snd_of_factor_equiv {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {M : Type u_5} [Fintype α] [DecidableEq α] [Nonempty α] [DecidableEq β] [Finite γ] [Nonempty γ] [Fintype δ] [DecidableEq δ] [Nonempty δ] [AddCommMonoid M] [Module Error M] (m : αβ) (g : βδ) (e : α γ × δ) (h : ∀ (a : α), g (m a) = (e a).2) (f : δM) :
b((uniformDistribution α).map m).support, ((uniformDistribution α).map m).weight b f (g b) = d(uniformDistribution δ).support, (uniformDistribution δ).weight d f d

A uniform push-forward has the second-coordinate uniform module-valued marginal when the observed coordinate factors through a product equivalence.

A finite-support uniform module-valued average is the corresponding uniform average over the support subtype.

theorem MIPStarRE.LDT.uniformOnFinset_sum_smul_equiv {α : Type u_1} {β : Type u_2} {M : Type u_3} [Fintype β] [DecidableEq β] [Nonempty β] [AddCommMonoid M] [Module Error M] (s : Finset α) (e : β s) (f : αM) :

A finite-support uniform module-valued average may be reindexed by any finite type equivalent to the support subtype.

A uniform module-valued average over a filtered finite support is the uniform average over the finite subtype satisfying the predicate.

theorem MIPStarRE.LDT.uniformOnFinset_filter_sum_smul_equiv {α : Type u_1} {β : Type u_2} {M : Type u_3} [Fintype α] (p : αProp) [DecidablePred p] [Fintype β] [DecidableEq β] [Nonempty β] [AddCommMonoid M] [Module Error M] (e : β { a : α // p a }) (f : αM) :

A uniform module-valued average over a filtered finite type may be reindexed by any finite seed type equivalent to the predicate subtype.