Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Unary 3-Partition lies in NP

Proved
TetrisHard.Rows.threePartition_mem_NP

by kmehltretter82 · Nov 19, 2026 · Mathlib 0df444a (Lean v4.33.1)

complexity-theorytetris

Let 3-Partition\mathrm{3\text{-}Partition}3-Partition denote the language of self-delimiting unary encodings ⟨s,T,a1,…,a3s⟩∈{0,1}∗\langle s, T, a_1, \dots, a_{3s}\rangle \in \{0,1\}^*⟨s,T,a1​,…,a3s​⟩∈{0,1}∗ of valid 3-Partition instances (s,T,a1,…,a3s)(s, T, a_1, \dots, a_{3s})(s,T,a1​,…,a3s​) (satisfying ∑i=13sai=sT\sum_{i=1}^{3s} a_i = sT∑i=13s​ai​=sT and T/4<ai<T/2T/4 < a_i < T/2T/4<ai​<T/2 for all iii) that admit a partition into sss triples each summing to TTT. Then

3-Partition∈NP.\mathrm{3\text{-}Partition} \in \mathrm{NP}.3-Partition∈NP.

A nondeterministic certificate specifies the part index ji∈{0,…,s−1}j_i \in \{0, \dots, s-1\}ji​∈{0,…,s−1} assigned to each aia_iai​ in unary; its length is bounded quadratically in the unary input length, and validity plus the sss part-sum equations are verifiable in polynomial time on a one-tape Turing machine.

Preamble
import Definitions.Def_TetrisHard_Rows_ThreePartition
Formal statement
namespace TetrisHard.Rows

theorem threePartition_mem_NP :
    threePartitionLanguage ∈ CookPvsNP.NP Bool := by sorry

end TetrisHard.Rows
Source
Garey and Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness (1979), Theorem 4.4 (pp. 96-105); Demaine, Hohenberger and Liben-Nowell, Tetris is Hard, Even to Approximate, arXiv:cs/0210020v1, Section 3 (p. 7)

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