Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3, p. A3 — newsvendor with U[x, x+U] demand: Q̄ = x + U(p−c)/p is optimal, with profit (p−c)x + (U/2)(p−c)²/p

Proved
FlexLearning.Threshold.lemma_3

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

capacity-planningnewsvendorp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1uniform-distribution

Consider a newsvendor selling at unit price ppp, buying at unit cost ccc with 0≤c<p0 \le c < p0≤c<p, no salvage value, facing demand DDD uniform on [x,x+U][x, x+U][x,x+U] with x≥0x \ge 0x≥0 and U>0U > 0U>0. For a capacity QQQ the expected profit is π(Q)=E[pmin⁡{D,Q}−cQ]\pi(Q) = \mathbb E[p\min\{D,Q\} - cQ]π(Q)=E[pmin{D,Q}−cQ]. Then the capacity

Qˉ=x+U p−cp  (≥0)\bar Q = x + U\,\frac{p-c}{p} \ \ (\ge 0)Qˉ​=x+Upp−c​  (≥0)

maximizes π\piπ over Q≥0Q \ge 0Q≥0, and its expected profit is

π(Qˉ)=(p−c)x+U2 (p−c)2p.\pi(\bar Q) = (p-c)x + \frac U2\,\frac{(p-c)^2}{p}.π(Qˉ​)=(p−c)x+2U​p(p−c)2​.

This closed form is the building block of every optimal profit in the paper: the static non-flexible optimum, and the second-period value after a stock-out, where the posterior demand is again uniform.

Formalization Note The paper allows U≥0U \ge 0U≥0 and any costs; here U>0U > 0U>0 (so that the uniform law is a probability measure) and 0≤c<p0 \le c < p0≤c<p (nonnegative cost, positive margin) are assumed. The maximizer is not claimed unique: at c=0c = 0c=0 every Q≥x+UQ \ge x + UQ≥x+U is optimal.

Preamble
import Mathlib
import Definitions.Def_FlexLearning_Threshold_Model
Formal statement
namespace FlexLearning.Threshold

theorem lemma_3 (p c x U : ℝ) (hc : 0 ≤ c) (hcp : c < p) (hx : 0 ≤ x) (hU : 0 < U) :
    0 ≤ x + U * ((p - c) / p) ∧
    nvProfit p c (prior x U) (x + U * ((p - c) / p)) = (p - c) * x + U / 2 * ((p - c) ^ 2 / p) ∧
    ∀ Q : ℝ, 0 ≤ Q →
      nvProfit p c (prior x U) Q ≤ nvProfit p c (prior x U) (x + U * ((p - c) / p)) := by sorry

end FlexLearning.Threshold
Source
Chod, Markakis & Trichakis, On the Learning Benefits of Resource Flexibility, SSRN preprint 3212177 (version of December 6, 2019), p. A3 (PDF 36), Lemma 3 (first part)
Human review
  • Endorsed by Shuze Chen · Oct 23, 2026

    Confirmed by the moderator at approval.

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