Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Subadditivity of WWW: W(X1∪⋯∪Xk)≤∑iW(Xi)W(X_1 \cup \dots \cup X_k) \le \sum_i W(X_i)W(X1​∪⋯∪Xk​)≤∑i​W(Xi​)

Proved
BinPacking.SmallItems.W_flatten_le_sum

by mikedeng1 · Sep 26, 2026 · Mathlib 0df444a (Lean v4.33.1)

approximation-algorithmsbin-packingp2o-batch-p100ap2o-gran-per-chapterp2o-plan-paperp2o-v1weighting-function

Let X1,…,XkX_1,\dots,X_kX1​,…,Xk​ be finite lists of real numbers in (0,1](0,1](0,1], regarded as disjoint parts of their union X1∪⋯∪XkX_1\cup\dots\cup X_kX1​∪⋯∪Xk​ (the concatenation of the lists, counted with multiplicity). Then

W(⋃i=1kXi)  ≤  ∑i=1kW(Xi).W\Bigl(\bigcup_{i=1}^k X_i\Bigr)\;\le\;\sum_{i=1}^k W(X_i).W(i=1⋃k​Xi​)≤i=1∑k​W(Xi​).

Applied to the bins X1,…,XL∗X_1,\dots,X_{L^*}X1​,…,XL∗​ of an optimal packing of LLL, subadditivity bounds W(L)W(L)W(L) by the sum of the weights of the bins, which is how the per-bin bound of Lemma 4.3 becomes a bound on W(L)W(L)W(L).

Formalization Note The parts are a list Xs : List (List ℝ) and the union is Xs.flatten. The hypothesis that all elements lie in (0,1](0,1](0,1] is the paper's standing assumption on the elements of LLL.

Preamble
import Mathlib
import Definitions.Def_BinPacking_SmallItems_Model
import Definitions.Def_BinPacking_SmallItems_Weight
Formal statement
namespace BinPacking.SmallItems

/-- Subadditivity of `W` (Section 4, p. 316): `W(X₁ ∪ ⋯ ∪ X_k) ≤ Σ W(X_i)`, for disjoint parts `X_i`
of a list of reals in `(0, 1]`, the union being the concatenation of the parts. -/
theorem W_flatten_le_sum (Xs : List (List ℝ)) (hL : IsList Xs.flatten) :
    W Xs.flatten ≤ (Xs.map W).sum := by sorry

end BinPacking.SmallItems
Source
Johnson, Demers, Ullman, Garey, Graham, Worst-Case Performance Bounds for Simple One-Dimensional Packing Algorithms, SIAM J. Comput. 3(4) (1974), p. 316, Section 4 (subadditivity of W)
Read-back

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

Let X1,…,XmX_1, \dots, X_mX1​,…,Xm​ be a finite list of lists of reals. Let X1X2⋯XmX_1 X_2 \cdots X_mX1​X2​⋯Xm​ be their concatenation, and assume every element of it satisfies 0<a≤10 < a \le 10<a≤1.

The weight W(X)W(X)W(X) of a list XXX is defined as follows. Let S=(S0,…,Sn−1)S = (S_0,\dots,S_{n-1})S=(S0​,…,Sn−1​) be XXX rearranged into nonincreasing order. Then

W(X)=min⁡σ(∑i: σ(i)=iw1(Si)+∑i: i<σ(i)w2(Si,Sσ(i))),W(X) = \min_{\sigma}\Big(\sum_{i:\,\sigma(i)=i} w_1(S_i) + \sum_{i:\,i<\sigma(i)} w_2(S_i,S_{\sigma(i)})\Big),W(X)=σmin​(i:σ(i)=i∑​w1​(Si​)+i:i<σ(i)∑​w2​(Si​,Sσ(i)​)),

where:

  • σ\sigmaσ ranges over the permutations of {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1} with σ∘σ=id\sigma\circ\sigma=\mathrm{id}σ∘σ=id;
  • w1(x)=1/⌊1/x⌋w_1(x) = 1/\lfloor 1/x\rfloorw1​(x)=1/⌊1/x⌋, with natural-number floor and 1/0:=01/0 := 01/0:=0;
  • w2(x,y)w_2(x,y)w2​(x,y) is computed with k=⌊1/x⌋k = \lfloor 1/x\rfloork=⌊1/x⌋. It equals w1(x)+k−1kw1(y)w_1(x) + \frac{k-1}{k}w_1(y)w1​(x)+kk−1​w1​(y) if 1k+1<x≤1k\frac1{k+1} < x \le \frac1kk+11​<x≤k1​ and kx+y≤1kx+y\le 1kx+y≤1, and w1(x)+w1(y)w_1(x)+w_1(y)w1​(x)+w1​(y) otherwise.

The statement asserts

W(X1X2⋯Xm)  ≤  ∑i=1mW(Xi).W(X_1 X_2\cdots X_m) \;\le\; \sum_{i=1}^m W(X_i).W(X1​X2​⋯Xm​)≤i=1∑m​W(Xi​).

Scope of the statement:

  • The parts are arbitrary lists: nothing is required of them beyond the elements of their concatenation lying in (0,1](0,1](0,1].
  • "Disjointness" is only in the sense that each occurrence belongs to exactly one part. Repeated values are allowed.
  • There is no constraint on the parts' sums or sizes.

Degenerate cases:

  • No parts. If m=0m = 0m=0, the concatenation is empty and the claim reads 0≤00 \le 00≤0, since WWW of the empty list is 000.
  • Empty parts. Empty parts contribute W=0W = 0W=0.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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