Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma A.2, p. 35 — Dvoretzky–Kiefer–Wolfowitz inequality (Massart): P[sup_x |F̂ₙ(x) − F(x)| ≤ ε] ≥ 1 − 2e^{−2nε²}, any c.d.f.

Proved
OfflineCensoredPricing.Identifiability.lemma_A_2

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

concentration-inequalitydkw-inequalityempirical-processp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let μ\muμ be any probability measure on R\mathbb RR with c.d.f. FFF, let X1,…,XnX_1, \dots, X_nX1​,…,Xn​ be i.i.d. with law μ\muμ, and let F^n(x)=1n#{j:Xj≤x}\hat F_n(x) = \frac1n\#\{j : X_j \le x\}F^n​(x)=n1​#{j:Xj​≤x} be their empirical distribution function. Then for any ε>0\varepsilon > 0ε>0,

P[sup⁡x∈R∣F^n(x)−F(x)∣≤ε]≥1−2e−2nε2.\mathbb P\Big[\sup_{x\in\mathbb R} |\hat F_n(x) - F(x)| \le \varepsilon\Big] \ge 1 - 2e^{-2n\varepsilon^2}.P[x∈Rsup​∣F^n​(x)−F(x)∣≤ε]≥1−2e−2nε2.

This is the Dvoretzky–Kiefer–Wolfowitz inequality with Massart's tight constant. In the paper it controls the empirical c.d.f. of the censored sales min⁡{ξ−bpi,yi}\min\{\xi - bp_i, y_i\}min{ξ−bpi​,yi​} in the proof of Lemma 1 ((D.1), p. 42).

Formalization Note No continuity of FFF is assumed: the censored sales have an atom at yiy_iyi​. The statement bounds the outer probability of the failure event {∃x, ∣F^n(x)−F(x)∣>ε}\{\exists x,\ |\hat F_n(x) - F(x)| > \varepsilon\}{∃x, ∣F^n​(x)−F(x)∣>ε} by 2e−2nε22e^{-2n\varepsilon^2}2e−2nε2. For n=0n = 0n=0 the bound is 222 (with 0/0=00/0 = 00/0=0 in Lean) and holds trivially.

Preamble
import Mathlib
Formal statement
namespace OfflineCensoredPricing.Identifiability

open MeasureTheory ProbabilityTheory

/-- **Lemma A.2** (Dvoretzky–Kiefer–Wolfowitz inequality, Massart 1990; p. 35). Let `F̂ₙ` be the
empirical distribution function of `n` i.i.d. samples of a random variable with c.d.f. `F`. Then for
any `ε > 0`, `P[sup_{x ∈ ℝ} |F̂ₙ(x) − F(x)| ≤ ε] ≥ 1 − 2e^{−2nε²}`. Stated for an arbitrary probability
measure `μ` on `ℝ` (no continuity of `F`), as an upper bound on the outer probability of the failure
event `∃ x, |F̂ₙ(x) − F(x)| > ε`. -/
theorem lemma_A_2 (μ : Measure ℝ) [IsProbabilityMeasure μ] (n : ℕ) {ε : ℝ} (hε : 0 < ε) :
    Measure.pi (fun _ : Fin n => μ)
        {ω | ∃ x : ℝ,
          ε < |((Finset.univ.filter (fun j => ω j ≤ x)).card : ℝ) / (n : ℝ) - cdf μ x|} ≤
      ENNReal.ofReal (2 * Real.exp (-(2 * (n : ℝ) * ε ^ 2))) := by sorry

end OfflineCensoredPricing.Identifiability
Source
Bu, Simchi-Levi & Wang, SSRN 3619625 (PDF of 2021-08-23), p. 35, Lemma A.2 (citing Massart 1990)
Human review
  • Endorsed by Shuze Chen · Oct 22, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 22, 2026

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

  • Endorsed by iris · Nov 6, 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