Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3: C0∗≤Qd∗Q∗Cd∗C^*_0 \le \frac{Q^*_d}{Q^*}C^*_dC0∗​≤Q∗Qd∗​​Cd∗​ and Cd∗≤C∗≤G(y0)+Qd∗Q∗Cd∗C^*_d \le C^* \le G(y^0) + \frac{Q^*_d}{Q^*}C^*_dCd∗​≤C∗≤G(y0)+Q∗Qd∗​​Cd∗​

Proved
ZhengQR.CostBounds.optimal_cost_bounds

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

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

Consider the stochastic continuous-review (Q,r)(Q,r)(Q,r) inventory model with demand rate λ\lambdaλ, leadtime LLL, fixed ordering cost KKK, holding and backorder cost rates h,ph,ph,p (all positive), and leadtime demand D≥0D\ge0D≥0 with E(D)=λLE(D)=\lambda LE(D)=λL, whose 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)+] has a unique minimizer y0y^0y0. Let Q∗Q^*Q∗ be the optimal order quantity of the stochastic model, and write

  • C∗=C(Q∗)C^*=C(Q^*)C∗=C(Q∗) for its optimal average cost,
  • C0∗=C0(Q∗)C^*_0=C_0(Q^*)C0∗​=C0​(Q∗) for its optimal average controllable cost, where C(Q)=G(y0)+C0(Q)C(Q)=G(y^0)+C_0(Q)C(Q)=G(y0)+C0​(Q),
  • Qd∗=2λK(h+p)/(hp)Q^*_d=\sqrt{2\lambda K(h+p)/(hp)}Qd∗​=2λK(h+p)/(hp)​ and Cd∗=Cd(Qd∗)C^*_d=C_d(Q^*_d)Cd∗​=Cd​(Qd∗​) for the optimal order quantity and optimal average cost of the EOQ model with the same parameters and demand constant at λL\lambda LλL.

Then

C0∗≤Qd∗Q∗ Cd∗,Cd∗≤C∗≤G(y0)+Qd∗Q∗ Cd∗.C^*_0\le\frac{Q^*_d}{Q^*}\,C^*_d,\qquad C^*_d\le C^*\le G(y^0)+\frac{Q^*_d}{Q^*}\,C^*_d.C0∗​≤Q∗Qd∗​​Cd∗​,Cd∗​≤C∗≤G(y0)+Q∗Qd∗​​Cd∗​.

The stochastic model's total optimal cost exceeds the EOQ's, while its controllable part is smaller, and the total gap is at most the newsboy cost G(y0)G(y^0)G(y0) (as Qd∗≤Q∗Q^*_d\le Q^*Qd∗​≤Q∗).

Formalization Note Cd∗C^*_dCd∗​ is taken as Cd(Qd∗)C_d(Q^*_d)Cd​(Qd∗​); the milestone for Eqs. (18), (20) proves Qd∗Q^*_dQd∗​ is the unique minimizer of CdC_dCd​, so this is the optimal EOQ cost. C0∗C^*_0C0∗​ is taken as C0(Q∗)C_0(Q^*)C0​(Q∗); by Eq. (13), C0=C−G(y0)C_0=C-G(y^0)C0​=C−G(y0) on (0,∞)(0,\infty)(0,∞), so Q∗Q^*Q∗ also minimizes C0C_0C0​ and C0(Q∗)=min⁡Q>0C0(Q)C_0(Q^*)=\min_{Q>0}C_0(Q)C0​(Q∗)=minQ>0​C0​(Q). The goal holds for every optimal Q∗Q^*Q∗; Lemma 6 shows exactly one exists.

Preamble
import Mathlib
import Definitions.Def_ZhengQR_CostBounds_QRMachinery
import Definitions.Def_ZhengQR_CostBounds_Model
Formal statement
namespace ZhengQR.CostBounds

theorem optimal_cost_bounds (M : QRModel) (Qs : ℝ) (hQs : IsOptQty M.G M.lam M.K Qs) :
    C0fun M.G M.lam M.K Qs ≤ M.Qd / Qs * Cfun M.Gd M.lam M.K M.Qd ∧
    Cfun M.Gd M.lam M.K M.Qd ≤ Cfun M.G M.lam M.K Qs ∧
    Cfun M.G M.lam M.K Qs ≤ M.G (idealPt M.G) + M.Qd / Qs * Cfun M.Gd M.lam M.K M.Qd := by sorry

end ZhengQR.CostBounds
Source
Zheng, On Properties of Stochastic Inventory Systems, Management Science 38(1), 1992, p. 97, Theorem 3
Read-back

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

Let MMM be a model record of type QRModel. The statement uses the following components of MMM:

  • a function GGG (M.G) and a second function GdG_dGd​ (M.Gd);
  • real parameters λ\lambdaλ (M.lam) and KKK (M.K);
  • a real number QdQ_dQd​ (M.Qd).

