Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 2 — ∇fμ(x)∈∂ϵf(x)\nabla f_\mu(x) \in \partial_\epsilon f(x)∇fμ​(x)∈∂ϵ​f(x) with ϵ=μL0(f)n1/2\epsilon = \mu L_0(f) n^{1/2}ϵ=μL0​(f)n1/2, μ≥0\mu \ge 0μ≥0

Proved
RandomGradFree.Nonsmooth.gradient_smoothing_mem_epsSubdiff

by mikedeng1 · Sep 28, 2026 · Mathlib 0df444a (Lean v4.33.1)

convexitygaussian-smoothingp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1subdifferential

Let EEE be a real inner product space of dimension nnn, let f:E→Rf : E \to \mathbb Rf:E→R be convex and Lipschitz continuous with constant L0≥0L_0 \ge 0L0​≥0, and let μ≥0\mu \ge 0μ≥0. Put ϵ=μL0n1/2\epsilon = \mu L_0 n^{1/2}ϵ=μL0​n1/2. For μ>0\mu > 0μ>0 let ∇fμ(x)\nabla f_\mu(x)∇fμ​(x) be the gradient of the Gaussian smoothing fμf_\mufμ​; for μ=0\mu = 0μ=0 let ∇f0(x)=Eu[f′(x,u) u]\nabla f_0(x) = \mathbb E_u[f'(x,u)\,u]∇f0​(x)=Eu​[f′(x,u)u] be the limiting vector of Eq. (24), where f′(x,u)=lim⁡α↓0(f(x+αu)−f(x))/αf'(x,u) = \lim_{\alpha \downarrow 0} (f(x+\alpha u) - f(x))/\alphaf′(x,u)=limα↓0​(f(x+αu)−f(x))/α is the directional derivative. Then for every x∈Ex \in Ex∈E the vector ∇fμ(x)\nabla f_\mu(x)∇fμ​(x) is an ϵ\epsilonϵ-subgradient of fff at xxx:

f(y)≥f(x)−ϵ+⟨∇fμ(x),y−x⟩for all y∈E.f(y) \ge f(x) - \epsilon + \langle \nabla f_\mu(x), y - x\rangle \qquad \text{for all } y \in E .f(y)≥f(x)−ϵ+⟨∇fμ​(x),y−x⟩for all y∈E.

Thus the expected output of the random oracle is an approximate subgradient of the original nonsmooth function, with an error that vanishes linearly in μ\muμ.

Formalization Note The ϵ\epsilonϵ-subdifferential (p. 532) is written out as the inequality above. For μ>0\mu > 0μ>0 the vector is Mathlib's gradient of fμf_\mufμ​ (which is differentiable, Eq. (21)); for μ=0\mu = 0μ=0 it is ∇f0(x)\nabla f_0(x)∇f0​(x) of Eq. (24), written as the Gaussian expectation of the shared oracle at μ=0\mu = 0μ=0, f′(x,u) uf'(x,u)\,uf′(x,u)u (Eq. (30), item 3). At μ=0\mu = 0μ=0 the statement is ∇f0(x)∈∂f(x)\nabla f_0(x) \in \partial f(x)∇f0​(x)∈∂f(x), Eq. (31).

Preamble
import Mathlib
import Definitions.Def_RandomGradFree_Shared_smoothing
import Definitions.Def_RandomGradFree_Shared_oracle

open MeasureTheory ProbabilityTheory
Formal statement
namespace RandomGradFree.Nonsmooth

theorem gradient_smoothing_mem_epsSubdiff {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    (f : E → ℝ) (hf : ConvexOn ℝ Set.univ f)
    (L₀ : ℝ) (hL₀ : 0 ≤ L₀) (hLip : ∀ x y, |f x - f y| ≤ L₀ * ‖x - y‖)
    (μ : ℝ) (hμ : 0 ≤ μ) (x : E) :
    ∀ y : E, f y ≥ f x - μ * L₀ * Real.sqrt (Module.finrank ℝ E)
      + inner ℝ (if μ = 0 then ∫ u, RandomGradFree.Shared.oracle f 0 x u ∂(stdGaussian E)
          else gradient (RandomGradFree.Shared.smoothing f μ) x) (y - x) := by sorry

end RandomGradFree.Nonsmooth
Source
Nesterov, Spokoiny, Random Gradient-Free Minimization of Convex Functions, Found. Comput. Math. 17 (2017), p. 535, Theorem 2
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Setting. EEE is a finite-dimensional real inner product space, with its Borel σ\sigmaσ-algebra. Write:

  • n=dim⁡REn = \dim_{\mathbb{R}} En=dimR​E;
  • γE\gamma_EγE​ for Mathlib's standard Gaussian probability measure on EEE;
  • ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle⟨⋅,⋅⟩ for the inner product.

Two functions come from imported files whose code was not supplied, so their meaning cannot be unfolded here:

  • fμ=smoothing(f,μ):E→Rf_\mu = \mathrm{smoothing}(f,\mu) : E \to \mathbb{R}fμ​=smoothing(f,μ):E→R;
  • oracle(f,0,x,u)\mathrm{oracle}(f, 0, x, u)oracle(f,0,x,u), a value in EEE that depends on fff, the number 000, a point xxx and a variable uuu. It must lie in EEE because it is integrated to give a vector that enters the inner product.

Hypotheses.

  • f:E→Rf : E \to \mathbb{R}f:E→R is convex on all of EEE.
  • L0L_0L0​ is a real number with L0≥0L_0 \ge 0L0​≥0.
  • For all x,y∈Ex, y \in Ex,y∈E: ∣f(x)−f(y)∣≤L0∥x−y∥|f(x) - f(y)| \le L_0 \|x - y\|∣f(x)−f(y)∣≤L0​∥x−y∥. That is, fff is L0L_0L0​-Lipschitz.
  • μ\muμ is a real number with μ≥0\mu \ge 0μ≥0.
  • xxx is a fixed point of EEE.

No integrability or differentiability hypothesis is made.

The vector ggg. Define

g={∫Eoracle(f,0,x,u) dγE(u)if μ=0,∇fμ(x)if μ>0.g = \begin{cases} \displaystyle\int_E \mathrm{oracle}(f,0,x,u)\, d\gamma_E(u) & \text{if } \mu = 0,\\[2mm] \nabla f_\mu(x) & \text{if } \mu > 0. \end{cases}g=⎩⎨⎧​∫E​oracle(f,0,x,u)dγE​(u)∇fμ​(x)​if μ=0,if μ>0.​

Two conventions matter here:

  • The integral is a Bochner integral. If u↦oracle(f,0,x,u)u \mapsto \mathrm{oracle}(f,0,x,u)u↦oracle(f,0,x,u) is not γE\gamma_EγE​-integrable, the integral is defined to be 000.
  • ∇fμ(x)\nabla f_\mu(x)∇fμ​(x) is Mathlib's gradient. If fμf_\mufμ​ is not differentiable at xxx, the gradient is defined to be 000.

Conclusion. For every y∈Ey \in Ey∈E,

f(y) ≥ f(x)−μL0n+⟨g, y−x⟩.f(y) \ \ge\ f(x) - \mu L_0 \sqrt{n} + \langle g,\ y - x\rangle.f(y) ≥ f(x)−μL0​n​+⟨g, y−x⟩.

Degenerate cases.

  • Junk-value zeros. If the relevant integral fails to exist (μ=0\mu = 0μ=0), or fμf_\mufμ​ is not differentiable at xxx (μ>0\mu > 0μ>0), then g=0g = 0g=0. The statement then asserts f(y)≥f(x)−μL0nf(y) \ge f(x) - \mu L_0 \sqrt{n}f(y)≥f(x)−μL0​n​ for all yyy.
  • μ=0\mu = 0μ=0. The correction term vanishes, and the claim is f(y)≥f(x)+⟨g,y−x⟩f(y) \ge f(x) + \langle g, y - x\ranglef(y)≥f(x)+⟨g,y−x⟩, with ggg the oracle integral (or 000 if it does not exist).
  • L0=0L_0 = 0L0​=0. The Lipschitz hypothesis forces fff to be constant. The claim becomes 0≥⟨g,y−x⟩0 \ge \langle g, y - x\rangle0≥⟨g,y−x⟩ for all yyy.
  • n=0n = 0n=0. EEE has only the point 000, so y=x=0y = x = 0y=x=0 and 0=0\sqrt{0} = 00​=0. The claim reduces to f(0)≥f(0)f(0) \ge f(0)f(0)≥f(0), which holds trivially.
  • No vacuous case. The hypotheses can always be satisfied, for example by a constant fff with any L0≥0L_0 \ge 0L0​≥0.
Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 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