Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Theorems 1–3 and §4 (reduction): subset sum is solvable iff 000 is not a local min of xTMxx^{\mathsf T}MxxTMx on x≥0x\ge0x≥0, iff MMM is not copositive, iff …

Proved
MurtyKabadi.Reduction.subsetSum_tfae

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

computational-complexitycopositive-matrixlocal-minimump2o-batch-p200ap2o-gran-per-chapterp2o-plan-paperp2o-v1quadratic-programmingsubset-sum

Let d0;d1,…,dnd_0; d_1, \dots, d_nd0​;d1​,…,dn​ be positive integers, the data of a subset sum instance, and let lll be the total number of decimal digits in these data. Let δ\deltaδ be an integer and ε\varepsilonε a rational number with

δ>4(d0∑j=1ndj)2n3,0<ε<2−nl2.\delta > 4\Big(d_0 \sum_{j=1}^n d_j\Big)^2 n^3, \qquad 0 < \varepsilon < 2^{-n l^2}.δ>4(d0​j=1∑n​dj​)2n3,0<ε<2−nl2.

Let MMM be the symmetric 2n×2n2n \times 2n2n×2n matrix of the quadratic form f5f_5f5​ in the variables (y,s)(y, s)(y,s), and Q(x)=xTMxQ(x) = x^{\mathsf T}MxQ(x)=xTMx. The following are equivalent:

  1. the subset sum instance is solvable (some subset of {d1,…,dn}\{d_1, \dots, d_n\}{d1​,…,dn​} sums to d0d_0d0​);
  2. x=0x = 0x=0 is not a local minimum of QQQ on {x≥0}\{x \ge 0\}{x≥0} (Problem 1);
  3. QQQ is not bounded below on {x≥0}\{x \ge 0\}{x≥0} (Problem 2);
  4. there is x≥0x \ge 0x≥0 with Q(x)<0Q(x) < 0Q(x)<0 (Problem 3);
  5. MMM is not copositive;
  6. there is x≥0x \ge 0x≥0 with eTx=ne^{\mathsf T}x = neTx=n and Q(x)<0Q(x) < 0Q(x)<0 (Problem 4 with a0=na_0 = na0​=n);
  7. u=0u = 0u=0 is not a local minimum of h(u)=(u2)TM(u2)h(u) = (u^2)^{\mathsf T} M (u^2)h(u)=(u2)TM(u2) on R2n\mathbb R^{2n}R2n (Problem 11);
  8. hhh is not bounded below on R2n\mathbb R^{2n}R2n (Problem 12).

This is the mathematical content of the paper's Theorems 1–3 and §4: the explicit map from (d0;d1,…,dn)(d_0; d_1, \dots, d_n)(d0​;d1​,…,dn​) to MMM is a reduction from subset sum to each of these questions, so each of them is NP-hard; in particular deciding whether a feasible point of a quadratic program is a local minimum, and deciding copositivity, are NP-hard.

Formalization Note Only the correctness of the reduction is formalized. Not formalized: membership in NP (Lemma 1), the polynomial-time computability of MMM from the data, the encoding size of MMM, and the NP-completeness of subset sum (cited in the paper from Garey–Johnson). MMM has rational entries (ε\varepsilonε is rational and (d02−nδ)/n2(d_0^2 - n\delta)/n^2(d02​−nδ)/n2 need not be an integer); a positive integer multiple of it is the integer matrix of Theorem 3, has the same answer to every question in the list, and this rescaling is not formalized. The paper's §3 standing assumption "DDD is not PSD" is not imposed (MMM can be PSD, e.g. n=1n = 1n=1, d1=5d_1 = 5d1​=5, d0=1d_0 = 1d0​=1), and the equivalence holds without it. The bound on ε\varepsilonε is written ε⋅2nl2<1\varepsilon \cdot 2^{nl^2} < 1ε⋅2nl2<1 in Q\mathbb QQ; lll counts decimal digits. For n=0n = 0n=0 all eight statements are false, so no hypothesis n≥1n \ge 1n≥1 is needed.

Preamble
import Mathlib
import Definitions.Def_MurtyKabadi_Reduction_QuadraticProblems
import Definitions.Def_MurtyKabadi_Reduction_SubsetSum
import Definitions.Def_MurtyKabadi_Reduction_Construction
Formal statement
namespace MurtyKabadi.Reduction

theorem subsetSum_tfae {n : ℕ} (d : Fin n → ℕ) (d0 δ : ℕ) (ε : ℚ)
    (hd : ∀ j, 0 < d j) (hd0 : 0 < d0)
    (hδ : 4 * (d0 * ∑ j, d j) ^ 2 * n ^ 3 < δ)
    (hε0 : 0 < ε) (hε : ε * (2 : ℚ) ^ (n * digitCount d d0 ^ 2) < 1) :
    List.TFAE
      [SubsetSumSolvable d d0,
       Problem1 (mkMatrix d d0 δ ε),
       Problem2 (mkMatrix d d0 δ ε),
       Problem3 (mkMatrix d d0 δ ε),
       ¬ Copositive (mkMatrix d d0 δ ε),
       Problem4 (mkMatrix d d0 δ ε) n,
       Problem11 (mkMatrix d d0 δ ε),
       Problem12 (mkMatrix d d0 δ ε)] := by sorry

end MurtyKabadi.Reduction
Source
Murty and Kabadi, Some NP-complete problems in quadratic and nonlinear programming, Math. Programming 39 (1987), pp. 124–125, Theorems 1, 2, 3 and their proofs; pp. 126–127, §4 (Problems 11 and 12)
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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me