QRModel is defined in a separate definitions file whose contents were not given to me. So I can't state what types these fields have, what constraints (if any) the structure places on them, or whether GGG and GdG_dGd​ are related. Let QsQ_sQs​ be any real number, and assume the hypothesis

IsOptQty(G,λ,K,Qs).\mathrm{IsOptQty}(G, \lambda, K, Q_s).IsOptQty(G,λ,K,Qs​).

IsOptQty is also defined in the imported file and not shown. Its name suggests "QsQ_sQs​ is an optimal order quantity for (G,λ,K)(G, \lambda, K)(G,λ,K)", but I can't confirm what condition it actually imposes.

The statement also uses three other functions from the imported files that I can't expand:

  • a function C0(G,λ,K,Q)C_0(G, \lambda, K, Q)C0​(G,λ,K,Q) (C0fun);
  • a function C(G,λ,K,Q)C(G, \lambda, K, Q)C(G,λ,K,Q) (Cfun);
  • a point xG∗=idealPt(G)x^*_G = \mathrm{idealPt}(G)xG∗​=idealPt(G), computed from GGG alone, at which GGG is evaluated.

Under these assumptions, the theorem asserts that all three of the following inequalities hold together:

C0(G,λ,K,Qs)  ≤  QdQs C(Gd,λ,K,Qd),C_0(G,\lambda,K,Q_s) \;\le\; \frac{Q_d}{Q_s}\, C(G_d,\lambda,K,Q_d),C0​(G,λ,K,Qs​)≤Qs​Qd​​C(Gd​,λ,K,Qd​), C(Gd,λ,K,Qd)  ≤  C(G,λ,K,Qs),C(G_d,\lambda,K,Q_d) \;\le\; C(G,\lambda,K,Q_s),C(Gd​,λ,K,Qd​)≤C(G,λ,K,Qs​), C(G,λ,K,Qs)  ≤  G(xG∗)  +  QdQs C(Gd,λ,K,Qd).C(G,\lambda,K,Q_s) \;\le\; G(x^*_G) \;+\; \frac{Q_d}{Q_s}\, C(G_d,\lambda,K,Q_d).C(G,λ,K,Qs​)≤G(xG∗​)+Qs​Qd​​C(Gd​,λ,K,Qd​).

The quantity CCC appears with two different argument sets:

  • In the second inequality and on the right-hand sides of the first and third, CCC is evaluated at the function GdG_dGd​ and quantity QdQ_dQd​.
  • On the left of the second and third inequalities, CCC is evaluated at GGG and QsQ_sQs​.
  • The first inequality compares a different function, C0C_0C0​, at (G,λ,K,Qs)(G,\lambda,K,Q_s)(G,λ,K,Qs​) with the scaled term QdQsC(Gd,λ,K,Qd)\frac{Q_d}{Q_s}C(G_d,\lambda,K,Q_d)Qs​Qd​​C(Gd​,λ,K,Qd​).

The statement asserts nothing about how C0C_0C0​ compares with CCC. It asserts no strict inequalities, and it doesn't say that QdQ_dQd​ is optimal for GdG_dGd​ in any sense, except through whatever the fields of QRModel enforce.

Degenerate cases:

  • Qs=0Q_s = 0Qs​=0: Nothing in the statement itself excludes this; only IsOptQty or QRModel could. If Qs=0Q_s = 0Qs​=0, real division gives Qd/Qs=0Q_d/Q_s = 0Qd​/Qs​=0, so the three claims become C0(G,λ,K,0)≤0C_0(G,\lambda,K,0) \le 0C0​(G,λ,K,0)≤0, C(Gd,λ,K,Qd)≤C(G,λ,K,0)C(G_d,\lambda,K,Q_d) \le C(G,\lambda,K,0)C(Gd​,λ,K,Qd​)≤C(G,λ,K,0), and C(G,λ,K,0)≤G(xG∗)C(G,\lambda,K,0) \le G(x^*_G)C(G,λ,K,0)≤G(xG∗​).
  • Negative values: Likewise, nothing in the displayed code requires QdQ_dQd​, QsQ_sQs​, λ\lambdaλ or KKK to be positive. If they are negative, the ratio Qd/QsQ_d/Q_sQd​/Qs​ may be negative or zero.
  • Unsatisfiable hypothesis: If IsOptQty can't be satisfied for some or all models (for example, if the optimality condition refers to a minimizer that doesn't exist), the theorem holds vacuously for those models.
  • Junk values: Any division by zero, empty or unbounded supremum or infimum, or non-integrable integral inside the definitions of C0C_0C0​, CCC, IsOptQty or idealPt would produce Lean's default values there. For idealPt in particular, if it's defined through a choice or argmin that may not exist, xG∗x^*_GxG∗​ could be an arbitrary default point. Because those definitions weren't given to me, I can't say which of these cases occur.
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