Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 2 — the no-stock-out probability is nondecreasing in the stock yiy_iyi​

Proved
BassokSubstitution.no_stockout_monotone

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

inventorymonotonicityp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1probabilitysubstitution

Consider the model with Assumptions 1–3, b≥0b \ge 0b≥0, independent nonnegative demands with densities and finite means, and stock levels y≥0y \ge 0y≥0. For classes k<ik < ik<i, the quantity

Pr⁡{Sii=0}+∑m=ki−1Pr⁡{Sim+1>0, S⃗m,im=0},\Pr\{S^i_i = 0\} + \sum_{m=k}^{i-1} \Pr\{S^{m+1}_i > 0,\ \vec S^m_{m,i} = 0\},Pr{Sii​=0}+m=k∑i−1​Pr{Sim+1​>0, Sm,im​=0},

regarded as a function of the stock yiy_iyi​ of product iii (all other stocks fixed), is nondecreasing on [0,∞)[0, \infty)[0,∞).

In the paper's words: as the stock of product iii increases, the probability of no stock-out of class iii in the subproblem with products k,…,ik, \dots, ik,…,i cannot decrease.

Formalization Note. The paper states ∂∂yi{⋯ }≥0\frac{\partial}{\partial y_i}\{\cdots\} \ge 0∂yi​∂​{⋯}≥0. With deriv, a non-differentiable point would make this trivially true, so the monotone form is stated instead; it implies the derivative inequality wherever the derivative exists. The paper leaves kkk implicit; it is Lemma 1's k<ik < ik<i. The sum's general term is as in Lemma 1. Indices are 0-based in Lean.

Preamble
import Mathlib
import Definitions.Def_BassokSubstitution_Profit

open MeasureTheory
Formal statement
namespace BassokSubstitution

/-- Lemma 2 (monotone form): for classes `k < i` (0-based), the left-hand side of Lemma 1 is a
nondecreasing function of the stock `y_i` of product `i` on `[0, ∞)`, the other stocks being
fixed. -/
theorem no_stockout_monotone {N : ℕ} (M : Model N)
    (hA1 : M.Assumption1) (hA2 : M.Assumption2) (hA3 : M.Assumption3) (hb : 0 ≤ M.b)
    (ν : Fin N → Measure ℝ) [∀ i, IsProbabilityMeasure (ν i)] (hν : DemandLaw ν)
    (y : Fin N → ℝ) (hy : 0 ≤ y) (k i : Fin N) (hki : k < i) :
    MonotoneOn
      (fun t : ℝ =>
        (Measure.pi ν).real {d | shortage (Function.update y i t) d i i = 0}
          + ∑ m ∈ Finset.univ.filter (fun m : Fin N => k ≤ m ∧ m < i),
              (Measure.pi ν).real {d | 0 < shortage (Function.update y i t) d (m + 1) i ∧
                ShortVecZero (Function.update y i t) d m m i})
      (Set.Ici 0) := by sorry

end BassokSubstitution
Source
Bassok, Anupindi, Akella, Single-Period Multiproduct Inventory Models with Substitution, Operations Research 47(4):632–642 (1999), p. 635, Lemma 2
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let NNN be a natural number and MMM a model with data c,p,π,s,bc,p,\pi,s,bc,p,π,s,b.

Hypotheses:

  • Model assumptions: Assumptions 1–3 hold (πj+pj≤πi+pi\pi_j+p_j\le\pi_i+p_iπj​+pj​≤πi​+pi​ and sj≤sis_j\le s_isj​≤si​ for i<ji<ji<j; aij+πj−si≥0a_{ij}+\pi_j-s_i\ge0aij​+πj​−si​≥0 for i≤ji\le ji≤j) and b≥0b\ge0b≥0.
  • Demand laws: ν0,…,νN−1\nu_0,\dots,\nu_{N-1}ν0​,…,νN−1​ are probability measures on R\mathbb RR, each with no mass on (−∞,0)(-\infty,0)(−∞,0), finite mean, and absolutely continuous. P\mathbb PP is their product law.
  • Stock: y≥0y\ge0y≥0 in RN\mathbb R^NRN.
  • Classes: k<ik<ik<i, which forces N≥2N\ge2N≥2.

The model data do not occur in the conclusion.

Notation.

  • Modified stock. For real ttt, y(t)y^{(t)}y(t) is yyy with its iii-th entry replaced by ttt.
  • Shortage Sja(y′,d)S^a_j(y',d)Sja​(y′,d), for a≤ja\le ja≤j: the unmet demand of class jjj after greedily processing classes a,…,ja,\dots,ja,…,j in order from stock y′y'y′, each class mmm drawing min⁡(unmet,stockl)\min(\text{unmet},\text{stock}_l)min(unmet,stockl​) from products l=m,m−1,…,al=m,m-1,\dots,al=m,m−1,…,a. It is 000 if a>ja>ja>j.
  • Vector condition. Za′,na(y′,d)Z^a_{a',n}(y',d)Za′,na​(y′,d) means Sla(y′,d)=0S^a_l(y',d)=0Sla​(y′,d)=0 for all classes lll with a′≤l≤na'\le l\le na′≤l≤n.

Conclusion. The function

t  ↦  P(Sii(y(t),d)=0)+∑m:  k≤m<iP(Sim+1(y(t),d)>0 and Zm,im(y(t),d))t\;\mapsto\;\mathbb P\big(S^i_i(y^{(t)},d)=0\big)+\sum_{m:\;k\le m<i}\mathbb P\big(S^{m+1}_i(y^{(t)},d)>0\text{ and }Z^m_{m,i}(y^{(t)},d)\big)t↦P(Sii​(y(t),d)=0)+m:k≤m<i∑​P(Sim+1​(y(t),d)>0 and Zm,im​(y(t),d))

is nondecreasing on [0,∞)[0,\infty)[0,∞): 0≤t≤t′0\le t\le t'0≤t≤t′ implies value at ttt ≤\le≤ value at t′t't′.

Degenerate cases:

  • The original yiy_iyi​. It plays no role beyond the hypothesis yi≥0y_i\ge0yi​≥0.
  • Negative ttt. Nothing is asserted for t<0t<0t<0.
  • N≤1N\le1N≤1. The statement is vacuous.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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