Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Chapter V, Theorem 1 (corrected (4b)) — the optimal inventory policy keeps a constant stock level

Proved
BellmanDP.Inventory.constant_stock_level_optimal

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

dynamic-programmingfunctional-equationsinventoryp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1

Let k,p>0k, p > 0k,p>0 be the unit ordering and penalty costs, 0<a<10 < a < 10<a<1 the discount factor, and φ\varphiφ a demand density: φ(s)>0\varphi(s) > 0φ(s)>0 for s>0s > 0s>0, ∫0∞φ(s) ds=1\int_0^\infty \varphi(s)\,ds = 1∫0∞​φ(s)ds=1, ∫0∞sφ(s) ds<∞\int_0^\infty s\varphi(s)\,ds < \infty∫0∞​sφ(s)ds<∞. Consider the optimal inventory equation

f(x)=min⁡y≥x[k(y−x)+a∫y∞p(s−y)φ(s) ds+af(0)∫y∞φ(s) ds+a∫0yf(y−s)φ(s) ds],x≥0.f(x) = \min_{y\ge x}\Big[k(y-x) + a\int_y^\infty p(s-y)\varphi(s)\,ds + af(0)\int_y^\infty\varphi(s)\,ds + a\int_0^y f(y-s)\varphi(s)\,ds\Big], \qquad x \ge 0.f(x)=y≥xmin​[k(y−x)+a∫y∞​p(s−y)φ(s)ds+af(0)∫y∞​φ(s)ds+a∫0y​f(y−s)φ(s)ds],x≥0.

It has exactly one solution fff among measurable functions bounded on [0,∞)[0,\infty)[0,∞), and:

  1. If ap>kap > kap>k, the equation
k=ap∫y∞φ(s) ds+ak∫0yφ(s) dsk = ap\int_y^\infty\varphi(s)\,ds + ak\int_0^y\varphi(s)\,dsk=ap∫y∞​φ(s)ds+ak∫0y​φ(s)ds

has exactly one root xˉ≥0\bar x \ge 0xˉ≥0, and for every x≥0x \ge 0x≥0 the minimum is attained at y=xˉy = \bar xy=xˉ when 0≤x≤xˉ0 \le x \le \bar x0≤x≤xˉ and at y=xy = xy=x when x≥xˉx \ge \bar xx≥xˉ: the optimal stock level is xˉ\bar xxˉ. 2. If ap≤kap \le kap≤k, the minimum is attained at y=xy = xy=x for every x≥0x \ge 0x≥0: never order.

This is the chapter's main result: with proportional costs the optimal policy is described by one number, computed from the demand distribution alone.

Formalization Note The book prints (4b) as "for x≥xˉx \ge \bar xx≥xˉ, y=xˉy = \bar xy=xˉ", which would order a negative amount; the proof (p. 163, "the minimum occurs at y=xy = xy=x") and Theorem 4's rule (7) give y=xy = xy=x, which is what is stated. For example, with x>xˉx > \bar xx>xˉ the level y=xˉy = \bar xy=xˉ violates the constraint y≥xy \ge xy≥x. The equation is encoded with an infimum and attainment of the minimum is asserted at the stated order level. Uniqueness is in the class the proof names ("uniformly bounded functions over x≥0x \ge 0x≥0", p. 164), restricted to measurable functions.

Preamble
import Mathlib
import Definitions.Def_BellmanDP_Inventory_Model

open MeasureTheory Filter Topology
Formal statement
namespace BellmanDP.Inventory

/-- Bellman, *Dynamic Programming*, Ch. V, § 5, Theorem 1, pp. 159-160, with (4b) corrected to
`y = x`. Let `k, p > 0`, `0 < a < 1` and let `φ` be a demand density (positive on `(0, ∞)`,
total mass 1, finite mean). Equation (5.1), `f(x) = Min_{y ≥ x} T(y, x, f)`, has exactly one
solution among measurable functions bounded on `[0, ∞)`, and:
* if `ap > k`, the equation `k = ap ∫_y^∞ φ + ak ∫_0^y φ` has exactly one root `x̄ ≥ 0`, and
  for every `x ≥ 0` the minimum is attained at `y = x̄` when `x ≤ x̄` and at `y = x` when
  `x ≥ x̄` (order up to `x̄`);
* if `ap ≤ k`, the minimum is attained at `y = x` for every `x ≥ 0` (never order). -/
theorem constant_stock_level_optimal (k p a : ℝ) (φ : ℝ → ℝ)
    (hk : 0 < k) (hp : 0 < p) (hφ : DemandDensity φ) (ha0 : 0 < a) (ha1 : a < 1) :
    (k < a * p →
      ∃ xbar : ℝ, 0 ≤ xbar ∧ StockLevelRoot k p a φ xbar ∧
        (∀ y : ℝ, 0 ≤ y → StockLevelRoot k p a φ y → y = xbar) ∧
        ∃ f : ℝ → ℝ, BoundedClass f ∧ SolvesInf (invT k p a φ) f ∧
          (∀ g : ℝ → ℝ, BoundedClass g → SolvesInf (invT k p a φ) g →
            Set.EqOn g f (Set.Ici 0)) ∧
          ∀ x : ℝ, 0 ≤ x →
            IsLeast (invT k p a φ f x '' Set.Ici x) (invT k p a φ f x (max x xbar))) ∧
    (a * p ≤ k →
      ∃ f : ℝ → ℝ, BoundedClass f ∧ SolvesInf (invT k p a φ) f ∧
        (∀ g : ℝ → ℝ, BoundedClass g → SolvesInf (invT k p a φ) g →
          Set.EqOn g f (Set.Ici 0)) ∧
        ∀ x : ℝ, 0 ≤ x → IsLeast (invT k p a φ f x '' Set.Ici x) (invT k p a φ f x x)) := by sorry

end BellmanDP.Inventory
Source
Bellman, Dynamic Programming, Princeton University Press (1957; Princeton Landmarks ed. 2010), DOI 10.2307/j.ctv1nxcw0f, Chapter V, § 5, Theorem 1, pp. 159-160 (proof pp. 160-164)
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

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