Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 3 — product form for a difference of salvage probabilities

Proved
BassokSubstitution.shortage_difference_product

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

independenceinventoryp2o-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 products j<ij < ij<i,

Pr⁡{S⃗i,Nj+1>0, S⃗i,Nj=0}−Pr⁡{S⃗i+1,Nj+1>0, S⃗i+1,Nj=0}=Pr⁡{Sij+1>0, S⃗j,ij=0} Pr⁡{S⃗i+1,Ni+1=0}.\Pr\{\vec S^{j+1}_{i,N} > 0,\ \vec S^j_{i,N} = 0\} - \Pr\{\vec S^{j+1}_{i+1,N} > 0,\ \vec S^j_{i+1,N} = 0\} = \Pr\{S^{j+1}_i > 0,\ \vec S^j_{j,i} = 0\}\,\Pr\{\vec S^{i+1}_{i+1,N} = 0\}.Pr{Si,Nj+1​>0, Si,Nj​=0}−Pr{Si+1,Nj+1​>0, Si+1,Nj​=0}=Pr{Sij+1​>0, Sj,ij​=0}Pr{Si+1,Ni+1​=0}.

Here S⃗a,nk=0\vec S^k_{a,n} = 0Sa,nk​=0 means Smk=0S^k_m = 0Smk​=0 for all a≤m≤na \le m \le na≤m≤n, and S⃗a,nk>0\vec S^k_{a,n} > 0Sa,nk​>0 is its negation.

The left side is the difference between the salvage coefficients of product jjj in ∂P/∂yi\partial P/\partial y_i∂P/∂yi​ and in ∂P/∂yi+1\partial P/\partial y_{i+1}∂P/∂yi+1​ (term (4b)); the lemma rewrites it as a product, which is how the salvage terms are grouped in Lemma 6 and in the proof of Theorem 2.

Formalization Note. The paper leaves jjj implicit; its use in the proof of Lemma 6 (Appendix B, p. 641) has 1≤j<i1 \le j < i1≤j<i. For i=Ni = Ni=N the vectors indexed i+1,…,Ni+1, \dots, Ni+1,…,N are empty: S⃗N+1,N ⋅=0\vec S^{\,\cdot}_{N+1,N} = 0SN+1,N⋅​=0 holds vacuously, so the second probability on the left is 000 and the last factor is 111. The product form needs the independence of the demand classes, which the paper uses without stating. Indices are 0-based in Lean (class N - 1 is the paper's NNN).

Preamble
import Mathlib
import Definitions.Def_BassokSubstitution_Profit

open MeasureTheory
Formal statement
namespace BassokSubstitution

/-- Lemma 3: for products `j < i` (0-based), with independent demand classes, the difference of
the two "salvage" probabilities factors as a product. Empty vector conditions (when `i` is the
last class) are vacuously true. -/
theorem shortage_difference_product {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) (j i : Fin N) (hji : j < i) :
    (Measure.pi ν).real
        {d | ¬ ShortVecZero y d (j + 1) i (N - 1) ∧ ShortVecZero y d j i (N - 1)}
      - (Measure.pi ν).real
        {d | ¬ ShortVecZero y d (j + 1) (i + 1) (N - 1) ∧ ShortVecZero y d j (i + 1) (N - 1)}
      = (Measure.pi ν).real {d | 0 < shortage y d (j + 1) i ∧ ShortVecZero y d j j i}
        * (Measure.pi ν).real {d | ShortVecZero y d (i + 1) (i + 1) (N - 1)} := 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 3
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 (independent) law.
  • Stock: y≥0y\ge0y≥0.
  • Indices: j<ij<ij<i in {0,…,N−1}\{0,\dots,N-1\}{0,…,N−1}, which forces N≥2N\ge2N≥2.

The model data do not occur in the conclusion.

Notation. All shortages are evaluated at (y,d)(y,d)(y,d), and j+1j+1j+1, i+1i+1i+1 and N−1N-1N−1 are natural numbers.

  • Shortage SlaS^a_lSla​, for a≤la\le la≤l: the unmet demand of class lll after greedily processing classes a,…,la,\dots,la,…,l from stock yyy, each class mmm drawing min⁡(unmet,stock)\min(\text{unmet},\text{stock})min(unmet,stock) from products m,m−1,…,am,m-1,\dots,am,m−1,…,a. Sla=0S^a_l=0Sla​=0 if a>la>la>l.
  • Vector condition. Za′,naZ^a_{a',n}Za′,na​ means Sla=0S^a_l=0Sla​=0 for every class l∈{0,…,N−1}l\in\{0,\dots,N-1\}l∈{0,…,N−1} with a′≤l≤na'\le l\le na′≤l≤n. "Not ZZZ" means some such Sla≠0S^a_l\ne0Sla​=0.

Conclusion.

P(not Zi,N−1j+1 and Zi,N−1j)−P(not Zi+1,N−1j+1 and Zi+1,N−1j)=P(Sij+1>0 and Zj,ij)⋅P(Zi+1,N−1i+1).\begin{aligned} &\mathbb P\big(\text{not }Z^{j+1}_{i,N-1}\text{ and }Z^j_{i,N-1}\big)-\mathbb P\big(\text{not }Z^{j+1}_{i+1,N-1}\text{ and }Z^j_{i+1,N-1}\big)\\ &\qquad=\mathbb P\big(S^{j+1}_i>0\text{ and }Z^j_{j,i}\big)\cdot\mathbb P\big(Z^{i+1}_{i+1,N-1}\big). \end{aligned}​P(not Zi,N−1j+1​ and Zi,N−1j​)−P(not Zi+1,N−1j+1​ and Zi+1,N−1j​)=P(Sij+1​>0 and Zj,ij​)⋅P(Zi+1,N−1i+1​).​

Degenerate cases:

  • i=N−1i=N-1i=N−1. Every condition over the range [i+1,N−1][i+1,N-1][i+1,N−1] is vacuously true. The second probability on the left is then that of the empty set, i.e. 000, and the last factor on the right is P(everything)=1\mathbb P(\text{everything})=1P(everything)=1. The claim reduces to
P(not Zi,N−1j+1 and Zi,N−1j)=P(Sij+1>0 and Zj,ij).\mathbb P\big(\text{not }Z^{j+1}_{i,N-1}\text{ and }Z^j_{i,N-1}\big)=\mathbb P\big(S^{j+1}_i>0\text{ and }Z^j_{j,i}\big).P(not Zi,N−1j+1​ and Zi,N−1j​)=P(Sij+1​>0 and Zj,ij​).
  • 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