Lemma 1 — decomposition of the no-stock-out probability of class
ProvedBassokSubstitution.no_stockout_identityConsider the model with Assumptions 1–3, , independent nonnegative demands with densities and finite means, and stock levels . For classes ,
where is the shortage of class in the subproblem with products and means that none of the classes is short in its subproblem starting at product .
The identity splits the event "class is not short when products are available" according to the least flexible product that already suffices. It is used, with Lemmas 2 and 5, to bound the salvage terms in the proof of Theorem 2.
Formalization Note. The paper prints the sum with "…"; its general term is for down to . Indices are 0-based in Lean. The model hypotheses are those of the whole mission; the identity itself does not need independence.
import Mathlib import Definitions.Def_BassokSubstitution_Profit open MeasureTheory
namespace BassokSubstitution
/-- Lemma 1: for classes `k < i` (0-based), the probability of no shortage of class `i` in the
subproblem with products `k, …, i` decomposes according to the first product (from `i`
downwards) whose subproblem already has no shortage of class `i`. -/
theorem no_stockout_identity {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) :
(Measure.pi ν).real {d | shortage y d i i = 0}
+ ∑ m ∈ Finset.univ.filter (fun m : Fin N => k ≤ m ∧ m < i),
(Measure.pi ν).real {d | 0 < shortage y d (m + 1) i ∧ ShortVecZero y d m m i}
= 1 - (Measure.pi ν).real {d | 0 < shortage y d k i} := by sorry
end BassokSubstitution
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a natural number and a model with data .
Hypotheses:
- Model assumptions: Assumptions 1–3 hold ( and for ; for ) and .
- Demand laws: are probability measures on , each giving measure , with finite mean, and absolutely continuous. is their product law on .
- Stock: with .
- Classes: are classes in , which forces .
The model , its assumptions and do not occur in the conclusion.
Notation. All shortages are evaluated at .
- Shortage , for a natural number and a class with : the unmet demand of class after the greedy procedure processes classes . Starting from stock , each class receives from products in turn. if .
- Vector condition. means for every class with .
- Natural-number indices. is a natural number.
Conclusion.
where each is the real-valued (outer) measure of the set of demand vectors .
Degenerate cases:
- . The sum has the single term .
- Zero stock. may be zero.
- . No pair exists, so the statement is vacuous.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.