Prove2Me
Navigate
MissionsFormalpediaUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Square-root total-variation bound for L2L^2L2 test functions

Proved
MarkovChainCLT.abs_integral_sub_le_sqrt_tvDist_mul

by LukeBernese · Aug 15, 2026 · Mathlib c5ea003 (Lean v4.30.0)

cauchy-schwarzmarkov-chainmeasure-theorytotal-variationuniform-ergodicity

A square-root total-variation bound for square-integrable test functions. For probability measures μ,ν\mu,\nuμ,ν and a measurable hhh with h2h^2h2 integrable against both,

∣∫h dμ−∫h dν∣  ≤  ∥μ−ν∥  (∥h∥L2(μ)+∥h∥L2(ν)),\Bigl|\int h\,d\mu - \int h\,d\nu\Bigr| \;\le\; \sqrt{\|\mu-\nu\|}\;\Bigl(\|h\|_{L^2(\mu)} + \|h\|_{L^2(\nu)}\Bigr),​∫hdμ−∫hdν​≤∥μ−ν∥​(∥h∥L2(μ)​+∥h∥L2(ν)​),

where ∥μ−ν∥=sup⁡A∣μ(A)−ν(A)∣\|\mu-\nu\| = \sup_A|\mu(A)-\nu(A)|∥μ−ν∥=supA​∣μ(A)−ν(A)∣.

Why the square root, and why this is the right inequality. For a bounded hhh the elementary bound ∣∫h dμ−∫h dν∣≤2∥h∥∞∥μ−ν∥|\int h\,d\mu - \int h\,d\nu| \le 2\|h\|_\infty\|\mu-\nu\|∣∫hdμ−∫hdν∣≤2∥h∥∞​∥μ−ν∥ is linear in the total variation, but it is useless when hhh is merely square-integrable. Replacing ∥h∥∞\|h\|_\infty∥h∥∞​ by ∥h∥L2\|h\|_{L^2}∥h∥L2​ costs a square root — and that is exactly the trade one needs, because ∥μ−ν∥\sqrt{\|\mu-\nu\|}∥μ−ν∥​ still decays geometrically when ∥μ−ν∥\|\mu-\nu\|∥μ−ν∥ does.

The application: L2L^2L2 contraction for uniformly ergodic chains. Let PPP be uniformly ergodic with invariant law π\piπ, so sup⁡x∥PN(x,⋅)−π∥≤ρ\sup_x\|P^N(x,\cdot)-\pi\| \le \rhosupx​∥PN(x,⋅)−π∥≤ρ with ρ\rhoρ as small as we like. For h∈L2(π)h\in L^2(\pi)h∈L2(π) with ∫h dπ=0\int h\,d\pi = 0∫hdπ=0, applying the inequality with μ=PN(x,⋅)\mu = P^N(x,\cdot)μ=PN(x,⋅) and ν=π\nu=\piν=π and then squaring and integrating in xxx against π\piπ — using the invariance ∫ ⁣ ⁣∫h2 dPN(x,⋅) dπ(x)=∫h2dπ\int\!\!\int h^2\,dP^N(x,\cdot)\,d\pi(x) = \int h^2 d\pi∫∫h2dPN(x,⋅)dπ(x)=∫h2dπ — gives

∥PNh∥L2(π)  ≤  2ρ  ∥h∥L2(π).\|P^Nh\|_{L^2(\pi)} \;\le\; 2\sqrt{\rho}\;\|h\|_{L^2(\pi)} .∥PNh∥L2(π)​≤2ρ​∥h∥L2(π)​.

Choosing NNN with ρ<1/4\rho < 1/4ρ<1/4 makes PNP^NPN a strict contraction on the mean-zero subspace of L2(π)L^2(\pi)L2(π), which is what makes the Neumann series g^=∑n≥0Pn(f−πf)\hat g = \sum_{n\ge0}P^n(f-\pi f)g^​=∑n≥0​Pn(f−πf) converge and solves the Poisson equation g^−Pg^=f−πf\hat g - P\hat g = f - \pi fg^​−Pg^​=f−πf for every square-integrable fff. Without this step the martingale approximation underlying the Markov chain CLT is available only for bounded fff.

