Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(7), p. 940 — Nahmias's identity y₊L = z + [max_l {v_l − d_[l,L)}]⁺

Proved
ZipkinLostSales.Bounds.eq_7

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

inventorylost-salesoperations-researchp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Let L≥1L\ge1L≥1, let v=(v0,…,vL−1)v=(v_0,\dots,v_{L-1})v=(v0​,…,vL−1​) be a state, zzz the current order, and dt,…,dt+L−1d_t,\dots,d_{t+L-1}dt​,…,dt+L−1​ the demands of the next LLL periods. Write d[l,L)=∑j=lL−1dt+jd_{[l,L)}=\sum_{j=l}^{L-1}d_{t+j}d[l,L)​=∑j=lL−1​dt+j​ for the demand of periods t+lt+lt+l through t+L−1t+L-1t+L−1. Then the inventory on hand when the current order arrives, obtained by iterating the lost-sales dynamics, is

y+L=z+[max⁡{vl−d[l,L): l=0,…,L−1}]+.y_{+L}=z+\Big[\max\{v_l-d_{[l,L)}:\ l=0,\dots,L-1\}\Big]^+ .y+L​=z+[max{vl​−d[l,L)​: l=0,…,L−1}]+.

This closed form (due to Nahmias, 1979) expresses the only random quantity in the one-period cost q(v,z)q(v,z)q(v,z) through the state; in particular y+L≥zy_{+L}\ge zy+L​≥z. It is the starting point for the bound on the last-period policy.

Formalization Note The identity is deterministic and is stated for all real vvv, zzz and demands, with no sign condition. y+Ly_{+L}y+L​ is the model's yPlusL, defined by the on-hand recursion with xl=vl−vl+1x_l=v_l-v_{l+1}xl​=vl​−vl+1​, vL=0v_L=0vL​=0; indices are 0,…,L−10,\dots,L-10,…,L−1, and the maximum is a Finset.sup' over the nonempty index set, nonempty because L≥1L\ge 1L≥1.

Preamble
import Mathlib
import Definitions.Def_ZipkinLostSales_Bounds_Model
Formal statement
namespace ZipkinLostSales.Bounds

/-- (7), p. 940 (Nahmias 1979): `y_{+L} = z + [max{v_l − d_{[l,L)} : l = 0, …, L − 1}]⁺`, where
`d_{[l,L)} = Σ_{l ≤ j < L} D j` is the demand of periods `t + l, …, t + L − 1`. A deterministic
identity, for every real `v`, `z` and `D`. -/
theorem eq_7 {L : ℕ} (hL : 0 < L) (v : Fin L → ℝ) (z : ℝ) (D : Fin L → ℝ) :
    yPlusL v z D =
      z + max ((Finset.univ : Finset (Fin L)).sup' ⟨⟨0, hL⟩, Finset.mem_univ _⟩
        (fun l => v l - ∑ j ∈ Finset.Ici l, D j)) 0 := by sorry

end ZipkinLostSales.Bounds
Source
Zipkin, On the Structure of Lost-Sales Inventory Models, Oper. Res. 56 (2008), p. 940 (PDF p. 5), eq. (7)
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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