Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

B.3, p. 27 — the Nadaraya–Watson estimate is the maximum of an (s, P) program with a single feasible point

Proved
BootRobust.NWDual.nw_eq_program

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

linear-programmingnadaraya-watsonp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1prescriptive-analytics

Let D∈DnD\in\mathcal D_nD∈Dn​ be a distribution on the finite support Ωn\Omega_nΩn​, let wi>0w_i>0wi​>0 be positive weights and ℓi\ell_iℓi​ arbitrary losses. Then the Nadaraya–Watson estimate

EDn[ℓ]=∑iwiℓiDi∑iwiDiE^n_D[\ell]=\frac{\sum_i w_i\ell_iD_i}{\sum_i w_iD_i}EDn​[ℓ]=∑i​wi​Di​∑i​wi​ℓi​Di​​

is the maximum of the program

max⁡s>0, P ∑iwiℓiPis.t.Pi=Di s  ∀i,∑iPi=s,∑iwiPi=1.\max_{s>0,\,P}\ \sum_i w_i\ell_iP_i\quad\text{s.t.}\quad P_i=D_i\,s\ \ \forall i,\qquad \sum_iP_i=s,\qquad\sum_iw_iP_i=1 .s>0,Pmax​ i∑​wi​ℓi​Pi​s.t.Pi​=Di​s  ∀i,i∑​Pi​=s,i∑​wi​Pi​=1.

The maximum is attained; in fact the only feasible point is s=1/∑iwiDis=1/\sum_iw_iD_is=1/∑i​wi​Di​, P=sDP=sDP=sD.

This rewrites the ratio estimator as a linear objective over a cone, the first step towards the perspective program of Corollary 1.

Preamble
import Mathlib
import Definitions.Def_BootRobust_NWDual_Setting
Formal statement
namespace BootRobust.NWDual

/-- B.3, p. 27: the Nadaraya–Watson estimate (19) at `D ∈ Dₙ` is the maximum of the linear
program over `s > 0` and `P` with `P = s · D`, `∑ P = s` and `∑ w P = 1`. -/
theorem nw_eq_program {ι : Type*} [Fintype ι] [DecidableEq ι]
    (D : ι → ℝ) (hD : D ∈ stdSimplex ℝ ι) (w : ι → ℝ) (hw : ∀ i, 0 < w i) (ℓ : ι → ℝ) :
    IsGreatest {x : ℝ | ∃ (s : ℝ) (P : ι → ℝ), 0 < s ∧ (∀ i, P i = D i * s) ∧
        ∑ i, P i = s ∧ ∑ i, w i * P i = 1 ∧ x = ∑ i, w i * ℓ i * P i}
      (BootRobust.Perf.nwEst w ℓ D) := by sorry

end BootRobust.NWDual
Source
Bertsimas and Van Parys, Bootstrap robust prescriptive analytics, arXiv:1711.09974v2, B.3 (proof of Corollary 1), p. 27, first display
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 8, 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