Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 5 — C(Q)=c(Q,r(Q))C(Q) = c(Q, r(Q))C(Q)=c(Q,r(Q)) is convex on Q>0Q > 0Q>0

Proved
ZhengQR.EOQHeuristic.optCost_convex

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

convexityinventoryp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1qr-policy

In the stochastic (Q,r)(Q, r)(Q,r) model (as in Lemma 2, with K>0K > 0K>0), the average cost with the reorder point chosen optimally,

C(Q)=c(Q,r(Q)),C(Q) = c(Q, r(Q)),C(Q)=c(Q,r(Q)),

is a convex function of the order quantity QQQ on (0,∞)(0, \infty)(0,∞).

Convexity of CCC makes the first-order condition (8) necessary and sufficient for the optimal order quantity.

Preamble
import Mathlib
import Definitions.Def_ZhengQR_EOQHeuristic_qrCost
import Definitions.Def_ZhengQR_EOQHeuristic_costCurves
import Definitions.Def_ZhengQR_EOQHeuristic_stochasticModel
open MeasureTheory Filter Topology
Formal statement
namespace ZhengQR.EOQHeuristic

theorem optCost_convex {lam L K h p : ℝ} {μ : Measure ℝ} (hM : IsQRModel lam L h p μ) (hK : 0 < K) :
    ConvexOn ℝ (Set.Ioi 0) (optCost (newsvendorCost μ h p) lam K) := by sorry

end ZhengQR.EOQHeuristic
Source
Zheng, On Properties of Stochastic Inventory Systems, Management Science 38(1), 1992, p. 91, Lemma 5
Read-back

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

Setting. Let λ,L,K,h,p\lambda, L, K, h, pλ,L,K,h,p be real numbers and μ\muμ a measure on R\mathbb{R}R. Assume the model hypotheses:

  • λ,L,h,p>0\lambda, L, h, p > 0λ,L,h,p>0;
  • μ\muμ is a probability measure with finite first moment and mean λL\lambda LλL;
  • μ\muμ is concentrated on x≥0x\ge0x≥0 almost everywhere;
  • G(y)=∫(h(y−x)++p(x−y)+) dμ(x)G(y) = \int \big(h(y-x)^+ + p(x-y)^+\big)\,d\mu(x)G(y)=∫(h(y−x)++p(x−y)+)dμ(x) has a unique global minimizer.

Assume also K>0K > 0K>0.

Notation.

  • c(Q,r)=(λK+∫rr+QG)/Qc(Q,r) = \big(\lambda K + \int_r^{r+Q} G\big)/Qc(Q,r)=(λK+∫rr+Q​G)/Q.
  • r(Q)r(Q)r(Q) is a chosen minimizer of c(Q,⋅)c(Q,\cdot)c(Q,⋅) over R\mathbb{R}R, or 000 if none exists.
  • C(Q)=c(Q,r(Q))C(Q) = c(Q, r(Q))C(Q)=c(Q,r(Q)).

Claim. CCC is convex on the open interval (0,∞)(0,\infty)(0,∞).

Degenerate cases. Q=0Q = 0Q=0, where C(0)=0C(0)=0C(0)=0 by the division-by-zero convention, is outside the domain and is not constrained. Negative QQQ are also outside the domain. The hypotheses can all hold, for example with μ\muμ the point mass at λL\lambda LλL.

Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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