Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The two-level serial system of the Clark-Scarf model: period costs, their reallocation, and the total cost C^2(y2)\hat C_2(y_2)C^2​(y2​) of Sect. 10.1.1

Definition
InventoryControl_clarkScarf

by naimengye · Sep 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

clark-scarfinventory-controlmulti-echelonoperations-researchprobability

The two-echelon serial system of Axsäter, Inventory Control, Sect. 10.1.1, in the infinite-horizon periodic-review form of Federgruen and Zipkin. Installation 1 faces the customer demand and replenishes from installation 2, which replenishes from an outside supplier with infinite supply. Period demands are independent and normally distributed with mean μ\muμ and standard deviation σ\sigmaσ, so the demand over nnn periods, D(n)D(n)D(n), is normal with mean nμn\munμ and standard deviation n σ\sqrt n\,\sigman​σ: this is csDemand mu sigma n, the same Gaussian law as the newsboy model's newsboyDemand. Lead-times L1,L2L_1, L_2L1​,L2​ are integral numbers of periods; unmet demand is backordered; there are echelon holding costs e1,e2≥0e_1, e_2 \ge 0e1​,e2​≥0 per unit and period, so that the installation holding costs are h1=e1+e2h_1 = e_1 + e_2h1​=e1​+e2​ and h2=e2h_2 = e_2h2​=e2​, and a shortage cost b1b_1b1​ per unit and period; there are no ordering costs.

