Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1 — c(Q,r)c(Q, r)c(Q,r) is jointly convex in Q>0Q > 0Q>0 and rrr

Proved
ZhengQR.EOQHeuristic.joint_convex

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

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

Consider the stochastic (Q,r)(Q, r)(Q,r) model with demand rate λ>0\lambda>0λ>0, leadtime L>0L>0L>0, holding and backorder cost rates h,p>0h, p > 0h,p>0, leadtime demand D≥0D \ge 0D≥0 with E(D)=λLE(D) = \lambda LE(D)=λL, newsvendor cost G(y)=E[h(y−D)++p(D−y)+]G(y) = E[h(y-D)^+ + p(D-y)^+]G(y)=E[h(y−D)++p(D−y)+] with a unique minimiser, and fixed ordering cost K>0K > 0K>0. Then the average cost

c(Q,r)=λK+∫rr+QG(y) dyQc(Q, r) = \frac{\lambda K + \int_r^{r+Q} G(y)\,dy}{Q}c(Q,r)=QλK+∫rr+Q​G(y)dy​

is a jointly convex function of (Q,r)(Q, r)(Q,r) on the domain {Q>0}×R\{Q > 0\} \times \mathbb{R}{Q>0}×R.

Joint convexity is what makes sequential minimisation (first over rrr, then over QQQ) yield a convex function of QQQ (Lemma 5).

Formalization Note The paper writes "a joint convex function of QQQ and rrr" without naming the domain; ccc is defined only for Q>0Q > 0Q>0, so the domain is (0,∞)×R(0,\infty) \times \mathbb{R}(0,∞)×R.

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

theorem joint_convex {lam L K h p : ℝ} {μ : Measure ℝ} (hM : IsQRModel lam L h p μ) (hK : 0 < K) :
    ConvexOn ℝ (Set.Ioi (0 : ℝ) ×ˢ (Set.univ : Set ℝ))
      (fun z : ℝ × ℝ => qrCost (newsvendorCost μ h p) lam K z.1 z.2) := by sorry

end ZhengQR.EOQHeuristic
Source
Zheng, On Properties of Stochastic Inventory Systems, Management Science 38(1), 1992, p. 89, Lemma 1
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 ∫∣x∣ dμ<∞\int |x|\,d\mu < \infty∫∣x∣dμ<∞ and ∫x dμ(x)=λL\int x\,d\mu(x) = \lambda L∫xdμ(x)=λL;
  • x≥0x \ge 0x≥0 for μ\muμ-almost every xxx;
  • the function 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 exactly one global minimizer on R\mathbb{R}R.

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

Define, for real QQQ and rrr,

c(Q,r)  =  λK+∫rr+QG(y) dyQ.c(Q, r) \;=\; \frac{\lambda K + \int_r^{r+Q} G(y)\,dy}{Q}.c(Q,r)=QλK+∫rr+Q​G(y)dy​.

Claim. The map (Q,r)↦c(Q,r)(Q, r) \mapsto c(Q,r)(Q,r)↦c(Q,r) is convex on the set (0,∞)×R(0,\infty)\times\mathbb{R}(0,∞)×R. That is, for all (Q1,r1)(Q_1,r_1)(Q1​,r1​) and (Q2,r2)(Q_2,r_2)(Q2​,r2​) with Q1,Q2>0Q_1, Q_2 > 0Q1​,Q2​>0, and all a,b≥0a, b \ge 0a,b≥0 with a+b=1a+b=1a+b=1:

c(aQ1+bQ2,  ar1+br2)  ≤  a c(Q1,r1)+b c(Q2,r2).c\big(aQ_1+bQ_2,\; ar_1+br_2\big) \;\le\; a\,c(Q_1,r_1) + b\,c(Q_2,r_2).c(aQ1​+bQ2​,ar1​+br2​)≤ac(Q1​,r1​)+bc(Q2​,r2​).

Degenerate cases. The domain excludes Q≤0Q \le 0Q≤0. The value c(0,r)=0c(0, r) = 0c(0,r)=0 (from division by zero) is therefore not constrained by this statement. The hypotheses can all hold, for example with μ\muμ the point mass at λL\lambda LλL. The claim covers every K>0K>0K>0. If the integral of GGG over some interval failed to exist, the integral's fallback value 000 would be used in the formula.

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