Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Avg Over Le Avg Over Add Total Variation Distance

Proved
LIDT.MIPStarRE.LDT.avgOver_le_avgOver_add_totalVariationDistance

by Dengnifer · Oct 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

lidt

Bounded expectations change by at most total variation. Let μ and ν be probability distributions and let f : α → Error take values in [0,1]. Then replacing μ by ν can increase the average by no more than the total variation distance between the two distributions.

(∀a, 0≤f(a)≤1)  ⟹  avgOver⁡ ν f≤avgOver⁡ μ f+totalVariationDistance⁡(μ,ν).\bigl(\forall a,\ 0 \le f(a) \le 1\bigr) \;\Longrightarrow\; \operatorname{avgOver}\,ν\,f \le \operatorname{avgOver}\,μ\,f + \operatorname{totalVariationDistance}(μ,ν).(∀a, 0≤f(a)≤1)⟹avgOverνf≤avgOverμf+totalVariationDistance(μ,ν).

This is the distribution-replacement estimate used in the pasting bounds comparing distinct-tuple sampling with uniform sampling.

Formalization credit: Sirui Lu, Ruixuan Deng, Yanqiao Zhu, and Zhengfeng Ji (arXiv:2609.19814). Mathematical source: Zhengfeng Ji, Anand Natarajan, Thomas Vidick, John Wright, and Henry Yuen (arXiv:2009.12982).

Formalization Note. The source declaration is MIPStarRE.LDT.avgOver_le_avgOver_add_totalVariationDistance; its Lean statement gives the exact quantifier order and all boundary hypotheses.

Preamble
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_Distribution
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_DistributionUniformSums
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_PMFAverages
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_PMFUniformAverages
import Definitions.Def_LIDT_MIPStarRE_LDT_Basic_ParametersBase
import Definitions.Def_LIDT_MIPStarRE_Quantum_FiniteMatrix_Basic
import Definitions.Def_LIDT_MIPStarRE_Quantum_FiniteMatrix_BlockDiagonal
import Definitions.Def_LIDT_MIPStarRE_Quantum_FiniteMatrix_NormalizedTrace
import Definitions.Def_LIDT_MIPStarRE_Quantum_FiniteMatrix_Order
import Definitions.Def_LIDT_MIPStarRE_Quantum_FiniteMatrix_TracePairing
import Mathlib
import Mathlib.Analysis.MeanInequalitiesPow
import Mathlib.Probability.ProbabilityMassFunction.Integrals
import Mathlib.Probability.ProbabilityMassFunction.Monad

open LIDT
/-!
# 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.
-/

@[expose] public section

open scoped BigOperators MatrixOrder _root_.Matrix ComplexOrder

open LIDT.MIPStarRE.LDT

/-! ### Averaging infrastructure

Linearity proofs use `Distribution.weightedSumLinearMap`; order and support
estimates use Mathlib's `Finset.sum` API. -/
Formal statement
theorem LIDT.MIPStarRE.LDT.avgOver_le_avgOver_add_totalVariationDistance {α : Type*} [DecidableEq α]
    (μ ν : _root_.LIDT.MIPStarRE.LDT.Distribution α) (hμ : μ.IsProbability) (hν : ν.IsProbability)
    (f : α → _root_.LIDT.MIPStarRE.LDT.Error)
    (hf_nonneg : ∀ a, 0 ≤ f a)
    (hf_le_one : ∀ a, f a ≤ 1) :
    _root_.LIDT.MIPStarRE.LDT.avgOver ν f ≤ _root_.LIDT.MIPStarRE.LDT.avgOver μ f + _root_.LIDT.MIPStarRE.LDT.totalVariationDistance μ ν := by sorry
Source
https://github.com/LionSR/MIPStarRE/blob/f382c801026f53a9efc260fdee707cb35e0adb15/MIPStarRE/LDT/Basic/DistributionAvg.lean#L331-L401

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me