Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2 — Qd∗≤Q∗≤QˉQ^*_d \le Q^* \le \bar QQd∗​≤Q∗≤Qˉ​, Qˉ≤Qˉ1\bar Q \le \bar Q_1Qˉ​≤Qˉ​1​, Qˉ≤Qˉ2\bar Q \le \bar Q_2Qˉ​≤Qˉ​2​, and Qˉ1−Qd∗\bar Q_1 - Q^*_dQˉ​1​−Qd∗​ increases to a finite limit in KKK

Proved
ZhengQR.OrderQty.order_quantity_bounds

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

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

Consider the continuous-review (Q,r)(Q, r)(Q,r) inventory system with demand rate λ>0\lambda > 0λ>0, leadtime L>0L > 0L>0, holding cost rate h>0h > 0h>0 and backorder penalty rate p>0p > 0p>0. The leadtime demand DDD has a distribution μ\muμ that is a probability measure, integrable, with mean E(D)=λL\mathbb{E}(D) = \lambda LE(D)=λL and D≥0D \ge 0D≥0 almost surely, and the newsvendor cost G(y)=E[h(y−D)++p(D−y)+]G(y) = \mathbb{E}[h(y-D)^+ + p(D-y)^+]G(y)=E[h(y−D)++p(D−y)+] has a unique minimizer y0y^0y0. Let H(Q)=G(r(Q))H(Q) = G(r(Q))H(Q)=G(r(Q)), where r(Q)r(Q)r(Q) is the optimal reorder point for QQQ, and H0(Q)=H(Q)−G(y0)H_0(Q) = H(Q) - G(y^0)H0​(Q)=H(Q)−G(y0). In the EOQ model with the same parameters, Hd(Q)=hph+pQH_d(Q) = \frac{hp}{h+p}QHd​(Q)=h+php​Q and Qd∗=2λK(h+p)/(hp)Q^*_d = \sqrt{2\lambda K(h+p)/(hp)}Qd∗​=2λK(h+p)/(hp)​.

For a fixed ordering cost K>0K > 0K>0, let Qˉ\bar QQˉ​, Qˉ1\bar Q_1Qˉ​1​, Qˉ2\bar Q_2Qˉ​2​ be the positive solutions of

QH0(Q)=2λK,H0(Q)=Hd(Qd∗),∫0QH0(y) dy=λK.Q H_0(Q) = 2\lambda K, \qquad H_0(Q) = H_d(Q^*_d), \qquad \int_0^Q H_0(y)\,dy = \lambda K.QH0​(Q)=2λK,H0​(Q)=Hd​(Qd∗​),∫0Q​H0​(y)dy=λK.

(a) Each of the three equations has exactly one positive solution, and for the optimal order quantity Q∗Q^*Q∗ of the stochastic model

Qd∗≤Q∗≤Qˉ,Qˉ≤Qˉ1,Qˉ≤Qˉ2.Q^*_d \le Q^* \le \bar Q, \qquad \bar Q \le \bar Q_1, \qquad \bar Q \le \bar Q_2.Qd∗​≤Q∗≤Qˉ​,Qˉ​≤Qˉ​1​,Qˉ​≤Qˉ​2​.

(b) Keep λ,L,h,p,μ\lambda, L, h, p, \muλ,L,h,p,μ fixed and let KKK vary. Then K↦Qˉ1(K)−Qd∗(K)K \mapsto \bar Q_1(K) - Q^*_d(K)K↦Qˉ​1​(K)−Qd∗​(K) is nondecreasing on (0,∞)(0, \infty)(0,∞), and it converges to a finite constant as K→∞K \to \inftyK→∞.

So the EOQ quantity underestimates the optimal order quantity when demand is random, but the gap is at most Qˉ1−Qd∗\bar Q_1 - Q^*_dQˉ​1​−Qd∗​, which stays bounded as the ordering cost grows.

Formalization Note "Qˉ=def{Q:… }\bar Q \overset{\text{def}}{=} \{Q : \dots\}Qˉ​=def{Q:…}" is read as the unique positive solution. The statement quantifies over any positive solutions and any optimal Q∗Q^*Q∗, and separately asserts that each equation has exactly one positive solution, so the bounds are not vacuous; existence and uniqueness of Q∗Q^*Q∗ is Lemma 6. Part (b) quantifies over every function K↦Qˉ1(K)K \mapsto \bar Q_1(K)K↦Qˉ​1​(K) that solves the defining equation for each K>0K > 0K>0. The paper calls Qˉ1−Qd∗\bar Q_1 - Q^*_dQˉ​1​−Qd∗​ "an increasing function of KKK"; its proof shows a nonnegative derivative, so the claim proved and formalized is "nondecreasing". The limit is a real number, not +∞+\infty+∞. The four comparisons are exactly the paper's; Qˉ1\bar Q_1Qˉ​1​ and Qˉ2\bar Q_2Qˉ​2​ are not compared with each other.

