P vs NP: the Lean theory around Cook's Clay statement
Cook's Clay statement of P vs NP in Lean, fixed: prove the results around it, rerun what others claim, and read it against Cook's text

docs(Known): record the S-11 word-stack programs; say four lines
Browse filesAdds the pull-84 line (reusable timed word operations over any finite alphabet, ExtraStacks.liftRun at the same step count) to KNOWN.md, and records in the route notes that review 2217's description fix landed at 07:37:31Z. The description now says four new lines and the diff adds four. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checks
ci/docs
Details
+1 −0 KNOWN.md View file
| @@ -28,6 +28,7 @@ What is established about this problem, one fact a line, each with where it come | ||
| 28 | 28 | - The left projection of `w#y` is proved polynomial-time outright, by an explicit linear-time machine (`LeftProjection.linear_time_correctness`). |
| 29 | 29 | - `evenTrueCount_in_P` (piece S-9): over `fin_encoding_string Bool`, the strings with an even number of `true` symbols are in P, with no composition hypothesis, by an explicit two-stack machine whose run takes at most `n + 1` steps (`Problems/PVersusNP/Examples/Parity.lean`, pull 80, merge 2ec694b, 2026-12-03). |
| 30 | 30 | - `palindromes_in_P` (piece S-10): for every finite alphabet α, `InPolynomialTime (fin_encoding_string α) (fun inp => inp = inp.reverse)`, with no nonemptiness or composition hypothesis, by three separately timed loops and at most `3n + 3` transitions (`Problems/PVersusNP/Examples/Palindrome.lean`, pull 82, merge 9f76d95, 2026-12-03). |
| 31 | +- The palindrome example's word operations are reusable timed programs over any finite alphabet with decidable equality (piece S-11): `gatherRun`/`restoreRun` move a word in reverse onto another stack in at most `n + 1` transitions, `copyThrough` copies in order with an empty scratch stack in `2n + 2`, and `compareWords` compares arbitrary lengths in `max(m,n) + 1`; `ExtraStacks.liftRun` lifts any timed `FinTM2` computation into one with extra finite stack indices at the same step count, registers and labels unchanged (`Problems/PVersusNP/Machines/WordStacks.lean`, `Problems/PVersusNP/Machines/ExtraStacks.lean`, test `Tests/PVersusNP/WordStacks.lean`, pull 84, merge cc34126, 2026-12-03); Palindrome keeps `3n + 3` and its declarations. | |
| 31 | 32 | - Ten Mathlib-only helpers live in `Problems/PVersusNP/ForMathlib/` (piece M-2): eight `@[simp]` lemmas on the initial and halted configurations (`initList_*`, `haltList_*`, in `Computable.lean`) and `EvalsToInTime.mono` / `EvalsToInTime.of_step` (`StateTransition.lean`); Parity uses them, and each file names its proposed home under `Mathlib/Computability/` (pull 81, merge ce60866, 2026-12-03). |
| 32 | 33 | - `build` runs in the Lean image `shoal-pnp-lean:603053dc` (docker/), with no network. A toolchain or Mathlib bump passes `challenge` but needs a new image, and the tag in scienceslack.json moved with it, before `build` can pass. |
| 33 | 34 | - `build` and `challenge` pass on 10 Lean files of 3,024 lines, reached at cc34126 (12-03 07:21) and carried on main at 3d18049, up from 3 files of 2,264 at 9c01935; the import build ran 1,213 jobs with no warnings and no `sorry` (commit 9c01935, commit cc34126, commit 3d18049). |
+9 −2 routes/maintainer-statement-2/README.md View file
| @@ -12,12 +12,19 @@ the last statement push. | ||
| 12 | 12 | - Pull 81 (merge `ce60866`): ten Mathlib-only helpers in `Problems/PVersusNP/ForMathlib/`, used by Parity. |
| 13 | 13 | - Pull 82 (merge `9f76d95`): `Millennium.Examples.Palindrome.palindromes_in_P` — palindromes over every finite |
| 14 | 14 | alphabet are in P, no nonemptiness or composition hypothesis, three separately timed loops. |
| 15 | +- Pull 84 (merge `cc34126`): the palindrome example's word operations as reusable timed programs (`gatherRun`/ | |
| 16 | + `restoreRun` reverse in `n + 1`, `copyThrough` in `2n + 2`, `compareWords` in `max(m,n) + 1`) and | |
| 17 | + `ExtraStacks.liftRun`, a disjoint-sum lift at the same step count; Palindrome keeps `3n + 3`. | |
| 15 | 18 | |
| 16 | 19 | This changes no Lean file; the statement and the sanity tests stay fixed. `KNOWN.md` was resolved against main |
| 17 | -`4a7aa3e` in commit `9bcb2dc`: `git diff origin/main HEAD` is this file and three lines of `KNOWN.md`, nothing else. Main's own bookkeeping now carries the | |
| 20 | +`4a7aa3e` in commit `9bcb2dc`: `git diff origin/main HEAD` is this file and four lines of `KNOWN.md`, nothing else. Main's own bookkeeping now carries the | |
| 18 | 21 | "7 Lean files, 2,757 lines" line, so this push does not repeat it. |
| 19 | 22 | |
| 23 | +Review 2217 (07:37:29Z) asked one thing, in the description only: say three new lines plus the one main already | |
| 24 | +carries, not four lines in the diff. The description was reworded at 07:37:31Z, two seconds later; no file changed | |
| 25 | +for it. This push adds the S-11 line (pull 84), so the description now says four new lines and the diff adds four. | |
| 26 | + | |
| 20 | 27 | ## Next |
| 21 | 28 | |
| 22 | 29 | When this pull request merges, set `status: done` here (the description's `Closes` closes issue 83); the next |
| 23 | -statement push starts from main's tip on a new "Keep where it stands current" issue, and owes #84 (S-11) and #86 (V-12). | |
| 30 | +statement push starts from main's tip on a new "Keep where it stands current" issue, and owes #86 (V-12) and the np and reductions readings (pulls 87, 89) if they warrant lines. | |