Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Knapsack Method, paragraph before Step (5), p. 867 — the LP-relaxation bound β·(α)_s + b_{s+1}(L − λ·(α)_s)/l_{s+1}

Proved
CuttingStock63.Knapsack.relaxation_bound

by mikedeng1 · Oct 6, 2026 · Mathlib 0df444a (Lean v4.33.1)

boundknapsacklp-relaxationp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let l1,…,lm>0l_1,\dots,l_m>0l1​,…,lm​>0 and b1,…,bm≥0b_1,\dots,b_m\ge0b1​,…,bm​≥0 be ordered by density, b1/l1≥b2/l2≥⋯≥bm/lmb_1/l_1\ge b_2/l_2\ge\dots\ge b_m/l_mb1​/l1​≥b2​/l2​≥⋯≥bm​/lm​, and append the slack item am+1a_{m+1}am+1​ with bm+1=0b_{m+1}=0bm+1​=0, lm+1=1l_{m+1}=1lm+1​=1. Let 1≤s≤m1\le s\le m1≤s≤m and let (α)s(\alpha)_s(α)s​ be a prefix. Then every extension (α′)m(\alpha')_m(α′)m​ of (α)s(\alpha)_s(α)s​ with L≥λ⋅(α′)mL\ge\lambda\cdot(\alpha')_mL≥λ⋅(α′)m​ satisfies

β⋅(α′)m  ≤  β⋅(α)s+bs+1 (L−λ⋅(α)s)ls+1.\beta\cdot(\alpha')_m\;\le\;\beta\cdot(\alpha)_s+\frac{b_{s+1}\,(L-\lambda\cdot(\alpha)_s)}{l_{s+1}}.β⋅(α′)m​≤β⋅(α)s​+ls+1​bs+1​(L−λ⋅(α)s​)​.

Equivalently, β⋅(α)s+bs+1(Lj−λ⋅(α)s)/ls+1>Mj\beta\cdot(\alpha)_s+b_{s+1}(L_j-\lambda\cdot(\alpha)_s)/l_{s+1}>M_jβ⋅(α)s​+bs+1​(Lj​−λ⋅(α)s​)/ls+1​>Mj​ is a necessary condition for some extension of (α)s(\alpha)_s(α)s​ to improve the current maximum MjM_jMj​: the value obtained by relaxing the integrality of as+1a_{s+1}as+1​ and setting as+1=(Lj−λ⋅(α)s)/ls+1a_{s+1}=(L_j-\lambda\cdot(\alpha)_s)/l_{s+1}as+1​=(Lj​−λ⋅(α)s​)/ls+1​.

This bound is the test of Step (5), which lets the method skip every extension of a prefix that cannot improve any MjM_jMj​.

Formalization Note Nonnegative prices are a disclosed hypothesis: Step (1) places the slack item, of density 0, after every item, which presupposes bi/li≥0b_i/l_i\ge0bi​/li​≥0, and the paper applies the method to cutting-stock prices, which are nonnegative. At s=ms=ms=m the right side is β⋅(α)m\beta\cdot(\alpha)_mβ⋅(α)m​ and the claim is immediate.

Preamble
import Mathlib
import Definitions.Def_CuttingStock63_Knapsack_Problem
Formal statement
namespace CuttingStock63.Knapsack

/-- Knapsack Method, paragraph before Step (5), p. 867: with the variables ordered by density
b_1/l_1 ≥ ⋯ ≥ b_m/l_m (and the slack item a_{m+1}, b_{m+1} = 0, l_{m+1} = 1, last), every
extension (α)_m of (α)_s with L ≥ λ·(α)_m has β·(α)_m ≤ β·(α)_s + b_{s+1}(L − λ·(α)_s)/l_{s+1}.
So β·(α)_s + b_{s+1}(L_j − λ·(α)_s)/l_{s+1} > M_j is necessary for an extension to improve M_j. -/
theorem relaxation_bound {m : ℕ} (l b : Fin m → ℝ) (hl : ∀ i, 0 < l i) (hb : ∀ i, 0 ≤ b i)
    (hdens : ∀ i i' : Fin m, i ≤ i' → b i' / l i' ≤ b i / l i) (L : ℝ) (a : Fin m → ℕ)
    (s : ℕ) (hs1 : 1 ≤ s) (hsm : s ≤ m) (a' : Fin m → ℕ) (hext : IsExtension a a' s)
    (hfit : Fits l L a') :
    bet b a' m ≤ bet b a s + nextB b s * (L - lam l a s) / nextL l s := by sorry

end CuttingStock63.Knapsack
Source
Gilmore & Gomory, A linear programming approach to the cutting stock problem—Part II, Opns. Res. 11 (1963), p. 867, Knapsack Method, paragraph before Step (5)
Human review
  • Endorsed by Shuze Chen · Oct 6, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 6, 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