Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eq. (18): in the EOQ model r_d(Q) = λL − hQ/(h + p) and H_d(Q) = hp/(h + p)·Q

Proved
ZhengQR.Flatness.eoq_H_linear

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

eoqinventoryp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Consider the EOQ model with backorders, i.e. the (Q,r)(Q,r)(Q,r) machinery applied to the cost rate Gd(y)=h(y−λL)++p(λL−y)+G_d(y) = h(y-\lambda L)^+ + p(\lambda L - y)^+Gd​(y)=h(y−λL)++p(λL−y)+. Let rd(Q)r_d(Q)rd​(Q) be an optimal reorder point for QQQ and Hd(Q)=Gd(rd(Q))H_d(Q) = G_d(r_d(Q))Hd​(Q)=Gd​(rd​(Q)) for Q>0Q>0Q>0, Hd(0)=Gd(yd0)H_d(0) = G_d(y^0_d)Hd​(0)=Gd​(yd0​). Then for every Q≥0Q \ge 0Q≥0,

Hd(Q)=hph+p Q,H_d(Q) = \frac{hp}{h+p}\,Q,Hd​(Q)=h+php​Q,

and for Q>0Q>0Q>0 the optimal reorder point is

rd(Q)=λL−hh+p Q.r_d(Q) = \lambda L - \frac{h}{h+p}\,Q.rd​(Q)=λL−h+ph​Q.

Thus the EOQ counterpart of HHH is the line of slope hp/(h+p)hp/(h+p)hp/(h+p), the asymptotic slope of HHH (Lemma 4).

Preamble
import Mathlib
import Definitions.Def_ZhengQR_Flatness_QRModel
Formal statement
namespace ZhengQR.Flatness

theorem eoq_H_linear (M : QRModel) (Q : ℝ) (hQ : 0 ≤ Q) :
    (0 < Q → M.rd Q = M.lam * M.L - M.h / (M.h + M.p) * Q) ∧
      M.Hd Q = M.h * M.p / (M.h + M.p) * Q := by sorry

end ZhengQR.Flatness
Source
Zheng, On Properties of Stochastic Inventory Systems, Management Science 38(1), 1992, p. 94, Eq. (18) and the display of r_d(Q) above it
Read-back

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

Setting. MMM is an arbitrary model consisting of:

  • real numbers λ,L,K,h,p\lambda, L, K, h, pλ,L,K,h,p, all strictly positive;
  • a probability measure μ\muμ on R\mathbb{R}R with finite first moment, mean λL\lambda LλL, and full mass on [0,∞)[0,\infty)[0,∞);
  • the requirement that 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.

The statement itself concerns only the deterministic cost function

Gd(y)=h (y−λL)++p (λL−y)+.G_d(y) = h\,(y-\lambda L)^+ + p\,(\lambda L - y)^+.Gd​(y)=h(y−λL)++p(λL−y)+.

Definitions used.

  • cd(Q,r)=(λK+∫rr+QGd)/Qc_d(Q,r) = \big(\lambda K + \int_r^{r+Q}G_d\big)/Qcd​(Q,r)=(λK+∫rr+Q​Gd​)/Q.
  • rd(Q)r_d(Q)rd​(Q) is a global minimizer of cd(Q,⋅)c_d(Q,\cdot)cd​(Q,⋅) over R\mathbb{R}R, picked by choice if there are several, or 000 if none exists.
  • Hd(Q)=Gd(rd(Q))H_d(Q) = G_d(r_d(Q))Hd​(Q)=Gd​(rd​(Q)) for Q>0Q>0Q>0. For Q≤0Q\le 0Q≤0, Hd(Q)=Gd(yd)H_d(Q) = G_d(y_d)Hd​(Q)=Gd​(yd​), where ydy_dyd​ is a chosen global minimizer of GdG_dGd​ (or 000 if there were none).

Claim. For every real Q≥0Q\ge 0Q≥0, both of the following hold.

  1. If Q>0Q>0Q>0, then
rd(Q)=λL−hh+p Q.r_d(Q) = \lambda L - \frac{h}{h+p}\,Q.rd​(Q)=λL−h+ph​Q.

Since rd(Q)r_d(Q)rd​(Q) is defined by choice, this asserts that the chosen minimizer is exactly this number. 2. The value of HdH_dHd​ is linear in QQQ:

Hd(Q)=hph+p Q.H_d(Q) = \frac{hp}{h+p}\,Q.Hd​(Q)=h+php​Q.

Degenerate cases.

  • At Q=0Q=0Q=0, the first claim is vacuous. The second claim says Hd(0)=Gd(yd)=0H_d(0) = G_d(y_d) = 0Hd​(0)=Gd​(yd​)=0.
  • The hypotheses about μ\muμ and KKK do not enter these formulas. Only hhh, ppp and the product λL\lambda LλL appear.
  • Nothing is asserted for Q<0Q<0Q<0.
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