Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3 (first two parts), p. 12 — Kingman's series for E[I^r_L] and E[I^r_∞] (Spitzer's identity)

Proved
LostSalesExpGap.ConstOrder.kingman_series

by tianyipeng · Nov 5, 2026 · Mathlib 0df444a (Lean v4.33.1)

lost-salesrandom-walkspitzer-identity

Let D1,D2,…D_1,D_2,\dotsD1​,D2​,… be i.i.d. copies of a nonnegative demand DDD with finite positive mean E[D]\mathbb E[D]E[D], and for an order level rrr write

Imr=max⁡0≤j≤m(jr−∑i=1jDi),I∞r=sup⁡j≥0(jr−∑i=1jDi)∈[0,∞].I^r_m=\max_{0\le j\le m}\Big(jr-\sum_{i=1}^jD_i\Big),\qquad I^r_\infty=\sup_{j\ge0}\Big(jr-\sum_{i=1}^jD_i\Big)\in[0,\infty].Imr​=0≤j≤mmax​(jr−i=1∑j​Di​),I∞r​=j≥0sup​(jr−i=1∑j​Di​)∈[0,∞].

Then for every r∈[0,E[D]]r\in[0,\mathbb E[D]]r∈[0,E[D]] and every m≥1m\ge1m≥1,

E[Imr]=∑n=1m1n E[(nr−∑i=1nDi)+],\mathbb E[I^r_m]=\sum_{n=1}^m\frac1n\,\mathbb E\Big[\Big(nr-\sum_{i=1}^nD_i\Big)^+\Big],E[Imr​]=n=1∑m​n1​E[(nr−i=1∑n​Di​)+],

and for every r∈[0,E[D])r\in[0,\mathbb E[D])r∈[0,E[D]),

E[I∞r]=∑n=1∞1n E[(nr−∑i=1nDi)+]in [0,∞].\mathbb E[I^r_\infty]=\sum_{n=1}^\infty\frac1n\,\mathbb E\Big[\Big(nr-\sum_{i=1}^nD_i\Big)^+\Big]\qquad\text{in }[0,\infty].E[I∞r​]=n=1∑∞​n1​E[(nr−i=1∑n​Di​)+]in [0,∞].

These are the first two assertions of Lemma 3 of Xin and Goldberg (Theorems 1 and 4 of Kingman (1962)), a form of Spitzer's identity for the expected maximum of a random walk.

Formalization note. The model objects are those of the published LostSalesExpGap_ConstOrder_ConstantOrder definitions: E[Imr]\mathbb E[I^r_m]E[Imr​] is EIL P r m (a Bochner integral of the finite maximum), E[I∞r]\mathbb E[I^r_\infty]E[I∞r​] is EIinf P r (a lower integral in [0,∞][0,\infty][0,∞]), and the series index is shifted by one (the Lean summand at nnn is the paper's term n+1n+1n+1). This is the part of milestone lemma_3 that does not involve r∞r_\inftyr∞​, γ\gammaγ or ϑ\varthetaϑ.

Preamble
import Mathlib
import Definitions.Def_LostSalesExpGap_ConstOrder_ConstantOrder

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

/-- Lemma 3, first two parts, p. 12 (Theorems 1 and 4 of Kingman (1962), via Spitzer's identity).
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)^+]` in `[0, ∞]`. Sums over `n`
are shifted by one: the summand at `n` is the paper's term `n + 1`. -/
theorem kingman_series (P : CappedBaseStock.DemandLaw) :
    (∀ 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) := 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 (first two displays), p. 12; Kingman, Some inequalities for the queue GI/G/1, Biometrika 49 (1962) 315-324, Theorems 1 and 4

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