Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Eqs. (13)–(15): C(Q)=G(y0)+C0(Q)C(Q) = G(y^0) + C_0(Q)C(Q)=G(y0)+C0​(Q), and H0(Q∗)=C0(Q∗)H_0(Q^*) = C_0(Q^*)H0​(Q∗)=C0​(Q∗) at the optimum

Proved
ZhengQR.CostBounds.cost_decomposition

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

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

In the stochastic (Q,r)(Q,r)(Q,r) model, let y0y^0y0 be the unique minimizer of GGG, H0(Q)=H(Q)−G(y0)H_0(Q)=H(Q)-G(y^0)H0​(Q)=H(Q)−G(y0) and C0(Q)=(λK+∫0QH0(y) dy)/QC_0(Q)=\big(\lambda K+\int_0^Q H_0(y)\,dy\big)/QC0​(Q)=(λK+∫0Q​H0​(y)dy)/Q.

  1. For every Q>0Q>0Q>0 the cost splits into the newsboy cost and the controllable cost:
C(Q)=G(y0)+C0(Q).C(Q)=G(y^0)+C_0(Q).C(Q)=G(y0)+C0​(Q).
  1. At every optimal order quantity Q∗Q^*Q∗,
H0(Q∗)=C0(Q∗).H_0(Q^*)=C_0(Q^*).H0​(Q∗)=C0​(Q∗).

The constant G(y0)G(y^0)G(y0) is the part of the inventory cost caused by demand randomness and not controllable through the order quantity; C0C_0C0​ is what the choice of QQQ trades off.

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

theorem cost_decomposition (M : QRModel) :
    (∀ Q : ℝ, 0 < Q →
      Cfun M.G M.lam M.K Q = M.G (idealPt M.G) + C0fun M.G M.lam M.K Q) ∧
    (∀ Qs : ℝ, IsOptQty M.G M.lam M.K Qs →
      H0fun M.G M.lam M.K Qs = C0fun M.G M.lam M.K Qs) := by sorry

end ZhengQR.CostBounds
Source
Zheng, On Properties of Stochastic Inventory Systems, Management Science 38(1), 1992, pp. 92–93, Eqs. (13), (14), (15)
Read-back

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

Setting. Fix a model (λ,L,K,h,p,μ)(\lambda,L,K,h,p,\mu)(λ,L,K,h,p,μ):

  • λ,L,K,h,p>0\lambda,L,K,h,p>0λ,L,K,h,p>0.
  • μ\muμ is a probability measure on R\mathbb RR with x≥0x\ge0x≥0 a.e., xxx integrable, and mean λL\lambda LλL.
  • G(y)=∫(hmax⁡(y−x,0)+pmax⁡(x−y,0)) dμ(x)G(y)=\int\big(h\max(y-x,0)+p\max(x-y,0)\big)\,d\mu(x)G(y)=∫(hmax(y−x,0)+pmax(x−y,0))dμ(x) has a unique global minimizer, denoted y0y^0y0.

Derived objects.

  • 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 fixed but unspecified global minimizer of c(Q,⋅)c(Q,\cdot)c(Q,⋅) over R\mathbb RR, if one exists; otherwise 000.
  • H(Q)=G(r(Q))H(Q)=G(r(Q))H(Q)=G(r(Q)) for Q>0Q>0Q>0, and H(Q)=G(y0)H(Q)=G(y^0)H(Q)=G(y0) for Q≤0Q\le0Q≤0.
  • C(Q)=c(Q,r(Q))C(Q)=c(Q,r(Q))C(Q)=c(Q,r(Q)).
  • H0(Q)=H(Q)−G(y0)H_0(Q)=H(Q)-G(y^0)H0​(Q)=H(Q)−G(y0).
  • C0(Q)=(λK+∫0QH0(y) dy)/QC_0(Q)=\big(\lambda K+\int_0^Q H_0(y)\,dy\big)/QC0​(Q)=(λK+∫0Q​H0​(y)dy)/Q.
  • An optimal order quantity is a Q∗>0Q^*>0Q∗>0 with C(Q∗)≤C(Q′)C(Q^*)\le C(Q')C(Q∗)≤C(Q′) for all Q′>0Q'>0Q′>0.

Statement. Two claims hold.

  1. For every real Q>0Q>0Q>0:
C(Q)=G(y0)+C0(Q).C(Q)=G(y^0)+C_0(Q).C(Q)=G(y0)+C0​(Q).
  1. For every optimal order quantity Q∗Q^*Q∗:
H0(Q∗)=C0(Q∗).H_0(Q^*)=C_0(Q^*).H0​(Q∗)=C0​(Q∗).

Degenerate cases. Claim 1 covers only Q>0Q>0Q>0. Claim 2 is vacuously true if no optimal order quantity exists. The statement does not assert existence. Where no optimal reorder point exists, r(Q)=0r(Q)=0r(Q)=0 is used. Integrals of non-integrable functions count as 000.

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