Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorem 3.1 (32) — Eu∥g0(x)∥∗2≤(n+4)∥∇f(x)∥∗2\mathbb E_u\|g_0(x)\|_*^2 \le (n+4)\|\nabla f(x)\|_*^2Eu​∥g0​(x)∥∗2​≤(n+4)∥∇f(x)∥∗2​

Proved
RandomGradFree.Smooth.directional_oracle_second_moment

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

p2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1random-oraclevariance-boundzeroth-order

Let EEE be a real inner product space of finite dimension nnn, uuu a standard Gaussian vector in EEE, and f:E→Rf : E \to \mathbb Rf:E→R differentiable at xxx. Let g0(x)=f′(x,u)Bug_0(x) = f'(x,u)Bug0​(x)=f′(x,u)Bu be the limiting random oracle of (30). Then

Eu(∥g0(x)∥∗2)≤(n+4) ∥∇f(x)∥∗2.\mathbb E_u\big(\|g_0(x)\|_*^2\big) \le (n+4)\,\|\nabla f(x)\|_*^2 .Eu​(∥g0​(x)∥∗2​)≤(n+4)∥∇f(x)∥∗2​.

This variance bound, of order nnn rather than the naive (n+4)2(n+4)^2(n+4)2, is what gives the random gradient method RG0\mathcal{RG}_0RG0​ its linear dependence on the dimension.

Formalization Note ∥g0(x)∥∗=∥f′(x,u) u∥\|g_0(x)\|_* = \|f'(x,u)\,u\|∥g0​(x)∥∗​=∥f′(x,u)u∥ with f′(x,u)f'(x,u)f′(x,u) written as fderiv ℝ f x u; no convexity is assumed, as in part 1 of the theorem.

Preamble
import Mathlib

open MeasureTheory ProbabilityTheory
Formal statement
namespace RandomGradFree.Smooth

theorem directional_oracle_second_moment {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]
    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E]
    (f : E → ℝ) (x : E) (hfx : DifferentiableAt ℝ f x) :
    ∫ u, ‖fderiv ℝ f x u • u‖ ^ 2 ∂(stdGaussian E)
      ≤ ((Module.finrank ℝ E : ℝ) + 4) * ‖gradient f x‖ ^ 2 := by sorry

end RandomGradFree.Smooth
Source
Nesterov, Spokoiny, Random Gradient-Free Minimization of Convex Functions, Found. Comput. Math. 17 (2017), p. 537, Theorem 3, part 1, Eq. (32)
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 σ-algebra, and n=dim⁡REn = \dim_{\mathbb{R}} En=dimR​E.
  • γE\gamma_EγE​ is the standard Gaussian measure on EEE (as defined in Mathlib).
  • f:E→Rf : E \to \mathbb{R}f:E→R is any function and x∈Ex \in Ex∈E.

Hypothesis. fff is (Fréchet) differentiable at xxx. Write Df(x)Df(x)Df(x) for its derivative, a linear map E→RE \to \mathbb{R}E→R, and ∇f(x)\nabla f(x)∇f(x) for the gradient, the vector with Df(x)[v]=⟨∇f(x),v⟩Df(x)[v] = \langle \nabla f(x), v\rangleDf(x)[v]=⟨∇f(x),v⟩.

Claim.

∫E∥Df(x)[u]  u∥2 dγE(u)  ≤  (n+4) ∥∇f(x)∥2.\int_E \big\| Df(x)[u]\; u \big\|^2 \, d\gamma_E(u) \;\le\; (n+4)\,\|\nabla f(x)\|^2 .∫E​​Df(x)[u]u​2dγE​(u)≤(n+4)∥∇f(x)∥2.

No other assumption is made on fff, such as convexity, smoothness elsewhere, or growth conditions.

Degenerate cases.

  • Integral convention. The integral is the Lebesgue/Bochner integral. If the integrand were not integrable, the integral would be defined as 000 and the inequality would hold trivially.
  • n=0n = 0n=0. Both sides are 000.
  • ∇f(x)=0\nabla f(x) = 0∇f(x)=0. The claim says the left side is at most 000.
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