Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Optimal independent sets of a disjoint union are optimal in each copy

Proved
WilliamsonShmoys.indepSet_disjoint_union_split

by もち · Nov 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

graph-theoryindependent-set

Let H0,…,Hm−1H_0,\dots,H_{m-1}H0​,…,Hm−1​ be graphs on {0,…,n−1}\{0,\dots,n-1\}{0,…,n−1}, let UUU be their disjoint union on {0,…,m−1}×{0,…,n−1}\{0,\dots,m-1\}\times\{0,\dots,n-1\}{0,…,m−1}×{0,…,n−1}, and let www be a real weight function on the vertices of UUU. Let AAA be an independent set of UUU of maximum weight among all independent sets of UUU. Then, for every copy jjj and every independent set SSS of HjH_jHj​,

∑a∈Sw(j,a)  ≤  ∑x∈A,  x1=jw(x).\sum_{a\in S} w(j,a)\;\le\;\sum_{x\in A,\;x_1=j} w(x).a∈S∑​w(j,a)≤x∈A,x1​=j∑​w(x).

In words, the part of an optimal independent set of a disjoint union that lies in one copy is optimal for that copy. This lets one call of an exact maximum-weight-independent-set solver, run on the disjoint union of kkk instances, give optimal answers for all kkk instances at once. That is the basis of the single-call RAM implementation of Baker's shifting technique.

Formalization Note. UUU is SimpleGraph.fromRel (fun u v => u.1 = v.1 ∧ (H u.1).Adj u.2 v.2) on Fin m × Fin n. Weights are arbitrary reals; no sign assumption is needed.

Preamble
import Mathlib

set_option autoImplicit false
open scoped BigOperators
Formal statement
theorem WilliamsonShmoys.indepSet_disjoint_union_split {m n : ℕ} (H : Fin m → SimpleGraph (Fin n)) (w : Fin m × Fin n → ℝ)
    (A : Finset (Fin m × Fin n))
    (hA : (SimpleGraph.fromRel (fun (u v : Fin m × Fin n) => u.1 = v.1 ∧ (H u.1).Adj u.2 v.2)).IsIndepSet
      (A : Set (Fin m × Fin n)))
    (hopt : ∀ S : Finset (Fin m × Fin n),
      (SimpleGraph.fromRel (fun (u v : Fin m × Fin n) => u.1 = v.1 ∧ (H u.1).Adj u.2 v.2)).IsIndepSet
        (S : Set (Fin m × Fin n)) →
      ∑ x ∈ S, w x ≤ ∑ x ∈ A, w x)
    (j : Fin m) (S : Finset (Fin n)) (hS : (H j).IsIndepSet (S : Set (Fin n))) :
    ∑ a ∈ S, w (j, a) ≤ ∑ x ∈ A.filter (fun x => x.1 = j), w x := by sorry
Source
Standard; used for the RAM implementation of Williamson–Shmoys, The Design of Approximation Algorithms, Sect. 10.2

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