Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Customer Tolerances, p. 883 — column choice for the ratio objective is again a knapsack problem (with Π̄ᵢ = −(z₁Π²ᵢ − z₂Π¹ᵢ − z₂lᵢ))

Proved
CuttingStock63.Fractional.column_choice_knapsack

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

column-generationcutting-stockknapsacklinear-fractional-programmingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Fix a stock length LLL, piece lengths l1,…,lml_1,\dots,l_ml1​,…,lm​, the current values z1,z2z_1,z_2z1​,z2​ of the two auxiliary objectives, and vectors Π1,Π2∈Rm\Pi^1,\Pi^2\in\mathbb R^mΠ1,Π2∈Rm (in the paper, the last mmm entries of the first two rows (1,0,Π1)(1,0,\Pi^1)(1,0,Π1) and (0,1,Π2)(0,1,\Pi^2)(0,1,Π2) of the basis inverse). A cutting pattern is a vector a∈Z≥0ma\in\mathbb Z_{\ge0}^ma∈Z≥0m​; its waste is w=L−∑iailiw=L-\sum_i a_il_iw=L−∑i​ai​li​ (eq. (4)) and its column is c=(−w,−1,a)c=(-w,-1,a)c=(−w,−1,a). Consider the bracket of (5),

Δ(a)=z1 (0,1,Π2)⋅c−z2 (1,0,Π1)⋅c=z1(−1+∑iΠi2ai)−z2(−w+∑iΠi1ai),\Delta(a)=z_1\,(0,1,\Pi^2)\cdot c-z_2\,(1,0,\Pi^1)\cdot c=z_1\Big(-1+\sum_i\Pi^2_ia_i\Big)-z_2\Big(-w+\sum_i\Pi^1_ia_i\Big),Δ(a)=z1​(0,1,Π2)⋅c−z2​(1,0,Π1)⋅c=z1​(−1+i∑​Πi2​ai​)−z2​(−w+i∑​Πi1​ai​),

so that dζ/dxj=Δ(aj)/z22d\zeta/dx_j=\Delta(a_j)/z_2^2dζ/dxj​=Δ(aj​)/z22​. Then:

  1. (third line of (5)) Δ(a)=wz2−z1+∑i(z1Πi2−z2Πi1)ai\Delta(a)=wz_2-z_1+\sum_i\big(z_1\Pi^2_i-z_2\Pi^1_i\big)a_iΔ(a)=wz2​−z1​+∑i​(z1​Πi2​−z2​Πi1​)ai​;
  2. (after substituting (4)) with k=Lz2−z1k=Lz_2-z_1k=Lz2​−z1​ and Πˉi=−(z1Πi2−z2Πi1−z2li)\bar\Pi_i=-\big(z_1\Pi^2_i-z_2\Pi^1_i-z_2l_i\big)Πˉi​=−(z1​Πi2​−z2​Πi1​−z2​li​),
Δ(a)=k−∑iΠˉiai;\Delta(a)=k-\sum_i\bar\Pi_ia_i ;Δ(a)=k−i∑​Πˉi​ai​;
  1. if z2≠0z_2\ne0z2​=0, a pattern aaa with ∑iaili≤L\sum_ia_il_i\le L∑i​ai​li​≤L minimizes Δ(a)/z22\Delta(a)/z_2^2Δ(a)/z22​ over all patterns that fit in LLL if and only if it maximizes ∑iΠˉiai\sum_i\bar\Pi_ia_i∑i​Πˉi​ai​ subject to ∑iaili≤L\sum_ia_il_i\le L∑i​ai​li​≤L, a∈Z≥0ma\in\mathbb Z^m_{\ge0}a∈Z≥0m​.

Hence choosing the column with the most negative dζ/dxjd\zeta/dx_jdζ/dxj​ is a knapsack problem with values Πˉi\bar\Pi_iΠˉi​, exactly as for the linear objective of Part I; only the values change.

Formalization Note The page prints the coefficient −li-l_i−li​ inside the sum after substituting (4), and Πˉi=−(z1Πi2−z2Πi1−li)\bar\Pi_i=-(z_1\Pi^2_i-z_2\Pi^1_i-l_i)Πˉi​=−(z1​Πi2​−z2​Πi1​−li​). Substituting w=L−∑iailiw=L-\sum_ia_il_iw=L−∑i​ai​li​ into wz2wz_2wz2​ gives Lz2−z2∑iailiLz_2-z_2\sum_ia_il_iLz2​−z2​∑i​ai​li​, so the correct coefficient is −z2li-z_2l_i−z2​li​; the statement uses the corrected one (the two agree when z2=1z_2=1z2​=1). The identities hold for arbitrary Π1,Π2\Pi^1,\Pi^2Π1,Π2, in particular for the rows of any basis inverse.

Preamble
import Mathlib
Formal statement
namespace CuttingStock63.Fractional
theorem column_choice_knapsack {m : ℕ} (L z₁ z₂ : ℝ) (l p₁ p₂ : Fin m → ℝ) :
    (∀ a : Fin m → ℕ,
      z₁ * (-1 + ∑ i, p₂ i * a i) - z₂ * (-(L - ∑ i, (a i : ℝ) * l i) + ∑ i, p₁ i * a i) =
        (L - ∑ i, (a i : ℝ) * l i) * z₂ - z₁ + ∑ i, (z₁ * p₂ i - z₂ * p₁ i) * a i) ∧
    (∀ a : Fin m → ℕ,
      z₁ * (-1 + ∑ i, p₂ i * a i) - z₂ * (-(L - ∑ i, (a i : ℝ) * l i) + ∑ i, p₁ i * a i) =
        (L * z₂ - z₁) - ∑ i, (-(z₁ * p₂ i - z₂ * p₁ i - z₂ * l i)) * a i) ∧
    (z₂ ≠ 0 → ∀ a : Fin m → ℕ, ∑ i, (a i : ℝ) * l i ≤ L →
      ((∀ a' : Fin m → ℕ, ∑ i, (a' i : ℝ) * l i ≤ L →
          (z₁ * (-1 + ∑ i, p₂ i * a i) - z₂ * (-(L - ∑ i, (a i : ℝ) * l i) + ∑ i, p₁ i * a i)) /
              z₂ ^ 2 ≤
            (z₁ * (-1 + ∑ i, p₂ i * a' i) -
                z₂ * (-(L - ∑ i, (a' i : ℝ) * l i) + ∑ i, p₁ i * a' i)) / z₂ ^ 2) ↔
        (∀ a' : Fin m → ℕ, ∑ i, (a' i : ℝ) * l i ≤ L →
          ∑ i, (-(z₁ * p₂ i - z₂ * p₁ i - z₂ * l i)) * a' i ≤
            ∑ i, (-(z₁ * p₂ i - z₂ * p₁ i - z₂ * l i)) * a i))) := by sorry
end CuttingStock63.Fractional
Source
Gilmore & Gomory, A linear programming approach to the cutting stock problem—Part II, Opns. Res. 11 (1963), p. 883, Customer Tolerances, eq. (5) second and third lines, the substitution of (4), and "So column choice is again a knapsack problem" (coefficient −l_i corrected to −z_2 l_i)
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