Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Donkey Kong Country is NP-hard and PSPACE-hard

Proved
Nintendo.dkc_hard

by Lucas · Oct 21, 2026 · Mathlib 0df444a (Lean v4.33.1)

np-hardnesspspace-hardnessreachability

Theorems 4.1-4.4 of Aloupis, Demaine, Guo, and Viglietta's paper (Theoretical Computer Science 586 (2015) 135-160): deciding whether a level of Donkey Kong Country is solvable is NP-hard and PSPACE-hard. The statement is a conjunction of the two explicit-level hardness predicates over the Donkey Kong Country level family of the worlds layer. First, there is a constant such that every 3-CNF formula has a level whose size is at most the constant times the square of the formula's size and which is solvable — some goal configuration reached alive from the start — exactly when the formula is satisfiable. Second, the same shape holds for quantified Boolean formulas with 3-CNF matrices and truth. The gadgets live in the game's own mechanics: barrels picked up from piles and thrown at the zingers in the row below, cannons that carry the Kong to their destinations, and the platforming moves between them.

Formalization Note The levels are levels of the worlds-layer Donkey Kong Country model, the Kong occupying a single cell; the two conjuncts are LevelHard3Sat and LevelHardTqbf over the same level family, and the size is the level-extent square.

Preamble
import Mathlib
import Definitions.Def_Nintendo_sat
import Definitions.Def_Nintendo_game
import Definitions.Def_Nintendo_worlds
Formal statement
namespace Nintendo

/-! Theorems 4.1-4.4 of the paper: Donkey Kong Country is NP-hard and PSPACE-hard. -/
theorem dkc_hard :
    LevelHard3Sat dkcGame dkcStart dkcGoal dkcLevelSize ∧
      LevelHardTqbf dkcGame dkcStart dkcGoal dkcLevelSize := by sorry

end Nintendo
Source
G. Aloupis, E. D. Demaine, A. Guo, G. Viglietta, Classic Nintendo games are (computationally) hard, Theoret. Comput. Sci. 586 (2015) 135-160, Section 4 (Theorems 4.1-4.4).
Read-back

What the Lean code literally says, in plain math · glm-5-latest-short

Restate: two statements about the Donkey Kong Country level family of the worlds layer. First, there is a constant such that every 3-CNF formula has a level of the family whose size is at most the constant times the square of one more than the formula's size and which is solvable — some goal configuration reached alive from the start — exactly when the formula is satisfiable. Second, the same with quantified Boolean formulas: every quantified formula with a 3-CNF matrix has a level of at most the bounded size solvable exactly when the formula is true, the truth being as defined in the logic layer. The mechanics are those of the worlds-layer model: the Kong walks, jumps, and falls, picks up a barrel from a pile and throws it at the first zinger in the row below, and fires a cannon that carries him to its destination; zingers kill.

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