Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

§9.1.1, Equation (9.1): a sample is separable iff some w has yᵢ⟨w, xᵢ⟩ ≥ 1 for all i

Proved
UnderstandingML.separable_iff_margin_one

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

halfspaceslinear-programmingseparability

§9.1.1, Equation (9.1). In the realizable case we look for www with yi⟨w,xi⟩>0y_i\langle w, x_i\rangle > 0yi​⟨w,xi​⟩>0 for all iii. If w∗w^*w∗ satisfies this, γ=min⁡iyi⟨w∗,xi⟩\gamma = \min_i y_i\langle w^*, x_i\rangleγ=mini​yi​⟨w∗,xi​⟩ and wˉ=w∗/γ\bar w = w^*/\gammawˉ=w∗/γ, then yi⟨wˉ,xi⟩≥1y_i\langle \bar w, x_i\rangle \ge 1yi​⟨wˉ,xi​⟩≥1 for all iii (9.1); and clearly such a vector is an ERM predictor.

Formally: the sample (xi,yi)(x_i, y_i)(xi​,yi​) is separable if and only if there is www with yi⟨w,xi⟩≥1y_i\langle w, x_i\rangle \ge 1yi​⟨w,xi​⟩≥1 for all iii.

Preamble
import Definitions.Def_UnderstandingML_Linear

open MeasureTheory
open scoped InnerProductSpace
Formal statement
namespace UnderstandingML

/-- **§9.1.1, Equation (9.1)** (p. 119). In the realizable (separable) case there is a vector
with `yᵢ⟨w, xᵢ⟩ ≥ 1` for all `i` (scale a separating vector by `1/γ`, `γ = minᵢ yᵢ⟨w*, xᵢ⟩`),
and clearly such a vector separates the sample: separability is equivalent to the feasibility
of the linear constraints (9.1). -/
theorem separable_iff_margin_one {d m : ℕ} (x : Fin m → Vec d) (y : Fin m → ℝ) :
    Separable x y ↔ ∃ w : Vec d, ∀ i, 1 ≤ y i * ⟪w, x i⟫_ℝ := 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, §9.1.1 p. 119, the derivation of Equation (9.1)
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).

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