Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 12, p. 613 — the swapped nearest neighbor weights satisfy Σᵢ Uₙᵢ(X) ≤ β(d, a/b)

Proved
StoneRegression.NearestNeighbor.proposition_12

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

conesnearest-neighborsp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1weight-functions

Fix n≥1n \ge 1n≥1, a coefficient row cn1≥⋯≥cnn≥0c_{n1} \ge \dots \ge c_{nn} \ge 0cn1​≥⋯≥cnn​≥0 with ∑icni=1\sum_i c_{ni} = 1∑i​cni​=1, and nonnegative scales sns_nsn​ satisfying condition (7) with constants 0<a≤b0 < a \le b0<a≤b. Let WnW_nWn​ be the nearest neighbor probability weight function (8), and let

Uni(X)=Wni(Xi,X1,…,X,…,Xn)U_{ni}(X) = W_{ni}(X_i, X_1, \dots, X, \dots, X_n)Uni​(X)=Wni​(Xi​,X1​,…,X,…,Xn​)

be the weight of slot iii when XiX_iXi​ is the query point and XXX takes its place in the sample. Then for all points X,X1,…,Xn∈RdX, X_1, \dots, X_n \in \mathbb R^dX,X1​,…,Xn​∈Rd,

∑i=1nUni(X)≤β(d,a/b),\sum_{i=1}^n U_{ni}(X) \le \beta(d, a/b),i=1∑n​Uni​(X)≤β(d,a/b),

where β(d,c)\beta(d,c)β(d,c) is the least number of sets in V(d,c)\mathcal V(d,c)V(d,c) covering Rd\mathbb R^dRd.

The bound says that a single point XXX cannot carry much total weight as a neighbor of the other sample points, uniformly in nnn and in the configuration. Through the exchangeability of the sample it yields condition (1) for nearest neighbor weights (Proposition 11).

Formalization Note The statement is deterministic: the points are fixed, and only nonnegativity of the scales and (7) (read for all points) are assumed, which are the only properties the page's proof uses. The swap acts on both the weights and the scales: the query is XiX_iXi​ and the sample is X1,…,XnX_1, \dots, X_nX1​,…,Xn​ with XXX in slot iii. β\betaβ is an infimum over N\mathbb NN, and the existence of a finite cover is not assumed.

Preamble
import Mathlib
import Definitions.Def_StoneRegression_Criterion_Setting
import Definitions.Def_StoneRegression_NearestNeighbor_Weights
Formal statement
namespace StoneRegression.NearestNeighbor

open MeasureTheory ProbabilityTheory Filter Topology
open scoped ENNReal NNReal

theorem proposition_12 {d : ℕ} (s : ScaleSeq d) (a b : ℝ) (ha : 0 < a) (hab : a ≤ b)
    (hs0 : ∀ n x xs j, 0 ≤ s n x xs j) (h7 : Cond7 s a b)
    (c : ℕ → ℕ → ℝ) (n : ℕ) (hn : 1 ≤ n) (hc : IsCoeffRow c n)
    (x : EuclideanSpace ℝ (Fin d)) (xs : Fin n → EuclideanSpace ℝ (Fin d)) :
    (∑ i, swapW (nnWeights c s) n x xs i) ≤ (beta d (a / b) : ℝ) := by sorry

end StoneRegression.NearestNeighbor
Source
Stone (1977), Ann. Statist. 5, Proposition 12 and the definition of U_ni, p. 613; proof pp. 613–615
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

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