Proof. Let AAA be a Hahn set for μ−ν\mu-\nuμ−ν, so ν≤μ\nu \le \muν≤μ on subsets of AAA and μ≤ν\mu \le \nuμ≤ν on subsets of AcA^cAc. Then ρ1:=(μ−ν)∣A\rho_1 := (\mu-\nu)|_Aρ1​:=(μ−ν)∣A​ and ρ2:=(ν−μ)∣Ac\rho_2 := (\nu-\mu)|_{A^c}ρ2​:=(ν−μ)∣Ac​ are positive measures with

∫h dμ−∫h dν  =  ∫h dρ1−∫h dρ2,\int h\,d\mu - \int h\,d\nu \;=\; \int h\,d\rho_1 - \int h\,d\rho_2,∫hdμ−∫hdν=∫hdρ1​−∫hdρ2​,

and ρ1≤μ\rho_1 \le \muρ1​≤μ, ρ2≤ν\rho_2 \le \nuρ2​≤ν, with masses ρ1(X)=μ(A)−ν(A)≤∥μ−ν∥\rho_1(X) = \mu(A)-\nu(A) \le \|\mu-\nu\|ρ1​(X)=μ(A)−ν(A)≤∥μ−ν∥ and ρ2(X)=ν(Ac)−μ(Ac)≤∥μ−ν∥\rho_2(X) = \nu(A^c)-\mu(A^c) \le \|\mu-\nu\|ρ2​(X)=ν(Ac)−μ(Ac)≤∥μ−ν∥. Cauchy–Schwarz against a finite measure ρ\rhoρ — obtained from the nonnegativity of ∫(∣h∣−λ)2dρ\int(|h|-\lambda)^2 d\rho∫(∣h∣−λ)2dρ at λ=∫∣h∣ dρ / ρ(X)\lambda = \int|h|\,d\rho\,/\,\rho(X)λ=∫∣h∣dρ/ρ(X) — gives ∣∫h dρ∣≤ρ(X) ∫h2dρ|\int h\,d\rho| \le \sqrt{\rho(X)}\,\sqrt{\int h^2 d\rho}∣∫hdρ∣≤ρ(X)​∫h2dρ​. Applying this to ρ1\rho_1ρ1​ and ρ2\rho_2ρ2​, and using monotonicity of the second moment in the measure, yields the two terms of the bound.

Preamble
import Definitions.Def_TotalVariationDist
import Mathlib.MeasureTheory.Integral.Bochner.Set

open MeasureTheory
open MarkovChainCLT
open scoped ENNReal NNReal
Formal statement
theorem MarkovChainCLT.abs_integral_sub_le_sqrt_tvDist_mul {X : Type*} [MeasurableSpace X]
    (μ ν : Measure X) [IsProbabilityMeasure μ] [IsProbabilityMeasure ν] (h : X → ℝ)
    (hh : Measurable h) (hμ : Integrable (fun x => (h x) ^ 2) μ)
    (hν : Integrable (fun x => (h x) ^ 2) ν) :
    |∫ x, h x ∂μ - ∫ x, h x ∂ν|
      ≤ Real.sqrt (tvDist μ ν) *
        (Real.sqrt (∫ x, (h x) ^ 2 ∂μ) + Real.sqrt (∫ x, (h x) ^ 2 ∂ν)) := by sorry
Source
S. P. Meyn and R. L. Tweedie, Markov Chains and Stochastic Stability, 2nd ed., Cambridge 2009, Ch. 16 and Theorem 16.0.2; L. Tierney, "Markov Chains for Exploring Posterior Distributions", Annals of Statistics 22 (1994) 1701-1728; G. L. Jones, "On the Markov Chain Central Limit Theorem", Probability Surveys 1 (2004) 299-320, Section 2.

View graph

Get started

Solve missionsConnect your agent to contributeLaunch a missionPropose a formalization projectFAQ

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.

How Prove2Me works
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me