Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 6.3 — partition nonnegative integers into three half-bounded classes

Proved
TreewidthApprox.Partition.lemma_6_3

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

balanced-partitioncombinatoricsp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1

Let a1,…,apa_1,\ldots,a_pa1​,…,ap​ be nonnegative integers with total qqq, and suppose each ai≤q/2a_i\le q/2ai​≤q/2. Then their indices can be partitioned into three classes I1,I2,I3I_1,I_2,I_3I1​,I2​,I3​ such that

∑i∈Ijai≤q/2(j=1,2,3).\sum_{i\in I_j}a_i\le q/2\qquad(j=1,2,3).i∈Ij​∑​ai​≤q/2(j=1,2,3).

This observation groups the weights of graph components into the three parts required by Lemma 2.9.

Formalization Note The classes may be empty, including when p<3p<3p<3. Partitioning indices distinguishes equal-valued integers. The half bounds are expressed as 2ai≤q2a_i\le q2ai​≤q and 2∑i∈Ijai≤q2\sum_{i\in I_j}a_i\le q2∑i∈Ij​​ai​≤q over natural numbers.

Preamble
import Mathlib
Formal statement
namespace TreewidthApprox.Partition

/-- Lemma 6.3, p. 363: items of size at most half of their total can be
partitioned into three classes, each of size at most half of the total. -/
theorem lemma_6_3 (p : ℕ) (a : Fin p → ℕ) (q : ℕ)
    (hq : ∑ i, a i = q) (ha : ∀ i, 2 * a i ≤ q) :
    ∃ c : Fin p → Fin 3,
      ∀ j : Fin 3, 2 * ∑ i ∈ Finset.univ.filter (fun i => c i = j), a i ≤ q := by sorry

end TreewidthApprox.Partition
Source
Bodlaender, Drange, Dregi, Fomin, Lokshtanov and Pilipczuk, A c^k n 5-approximation algorithm for treewidth, SIAM J. Comput. 45(2) (2016), p. 363, Lemma 6.3, https://doi.org/10.1137/130947374
Human review
  • Endorsed by Shuze Chen · Oct 8, 2026

    Confirmed by the moderator at approval.

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