Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3: the cost of L consecutive periods from state (x, 𝓘)

Proved
LostSalesConstantOrder.LargeLeadTime.lemma_3

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

inventorylost-salesp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Consider the lost-sales system with lead time LLL, holding cost h>0h>0h>0, penalty c>0c>0c>0 and i.i.d. demands DtD_tDt​ with law D\mathcal DD (finite third moment, not deterministic). Fix a period τ\tauτ. For any admissible policy π\piπ, the expected cost of the LLL periods τ,…,τ+L−1\tau,\dots,\tau+L-1τ,…,τ+L−1 is the expectation, over the state (xτπ,Iτπ)(\mathbf x^\pi_\tau,I^\pi_\tau)(xτπ​,Iτπ​), of the expected cost of those periods for the system started in that state:

E[∑t=ττ+L−1Ctπ]=E[windowCost(xτπ,Iτπ)].\mathbb E\Big[\sum_{t=\tau}^{\tau+L-1}C^\pi_t\Big]=\mathbb E\big[\mathrm{windowCost}(\mathbf x^\pi_\tau,I^\pi_\tau)\big].E[t=τ∑τ+L−1​Ctπ​]=E[windowCost(xτπ​,Iτπ​)].

Moreover, for every pipeline x\mathbf xx and initial inventory I\mathcal II,

windowCost(x,I)=h∑k=1LE[max⁡j=0,…,k(∑i=k+1−jk(xi−Dτ+i−1)+δj,kI)]+c(E[Iτ+L]−I+L E[D]−∑i=1Lxi),\mathrm{windowCost}(\mathbf x,\mathcal I)=h\sum_{k=1}^L\mathbb E\Big[\max_{j=0,\dots,k}\Big(\sum_{i=k+1-j}^k(x_i-D_{\tau+i-1})+\delta_{j,k}\mathcal I\Big)\Big]+c\Big(\mathbb E[I_{\tau+L}]-\mathcal I+L\,\mathbb E[D]-\sum_{i=1}^Lx_i\Big),windowCost(x,I)=hk=1∑L​E[j=0,…,kmax​(i=k+1−j∑k​(xi​−Dτ+i−1​)+δj,k​I)]+c(E[Iτ+L​]−I+LE[D]−i=1∑L​xi​),

where Iτ+LI_{\tau+L}Iτ+L​ is the inventory at the end of the window started at (x,I)(\mathbf x,\mathcal I)(x,I) and δj,k=1\delta_{j,k}=1δj,k​=1 if j=kj=kj=k, 000 otherwise.

This is the paper's Lemma 3: windowCost(x,I)\mathrm{windowCost}(\mathbf x,\mathcal I)windowCost(x,I) is the conditional expectation E[∑t=ττ+L−1Ctπ∣xτπ=x,Iτπ=I]\mathbb E[\sum_{t=\tau}^{\tau+L-1}C^\pi_t\mid\mathbf x^\pi_\tau=\mathbf x,I^\pi_\tau=\mathcal I]E[∑t=ττ+L−1​Ctπ​∣xτπ​=x,Iτπ​=I]. It is the explicit form of the cost of any LLL consecutive periods on which every later comparison rests.

Formalization Note The conditioning on {xτπ=x,Iτπ=I}\{\mathbf x^\pi_\tau=\mathbf x, I^\pi_\tau=\mathcal I\}{xτπ​=x,Iτπ​=I} is rendered by starting the dynamics at (x,I)(\mathbf x,\mathcal I)(x,I) (the demands of the window are independent of the state for every nonanticipative policy); the first conjunct states that this rendering integrates back to the policy's window cost. The window starts at Lean period t0t_0t0​, the paper's τ=t0+1\tau=t_0+1τ=t0​+1; it is stated for every t0t_0t0​, which is the paper's range τ∈[1,T+1]\tau\in[1,T+1]τ∈[1,T+1] for all horizons TTT. The right-hand side is a real number (the ccc-term is the expected lost demand) mapped into [0,∞][0,\infty][0,∞] with ENNReal.ofReal; its expectations are Bochner integrals of bounded integrands.

Preamble
import Definitions.Def_LostSalesConstantOrder_LargeLeadTime_Model

open MeasureTheory ProbabilityTheory Filter
open scoped ENNReal NNReal BigOperators
Formal statement
namespace LostSalesConstantOrder.LargeLeadTime

/-- Lemma 3, p. 6. First conjunct: for every admissible policy and every window start `t₀`
(the paper's `τ = t₀ + 1`), the expected cost of the `L` periods `t₀, …, t₀ + L − 1` is the
expectation of `windowCost` at the state `(x^π_τ, I^π_τ)`; this is how the conditional expectation
`E[· | x^π_τ = x, I^π_τ = 𝓘]` is rendered. Second conjunct: the formula of Lemma 3 for that
window cost started at pipeline `x` and inventory `𝓘` (`d (i − 1)` is `D_{τ+i−1}`, `slot x (i − 1)` is
`x_i`). -/
theorem lemma_3 (P : CappedBaseStock.DemandLaw) (prm : CappedBaseStock.Parameters)
    (h3 : FiniteThirdMoment P) (hnd : NonDeterministic P) :
    (∀ (π : CappedBaseStock.AdmissiblePolicy) (t₀ : ℕ),
      costWindow P prm π t₀ =
        ∫⁻ ω, windowCost P prm (CappedBaseStock.run prm π ω t₀).2
          (CappedBaseStock.run prm π ω t₀).1 ∂CappedBaseStock.sampleLaw P) ∧
    ∀ (x : Fin prm.L → ℝ≥0) (I : ℝ≥0),
      windowCost P prm x I =
        ENNReal.ofReal
          (prm.h * ∑ k ∈ Finset.Icc 1 prm.L,
              ∫ d, (Finset.range (k + 1)).sup' Finset.nonempty_range_add_one
                (fun j => (∑ i ∈ Finset.Icc (k + 1 - j) k,
                    ((slot x (i - 1) : ℝ) - (d (i - 1) : ℝ))) +
                  if j = k then (I : ℝ) else 0) ∂CappedBaseStock.demandPathLaw P +
            prm.p * ((∫ d, (endInventory prm x I d : ℝ) ∂CappedBaseStock.demandPathLaw P) -
              I + prm.L * CappedBaseStock.mean P - ∑ i, (x i : ℝ))) := by sorry

end LostSalesConstantOrder.LargeLeadTime
Source
Goldberg, Katz-Rogozhnikov, Lu, Sharma & Squillante, Asymptotic Optimality of Constant-Order Policies for Lost Sales Inventory Models with Large Lead Times, arXiv:1211.4063v2, p. 6, Lemma 3
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

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