Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1.9 — convexity iff directional derivatives exist and are nondecreasing along lines

Proved
ShorNonsmooth.Subdiff.convex_iff_dirDeriv_monotone

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

convex-analysisdirectional-derivativep2o-batch-b23ap2o-gran-per-chapterp2o-plan-bookp2o-v1

A function f:En→Rf : E_n \to \mathbb{R}f:En​→R is convex if and only if its one-sided directional derivative fη′(x)f'_\eta(x)fη′​(x) exists (and is finite) at every point xxx in every direction η\etaη, and for every xxx and η\etaη the function

t⟼fη′(x+tη),t∈R,t \longmapsto f'_\eta(x + t\eta), \qquad t \in \mathbb{R},t⟼fη′​(x+tη),t∈R,

is nondecreasing.

This characterizes convexity through monotonicity of one-sided derivatives along lines, and yields the smooth Hessian criterion as a special case.

Formalization Note The derivative is packaged as a function D(x,η)D(x,\eta)D(x,η) with D(x,η)=fη′(x)D(x,\eta) = f'_\eta(x)D(x,η)=fη′​(x) for all x,ηx, \etax,η; it is unique because a limit from the right is unique. Existence is required for all directions, including −η-\eta−η.

Preamble
import Mathlib
import Definitions.Def_ShorNonsmooth_Subdiff_DirDeriv
Formal statement
namespace ShorNonsmooth.Subdiff

/-- Shor (1985), p. 11, Theorem 1.9: a function `f` on `E_n` is convex if and only if its
one-sided directional derivative `f′_η(x)` exists (finite) at every point `x` in every direction
`η`, and `t ↦ f′_η(x + tη)` is nondecreasing for every `x` and `η`. The derivative is recorded as
a function `D x η`; it is unique because the limit from the right is unique. -/
theorem convex_iff_dirDeriv_monotone {n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ) :
    ConvexOn ℝ Set.univ f ↔
      ∃ D : EuclideanSpace ℝ (Fin n) → EuclideanSpace ℝ (Fin n) → ℝ,
        (∀ x η, HasOneSidedDirDeriv f x η (D x η)) ∧
          ∀ x η, Monotone (fun t : ℝ => D (x + t • η) η) := by sorry

end ShorNonsmooth.Subdiff
Source
Shor, Minimization Methods for Non-Differentiable Functions, Springer 1985, p. 11, Theorem 1.9
Human review
  • Endorsed by Shuze Chen · Oct 2, 2026

    Confirmed by the moderator at approval.

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