Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3, p. 12 — Kingman's series for E[I^r_L], E[I^r_∞], and E[I^r∞_∞] − E[I^r∞_L] ≤ ((1−γ)eϑ(L+1))⁻¹γ^{L+1}

Proved
LostSalesExpGap.ConstOrder.lemma_3

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

lost-salesp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1queueingspitzer-identity

Let D1,D2,…D_1,D_2,\dotsD1​,D2​,… be i.i.d. nonnegative demands with finite mean and strictly positive variance, h,p>0h,p>0h,p>0, and let ILr=max⁡j=0,…,L(jr−∑i=1jDi)I^r_L=\max_{j=0,\dots,L}(jr-\sum_{i=1}^jD_i)ILr​=maxj=0,…,L​(jr−∑i=1j​Di​), I∞r=sup⁡j≥0(jr−∑i=1jDi)I^r_\infty=\sup_{j\ge0}(jr-\sum_{i=1}^jD_i)I∞r​=supj≥0​(jr−∑i=1j​Di​). Let r∞,γ,ϑr_\infty,\gamma,\varthetar∞​,γ,ϑ be as in Sec. 2.3. Then:

  1. for all r∈[0,E[D]]r\in[0,\mathbb E[D]]r∈[0,E[D]] and L≥1L\ge1L≥1,
E[ILr]=∑n=1L1n E[(nr−∑i=1nDi)+];\mathbb E[I^r_L]=\sum_{n=1}^L\frac1n\,\mathbb E\Big[\Big(nr-\sum_{i=1}^nD_i\Big)^+\Big];E[ILr​]=n=1∑L​n1​E[(nr−i=1∑n​Di​)+];
  1. if in addition r<E[D]r<\mathbb E[D]r<E[D],
E[I∞r]=∑n=1∞1n E[(nr−∑i=1nDi)+];\mathbb E[I^r_\infty]=\sum_{n=1}^\infty\frac1n\,\mathbb E\Big[\Big(nr-\sum_{i=1}^nD_i\Big)^+\Big];E[I∞r​]=n=1∑∞​n1​E[(nr−i=1∑n​Di​)+];
  1. for all L≥1L\ge1L≥1,
E[I∞r∞]−E[ILr∞]≤((1−γ)eϑ(L+1))−1γL+1.\mathbb E[I^{r_\infty}_\infty]-\mathbb E[I^{r_\infty}_L]\le\big((1-\gamma)e\vartheta(L+1)\big)^{-1}\gamma^{L+1}.E[I∞r∞​​]−E[ILr∞​​]≤((1−γ)eϑ(L+1))−1γL+1.

These are Theorems 1 and 4 of Kingman (1962), specialized to the queue with interarrival law D\mathcal DD and constant service time rrr.

Formalization Note Item 2 is an identity in [0,∞][0,\infty][0,∞] (lower integrals and an extended-real series). Item 3 is stated additively in [0,∞][0,\infty][0,∞], E[I∞r∞]≤E[ILr∞]+((1−γ)e(L+1))−1ϑ−1γL+1\mathbb E[I^{r_\infty}_\infty]\le\mathbb E[I^{r_\infty}_L]+((1-\gamma)e(L+1))^{-1}\vartheta^{-1}\gamma^{L+1}E[I∞r∞​​]≤E[ILr∞​​]+((1−γ)e(L+1))−1ϑ−1γL+1, with 1/ϑ=01/\vartheta=01/ϑ=0 when ϑ=∞\vartheta=\inftyϑ=∞. Sums are indexed from 000 in Lean: the term at nnn is the paper's term n+1n+1n+1. LLL in items 1 and 3 is any horizon ≥1\ge1≥1, not tied to the model's lead time; h,ph,ph,p enter only through r∞r_\inftyr∞​.

Preamble
import Mathlib
import Definitions.Def_LostSalesExpGap_ConstOrder_ConstantOrder

open MeasureTheory ProbabilityTheory
open scoped ENNReal NNReal BigOperators
Formal statement
namespace LostSalesExpGap.ConstOrder

/-- Lemma 3, p. 12 (Theorems 1 and 4 of Kingman (1962)). For `r ∈ [0, E[D]]` and `m ≥ 1`,
`E[I^r_m] = Σ_{n=1}^m (1/n) E[(n r − Σ_{i=1}^n D_i)^+]`; for `r ∈ [0, E[D])`,
`E[I^r_∞] = Σ_{n=1}^∞ (1/n) E[(n r − Σ_{i=1}^n D_i)^+]`; and
`E[I^{r∞}_∞] − E[I^{r∞}_m] ≤ ((1 − γ) e ϑ (m + 1))⁻¹ γ^{m+1}`. Sums over `n` are shifted by one:
the summand at `n` is the paper's term `n + 1`. -/
theorem lemma_3 (P : CappedBaseStock.DemandLaw) (c : CappedBaseStock.Parameters)
    (hP : LostSalesConstantOrder.LargeLeadTime.NonDeterministic P) :
    (∀ r : ℝ, 0 ≤ r → r ≤ CappedBaseStock.mean P → ∀ m : ℕ, 1 ≤ m →
      EIL P r m = ∑ n ∈ Finset.range m, (1 / ((n : ℝ) + 1)) *
        ∫ d, max (((n : ℝ) + 1) * r - ∑ i ∈ Finset.range (n + 1), (d i : ℝ)) 0
          ∂CappedBaseStock.demandPathLaw P) ∧
    (∀ r : ℝ, 0 ≤ r → r < CappedBaseStock.mean P →
      EIinf P r = ∑' n : ℕ, ENNReal.ofReal (1 / ((n : ℝ) + 1)) *
        ∫⁻ d, ENNReal.ofReal (((n : ℝ) + 1) * r - ∑ i ∈ Finset.range (n + 1), (d i : ℝ))
          ∂CappedBaseStock.demandPathLaw P) ∧
    (∀ m : ℕ, 1 ≤ m →
      EIinf P (rInf P c) ≤ ENNReal.ofReal (EIL P (rInf P c) m) +
        ENNReal.ofReal (((1 - gamma P c) * Real.exp 1 * ((m : ℝ) + 1))⁻¹ * varthetaInv P c *
          gamma P c ^ (m + 1))) := by sorry

end LostSalesExpGap.ConstOrder
Source
Xin, Goldberg, Optimality gap of constant-order policies decays exponentially in the lead time for lost sales models, arXiv:1409.1499v2, Lemma 3, p. 12
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