Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 14.9 (projection lemma): for the projection v of w onto a convex H and every u ∈ H, ‖w − u‖² − ‖v − u‖² ≥ 0

Proved
UnderstandingML.projection_lemma

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

convexityprojection

Lemma 14.9 (Projection Lemma). Let HHH be a closed convex set and let vvv be the projection of www onto HHH, v=argmin⁡x∈H∥x−w∥2v = \operatorname{argmin}_{x \in H}\|x - w\|^2v=argminx∈H​∥x−w∥2. Then for every u∈Hu \in Hu∈H, ∥w−u∥2−∥v−u∥2≥0\|w - u\|^2 - \|v - u\|^2 \ge 0∥w−u∥2−∥v−u∥2≥0.

Formally: for a convex HHH and a point v∈Hv \in Hv∈H minimizing ∥x−w∥\|x - w\|∥x−w∥ over HHH (closedness only guarantees existence).

Preamble
import Definitions.Def_UnderstandingML_SGD

open MeasureTheory
open scoped InnerProductSpace
Formal statement
namespace UnderstandingML

/-- **Lemma 14.9 (Projection Lemma)** (p. 193). Let `H` be a closed convex set and let `v` be the
projection of `w` onto `H`, `v = argmin_{x ∈ H} ‖x − w‖²`. Then for every `u ∈ H`,
`‖w − u‖² − ‖v − u‖² ≥ 0`. (Closedness is only needed for the projection to exist.) -/
theorem projection_lemma {d : ℕ} (H : Set (Vec d)) (hH : Convex ℝ H) (w v : Vec d)
    (hv : IsProjection H w v) (u : Vec d) (hu : u ∈ H) :
    0 ≤ ‖w - u‖ ^ 2 - ‖v - u‖ ^ 2 := by sorry

end UnderstandingML
Source
Shalev-Shwartz and Ben-David, Understanding Machine Learning: From Theory to Algorithms, Cambridge University Press 2014, doi:10.1017/CBO9781107298019, §14.4.1 pp. 193-194, Lemma 14.9 with its proof
Human review
  • Endorsed by Shuze Chen · Sep 25, 2026

    Confirmed by the moderator at approval.

  • Endorsed by naimengye · Sep 25, 2026

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

  • Endorsed by mikedeng1 · Sep 27, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me