Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§7.2.1 — closest-point bound: inf⁡a{−λTa+∥x−a∥22}=−λTx−∥λ∥22/4\inf_a\{-\lambda^{\mathsf T}a+\|x-a\|_2^2\}=-\lambda^{\mathsf T}x-\|\lambda\|_2^2/4infa​{−λTa+∥x−a∥22​}=−λTx−∥λ∥22​/4

Proved
SOSInference.Means.closest_point_bound

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

convex-analysisoptimal-transportp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

For x,λ∈Rlx,\lambda\in\mathbb R^lx,λ∈Rl:

  1. inf⁡a∈Rl{−λTa+∥x−a∥22}=−λTx−∥λ∥224\displaystyle\inf_{a\in\mathbb R^l}\big\{-\lambda^{\mathsf T}a+\|x-a\|_2^2\big\}=-\lambda^{\mathsf T}x-\frac{\|\lambda\|_2^2}{4}a∈Rlinf​{−λTa+∥x−a∥22​}=−λTx−4∥λ∥22​​, and the infimum is a minimum;
  2. the minimum is attained at the optimizer a∗(x,λ)=x+λ/2a_*(x,\lambda)=x+\lambda/2a∗​(x,λ)=x+λ/2;
  3. consequently, for every finite nonempty family (zj)(z_j)(zj​) of points of Rl\mathbb R^lRl,
inf⁡j{−λTzj+∥x−zj∥22} ≥ −λTx−∥λ∥224.\inf_j\big\{-\lambda^{\mathsf T}z_j+\|x-z_j\|_2^2\big\}\ \ge\ -\lambda^{\mathsf T}x-\frac{\|\lambda\|_2^2}{4}.jinf​{−λTzj​+∥x−zj​∥22​} ≥ −λTx−4∥λ∥22​​.

It identifies the centre x+λ/2x+\lambda/2x+λ/2 around which the nearest sample points determine the constraints of the dual problem (22).

Preamble
import Mathlib
import Definitions.Def_SOSInference_Means_sos
Formal statement
namespace SOSInference.Means

open scoped RealInnerProductSpace

/-- **Closest-point bound**, §7.2.1, p. 38 (Blanchet, Kang, Sample Out-of-Sample Inference Based on
Wasserstein Distance, arXiv:1605.01340v4, p. 38, Step 1).

For `x, λ ∈ ℝ^l`:
1. `inf_{a ∈ ℝ^l} {−λᵀa + ‖x − a‖₂²} = −λᵀx − ‖λ‖₂²/4`, and the infimum is a minimum;
2. it is attained at the optimizer `a*(x, λ) = x + λ/2`;
3. hence for every finite nonempty family `(z_j)`,
   `inf_j {−λᵀz_j + ‖x − z_j‖₂²} ≥ −λᵀx − ‖λ‖₂²/4`. -/
theorem closest_point_bound {l : ℕ} (x lam : E l) :
    IsLeast (Set.range fun a : E l => -⟪lam, a⟫ + ‖x - a‖ ^ 2) (-⟪lam, x⟫ - ‖lam‖ ^ 2 / 4) ∧
    -⟪lam, x + (1 / 2 : ℝ) • lam⟫ + ‖x - (x + (1 / 2 : ℝ) • lam)‖ ^ 2 =
      -⟪lam, x⟫ - ‖lam‖ ^ 2 / 4 ∧
    ∀ {ι : Type} [Fintype ι] [Nonempty ι] (z : ι → E l),
      -⟪lam, x⟫ - ‖lam‖ ^ 2 / 4 ≤ ⨅ j, (-⟪lam, z j⟫ + ‖x - z j‖ ^ 2) := by sorry

end SOSInference.Means
Source
Blanchet, Kang, Sample Out-of-Sample Inference Based on Wasserstein Distance, arXiv:1605.01340v4, p. 38, §7.2.1 (Step 1)
Human review
  • Endorsed by Shuze Chen · Oct 18, 2026

    Confirmed by the moderator at approval.

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