Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Observation 7.12 — equivalent Wagner–Whitin inequalities

Proved
PochetWolsey.WagnerWhitin.ww_inequality_rewriting

by Shuze Chen · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

convex-hulllot-sizingp2o-gran-per-chapterp2o-plan-bookp2o-v1production-planning

Let n≥1n\ge1n≥1, dt≥0d_t\ge0dt​≥0, and real vectors x,y,sx,y,sx,y,s satisfy s0=0s_0=0s0​=0 and st−1+xt=dt+sts_{t-1}+x_t=d_t+s_tst−1​+xt​=dt​+st​. For 1≤k≤l≤n1\le k\le l\le n1≤k≤l≤n, the following three inequalities are equivalent:

sk−1≥∑j=kldj(1−∑u=kjyu),s_{k-1}\ge\sum_{j=k}^l d_j\Bigl(1-\sum_{u=k}^j y_u\Bigr),sk−1​≥j=k∑l​dj​(1−u=k∑j​yu​), sk−1+∑j=kldjlyj≥dkl,s_{k-1}+\sum_{j=k}^l d_{jl}y_j\ge d_{kl},sk−1​+j=k∑l​djl​yj​≥dkl​, ∑j=1k−1xj+∑j=kldjlyj≥d1l.\sum_{j=1}^{k-1}x_j+\sum_{j=k}^l d_{jl}y_j\ge d_{1l}.j=1∑k−1​xj​+j=k∑l​djl​yj​≥d1l​.

Here dab=∑j=abdjd_{ab}=\sum_{j=a}^b d_jdab​=∑j=ab​dj​. The observation relates the stock formulation to an (l,S)(l,S)(l,S) inequality.

Formalization Note The last expression uses the chapter's default s0=0s_0=0s0​=0 and balance equations. These assumptions do not constrain the separate goal's initial stock. No setup integrality or sign condition on x,y,sx,y,sx,y,s is needed for these algebraic rewritings.

Preamble
import Mathlib

open scoped BigOperators
Formal statement
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
Source
Pochet and Wolsey, Production Planning by Mixed Integer Programming, Springer 2006, p. 225 (PDF 239), Observation 7.12
Read-back

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

Data and hypotheses.

  • nnn is a natural number with n>0n > 0n>0.
  • d,x,y∈Rnd, x, y \in \mathbb{R}^nd,x,y∈Rn, indexed by periods 0,…,n−10,\dots,n-10,…,n−1.
  • s∈Rn+1s \in \mathbb{R}^{n+1}s∈Rn+1, indexed 0,…,n0,\dots,n0,…,n.
  • dt≥0d_t \ge 0dt​≥0 for every ttt.
  • s0=0s_0 = 0s0​=0.
  • The balance equation st+xt=dt+st+1s_t + x_t = d_t + s_{t+1}st​+xt​=dt​+st+1​ holds for every t∈{0,…,n−1}t\in\{0,\dots,n-1\}t∈{0,…,n−1}.
  • k,lk, lk,l are period indices with k≤lk \le lk≤l.

No sign or range condition is imposed on xxx, yyy, or on s1,…,sns_1,\dots,s_ns1​,…,sn​. In particular, yyy is not required to lie in {0,1}\{0,1\}{0,1} or in [0,1][0,1][0,1].

The three inequalities.

(A)sk  ≥  ∑j=kldj(1−∑u=kjyu),\text{(A)}\quad s_k \;\ge\; \sum_{j=k}^{l} d_j\Big(1 - \sum_{u=k}^{j} y_u\Big),(A)sk​≥j=k∑l​dj​(1−u=k∑j​yu​), (B)sk+∑j=kl(∑u=jldu)yj  ≥  ∑j=kldj,\text{(B)}\quad s_k + \sum_{j=k}^{l}\Big(\sum_{u=j}^{l} d_u\Big) y_j \;\ge\; \sum_{j=k}^{l} d_j,(B)sk​+j=k∑l​(u=j∑l​du​)yj​≥j=k∑l​dj​, (C)∑j=0k−1xj+∑j=kl(∑u=jldu)yj  ≥  ∑j=0ldj.\text{(C)}\quad \sum_{j=0}^{k-1} x_j + \sum_{j=k}^{l}\Big(\sum_{u=j}^{l} d_u\Big) y_j \;\ge\; \sum_{j=0}^{l} d_j .(C)j=0∑k−1​xj​+j=k∑l​(u=j∑l​du​)yj​≥j=0∑l​dj​.

In each, sks_ksk​ is the stock coordinate with index kkk.

Conclusion. Both (A)   ⟺  \iff⟺ (B) and (B)   ⟺  \iff⟺ (C) hold. These are two logical equivalences between non-strict inequalities, asserted for this fixed data.

Degenerate cases.

  • n=0n = 0n=0. This is excluded by n>0n > 0n>0.
  • k=0k = 0k=0. The sum ∑j=0k−1xj\sum_{j=0}^{k-1} x_j∑j=0k−1​xj​ in (C) is empty and equals 000, and sk=s0=0s_k = s_0 = 0sk​=s0​=0.
  • k=lk = lk=l. Every outer sum has the single term j=kj = kj=k.
  • Inner sums. The inner sums ∑u=kj\sum_{u=k}^{j}∑u=kj​ and ∑u=jl\sum_{u=j}^{l}∑u=jl​ always range over k≤j≤lk \le j \le lk≤j≤l, so they are never empty.
  • Unused data. The coordinate sns_nsn​ never appears in the inequalities, beyond the balance equation for t=n−1t = n-1t=n−1.
Human review
  • Endorsed by Community (Bot) · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Shuze Chen · Oct 29, 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