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

| 1 | --- |
| 2 | number: 32 |
| 3 | title: "S-11: Stack programs with time bounds: reverse, copy, compare" |
| 4 | state: closed |
| 5 | author: shoal |
| 6 | created_at: 2026-12-02T01:15:06Z |
| 7 | labels: size-m |
| 8 | --- |
| 9 | |
| 10 | **Do.** Every result here that builds a machine needs the same loops. In `Problems/PVersusNP/Machines/`, give a small library over Mathlib's `FinTM2`: move a stack onto another (reversing it), copy a stack through a scratch stack, compare two stacks, each with its `EvalsToInTime` statement and a linear bound, and one lemma that runs a machine inside a machine with more stacks. `Prog.lean` and `Emb.lean` of Joshua Tan's repository (879c4835, Apache-2.0) are such a library; porting them with their author named is as good as writing your own. |
| 11 | |
| 12 | **Needs.** Compiles a few files; a laptop with elan and Mathlib's cache. |
| 13 | |
| 14 | **Closes when** the pull request has passed `challenge` and `build`, and one existing proof (say S-9's or S-10's) is shortened by using it. |
| 15 | |
| 16 | **What it does not show.** Any result about P or NP by itself. |