Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proof of Theorem 3.1 — the box kernel density estimator is the density of a member of Pn\mathcal P_nPn​

Proved
DistInterpRO.Consistency.kde_mem_distSet

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

kernel-density-estimationp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1robust-optimization

Let n≥1n\ge1n≥1, ϵ>0\epsilon>0ϵ>0 and x1,…,xn∈Rmx_1,\dots,x_n\in\mathbb R^mx1​,…,xn​∈Rm. Let Zi={xi+δ∣∥δ∥∞≤ϵ}\mathcal Z_i=\{x_i+\delta\mid\|\delta\|_\infty\le\epsilon\}Zi​={xi​+δ∣∥δ∥∞​≤ϵ} and let

hn(x)=(nϵm)−1∑i=1nK(x−xiϵ),K(z)=1(∥z∥∞≤1)2m.h_n(x)=(n\epsilon^m)^{-1}\sum_{i=1}^nK\Big(\frac{x-x_i}{\epsilon}\Big),\qquad K(z)=\frac{\mathbf 1(\|z\|_\infty\le1)}{2^m}.hn​(x)=(nϵm)−1i=1∑n​K(ϵx−xi​​),K(z)=2m1(∥z∥∞​≤1)​.

Then the measure μn\mu_nμn​ with Lebesgue density hnh_nhn​ is a probability measure on Rm\mathbb R^mRm and, for every S⊆{1,…,n}S\subseteq\{1,\dots,n\}S⊆{1,…,n},

∫Rm1(x∈⋃j∈SZj)hn(x) dx ≥ ∣S∣n,\int_{\mathbb R^m}\mathbf 1\Big(x\in\bigcup_{j\in S}\mathcal Z_j\Big)h_n(x)\,dx\ \ge\ \frac{|S|}{n},∫Rm​1(x∈j∈S⋃​Zj​)hn​(x)dx ≥ n∣S∣​,

that is, μn∈Pn\mu_n\in\mathcal P_nμn​∈Pn​.

This is the step of the proof of Theorem 3.1 that places a kernel density estimator inside the distribution set of the robust problem (footnote 2: "hnh_nhn​ is the density function of a probability measure that belongs to Pn\mathcal P_nPn​").

Formalization Note The measure is volume.withDensity (ofReal ∘ hₙ) on Fin m → ℝ with the sup norm; membership in Pn\mathcal P_nPn​ includes being a probability measure, which is where the normalisation 2m2^m2m of KKK is used. The paper states this for the bandwidth ϵ(n)\epsilon(n)ϵ(n); the statement holds for every ϵ>0\epsilon>0ϵ>0.

Preamble
import Mathlib
import Definitions.Def_DistInterpRO_Consistency_Model

open MeasureTheory Filter Topology ProbabilityTheory
Formal statement
namespace DistInterpRO.Consistency

theorem kde_mem_distSet {m n : ℕ} (hn : 0 < n) {ε : ℝ} (hε : 0 < ε)
    (xs : Fin n → Fin m → ℝ) :
    volume.withDensity (fun x => ENNReal.ofReal (kde ε xs x)) ∈
      distSet (fun i => box (xs i) ε) := by sorry

end DistInterpRO.Consistency
Source
Xu, Caramanis and Mannor, A Distributional Interpretation of Robust Optimization, Math. Oper. Res. 37(1) (2012), p. 99, proof of Theorem 3.1, the display chain at the top of the page ending '= |S|/n' and the sentence 'Hence, hₙ ∈ 𝒫ₙ' with footnote 2
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Assumptions:

  • natural numbers mmm and nnn with n≥1n \ge 1n≥1;
  • a real bandwidth ε>0\varepsilon > 0ε>0;
  • sample points x1,…,xn∈Rmx_1,\dots,x_n \in \mathbb{R}^mx1​,…,xn​∈Rm.

Let λm\lambda^mλm be Lebesgue measure on Rm\mathbb{R}^mRm. Let μ\muμ be the measure whose density with respect to λm\lambda^mλm is x↦max⁡(hn(x),0)x \mapsto \max(h_n(x), 0)x↦max(hn​(x),0), where

hn(x)=1nεm∑i=1nK((x−xi)/ε)h_n(x) = \frac{1}{n\varepsilon^m}\sum_{i=1}^n K\big((x - x_i)/\varepsilon\big)hn​(x)=nεm1​i=1∑n​K((x−xi​)/ε)

and K(z)=2−mK(z) = 2^{-m}K(z)=2−m if ∥z∥∞≤1\|z\|_\infty \le 1∥z∥∞​≤1 and 000 otherwise. For ε>0\varepsilon > 0ε>0 we have hn≥0h_n \ge 0hn​≥0, so max⁡(hn,0)=hn\max(h_n,0) = h_nmax(hn​,0)=hn​.

Claim: μ\muμ belongs to the distribution set built from the boxes Zi={z:∥z−xi∥∞≤ε}\mathcal{Z}_i = \{z : \|z - x_i\|_\infty \le \varepsilon\}Zi​={z:∥z−xi​∥∞​≤ε}. That is, both of the following hold:

  1. μ\muμ is a probability measure, meaning ∫hn dλm=1\int h_n \, d\lambda^m = 1∫hn​dλm=1.
  2. For every subset S⊆{1,…,n}S \subseteq \{1,\dots,n\}S⊆{1,…,n},
μ(⋃i∈SZi)≥∣S∣n.\mu\Big(\bigcup_{i\in S}\mathcal{Z}_i\Big) \ge \frac{|S|}{n}.μ(i∈S⋃​Zi​)≥n∣S∣​.

Degenerate cases.

  • The case n=0n = 0n=0 and nonpositive ε\varepsilonε are excluded by the hypotheses.
  • If m=0m = 0m=0, then R0\mathbb{R}^0R0 is a single point, and λ0\lambda^0λ0 is the unit point mass on it. Here hn≡1h_n \equiv 1hn​≡1, every box is the whole one-point space, and the claim reduces to 1≥∣S∣/n1 \ge |S|/n1≥∣S∣/n.
  • The sample points may repeat; nothing requires them to be distinct.
  • S=∅S = \emptysetS=∅ gives the trivial bound 0≤00 \le 00≤0.
Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 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