Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Property (b) — the derivative of fnf_nfn​ on either side of the order-up-to level

Proved
ServiceParts.BaseStock.property_b

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

dynamic-programminginventoryp2o-batch-b23ap2o-gran-per-chapterp2o-plan-bookp2o-v1

In the model of Section 2.1 with lead time one period, let n≥2n \ge 2n≥2 and suppose the order-up-to rule u(y)=max⁡{0,s−y}u(y) = \max\{0, s-y\}u(y)=max{0,s−y} with a real level sss is optimal in the nnn-period problem at every inventory position. Then fnf_nfn​ is differentiable at every yyy, with

fn′(y)={−c+L′(y),y<s,L′(y)+α∫0∞fn−1′(y−x) g(x) dx,y≥s.f_n'(y) = \begin{cases} -c + L'(y), & y < s,\\[1mm] L'(y) + \alpha\displaystyle\int_0^\infty f_{n-1}'(y-x)\,g(x)\,dx, & y \ge s. \end{cases}fn′​(y)=⎩⎨⎧​−c+L′(y),L′(y)+α∫0∞​fn−1′​(y−x)g(x)dx,​y<s,y≥s.​

Below the level the optimal order raises the position to sss, so only the purchase and the current period's cost vary with yyy; above it nothing is ordered.

Formalization Note The book's sn∗s_n^*sn∗​ is "the unique solution of (2.6)"; here sss is any real level at which the order-up-to rule is optimal, which is how the book uses sn∗s_n^*sn∗​. The conclusion is a HasDerivAt statement, so differentiability of fnf_nfn​ is asserted, not presupposed.

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

/-- Property (b) in the proof of Theorem 2, p. 19 (re-established as (2.10), p. 20): if the
order-up-to rule with level s is optimal in the n-period problem (n ≥ 2), then fₙ is
differentiable at every y, with f′ₙ(y) = −c + L′(y) for y < s and
f′ₙ(y) = L′(y) + α ∫₀^∞ f′ₙ₋₁(y − x) g(x) dx for y ≥ s. -/
theorem property_b (M : Model) (n : ℕ) (hn : 2 ≤ n) (s : ℝ)
    (hs : M.IsOrderUpToOptimal n s) (y : ℝ) :
    HasDerivAt (M.f n)
      (if y < s then -M.c + deriv M.L y
       else deriv M.L y + M.α * ∫ x in Ioi (0 : ℝ), deriv (M.f (n - 1)) (y - x) * M.g x) y := by sorry

end ServiceParts.BaseStock
Source
Muckstadt, Analysis and Algorithms for Service Parts Supply Chains, Springer 2005, DOI 10.1007/b138879, p. 19, Section 2.1, proof of Theorem 2 (property (b)); re-established as eq. (2.10), p. 20
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