Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1 (Glasserman) — d/dθ E X(θ) = E dX(θ)/dθ for a Lipschitz, a.s. differentiable random function

Proved
RLPBidPrice.Unbiased.lemma1_glasserman

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

differentiation-under-the-integralp2o-batch-rm-cafterp2o-gran-per-chapterp2o-plan-paperp2o-v1probability

Let (Ω,P)(\Omega, P)(Ω,P) be a probability space and X(θ)=X(θ,ω)X(\theta) = X(\theta, \omega)X(θ)=X(θ,ω) a real random function of a real parameter θ\thetaθ, each X(θ)X(\theta)X(θ) a (strongly) measurable random variable, with X(θ0)X(\theta_0)X(θ0​) integrable. Suppose XXX satisfies the Lipschitz condition: there is a constant K≥0K \ge 0K≥0 with

∣X(θ+h,ω)−X(θ,ω)∣≤Khfor all ω, θ∈R, h≥0,|X(\theta + h, \omega) - X(\theta, \omega)| \le K h \quad \text{for all } \omega,\ \theta \in \mathbb{R},\ h \ge 0,∣X(θ+h,ω)−X(θ,ω)∣≤Khfor all ω, θ∈R, h≥0,

and that θ↦X(θ,ω)\theta \mapsto X(\theta, \omega)θ↦X(θ,ω) is differentiable at θ0\theta_0θ0​ for PPP-almost every ω\omegaω. Then θ↦EX(θ)\theta \mapsto \mathbb{E} X(\theta)θ↦EX(θ) is differentiable at θ0\theta_0θ0​ and

ddθ EX(θ)∣θ0=E[ddθX(θ)∣θ0].\frac{d}{d\theta}\, \mathbb{E} X(\theta)\Big|_{\theta_0} = \mathbb{E}\Big[ \frac{d}{d\theta} X(\theta)\Big|_{\theta_0} \Big].dθd​EX(θ)​θ0​​=E[dθd​X(θ)​θ0​​].

This is the interchange lemma the paper uses to pass from almost-sure differentiability of the LP value to differentiability of its expectation.

Formalization Note. The Lipschitz condition is read with θ\thetaθ universally quantified (a global condition; by symmetry it bounds ∣X(θ′)−X(θ)∣≤K∣θ′−θ∣|X(\theta') - X(\theta)| \le K|\theta' - \theta|∣X(θ′)−X(θ)∣≤K∣θ′−θ∣). The implicit standing assumptions of "a random function" with an expectation — measurability of each X(θ)X(\theta)X(θ) and integrability (at θ0\theta_0θ0​; the Lipschitz bound then gives it everywhere) — are explicit hypotheses. The conclusion is stated with HasDerivAt, which asserts both that the derivative exists and that it equals the displayed expectation.

Preamble
import Mathlib
import Definitions.Def_RLPBidPrice_Unbiased_Model

open MeasureTheory Matrix
Formal statement
namespace RLPBidPrice.Unbiased

theorem lemma1_glasserman {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
    [IsProbabilityMeasure P] (X : ℝ → Ω → ℝ) (θ₀ : ℝ)
    (hmeas : ∀ θ, AEStronglyMeasurable (X θ) P)
    (hint : Integrable (X θ₀) P)
    (K : ℝ) (hK : 0 ≤ K)
    (hlip : ∀ ω θ h, 0 ≤ h → |X (θ + h) ω - X θ ω| ≤ K * h)
    (hdiff : ∀ᵐ ω ∂P, DifferentiableAt ℝ (fun θ => X θ ω) θ₀) :
    HasDerivAt (fun θ => ∫ ω, X θ ω ∂P) (∫ ω, deriv (fun θ => X θ ω) θ₀ ∂P) θ₀ := by sorry

end RLPBidPrice.Unbiased
Source
Talluri, van Ryzin, A Randomized Linear Programming Method for Computing Network Bid Prices, Transp. Sci. 33(2), 1999, p. 210, Lemma 1
Read-back

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

Let (Ω,P)(\Omega, P)(Ω,P) be a probability space. Let X:R×Ω→RX : \mathbb{R} \times \Omega \to \mathbb{R}X:R×Ω→R, written Xθ(ω)X_\theta(\omega)Xθ​(ω), be a real-valued family indexed by θ∈R\theta \in \mathbb{R}θ∈R, and fix θ0∈R\theta_0 \in \mathbb{R}θ0​∈R. Assume:

  • for every θ\thetaθ, XθX_\thetaXθ​ is almost-everywhere strongly measurable with respect to PPP;
  • Xθ0X_{\theta_0}Xθ0​​ is PPP-integrable;
  • there is a constant K≥0K \ge 0K≥0 such that, for every ω\omegaω (not merely almost every), every θ\thetaθ and every h≥0h \ge 0h≥0,
∣Xθ+h(ω)−Xθ(ω)∣≤Kh.|X_{\theta+h}(\omega) - X_\theta(\omega)| \le K h.∣Xθ+h​(ω)−Xθ​(ω)∣≤Kh.

Because θ\thetaθ ranges over all reals, this says each θ↦Xθ(ω)\theta \mapsto X_\theta(\omega)θ↦Xθ​(ω) is KKK-Lipschitz on R\mathbb{R}R;

  • for PPP-almost every ω\omegaω, θ↦Xθ(ω)\theta \mapsto X_\theta(\omega)θ↦Xθ​(ω) is differentiable at θ0\theta_0θ0​.

Conclusion: the function θ↦∫ΩXθ dP\theta \mapsto \int_\Omega X_\theta \, dPθ↦∫Ω​Xθ​dP has a derivative at θ0\theta_0θ0​, equal to

∫ΩddθXθ(ω)∣θ=θ0 dP(ω).\int_\Omega \frac{d}{d\theta} X_\theta(\omega)\Big|_{\theta=\theta_0} \, dP(\omega).∫Ω​dθd​Xθ​(ω)​θ=θ0​​dP(ω).

In this integrand, the derivative is taken to be 000 at any ω\omegaω where it does not exist. By the last hypothesis that happens only on a null set.

Degenerate cases.

  • Ω\OmegaΩ cannot be empty, because PPP is a probability measure.
  • If K=0K = 0K=0, each X⋅(ω)X_\cdot(\omega)X⋅​(ω) is constant in θ\thetaθ and the asserted derivative is 000.
  • If the pointwise-derivative function were not integrable, the right-hand integral would take the default value 000. The statement makes no separate integrability assertion about it.
Human review
  • Endorsed by Shuze Chen · Oct 21, 2026

    Confirmed by the moderator at approval.

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