In an arbitrary period ttt, y2y_2y2​ is the echelon inventory position of installation 2 after ordering, and y1y_1y1​ is the realized echelon inventory position of installation 1 after its order in period t+L2t + L_2t+L2​, which cannot exceed the echelon stock y2−D(L2)y_2 - D(L_2)y2​−D(L2​) then available (Eq. 10.1). Writing μ2′=L2μ\mu_2' = L_2\muμ2′​=L2​μ and μ1′′=(L1+1)μ\mu_1'' = (L_1+1)\muμ1′′​=(L1​+1)μ,

  • csPeriodCost e1 e2 b1 mu sigma L1 L2 y2 y1 is the sum of the period costs (10.2) and (10.3), h2 E(y2−D(L2)−y1)+h1 E(y1−D(L1+1))++b1 E(y1−D(L1+1))−h_2\,\mathbb{E}(y_2 - D(L_2) - y_1) + h_1\,\mathbb{E}(y_1 - D(L_1+1))^{+} + b_1\,\mathbb{E}(y_1 - D(L_1+1))^{-}h2​E(y2​−D(L2​)−y1​)+h1​E(y1​−D(L1​+1))++b1​E(y1​−D(L1​+1))−;
  • csStage2Cost e2 mu L2 y2 is the reallocated cost C~2=h2(y2−μ2′)\tilde C_2 = h_2(y_2 - \mu_2')C~2​=h2​(y2​−μ2′​) of Eq. (10.4);
  • csStage1Cost e1 e2 b1 mu sigma L1 y1 is the reallocated cost C~1=e1y1−h1μ1′′+(h1+b1) E(y1−D(L1+1))−\tilde C_1 = e_1y_1 - h_1\mu_1'' + (h_1 + b_1)\,\mathbb{E}(y_1 - D(L_1+1))^{-}C~1​=e1​y1​−h1​μ1′′​+(h1​+b1​)E(y1​−D(L1​+1))− of Eq. (10.5), which is also the function C^1(y^1)\hat C_1(\hat y_1)C^1​(y^​1​) of Eq. (10.6) when y^1\hat y_1y^​1​ is free;
  • csTotalCost e1 e2 b1 mu sigma L1 L2 S1 y2 is the total expected cost C^2(y2)\hat C_2(y_2)C^2​(y2​) of Eq. (10.9) when installation 1 uses the echelon order-up-to level S1S_1S1​:
C^2(y2)  =  h2(y2−μ2′)+C^1(S1)+∫y2−S1∞[C^1(y2−u)−C^1(S1)] 1σ2′φ ⁣(u−μ2′σ2′)du,\hat C_2(y_2) \;=\; h_2(y_2 - \mu_2') + \hat C_1(S_1) + \int_{y_2 - S_1}^{\infty}\big[\hat C_1(y_2 - u) - \hat C_1(S_1)\big]\,\frac{1}{\sigma_2'}\varphi\!\Big(\frac{u - \mu_2'}{\sigma_2'}\Big)\mathrm{d}u,C^2​(y2​)=h2​(y2​−μ2′​)+C^1​(S1​)+∫y2​−S1​∞​[C^1​(y2​−u)−C^1​(S1​)]σ2′​1​φ(σ2′​u−μ2′​​)du,

the integral being taken against the law of D(L2)D(L_2)D(L2​).

Formalization Note The costs are parametrized by the echelon costs e1,e2e_1, e_2e1​,e2​, and h1=e1+e2h_1 = e_1 + e_2h1​=e1​+e2​, h2=e2h_2 = e_2h2​=e2​ are written out, so the relation between the two cost systems is built in rather than assumed. All expectations are Bochner integrals against the Gaussian laws; integrability holds because the integrands grow at most linearly, and the arbitrary allocation rules of the main theorem carry an explicit integrability hypothesis. L2=0L_2 = 0L2​=0 is allowed, in which case D(L2)D(L_2)D(L2​) is the point mass at 000. The order-up-to level S1S_1S1​ is a parameter of C^2\hat C_2C^2​; the theorems fix it by the fractile condition (10.8).

Definition code
import Definitions.Def_InventoryControl_newsboy

open MeasureTheory ProbabilityTheory

namespace InventoryControl

/-- `D(n)`: the demand over `n` periods, normal with mean `n μ` and standard deviation `√n σ`.
Axsäter, *Inventory Control*, Sect. 10.1.1 p. 194. -/
noncomputable def csDemand (mu sigma : ℝ) (n : ℕ) : Measure ℝ :=
  newsboyDemand (n * mu) (Real.sqrt n * sigma)

/-- Eq. (10.4): the reallocated cost at installation 2, `h₂ (y₂ − μ'₂)` with `h₂ = e₂`. -/
noncomputable def csStage2Cost (e2 mu : ℝ) (L2 : ℕ) (y2 : ℝ) : ℝ := e2 * (y2 - L2 * mu)

/-- Eq. (10.5) and (10.6): the reallocated cost at installation 1,
`e₁ y₁ − h₁ μ''₁ + (h₁ + b₁) E((y₁ − D(L₁+1))⁻)` with `h₁ = e₁ + e₂`. -/
noncomputable def csStage1Cost (e1 e2 b1 mu sigma : ℝ) (L1 : ℕ) (y1 : ℝ) : ℝ :=
  e1 * y1 - (e1 + e2) * ((L1 + 1) * mu)
    + (e1 + e2 + b1) * ∫ x, max (x - y1) 0 ∂(csDemand mu sigma (L1 + 1))

/-- Eq. (10.2) + (10.3): the period costs before reallocation,
`h₂ E(y₂ − D(L₂) − y₁) + h₁ E((y₁ − D(L₁+1))⁺) + b₁ E((y₁ − D(L₁+1))⁻)`. -/
noncomputable def csPeriodCost (e1 e2 b1 mu sigma : ℝ) (L1 L2 : ℕ) (y2 y1 : ℝ) : ℝ :=
  e2 * ((y2 - L2 * mu) - y1)
    + (e1 + e2) * ∫ x, max (y1 - x) 0 ∂(csDemand mu sigma (L1 + 1))
    + b1 * ∫ x, max (x - y1) 0 ∂(csDemand mu sigma (L1 + 1))

/-- Eq. (10.9): the total expected cost `Ĉ₂(y₂)` when installation 1 orders up to `S₁`. -/
noncomputable def csTotalCost (e1 e2 b1 mu sigma : ℝ) (L1 L2 : ℕ) (S1 y2 : ℝ) : ℝ :=
  csStage2Cost e2 mu L2 y2 + csStage1Cost e1 e2 b1 mu sigma L1 S1
    + ∫ u in Set.Ioi (y2 - S1),
        (csStage1Cost e1 e2 b1 mu sigma L1 (y2 - u) - csStage1Cost e1 e2 b1 mu sigma L1 S1)
          ∂(csDemand mu sigma L2)

end InventoryControl
Source
Sven Axsäter, Inventory Control, 3rd ed., Springer 2015, DOI 10.1007/978-3-319-15729-0, Sect. 10.1.1 pp. 192-196: the model and notation pp. 193-194, Eq. (10.1)-(10.5) pp. 194-195, Eq. (10.9) p. 196

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