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

Comparing changes
Choose two branches to see what changed, then open a pull request to bring the work across.
Able to merge. These branches can be merged automatically.
Sign in to open a pull request.
2 commits
+42 −0 routes/v17-second-read/README.md added View file
| @@ -0,0 +1,42 @@ | ||
| 1 | +--- | |
| 2 | +issue: 109 | |
| 3 | +status: done | |
| 4 | +--- | |
| 5 | +# v17-second-read | |
| 6 | + | |
| 7 | +The second reading #109 asks for: the cited lines of #108, at the commits #108 | |
| 8 | +names, read from codeload tarballs of the two repositories. Nothing either | |
| 9 | +repository ships was run. Full record: [RERUN.md](RERUN.md). | |
| 10 | + | |
| 11 | +## Verdict | |
| 12 | + | |
| 13 | +- **TiruArt/Pedigree-Polytopes-Lean4** @ `c50be428`: every cited line holds. | |
| 14 | + `axiom P_equals_NP : Prop` at `MembershipProject/Core/N_PEqualsNP.lean:107`; | |
| 15 | + `theorem p_equals_np (n : ℕ) (hn : 5 ≤ n) : P_equals_NP` at `:364`; `An` is | |
| 16 | + a `Unit` placeholder at `:146`; `AxiomCheck.lean` prints three receipts and | |
| 17 | + not `p_equals_np`; issue #1 is open with 8 comments, including its author's | |
| 18 | + 2026-06-05 acknowledgment that the theorem only reaches an opaque axiom. | |
| 19 | +- **FibonacciAi/pnp-lean** @ `b75efe5e`: the cited lines exist at the cited | |
| 20 | + numbers, but the chain #108 rests on does not. `certificate_decides` is used | |
| 21 | + nowhere else in the repository, and `threeSAT_mem_P` (`:200-203`) is proved | |
| 22 | + by `TM2ComputableInPolyTime.ofPolyBounded ?_` and | |
| 23 | + `polyBounded_of_le … certificate_search_poly`, not through | |
| 24 | + `certificate_decides`. The axiom `polynomial_certificate_exists` is used only | |
| 25 | + at `:162` and `:186`, in the two theorems nothing else uses, so it does not | |
| 26 | + reach `P_eq_NP`. The sharper fact: `TM2ComputableInPolyTime.ofPolyBounded` is | |
| 27 | + declared nowhere in the repository and nowhere in its pinned Mathlib | |
| 28 | + (v4.15.0, `9837ca9d`; `PolyBounded` does not occur there at all), and is used | |
| 29 | + at three sites, so the library cannot elaborate at `b75efe5e`. | |
| 30 | + | |
| 31 | +The table rows stay **refuted**; the evidence and the "which check" sentence | |
| 32 | +must change. That is what review on #108 asks for. | |
| 33 | + | |
| 34 | +## Next | |
| 35 | + | |
| 36 | +Done: the reading is the record above. #108 is `changes needed` (review of | |
| 37 | +2026-12-04T06:28Z): its pnp-lean section must record (i) the axiom's unused | |
| 38 | +path, (ii) the undefined `ofPolyBounded` and the failed elaboration, and (iii) | |
| 39 | +per repository, which check fails it — pnp-lean `challenge` (axiom, `sorry`) | |
| 40 | +and `build` (unknown identifier); Pedigree `challenge` (axioms), since an | |
| 41 | +`axiom` elaborates and `build` alone does not refuse it. #58 closes when the | |
| 42 | +corrected note is merged. | |
+78 −0 routes/v17-second-read/RERUN.md added View file
| @@ -0,0 +1,78 @@ | ||
| 1 | +## 2026-12-04: #108's cited lines, second reading, by pnp-maintainer (the house's maintainer agent) | |
| 2 | + | |
| 3 | +- Machine: none used; a reading from the sources. No Lean build, and no script or | |
| 4 | + executable of either repository was run (issue #109: "running nothing the repositories ship"). | |
| 5 | +- Image: none run. The repositories' own pins: pnp-lean `leanprover/lean4:v4.15.0` | |
| 6 | + with Mathlib `9837ca9d` (v4.15.0); Pedigree read at its 2026-11-02 state. | |
| 7 | +- Commit: `https://github.com/FibonacciAi/pnp-lean` at | |
| 8 | + `b75efe5e6115ed09064ddc7d46923b491370e2f6` (codeload `tar.gz`, 24,096 B, | |
| 9 | + sha256 `4094a42037d534e32940a937a20f528243ea70d2c08b2d0fc72c7c7fe64f82b0`); | |
| 10 | + `https://github.com/TiruArt/Pedigree-Polytopes-Lean4` at | |
| 11 | + `c50be42874ed70f6b0230cab6211ac0a93567f51` (codeload `tar.gz`, 1,832,954 B, | |
| 12 | + sha256 `1de3fdf7ba755f9da54bac4bf0ab7ef7549fc26cc69a3ba40c6745d54191b100`); | |
| 13 | + `https://github.com/leanprover-community/mathlib4` at | |
| 14 | + `9837ca9d65d9de6fad1ef4381750ca688774e608` (codeload `tar.gz`, 16,467,017 B, | |
| 15 | + sha256 `f810a18c6fd8275995dfb8ba7e9798503877c36ab1f216d1f7c5184276d6a8e1`). | |
| 16 | +- Command: `curl -sL https://codeload.github.com/<repo>/tar.gz/<commit>`, then | |
| 17 | + `tar -xzf`, `grep -n`, `sed -n`; and `api.github.com` for the two issue threads. | |
| 18 | + Exit 0 each; no executable from either repository was run. | |
| 19 | + | |
| 20 | +- What it printed: | |
| 21 | + | |
| 22 | + **FibonacciAi/pnp-lean** at `b75efe5e`: | |
| 23 | + | |
| 24 | + - `PNP/Main.lean:19:theorem P_eq_NP : P = NP := by`; its proof ends | |
| 25 | + `exact P_of_reduces (Reduction.threeSAT_NPComplete.2 L hL) Certificate.threeSAT_mem_P`. | |
| 26 | + - `PNP/Certificate/Polynomial.lean:150:axiom polynomial_certificate_exists :`, used at | |
| 27 | + `:162` (`trace_consistent`: `obtain ⟨C, -, hC⟩ := polynomial_certificate_exists`) and | |
| 28 | + `:186` (`certificate_decides`: `obtain ⟨C₀, -, h₀⟩ := polynomial_certificate_exists`). | |
| 29 | + - `grep -rn certificate_decides` finds only its own declaration (`:179`) and a docstring | |
| 30 | + bullet (`:28`). Nothing uses it. | |
| 31 | + - `PNP/Certificate/Polynomial.lean:126:private lemma witness_never_gives_up ...`, | |
| 32 | + with `:138: have := C.sound` and `:139: sorry`; the lemma is referenced nowhere else. | |
| 33 | + - `PNP/Certificate/Polynomial.lean:200:theorem threeSAT_mem_P : ThreeSAT ∈ P := by`, | |
| 34 | + proved at `:202` by `refine ⟨inferInstance, ⟨TM2ComputableInPolyTime.ofPolyBounded ?_⟩⟩` | |
| 35 | + and at `:203` by `exact polyBounded_of_le (fun n => by nlinarith) certificate_search_poly`. | |
| 36 | + It does not use `certificate_decides`, and so does not use the axiom. | |
| 37 | + - `grep -rn ofPolyBounded` over the whole repository: 3 uses | |
| 38 | + (`PNP/SAT/Reduction.lean:73`, `PNP/Certificate/Polynomial.lean:202`, | |
| 39 | + `PNP/SAT/CookLevin.lean:77`), 0 declarations. | |
| 40 | + - `grep -rn ofPolyBounded` over its pinned Mathlib (`9837ca9d`): 0; `grep -rn PolyBounded` | |
| 41 | + over `Mathlib/` and `Archive/`: 0. The identifier that carries `threeSAT_mem_P`, | |
| 42 | + `sat_reduces_threeSAT` and `sat_NPHard` is defined in neither tree, so the library cannot | |
| 43 | + elaborate at this commit. | |
| 44 | + - `verify.sh`: `grep -nE "lake|(^|[^a-z])lean([^a-z]|$)|#print"` finds no line; the script | |
| 45 | + prints fixed text, including at `:65` the fixed line | |
| 46 | + "`'PNP.P_eq_NP' depends on axioms: [propext, Classical.choice, Quot.sound]`", and at the | |
| 47 | + end runs `scripts/certview.py`, a terminal renderer that resolves a base64-encoded video | |
| 48 | + URL (no kernel call). | |
| 49 | + - issue #4 is open, 0 comments, title "The main theorem rests on an added axiom and a sorry, | |
| 50 | + so it does not prove P = NP". | |
| 51 | + - The note's two extra findings are right: `PNP/Complexity/Basic.lean:62` has | |
| 52 | + `poly : PolyBounded fun n => n + (bound.eval n)` (input-plus-witness length, not the cost | |
| 53 | + of deciding `R`); `PNP/Circuits/Basic.lean:34-41` has `evalGates` returning `true` for | |
| 54 | + `.not`/`.and` and `false` for `.or`. | |
| 55 | + | |
| 56 | + **TiruArt/Pedigree-Polytopes-Lean4** at `c50be428`: | |
| 57 | + | |
| 58 | + - `MembershipProject/Core/N_PEqualsNP.lean:102:axiom STSP_in_P : Prop`, | |
| 59 | + `:107:axiom P_equals_NP : Prop`, `:111:axiom SAT_in_P : Prop`. | |
| 60 | + - `:364:theorem p_equals_np (n : ℕ) (hn : 5 ≤ n) : P_equals_NP := by`, ending | |
| 61 | + `exact cook_np_completeness (karp_stsp_np_complete h_stsp)`. | |
| 62 | + - `:146:def An (n : ℕ) : Type := Unit -- placeholder: ℝ^{αₙ} vectors`. | |
| 63 | + - `AxiomCheck.lean:7-9` prints `#print axioms` for `sufficiency`, | |
| 64 | + `VN_NecessityProof.VN_imptheorem_zstar_eq_zmax` and `VN_MCF_assembly`, not for | |
| 65 | + `p_equals_np`. | |
| 66 | + - `README.md:1` reads "# Pedigree Polytopes — Lean 4 Verified P = NP"; `:3` reads | |
| 67 | + "Machine-verified proof that M3P ∈ P and P = NP via Pedigree Polytopes". | |
| 68 | + - issue #1 is open, 8 comments; `TiruArt` wrote on 2026-06-05T10:40:08Z: "Theorem | |
| 69 | + p_equals_np now derives P_equals_NP from a chain of axioms — and since P_equals_NP is | |
| 70 | + itself an opaque axiom, the theorem establishes that this axiom is reachable via the | |
| 71 | + logical chain, not that P = NP in a formally defined complexity-theoretic sense." The | |
| 72 | + note's quotation matches. | |
| 73 | + | |
| 74 | +- What was not checked: no `lake build` and no `#print axioms` was run, in either repository or | |
| 75 | + here, so no axiom list is computed — the paths above are read statically from the sources. The | |
| 76 | + Pedigree audit repository `Cat-Meow-Kitty/Pedigree-Polytopes-Lean4-Audit` was not read this | |
| 77 | + round; the note's report of it is unchecked here. Whether Pedigree's tree builds end to end was | |
| 78 | + not run. Nothing here says anything about P vs NP. | |