Preamble
import Mathlib
import Definitions.Def_ZhengQR_OrderQty_newsvendorCost
import Definitions.Def_ZhengQR_OrderQty_qrMachinery

open MeasureTheory Filter Topology
Formal statement
namespace ZhengQR.OrderQty

/-- Theorem 2 (Zheng 1992, p. 96). With `Q̄`, `Q̄₁`, `Q̄₂` the positive solutions of
`Q H₀(Q) = 2λK`, `H₀(Q) = H_d(Q*_d)` and `∫_0^Q H₀(y) dy = λK`:
(a) each of the three equations has exactly one positive solution, and for every optimal order
quantity `Q*`, `Q*_d ≤ Q* ≤ Q̄`, `Q̄ ≤ Q̄₁`, `Q̄ ≤ Q̄₂`;
(b) with `λ, L, h, p, μ` fixed, `K ↦ Q̄₁(K) - Q*_d(K)` is nondecreasing on `(0, ∞)` ("increasing")
and converges to a finite constant as `K → ∞`. -/
theorem order_quantity_bounds
    {lam L h p : ℝ} {μ : Measure ℝ}
    (hlam : 0 < lam) (hL : 0 < L) (hh : 0 < h) (hp : 0 < p)
    (hμ : IsLeadtimeDemand lam L μ)
    (hG : ∃! y : ℝ, IsMinimizer (newsvendorCost h p μ) y) :
    (∀ K : ℝ, 0 < K →
      (∃! Q : ℝ, 0 < Q ∧ Q * H0fun (newsvendorCost h p μ) Q = 2 * lam * K) ∧
      (∃! Q : ℝ, 0 < Q ∧
        H0fun (newsvendorCost h p μ) Q = Hfun (eoqCost lam L h p) (eoqQty lam K h p)) ∧
      (∃! Q : ℝ, 0 < Q ∧ (∫ y in (0 : ℝ)..Q, H0fun (newsvendorCost h p μ) y) = lam * K) ∧
      ∀ Qs Qb Qb1 Qb2 : ℝ,
        IsOptQty (newsvendorCost h p μ) lam K Qs →
        0 < Qb → Qb * H0fun (newsvendorCost h p μ) Qb = 2 * lam * K →
        0 < Qb1 →
        H0fun (newsvendorCost h p μ) Qb1 = Hfun (eoqCost lam L h p) (eoqQty lam K h p) →
        0 < Qb2 → (∫ y in (0 : ℝ)..Qb2, H0fun (newsvendorCost h p μ) y) = lam * K →
        eoqQty lam K h p ≤ Qs ∧ Qs ≤ Qb ∧ Qb ≤ Qb1 ∧ Qb ≤ Qb2) ∧
    ∀ Qb1 : ℝ → ℝ,
      (∀ K : ℝ, 0 < K → 0 < Qb1 K ∧
        H0fun (newsvendorCost h p μ) (Qb1 K) = Hfun (eoqCost lam L h p) (eoqQty lam K h p)) →
      MonotoneOn (fun K => Qb1 K - eoqQty lam K h p) (Set.Ioi 0) ∧
      ∃ c : ℝ, Tendsto (fun K => Qb1 K - eoqQty lam K h p) atTop (𝓝 c) := by sorry

end ZhengQR.OrderQty
Source
Zheng, On Properties of Stochastic Inventory Systems, Management Science 38(1), 1992, p. 96, Theorem 2 (definitions of Q̄, Q̄₁, Q̄₂ in the display above it; proof pp. 96–97)
Read-back

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

