Inventory stage cost, sales and lost-sales transition
DefinitionInventoryBounds_Primitivesinventoryprobabilitysample-complexity
Real-valued stage cost h max(y-d,0)+p max(d-y,0), sales min(d,y), and leftover inventory max(y-d,0). Domain and positivity assumptions belong to theorems, not these total algebraic definitions.
Definition code
import Mathlib.Data.Real.Basic set_option autoImplicit false namespace InventoryBounds noncomputable def stageCost (h p y d : ℝ) : ℝ := h * max (y - d) 0 + p * max (d - y) 0 def lostNext (y d : ℝ) : ℝ := max (y - d) 0 def sales (y d : ℝ) : ℝ := min d y end InventoryBounds
Source
Hanzhang Qin, David Simchi-Levi, Ruihao Zhu, Information Limits of Multistage Inventory Control: Learning, Valuation, and Censoring, arXiv:2609.37380v1 (29 September 2026), https://arxiv.org/abs/2609.37380v1, Sections 2.1 and 3.3
Read-back
What the Lean code literally says, in plain math · gpt-6
For every four real numbers , the function is defined to be . There are no sign restrictions on any of its arguments; in particular, and need not be nonnegative.
For every two real numbers , the function is defined to be . This definition always returns a nonnegative real number, including when either input is negative.
For every two real numbers , the function is defined to be . Neither input is required to be nonnegative, so the output is not required to be nonnegative.