Observation 7.12 — equivalent Wagner–Whitin inequalities
ProvedPochetWolsey.WagnerWhitin.ww_inequality_rewritingLet , , and real vectors satisfy and . For , the following three inequalities are equivalent:
Here . The observation relates the stock formulation to an inequality.
Formalization Note The last expression uses the chapter's default and balance equations. These assumptions do not constrain the separate goal's initial stock. No setup integrality or sign condition on is needed for these algebraic rewritings.
import Mathlib open scoped BigOperators
namespace PochetWolsey.WagnerWhitin
theorem ww_inequality_rewriting (n : ℕ) (hn : 0 < n)
(d x y : Fin n → ℝ) (s : Fin (n + 1) → ℝ)
(hd : ∀ t, 0 ≤ d t) (hs0 : s 0 = 0)
(hbalance : ∀ t, s t.castSucc + x t = d t + s t.succ)
(k l : Fin n) (hkl : k ≤ l) :
(s k.castSucc ≥ ∑ j ∈ Finset.Icc k l,
d j * (1 - ∑ u ∈ Finset.Icc k j, y u) ↔
s k.castSucc + ∑ j ∈ Finset.Icc k l,
(∑ u ∈ Finset.Icc j l, d u) * y j ≥ ∑ j ∈ Finset.Icc k l, d j) ∧
(s k.castSucc + ∑ j ∈ Finset.Icc k l,
(∑ u ∈ Finset.Icc j l, d u) * y j ≥ ∑ j ∈ Finset.Icc k l, d j ↔
(∑ j ∈ Finset.Iio k, x j) + ∑ j ∈ Finset.Icc k l,
(∑ u ∈ Finset.Icc j l, d u) * y j ≥ ∑ j ∈ Finset.Iic l, d j) := by sorry
end PochetWolsey.WagnerWhitin
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Data and hypotheses.
- is a natural number with .
- , indexed by periods .
- , indexed .
- for every .
- .
- The balance equation holds for every .
- are period indices with .
No sign or range condition is imposed on , , or on . In particular, is not required to lie in or in .
The three inequalities.
In each, is the stock coordinate with index .
Conclusion. Both (A) (B) and (B) (C) hold. These are two logical equivalences between non-strict inequalities, asserted for this fixed data.
Degenerate cases.
- . This is excluded by .
- . The sum in (C) is empty and equals , and .
- . Every outer sum has the single term .
- Inner sums. The inner sums and always range over , so they are never empty.
- Unused data. The coordinate never appears in the inequalities, beyond the balance equation for .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.