Throughout, λ,L,h,p\lambda, L, h, pλ,L,h,p are real numbers and μ\muμ is a measure on R\mathbb{R}R. The statement also uses several named objects whose definitions are imported from other files and are not shown here. Their meaning cannot be recovered from this declaration, so they are treated as opaque. Only their shapes, as the statement uses them, are recorded below:

  • IsLeadtimeDemand(λ,L,μ)\mathrm{IsLeadtimeDemand}(\lambda, L, \mu)IsLeadtimeDemand(λ,L,μ) is a condition on λ\lambdaλ, LLL and the measure μ\muμ.
  • G:=newsvendorCost(h,p,μ)G := \mathrm{newsvendorCost}(h, p, \mu)G:=newsvendorCost(h,p,μ) is a real function of one real variable, G:R→RG:\mathbb{R}\to\mathbb{R}G:R→R, built from hhh, ppp and μ\muμ.
  • IsMinimizer(G,y)\mathrm{IsMinimizer}(G, y)IsMinimizer(G,y) is a condition on the function GGG and the point yyy.
  • H0:=H0fun(G)H_0 := \mathrm{H0fun}(G)H0​:=H0fun(G) is a real function R→R\mathbb{R}\to\mathbb{R}R→R built from GGG.
  • eoqCost(λ,L,h,p)\mathrm{eoqCost}(\lambda, L, h, p)eoqCost(λ,L,h,p) is some object built from λ,L,h,p\lambda, L, h, pλ,L,h,p. It does not involve μ\muμ or KKK.
  • Hd:=Hfun(eoqCost(λ,L,h,p))H_d := \mathrm{Hfun}(\mathrm{eoqCost}(\lambda, L, h, p))Hd​:=Hfun(eoqCost(λ,L,h,p)) is a real function R→R\mathbb{R}\to\mathbb{R}R→R.
  • Qd(K):=eoqQty(λ,K,h,p)Q_d(K) := \mathrm{eoqQty}(\lambda, K, h, p)Qd​(K):=eoqQty(λ,K,h,p) is a real number built from λ,K,h,p\lambda, K, h, pλ,K,h,p. It does not involve LLL or μ\muμ.
  • IsOptQty(G,λ,K,Q)\mathrm{IsOptQty}(G, \lambda, K, Q)IsOptQty(G,λ,K,Q) is a condition on GGG, λ\lambdaλ, KKK and a real number QQQ.

Hypotheses. Assume all of the following:

  • λ>0\lambda > 0λ>0, L>0L > 0L>0, h>0h > 0h>0 and p>0p > 0p>0;
  • IsLeadtimeDemand(λ,L,μ)\mathrm{IsLeadtimeDemand}(\lambda, L, \mu)IsLeadtimeDemand(λ,L,μ) holds;
  • there is exactly one real yyy for which IsMinimizer(G,y)\mathrm{IsMinimizer}(G, y)IsMinimizer(G,y) holds.

Part (a). For every real K>0K > 0K>0, all four of the following hold.

  1. There is exactly one real QQQ with Q>0Q > 0Q>0 and
Q⋅H0(Q)=2λK.Q \cdot H_0(Q) = 2\lambda K.Q⋅H0​(Q)=2λK.
  1. There is exactly one real QQQ with Q>0Q > 0Q>0 and
H0(Q)=Hd(Qd(K)).H_0(Q) = H_d\big(Q_d(K)\big).H0​(Q)=Hd​(Qd​(K)).
  1. There is exactly one real QQQ with Q>0Q > 0Q>0 and
∫0QH0(y) dy=λK,\int_0^{Q} H_0(y)\,dy = \lambda K,∫0Q​H0​(y)dy=λK,

where the integral is the ordinary interval integral from 000 to QQQ. 4. Take any reals Q∗,Qˉ,Qˉ1,Qˉ2Q^*, \bar Q, \bar Q_1, \bar Q_2Q∗,Qˉ​,Qˉ​1​,Qˉ​2​ such that:

  • IsOptQty(G,λ,K,Q∗)\mathrm{IsOptQty}(G, \lambda, K, Q^*)IsOptQty(G,λ,K,Q∗) holds (no sign condition is placed on Q∗Q^*Q∗);
  • Qˉ>0\bar Q > 0Qˉ​>0 and Qˉ H0(Qˉ)=2λK\bar Q\, H_0(\bar Q) = 2\lambda KQˉ​H0​(Qˉ​)=2λK;
  • Qˉ1>0\bar Q_1 > 0Qˉ​1​>0 and H0(Qˉ1)=Hd(Qd(K))H_0(\bar Q_1) = H_d(Q_d(K))H0​(Qˉ​1​)=Hd​(Qd​(K));
  • Qˉ2>0\bar Q_2 > 0Qˉ​2​>0 and ∫0Qˉ2H0(y) dy=λK\int_0^{\bar Q_2} H_0(y)\,dy = \lambda K∫0Qˉ​2​​H0​(y)dy=λK.

