Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 1 — (Q,r)(Q, r)(Q,r) is optimal iff c(Q,r)=G(r)=G(r+Q)c(Q, r) = G(r) = G(r + Q)c(Q,r)=G(r)=G(r+Q)

Proved
ZhengQR.EOQHeuristic.joint_opt_iff

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 (as in Lemma 2, with K>0K > 0K>0), let Q>0Q > 0Q>0 and r∈Rr \in \mathbb{R}r∈R. Then (Q,r)(Q, r)(Q,r) minimises ccc over {Q′>0}×R\{Q' > 0\} \times \mathbb{R}{Q′>0}×R if and only if

c(Q,r)=G(r)=G(r+Q).c(Q, r) = G(r) = G(r + Q).c(Q,r)=G(r)=G(r+Q).

The theorem characterises the optimal policy by two simultaneous equations; the paper uses it to derive qualitative properties of (Q,r)(Q, r)(Q,r) systems.

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_opt_iff {lam L K h p : ℝ} {μ : Measure ℝ} (hM : IsQRModel lam L h p μ) (hK : 0 < K) (Q r : ℝ) (hQ : 0 < Q) :
    (∀ Q' r' : ℝ, 0 < Q' → qrCost (newsvendorCost μ h p) lam K Q r ≤ qrCost (newsvendorCost μ h p) lam K Q' r') ↔
      (qrCost (newsvendorCost μ h p) lam K Q r = newsvendorCost μ h p r ∧ newsvendorCost μ h p r = newsvendorCost μ h p (r + Q)) := by sorry

end ZhengQR.EOQHeuristic
Source
Zheng, On Properties of Stochastic Inventory Systems, Management Science 38(1), 1992, p. 92, Theorem 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 finite first moment and mean λL\lambda LλL;
  • μ\muμ is concentrated on x≥0x\ge0x≥0 almost everywhere;
  • 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 a unique global minimizer.

Assume also K>0K>0K>0. Fix real Q>0Q > 0Q>0 and real rrr, and write

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 following equivalence holds:

(∀Q′>0, ∀r′∈R: c(Q,r)≤c(Q′,r′))  ⟺  (c(Q,r)=G(r)  and  G(r)=G(r+Q)).\Big(\forall Q' > 0,\ \forall r' \in \mathbb{R}:\ c(Q,r) \le c(Q',r')\Big) \iff \Big(c(Q,r) = G(r) \ \text{ and } \ G(r) = G(r+Q)\Big).(∀Q′>0, ∀r′∈R: c(Q,r)≤c(Q′,r′))⟺(c(Q,r)=G(r)  and  G(r)=G(r+Q)).

In words, (Q,r)(Q,r)(Q,r) minimizes ccc over (0,∞)×R(0,\infty)\times\mathbb{R}(0,∞)×R exactly when both equalities hold.

Degenerate cases. Competitors Q′≤0Q'\le 0Q′≤0 are not considered; in particular c(0,⋅)=0c(0,\cdot) = 0c(0,⋅)=0 by the division-by-zero convention, and it is excluded. Q≤0Q\le0Q≤0 is excluded by hypothesis. The statement does not assert that a joint minimizer exists. The hypotheses can all hold, for example with μ\muμ the point mass at λL\lambda LλL.

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