Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Section 2, Eq. (21) — ∇fμ(x)=Euf(x+μu)−f(x)μBu\nabla f_\mu(x) = \mathbb E_u \frac{f(x+\mu u)-f(x)}{\mu} Bu∇fμ​(x)=Eu​μf(x+μu)−f(x)​Bu

Proved
RandomGradFree.Nonsmooth.smoothing_hasGradient

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

gaussian-smoothinggradientp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1zeroth-order

Let f:E→Rf : E \to \mathbb Rf:E→R be Lipschitz continuous with constant L0≥0L_0 \ge 0L0​≥0 and let μ>0\mu > 0μ>0. Then the Gaussian smoothing fμf_\mufμ​ is differentiable at every x∈Ex \in Ex∈E, and its gradient is the expectation of the finite-difference oracle:

∇fμ(x)=Eu ⁣[f(x+μu)−f(x)μ u].\nabla f_\mu(x) = \mathbb E_u\!\left[\frac{f(x+\mu u) - f(x)}{\mu}\, u\right].∇fμ​(x)=Eu​[μf(x+μu)−f(x)​u].

In other words, the random oracle gμ(x)g_\mu(x)gμ​(x) is an unbiased estimator of ∇fμ(x)\nabla f_\mu(x)∇fμ​(x); this is the identity that turns the random search method into a stochastic gradient method for fμf_\mufμ​.

Formalization Note "Differentiable with this gradient" is Mathlib's HasGradientAt, with the gradient taken with respect to the inner product of EEE (the paper's ⟨B⋅,⋅⟩\langle B\cdot,\cdot\rangle⟨B⋅,⋅⟩, so the paper's B−1∇fμ(x)B^{-1}\nabla f_\mu(x)B−1∇fμ​(x)). The paper assumes only that fff has directional derivatives and differentiates under the integral sign; Lipschitz continuity is assumed here, which justifies that step and is the setting of Theorem 6.

Preamble
import Mathlib
import Definitions.Def_RandomGradFree_Shared_smoothing
import Definitions.Def_RandomGradFree_Nonsmooth_oracle

open MeasureTheory ProbabilityTheory
Formal statement
namespace RandomGradFree.Nonsmooth

theorem smoothing_hasGradient {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    (f : E → ℝ) (L₀ : ℝ) (hL₀ : 0 ≤ L₀) (hLip : ∀ x y, |f x - f y| ≤ L₀ * ‖x - y‖)
    (μ : ℝ) (hμ : 0 < μ) (x : E) :
    HasGradientAt (RandomGradFree.Shared.smoothing f μ) (∫ u, oracle f μ x u ∂(stdGaussian E)) x := by sorry

end RandomGradFree.Nonsmooth
Source
Nesterov, Spokoiny, Random Gradient-Free Minimization of Convex Functions, Found. Comput. Math. 17 (2017), pp. 534-535, Section 2, Eq. (21)
Read-back

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

The setting is:

  • EEE is a finite-dimensional real inner product space with its Borel σ-algebra.
  • γE\gamma_EγE​ is the standard Gaussian measure on EEE.
  • f:E→Rf : E \to \mathbb{R}f:E→R is any function (convexity is not assumed) satisfying, for a real L0≥0L_0 \ge 0L0​≥0, ∣f(x)−f(y)∣≤L0∥x−y∥|f(x)-f(y)| \le L_0\|x-y\|∣f(x)−f(y)∣≤L0​∥x−y∥ for all x,yx, yx,y.
  • μ>0\mu > 0μ>0 (strictly) is a real number and x∈Ex \in Ex∈E is a point.

The statement asserts that fμ=smoothing(f,μ)f_\mu = \mathrm{smoothing}(f,\mu)fμ​=smoothing(f,μ) is (Fréchet) differentiable at xxx and that its gradient there is

∇fμ(x)  =  ∫Ef(x+μu)−f(x)μ u   dγE(u),\nabla f_\mu(x) \;=\; \int_E \frac{f(x+\mu u) - f(x)}{\mu}\, u \;\, d\gamma_E(u) ,∇fμ​(x)=∫E​μf(x+μu)−f(x)​udγE​(u),

with the integral taken as a vector-valued (Bochner) integral in EEE. The gradient is the vector representing the derivative through the inner product. The function fμf_\mufμ​ is defined in a separate shared definition not included in this declaration's code, so its formula cannot be expanded here.

The statement does not separately assert that the integrand is integrable. By convention, the integral of a non-integrable function is the zero vector. In that case the claim would read ∇fμ(x)=0\nabla f_\mu(x) = 0∇fμ​(x)=0.

Degenerate cases:

  • E={0}E = \{0\}E={0}: the integrand is 000, so the claim is that fμf_\mufμ​ has gradient 000 at xxx. On the one-point space this holds for any function.
  • L0=0L_0 = 0L0​=0: fff is constant, the integrand is identically 000, and the claim is that fμf_\mufμ​ has gradient 000 at xxx.
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