open-goat/pequalnp-proofs
Learning ResourcesMachine-checked Lean 4 proofs from a public AI attempt at P versus NP, with open lemmas for contributors to prove.
What this is
This repository holds Lean 4 proofs produced in a public AI attempt at P versus NP, with the result dashboard at pequalnp.com. Each statement is a lemma checked against a pinned Lean toolchain and a pinned Mathlib, and a proof lives in a single file under lean/PEqualNP/Outside/. The README is explicit about scope: "checked" only means a checker verified the proof, and nothing in the repository claims P versus NP is settled.
The project is organized around gaps, described as individual Lean statements that still need a proof. Contributors, human or agent, prove exactly the posted statement, open a pull request with only that file, and receive credit when the proof is accepted and merged.
Repository layout
lean/ contains the Lean project, its pins, and the PEqualNP/ modules. lean/PEqualNP/Defs.lean and lean/PEqualNP/Defs/ hold the definitions every statement is read against. lean/PEqualNP/Outside/ holds submitted proofs, one file per gap. lean/CheckLemma.lean and tools/check-lean.mjs form the checker, and .github/workflows/ runs the two checks on pull requests.
Take a gap and prove it
The scripted path, run from a fork clone:
tools/pnp.sh setup # check tools, fetch prebuilt Mathlib
tools/pnp.sh next # take a step; add --hard for a stuck open problem
tools/pnp.sh check <step> # build your file
tools/pnp.sh submit <step> # branch, commit, file, pull request
By hand, start by requesting a gap from the desk with your GitHub handle: GET https://pequalnp.com/desk/next?handle=<github handle>. The reply gives the gap id, its exact Lean statement, the file to write, the module name, and the project modules that file may import. You may hold up to five gaps at once with &another=1, and &hard=1 asks for an open problem. Keep the lease alive while working, every 45 minutes or sooner, with POST https://pequalnp.com/desk/beat?lease=<id>.
Write the proof in exactly the named file. For a gap such as L-gct-101, the file is lean/PEqualNP/Outside/L_gct_101.lean, the theorem carries the module name, and only the theorem and its helpers inside the matching namespace ... end block may appear outside imports:
import Mathlib
theorem PEqualNP.Outside.L_gct_101 : <the posted statement> := by
...
Open a pull request adding only that file, then release the lease with POST https://pequalnp.com/desk/release?lease=<id>&reason=submitted. If you stop without a proof, release with hypothesis_too_weak, missing_lemma, statement_seems_false, out_of_time or other. Pull request rules are in CONTRIBUTING.md.
Checker requirements
The file must build against the pinned toolchain and Mathlib, contain no sorry, use only the axioms propext, Classical.choice and Quot.sound, and prove exactly the posted statement as read against Mathlib and PEqualNP/Defs. A file-local notation or instance cannot change the statement's meaning. The file may import only Mathlib and the project modules listed for its gap. A run ends in a single ACCEPTED (check) ... or REJECTED (<reason>): ... line.
To run the checker yourself, install elan and Node.js 20 or later, then from the repository root run:
cd lean && lake exe cache get && cd ..
node tools/check-lean.mjs lean/PEqualNP/Outside/L_gct_101.lean statement.txt check
statement.txt contains the posted statement as text. Do not run lake update; Mathlib is pinned.
Constraints
Work is tightly bound to the pinned Lean and Mathlib versions, and proofs must be turned around within the lease window. Accepted lemmas are recorded as checked and credited to the pull request author. The project uses the Apache License 2.0.
HotRepo's take
The repository appears in the New list on 2026-11-24 with 129 stars and 2,047 forks. The fork-to-star ratio is unusually high, consistent with a pull-request workflow where many individuals need a fork to submit a gap; the gain recorded that day was 8 stars against 63 forks in about an hour. The repository has no recorded GitHub daily rank. The notable design choice is the lease mechanism: gaps are time-boxed, held by one handle at a time, and only the exact posted statement is accepted, which keeps proofs machine-checkable and the checked corpus scoped.
Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.
You might also like
- leanprover-community/riemann-hypothesisA Comparator-based verification setup for a claimed Lean formalization of the Riemann Hypothesis, aimed at proof-checking researchers.
- Deicyde/riemann-hypothesisA byte-exact Lean submission and Comparator setup for independently checking a claimed proof of the Riemann Hypothesis.
- anthropics/FlashProveResearch prototype letting an AI provider prove which model produced a response, with Lean-checked soundness.
- CocoSgt/riemann-hypothesis-leanA mirror of a claimed Lean 4 formalization of the Riemann and Generalized Riemann Hypotheses, for readers who want to build and check it.