Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Lemma 14.7 (on ℝ^d): a convex f is ρ-Lipschitz iff every subgradient at every point has norm ≤ ρ

Proved
UnderstandingML.lipschitz_iff_subgradient_bounded

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

lipschitzsubgradients

Lemma 14.7. Let AAA be a convex open set and let f:A→Rf : A \to \mathbb{R}f:A→R be a convex function. Then fff is ρ\rhoρ-Lipschitz over AAA iff for all w∈Aw \in Aw∈A and v∈∂f(w)v \in \partial f(w)v∈∂f(w) we have ∥v∥≤ρ\|v\| \le \rho∥v∥≤ρ.

Formally: for A=RdA = \mathbb{R}^dA=Rd and a Lipschitz constant ρ≥0\rho \ge 0ρ≥0. (On R0\mathbb{R}^0R0, a single point, every function is ρ\rhoρ-Lipschitz for every ρ\rhoρ, while 0∈∂f(0)0 \in \partial f(0)0∈∂f(0) has norm 000, so the equivalence needs ρ≥0\rho \ge 0ρ≥0.)

Preamble
import Definitions.Def_UnderstandingML_SGD

open MeasureTheory
open scoped InnerProductSpace
Formal statement
namespace UnderstandingML

/-- **Lemma 14.7** (p. 190), for `A = ℝ^d`. Let `f : ℝ^d → ℝ` be a convex function. Then `f` is
`ρ`-Lipschitz iff for all `w` and `v ∈ ∂f(w)` we have `‖v‖ ≤ ρ`. The Lipschitz constant is
nonnegative: on `ℝ⁰` every function is `ρ`-Lipschitz for every `ρ`, while `0 ∈ ∂f(0)`. -/
theorem lipschitz_iff_subgradient_bounded {d : ℕ} (f : Vec d → ℝ) (hf : ConvexOn ℝ Set.univ f)
    (ρ : ℝ) (hρ : 0 ≤ ρ) :
    (∀ u v, |f u - f v| ≤ ρ * ‖u - v‖) ↔ ∀ w v, IsSubgradient f w v → ‖v‖ ≤ ρ := 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.2.2 p. 190, Lemma 14.7 with its proof (for A = ℝ^d)
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