Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(9) — derivative of the two-point objective in ppp

Proved
RobustMeanCov.OnePoint.twoPointValue_hasDerivAt

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

calculusp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1two-point-distribution

Let u:R→Ru:\mathbb R\to\mathbb Ru:R→R be differentiable, m,s∈Rm,s\in\mathbb Rm,s∈R, and p∈(0,1)p\in(0,1)p∈(0,1). Write the two support points of (8) as

a=m−p1−p s,b=m+1−pp s.a=m-\sqrt{\tfrac{p}{1-p}}\,s,\qquad b=m+\sqrt{\tfrac{1-p}{p}}\,s .a=m−1−pp​​s,b=m+p1−p​​s.

Then U(p)=p u(b)+(1−p) u(a)U(p)=p\,u(b)+(1-p)\,u(a)U(p)=pu(b)+(1−p)u(a) is differentiable at ppp with

∂U∂p(p)=u(b)−u(a)−(b−a) u′(b)+u′(a)2.\frac{\partial U}{\partial p}(p)=u(b)-u(a)-(b-a)\,\frac{u'(b)+u'(a)}{2}.∂p∂U​(p)=u(b)−u(a)−(b−a)2u′(b)+u′(a)​.

This formula is display (9) of the paper. Its sign is the trapezoidal-rule error for ∫abu′\int_a^b u'∫ab​u′, which is how the convexity or concavity of u′u'u′ controls the monotonicity of U(p)U(p)U(p).

Formalization Note The statement is made for every real sss; the paper's σx≥0\sigma_x\ge0σx​≥0 is a special case.

Preamble
import Mathlib
import Definitions.Def_RobustMeanCov_OnePoint_twoPointValue
Formal statement
namespace RobustMeanCov.OnePoint

theorem twoPointValue_hasDerivAt (u : ℝ → ℝ) (hu : Differentiable ℝ u) (m s p : ℝ)
    (hp : p ∈ Set.Ioo (0 : ℝ) 1) :
    HasDerivAt (fun q : ℝ => twoPointValue u m s q)
      (u (m + Real.sqrt ((1 - p) / p) * s) - u (m - Real.sqrt (p / (1 - p)) * s)
        - ((m + Real.sqrt ((1 - p) / p) * s) - (m - Real.sqrt (p / (1 - p)) * s))
          * (deriv u (m + Real.sqrt ((1 - p) / p) * s)
              + deriv u (m - Real.sqrt (p / (1 - p)) * s)) / 2) p := by sorry

end RobustMeanCov.OnePoint
Source
Popescu, Robust Mean-Covariance Solutions for Stochastic Optimization, Oper. Res. 55(1), 2007, p. 102, §3.1, (9)
Read-back

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

This is a theorem. Let u:R→Ru:\mathbb{R}\to\mathbb{R}u:R→R be differentiable at every point, with derivative u′u'u′. Let m,s,pm, s, pm,s,p be real numbers with 0<p<10<p<10<p<1. No condition is placed on mmm or sss. Put

x+=m+1−pp s,x−=m−p1−p s.x_+ = m + \sqrt{\tfrac{1-p}{p}}\,s,\qquad x_- = m - \sqrt{\tfrac{p}{1-p}}\,s .x+​=m+p1−p​​s,x−​=m−1−pp​​s.

Consider the function V(q)=q u ⁣(m+(1−q)/q s)+(1−q) u ⁣(m−q/(1−q) s)V(q) = q\,u\!\left(m+\sqrt{(1-q)/q}\,s\right) + (1-q)\,u\!\left(m-\sqrt{q/(1-q)}\,s\right)V(q)=qu(m+(1−q)/q​s)+(1−q)u(m−q/(1−q)​s). The theorem asserts that VVV is differentiable at the point ppp, with derivative

V′(p)  =  u(x+)−u(x−)  −  (x+−x−) (u′(x+)+u′(x−))2.V'(p) \;=\; u(x_+) - u(x_-) \;-\; \frac{(x_+ - x_-)\,\bigl(u'(x_+) + u'(x_-)\bigr)}{2}.V′(p)=u(x+​)−u(x−​)−2(x+​−x−​)(u′(x+​)+u′(x−​))​.

Degenerate cases:

  • Endpoints and outside. ppp is restricted to the open interval (0,1)(0,1)(0,1), so the junk conventions (square root of a negative is 000, division by zero is 000) never occur at ppp itself. Nothing is claimed at p=0p=0p=0, at p=1p=1p=1, or outside (0,1)(0,1)(0,1).
  • When s=0s=0s=0: x+=x−=mx_+=x_-=mx+​=x−​=m and the asserted derivative is 000.
  • When s<0s<0s<0: x+<m<x−x_+ < m < x_-x+​<m<x−​. The formula is asserted unchanged.
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 paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me