Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 16 (corrected) — S̃_ijt ≤ S*_ijt, and S*_ijt ≤ S̃_ijt + M_jt when T^r = T^e + 1 or t < T^e + T_i0

Proved
ServiceParts.RealTime.theorem16_corrected

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

exchange-argumentinventoryp2o-batch-b23ap2o-gran-per-chapterp2o-plan-bookp2o-v1service-parts

Fix an item with a finite set JJJ of bases. For every base jjj and every period k∈[Tije,…,Tijr+Ti0]k \in [T^e_{ij}, \dots, T^r_{ij} + T_{i0}]k∈[Tije​,…,Tijr​+Ti0​] let S^ijk\hat S_{ijk}S^ijk​ be the largest optimal solution of the constrained newsvendor problem CNijk\mathrm{CN}_{ijk}CNijk​, and for t∈[Tije,…,Tijr+Ti0]t \in [T^e_{ij}, \dots, T^r_{ij} + T_{i0}]t∈[Tije​,…,Tijr​+Ti0​] put

Mjt=max⁡k∈[Tije,…,t]{S^ijk−S~ijk}.(10.43)M_{jt} = \max_{k \in [T^e_{ij}, \dots, t]} \big\{ \hat S_{ijk} - \tilde S_{ijk} \big\}. \tag{10.43}Mjt​=k∈[Tije​,…,t]max​{S^ijk​−S~ijk​}.(10.43)

Let Sijt∗S^*_{ijt}Sijt∗​ be the cumulative supply of an optimal solution of ESAMi\mathrm{ESAM}_iESAMi​. Then for every base jjj and every t∈[Tije,…,Tijr+Ti0]t \in [T^e_{ij}, \dots, T^r_{ij} + T_{i0}]t∈[Tije​,…,Tijr​+Ti0​]:

  1. S~ijt≤Sijt∗\tilde S_{ijt} \le S^*_{ijt}S~ijt​≤Sijt∗​;
  2. if Tijr=Tije+1T^r_{ij} = T^e_{ij} + 1Tijr​=Tije​+1 or t<Tije+Ti0t < T^e_{ij} + T_{i0}t<Tije​+Ti0​, then
Sijt∗≤S~ijt+Mjt.(10.44)S^*_{ijt} \le \tilde S_{ijt} + M_{jt}. \tag{10.44}Sijt∗​≤S~ijt​+Mjt​.(10.44)

These bounds confine the optimal cumulative stock levels of the model with expedited shipments to a finite window, which the book uses to write ESAMi\mathrm{ESAM}_iESAMi​ as a linear program.

Formalization Note This corrects the book's Theorem 16, which asserts the upper bound for every ttt with no proviso. As printed it is false. When Tijr≥Tije+2T^r_{ij} \ge T^e_{ij} + 2Tijr​≥Tije​+2, an expedited unit shipped in the last period Ti0T_{i0}Ti0​ arrives in period Tije+Ti0T^e_{ij} + T_{i0}Tije​+Ti0​ and cannot be shipped later. It may still be worth sending to cover demand in a later period, which pushes S∗S^*S∗ above S~+M\tilde S + MS~+M; the item theorem16_counterexample gives an instance. The book's exchange argument delays the last arriving unit by one period. That argument is valid when the violating period precedes Tije+Ti0T^e_{ij} + T_{i0}Tije​+Ti0​. It is also valid when Tijr=Tije+1T^r_{ij} = T^e_{ij} + 1Tijr​=Tije​+1, where a last-period expedited unit can be replaced by a regular one arriving one period later.

Preamble
import Mathlib
import Definitions.Def_ServiceParts_RealTime_Model
import Definitions.Def_ServiceParts_RealTime_ESAM

open MeasureTheory
Formal statement
namespace ServiceParts.RealTime

/-- Theorem 16, p. 244, corrected. Let `Ŝ_{ijk}` be the largest optimal solution of
`CN_{ijk}` for `k ∈ [T^e_{ij}, …, T^r_{ij} + T_{i0}]` and
`M_{jt} = max_{k∈[T^e_{ij},…,t]} {Ŝ_{ijk} - S̃_{ijk}}` (10.43). In every optimal solution of
`ESAM_i`, for every base `j` and `t ∈ [T^e_{ij}, …, T^r_{ij} + T_{i0}]`,
`S̃_{ijt} ≤ S*_{ijt}`, and `S*_{ijt} ≤ S̃_{ijt} + M_{jt}` (10.44) provided
`T^r_{ij} = T^e_{ij} + 1` or `t < T^e_{ij} + T_{i0}`. (The upper bound as printed, without
this proviso, is false: see `theorem16_counterexample`.) -/
theorem theorem16_corrected {J : Type*} [Fintype J] {Ω : Type*} [MeasurableSpace Ω]
    {P : Measure Ω} [IsProbabilityMeasure P] (M : ItemModel J Ω P) (Shat : J → ℕ → ℤ)
    (hShat : ∀ j k, M.Te j ≤ k → k ≤ M.Tr j + M.T0 → M.IsLargestCNSolution j k (Shat j k))
    (yr ye : J → ℕ → ℕ) (hy : IsESAMOptimal M yr ye) (j : J) (t : ℕ)
    (ht₁ : M.Te j ≤ t) (ht₂ : t ≤ M.Tr j + M.T0) :
    M.baseSupply j t ≤ esamStock M yr ye j t ∧
      (M.Tr j = M.Te j + 1 ∨ t < M.Te j + M.T0 →
        esamStock M yr ye j t ≤ M.baseSupply j t +
          (Finset.Icc (M.Te j) t).sup' ⟨M.Te j, Finset.left_mem_Icc.mpr ht₁⟩
            (fun k => Shat j k - M.baseSupply j k)) := by sorry

end ServiceParts.RealTime
Source
Muckstadt, Analysis and Algorithms for Service Parts Supply Chains, Springer 2005, DOI 10.1007/b138879, p. 244, Theorem 16, (10.43)-(10.44) (corrected: the book states the upper bound without the proviso)
Human review
  • Endorsed by Shuze Chen · Oct 2, 2026

    Confirmed by the moderator at approval.

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