Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 4, p. 10 — Berry–Esseen: sup_t |Pr{√k/σ̂(y) (F̂_k(y) − E[I{Ŷ ≤ y}]) ≤ t} − Φ(t)| ≤ 33/(4σ̂³(y)k^{1/2})

Proved
CoVaRMC.Batching.lemma_4

by mikedeng1 · Oct 22, 2026 · Mathlib 0df444a (Lean v4.33.1)

batching-estimatorberry-esseenempirical-distributionnormal-approximationp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let (Xi,j,Yi,j)(X_{i,j}, Y_{i,j})(Xi,j​,Yi,j​) be i.i.d. with joint density fff, α∈(0,1)\alpha \in (0,1)α∈(0,1), k,m≥1k, m \ge 1k,m≥1, and let Y^1,…,Y^k\hat Y_1,\dots,\hat Y_kY^1​,…,Y^k​ be the batch values, F^k\hat F_kF^k​ their empirical distribution function and σ^(y)=Var(I{Y^≤y})\hat\sigma(y) = \sqrt{\mathrm{Var}(I\{\hat Y \le y\})}σ^(y)=Var(I{Y^≤y})​. Let Φ\PhiΦ be the standard normal distribution function. For every yyy with σ^(y)>0\hat\sigma(y) > 0σ^(y)>0,

sup⁡t∈R∣Pr⁡{kσ^(y)(F^k(y)−E[I{Y^≤y}])≤t}−Φ(t)∣≤334⋅1σ^3(y) k1/2.\sup_{t \in \mathbb R}\left|\Pr\left\{\frac{\sqrt k}{\hat\sigma(y)}\Big(\hat F_k(y) - \mathrm E\big[I\{\hat Y \le y\}\big]\Big) \le t\right\} - \Phi(t)\right| \le \frac{33}{4}\cdot\frac{1}{\hat\sigma^3(y)\,k^{1/2}}.t∈Rsup​​Pr{σ^(y)k​​(F^k​(y)−E[I{Y^≤y}])≤t}−Φ(t)​≤433​⋅σ^3(y)k1/21​.

This controls the across-batch error of (5) uniformly in ttt and is what lets the proof of Theorem 3 pass from probabilities to the normal distribution function at a rate k−1/2k^{-1/2}k−1/2.

Formalization Note. Two departures from the page, both disclosed. (1) The hypothesis σ^(y)>0\hat\sigma(y) > 0σ^(y)>0 is added: the page divides by σ^3(y)\hat\sigma^3(y)σ^3(y), and in Lean a/0=0a/0 = 0a/0=0 would make the bound false when σ^(y)=0\hat\sigma(y) = 0σ^(y)=0. (2) Assumption 1, stated on the page, is not used by the Berry–Esseen argument and is omitted, which strengthens the lemma. The constant 33/433/433/4 is the page's. The supremum over ttt is written as "for every ttt". Φ\PhiΦ is the distribution function of gaussianReal 0 1.

Preamble
import Mathlib
import Definitions.Def_CoVaRMC_Batching_Setting

open MeasureTheory ProbabilityTheory Filter Topology
Formal statement
namespace CoVaRMC.Batching

/-- Lemma 4, p. 10 (Berry–Esseen): for `σ̂(y) > 0`,
`sup_t |Pr{(√k / σ̂(y)) (F̂_k(y) - E[I{Ŷ ≤ y}]) ≤ t} - Φ(t)| ≤ (33/4) · 1 / (σ̂³(y) k^{1/2})`. -/
theorem lemma_4 (D : JointDensity) (α : ℝ) (hα : α ∈ Set.Ioo (0 : ℝ) 1)
    {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω) [IsProbabilityMeasure P]
    (S : ℕ × ℕ → Ω → ℝ × ℝ) (hSm : ∀ p, Measurable (S p)) (hSi : iIndepFun S P)
    (hSl : ∀ p, P.map (S p) = D.law)
    (k m : ℕ) (hk : 0 < k) (hm : 0 < m) (y : ℝ) (hσ : 0 < sigmaHat P S α m y) (t : ℝ) :
    |(P {ω | √(k : ℝ) / sigmaHat P S α m y * (FkHat S α k m y ω - pHat P S α m y) ≤ t}).toReal
        - cdf (gaussianReal 0 1) t|
      ≤ 33 / 4 * (1 / (sigmaHat P S α m y ^ 3 * √(k : ℝ))) := by sorry

end CoVaRMC.Batching
Source
Huang, Lin, Hong, Monte-Carlo Estimation of CoVaR, arXiv:2210.06148v1, p. 10, Lemma 4
Human review
  • Endorsed by Shuze Chen · Oct 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 23, 2026

    Confirmed by the mission captain (proposal self-audit).

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