Then

Qd(K)≤Q∗≤Qˉ,Qˉ≤Qˉ1,Qˉ≤Qˉ2.Q_d(K) \le Q^* \le \bar Q, \qquad \bar Q \le \bar Q_1, \qquad \bar Q \le \bar Q_2.Qd​(K)≤Q∗≤Qˉ​,Qˉ​≤Qˉ​1​,Qˉ​≤Qˉ​2​.

All four inequalities are non-strict. No comparison is made between Qˉ1\bar Q_1Qˉ​1​ and Qˉ2\bar Q_2Qˉ​2​.

Items 1–3 make Qˉ\bar QQˉ​, Qˉ1\bar Q_1Qˉ​1​ and Qˉ2\bar Q_2Qˉ​2​ the unique positive solutions. Nothing asserts that any Q∗Q^*Q∗ satisfying IsOptQty\mathrm{IsOptQty}IsOptQty exists. If none exists for a given KKK, the conclusion about Q∗Q^*Q∗ holds vacuously for that KKK.

Part (b). Let Qˉ1:R→R\bar Q_1 : \mathbb{R}\to\mathbb{R}Qˉ​1​:R→R be any function such that, for every K>0K > 0K>0:

  • Qˉ1(K)>0\bar Q_1(K) > 0Qˉ​1​(K)>0, and
  • H0(Qˉ1(K))=Hd(Qd(K))H_0(\bar Q_1(K)) = H_d(Q_d(K))H0​(Qˉ​1​(K))=Hd​(Qd​(K)).

Then two things hold:

  • The function K↦Qˉ1(K)−Qd(K)K \mapsto \bar Q_1(K) - Q_d(K)K↦Qˉ​1​(K)−Qd​(K) is monotone non-decreasing on the open interval (0,∞)(0,\infty)(0,∞). That is, 0<K≤K′0 < K \le K'0<K≤K′ implies Qˉ1(K)−Qd(K)≤Qˉ1(K′)−Qd(K′)\bar Q_1(K) - Q_d(K) \le \bar Q_1(K') - Q_d(K')Qˉ​1​(K)−Qd​(K)≤Qˉ​1​(K′)−Qd​(K′). This is not strict increase.
  • There is a real number ccc with
lim⁡K→∞(Qˉ1(K)−Qd(K))=c.\lim_{K\to\infty}\big(\bar Q_1(K) - Q_d(K)\big) = c.K→∞lim​(Qˉ​1​(K)−Qd​(K))=c.

The values of Qˉ1\bar Q_1Qˉ​1​ at K≤0K \le 0K≤0 are unconstrained. They do not affect either conclusion. By item 2 of part (a), Qˉ1\bar Q_1Qˉ​1​ is uniquely determined on (0,∞)(0,\infty)(0,∞), so such a function exists under the hypotheses.

Degenerate cases. Non-positive KKK is excluded in part (a). In part (b), K≤0K \le 0K≤0 is ignored by both the monotonicity claim, which is restricted to (0,∞)(0,\infty)(0,∞), and the limit, which depends only on large KKK. The hypotheses are IsLeadtimeDemand(λ,L,μ)\mathrm{IsLeadtimeDemand}(\lambda, L, \mu)IsLeadtimeDemand(λ,L,μ) and the existence of a unique minimizer of GGG, and their content is not visible here. If they cannot hold together for positive λ,L,h,p\lambda, L, h, pλ,L,h,p, the whole statement is vacuous. Since μ\muμ is an arbitrary measure apart from the IsLeadtimeDemand\mathrm{IsLeadtimeDemand}IsLeadtimeDemand condition, if GGG, H0H_0H0​ or HdH_dHd​ are defined through integrals, then integrals of non-integrable functions would take the default value 000 inside those definitions. Any divisions inside eoqQty\mathrm{eoqQty}eoqQty or the other definitions would take the value 000 when dividing by zero. Neither default is visible from this statement. In the integral equation of item 3, suppose H0H_0H0​ is not integrable on [0,Q][0, Q][0,Q]. Then the interval integral takes the default value 000, which cannot equal λK>0\lambda K > 0λK>0, so such a QQQ never counts as a solution. Existence and uniqueness are asserted for the three equations only, not for Q∗Q^*Q∗. The asserted ordering places no requirement that Q∗Q^*Q∗ be positive.

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