Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 2 — optimality of order-up-to policies in the n-period Karlin–Scarf recursion

Proved
ServiceParts.BaseStock.order_up_to_optimal

by mikedeng1 · Sep 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

base-stockdynamic-programminginventoryp2o-batch-b23ap2o-gran-per-chapterp2o-plan-bookp2o-v1

In the model of Section 2.1 with lead time one period, consider the nnn-period recursion

f1(y)=L(y),fn(y)=min⁡u≥0{c u+L(y)+α∫0∞fn−1(y+u−x) g(x) dx}.f_1(y) = L(y), \qquad f_n(y) = \min_{u \ge 0}\Big\{ c\,u + L(y) + \alpha\int_0^\infty f_{n-1}(y+u-x)\,g(x)\,dx \Big\}.f1​(y)=L(y),fn​(y)=u≥0min​{cu+L(y)+α∫0∞​fn−1​(y+u−x)g(x)dx}.

Then:

  1. for every horizon n≥2n \ge 2n≥2 an order-up-to policy is optimal: either there is a real level sn∗s_n^*sn∗​ such that
un∗(y)=max⁡{0, sn∗−y}u_n^*(y) = \max\{0,\ s_n^* - y\}un∗​(y)=max{0, sn∗​−y}

attains the minimum for every inventory position yyy, or ordering nothing attains the minimum for every yyy (the level sn∗=−∞s_n^* = -\inftysn∗​=−∞); 2. there is N≥2N \ge 2N≥2 such that for every n≥Nn \ge Nn≥N the level sn∗s_n^*sn∗​ is a real number.

This is Theorem 2 of the book in the form its proof establishes: an induction over a finite horizon nnn with lead time τ=1\tau = 1τ=1.

Formalization Note The book states Theorem 2 for "the optimal policy" with lead time τ\tauτ and a real level s∗s^*s∗, but proves it for the finite-horizon recursion with τ=1\tau = 1τ=1; the passage n→∞n \to \inftyn→∞ is left as an unproved conjecture on p. 21. The book also claims a real level for every n≥2n \ge 2n≥2, starting from a base case "left to the reader". Under its assumption b>1−ααcb > \frac{1-\alpha}{\alpha}cb>α1−α​c that base case fails when c>αbc > \alpha bc>αb (e.g. α=12\alpha = \tfrac12α=21​, c=1c = 1c=1, b=32b = \tfrac32b=23​): the two-period problem then never orders. The statement is therefore corrected to allow the level −∞-\infty−∞, and part 2 records the finiteness that the assumption does guarantee for all long enough horizons. Optimality is against all orders u≥0u \ge 0u≥0.

Preamble
import Mathlib
import Definitions.Def_ServiceParts_BaseStock_Model
import Definitions.Def_ServiceParts_BaseStock_Recursion

open MeasureTheory Set Filter Topology
Formal statement
namespace ServiceParts.BaseStock

/-- Theorem 2, p. 18, in the n-period form of its proof (lead time τ = 1), corrected at the
base case: (i) for every horizon n ≥ 2 an order-up-to rule is optimal at every inventory
position — either with a real level s, u*(y) = max{0, s − y}, or with level −∞ (never order);
(ii) there is N ≥ 2 such that for every n ≥ N the level can be taken real. -/
theorem order_up_to_optimal (M : Model) :
    (∀ n : ℕ, 2 ≤ n →
        (∃ s : ℝ, M.IsOrderUpToOptimal n s) ∨ (∀ y : ℝ, M.IsOptimalOrder n y 0)) ∧
      ∃ N : ℕ, 2 ≤ N ∧ ∀ n : ℕ, N ≤ n → ∃ s : ℝ, M.IsOrderUpToOptimal n s := by sorry

end ServiceParts.BaseStock
Source
Muckstadt, Analysis and Algorithms for Service Parts Supply Chains, Springer 2005, DOI 10.1007/b138879, p. 18, Theorem 2 (n-period form of the proof, pp. 18-21, eq. (2.5))
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