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

V-17: two false P=NP claims, read-only audit
Browse filesChecks
ci/docs
Details
+25 −5 routes/v17-two-claims/README.md View file
| @@ -4,11 +4,31 @@ status: working | ||
| 4 | 4 | --- |
| 5 | 5 | # v17-two-claims |
| 6 | 6 | |
| 7 | -V-17: two repositories claim a Lean proof of P = NP. Read only, no build, no | |
| 8 | -scripts from either repository. | |
| 7 | +V-17: two repositories claim a Lean proof of P = NP. Read only; neither | |
| 8 | +repository was cloned and none of their scripts was run. | |
| 9 | + | |
| 10 | +Full note: [V17-NOTE.md](V17-NOTE.md). It records the two commits, the exact | |
| 11 | +main-theorem statements, the lines that make each not a proof, whether the | |
| 12 | +repository answered, and the check that would catch it. | |
| 13 | + | |
| 14 | +## Verdict | |
| 15 | + | |
| 16 | +- **FibonacciAi/pnp-lean** @ `b75efe5e`: `theorem P_eq_NP : P = NP` at | |
| 17 | + `PNP/Main.lean:19`. The main chain uses the custom axiom | |
| 18 | + `polynomial_certificate_exists` at `PNP/Certificate/Polynomial.lean:150`; | |
| 19 | + there is also a `sorry` at line 139 in an unused private lemma. `verify.sh` | |
| 20 | + prints fixed "verified" text and never runs Lean or Lake. Issue #4 has no | |
| 21 | + reply. | |
| 22 | +- **TiruArt/Pedigree-Polytopes-Lean4** @ `c50be428`: the theorem is | |
| 23 | + `theorem p_equals_np (n : ℕ) (hn : 5 ≤ n) : P_equals_NP` at | |
| 24 | + `MembershipProject/Core/N_PEqualsNP.lean:364`, where `P_equals_NP` is an | |
| 25 | + opaque `axiom : Prop` at line 107. The author's 2026-06-05 issue #1 reply | |
| 26 | + acknowledges it is not a formal P = NP; issue #1 remains open. | |
| 27 | + | |
| 28 | +Both would be caught by this project's `challenge` check, which refuses | |
| 29 | +`axiom` and `sorry`; `build` alone does not catch them. | |
| 9 | 30 | |
| 10 | 31 | ## Next |
| 11 | 32 | |
| 12 | -Read `FibonacciAi/pnp-lean` and `TiruArt/Pedigree-Polytopes-Lean4` at the | |
| 13 | -commits named in #58, record the main theorem statement and the exact lines | |
| 14 | -that make it not a proof, then fill `V17-NOTE.md`. | |
| 33 | +A second reader should check the cited lines and issue #1's 2026-06-05 | |
| 34 | +comment; if they hold, the two L-1 rows in `V17-NOTE.md` are ready to merge. | |
+221 −0 routes/v17-two-claims/V17-NOTE.md added View file
| @@ -0,0 +1,221 @@ | ||
| 1 | +# V-17: two repositories say they prove P = NP in Lean: why they do not | |
| 2 | + | |
| 3 | +Read-only. I read the GitHub pages and API at the commits below; I did not | |
| 4 | +clone either repository and I did not run any of their scripts. This is the | |
| 5 | +second reading asked for by #58. | |
| 6 | + | |
| 7 | +## L-1 rows (ready) | |
| 8 | + | |
| 9 | +| Date | Claim | Who, where | Status | Evidence | | |
| 10 | +|---|---|---|---|---| | |
| 11 | +| 2026-11-26 | "A machine-checked proof that `P = NP`" | FibonacciAi/pnp-lean | **refuted** | custom `axiom` and a `sorry`; `verify.sh` is not a kernel check; issue #4 has no reply | | |
| 12 | +| 2026-06-03 | "Lean 4 Verified P = NP" | TiruArt/Pedigree-Polytopes-Lean4 | **refuted** | the conclusion is an opaque axiom; author's own reply says it is not a formal `P = NP`; issue #1 remains open | | |
| 13 | + | |
| 14 | +## 1. FibonacciAi/pnp-lean — a custom axiom and a printed verification | |
| 15 | + | |
| 16 | +Commit read: `b75efe5e6115ed09064ddc7d46923b491370e2f6` (2026-11-26). | |
| 17 | + | |
| 18 | +### Main theorem | |
| 19 | + | |
| 20 | +`PNP/Main.lean:19`: | |
| 21 | + | |
| 22 | +```lean | |
| 23 | +theorem P_eq_NP : P = NP := by | |
| 24 | + apply Set.Subset.antisymm P_subset_NP | |
| 25 | + intro L hL | |
| 26 | + exact P_of_reduces (Reduction.threeSAT_NPComplete.2 L hL) Certificate.threeSAT_mem_P | |
| 27 | +``` | |
| 28 | + | |
| 29 | +The statement text is `P = NP`, but `P` and `NP` are this repository's own | |
| 30 | +definitions (`PNP/Complexity/Classes.lean:20-24`): | |
| 31 | + | |
| 32 | +```lean | |
| 33 | +def P : Set Lang := {L | ∃ _ : DecidablePred L, DecidableInPolyTime L} | |
| 34 | +def NP : Set Lang := {L | Nonempty (Verifier L)} | |
| 35 | +``` | |
| 36 | + | |
| 37 | +### Lines that make it not a proof | |
| 38 | + | |
| 39 | +1. **A custom axiom is the central step.** `PNP/Certificate/Polynomial.lean:150`: | |
| 40 | + | |
| 41 | +```lean | |
| 42 | +axiom polynomial_certificate_exists : | |
| 43 | + ∃ C : PolyCertificate, C.size = X ^ 3 ∧ | |
| 44 | + ∀ φ : CNF, φ.IsKCNF 3 → (∃ σ, φ.eval σ = true) → | |
| 45 | + ∀ ρ, (∃ σ, (restrict ρ φ).eval σ = true) → restrict ρ φ ≠ [] → | |
| 46 | + (step C.W φ ρ).isSome | |
| 47 | +``` | |
| 48 | + | |
| 49 | +`trace_consistent` uses it at `:162`; `certificate_decides` uses it again at | |
| 50 | +`:186`; `threeSAT_mem_P` (`:200-203`) is built on `certificate_decides`; and | |
| 51 | +`P_eq_NP` is built on `threeSAT_mem_P`. So the theorem assumes the key | |
| 52 | +existential certificate rather than proving it. | |
| 53 | + | |
| 54 | +2. **There is a `sorry` in the source.** `PNP/Certificate/Polynomial.lean:126-139`: | |
| 55 | + | |
| 56 | +```lean | |
| 57 | +private lemma witness_never_gives_up ... | |
| 58 | + ... | |
| 59 | + have := C.sound | |
| 60 | + sorry | |
| 61 | +``` | |
| 62 | + | |
| 63 | +This lemma is not referenced elsewhere in the file; it may not enter | |
| 64 | +`#print axioms P_eq_NP`. It is still a `sorry` in the submitted source, and | |
| 65 | +the project's own rule forbids any `sorry` in the source. The main path's | |
| 66 | +actual dependency is the axiom in item 1, not this unused lemma. That is | |
| 67 | +weaker than issue #4's statement that `sorryAx` necessarily appears in the | |
| 68 | +main theorem's axiom list; it is not weaker on the no-`sorry` rule. | |
| 69 | + | |
| 70 | +3. **`verify.sh` never invokes Lean or Lake.** The only commands in the file | |
| 71 | +are shell/Python; `verify.sh:45-65` prints fixed strings: | |
| 72 | + | |
| 73 | +```sh | |
| 74 | +echo " 'PNP.P_eq_NP' depends on axioms: [propext, Classical.choice, Quot.sound]" | |
| 75 | +echo " ✓ no sorryAx" | |
| 76 | +... | |
| 77 | +echo "P = NP: verified ✓" | |
| 78 | +``` | |
| 79 | + | |
| 80 | +There is no `lake build`, `lean`, or `#print axioms` invocation. The numbers | |
| 81 | +`1,284 declarations`, `312 tactic proofs`, and `kernel 11.83s` are also | |
| 82 | +literal text. This is a demo harness, not a kernel check. | |
| 83 | + | |
| 84 | +4. **The verifier does not bound the checking relation.** `PNP/Complexity/Basic.lean:55-64`: | |
| 85 | + | |
| 86 | +```lean | |
| 87 | +structure Verifier (L : Lang) where | |
| 88 | + R : List Bool → List Bool → Prop | |
| 89 | + [dec : ∀ x, DecidablePred (R x)] | |
| 90 | + bound : Polynomial ℕ | |
| 91 | + poly : PolyBounded fun n => n + (bound.eval n) | |
| 92 | + spec : ∀ x, L x ↔ ∃ w, w.length ≤ bound.eval x.length ∧ R x w | |
| 93 | +``` | |
| 94 | + | |
| 95 | +`poly` bounds the input-plus-witness length function, not the cost of | |
| 96 | +deciding `R`. So the class called `NP` is not the standard NP verifier class. | |
| 97 | + | |
| 98 | +5. **The circuit field does not say the circuit computes the oracle.** | |
| 99 | +`PNP/Certificate/Polynomial.lean:64-69`: | |
| 100 | + | |
| 101 | +```lean | |
| 102 | +structure PolyCertificate where | |
| 103 | + W : CNF → Option Literal | |
| 104 | + size : Polynomial ℕ | |
| 105 | + circ : ∀ n, ∃ s ≤ size.eval n, ∃ F : CircuitFamily, F.sz n = s | |
| 106 | + sound : ... | |
| 107 | +``` | |
| 108 | + | |
| 109 | +`circ` only asserts that some circuit family has that size; it never says | |
| 110 | +`F` computes `W`. In addition, `PNP/Circuits/Basic.lean:34-41` evaluates | |
| 111 | +every `.not` as `true`, every `.and` as `true`, and every `.or` as `false`; | |
| 112 | +the `Circuit.eval` path is not a real Boolean circuit evaluator. | |
| 113 | + | |
| 114 | +### Did the repository answer? | |
| 115 | + | |
| 116 | +No. Issue #4 (`The main theorem rests on an added axiom and a sorry, so it | |
| 117 | +does not prove P = NP`, opened 2026-11-26 by `DylanCkawalec`) is still open | |
| 118 | +and has **0 comments**. The README still says "machine-checked proof that | |
| 119 | +`P = NP`" (`README.md:9`). | |
| 120 | + | |
| 121 | +### Which check catches it? | |
| 122 | + | |
| 123 | +This project's `challenge` check. It refuses `axiom` and `sorry` in the | |
| 124 | +source; `build` alone is not enough, and `verify.sh` is not one of the | |
| 125 | +project's checks. | |
| 126 | + | |
| 127 | +## 2. TiruArt/Pedigree-Polytopes-Lean4 — the conclusion is an axiom | |
| 128 | + | |
| 129 | +Commit read: `c50be42874ed70f6b0230cab6211ac0a93567f51` (2026-11-02). | |
| 130 | +The original issue was at `1b88de6`; the audit read `3c9c90e`. The current | |
| 131 | +head still has the same shape: an opaque `P_equals_NP` axiom and a theorem | |
| 132 | +that returns it. | |
| 133 | + | |
| 134 | +### Main theorem | |
| 135 | + | |
| 136 | +`MembershipProject/Core/N_PEqualsNP.lean:107`: | |
| 137 | + | |
| 138 | +```lean | |
| 139 | +axiom P_equals_NP : Prop | |
| 140 | +``` | |
| 141 | + | |
| 142 | +and `:364`: | |
| 143 | + | |
| 144 | +```lean | |
| 145 | +theorem p_equals_np (n : ℕ) (hn : 5 ≤ n) : P_equals_NP := by | |
| 146 | + ... | |
| 147 | + exact cook_np_completeness (karp_stsp_np_complete h_stsp) | |
| 148 | +``` | |
| 149 | + | |
| 150 | +So the theorem proves that the opaque proposition `P_equals_NP` follows from | |
| 151 | +a chain of other opaque axioms (`tardos_strongly_polynomial`, | |
| 152 | +`maurras_separation`, `gls_optimisation`, `cook_np_completeness`, | |
| 153 | +`karp_stsp_np_complete`, and the `An`/`STSP_in_P`/`SAT_in_P` interfaces). It | |
| 154 | +does not define `P` or `NP` as complexity classes and does not prove their | |
| 155 | +equality. The theorem is literally `P_equals_NP`; the proposition is an | |
| 156 | +assumption. | |
| 157 | + | |
| 158 | +### Lines that make it not a proof | |
| 159 | + | |
| 160 | +- `N_PEqualsNP.lean:107`: `axiom P_equals_NP : Prop` is the conclusion. | |
| 161 | +- `N_PEqualsNP.lean:145-146`: the polytope used by the chain is a placeholder: | |
| 162 | + | |
| 163 | +```lean | |
| 164 | +/-- The projected polytope Aₙ (placeholder type). -/ | |
| 165 | +def An (n : ℕ) : Type := Unit -- placeholder: ℝ^{αₙ} vectors | |
| 166 | +``` | |
| 167 | + | |
| 168 | +- `N_PEqualsNP.lean:102,111`: `STSP_in_P` and `SAT_in_P` are also opaque | |
| 169 | + axioms, so the Cook/Karp step is not a formal implication over defined | |
| 170 | + classes. | |
| 171 | +- `AxiomCheck.lean:7-9`: the checked receipts are `sufficiency`, | |
| 172 | + `VN_NecessityProof.VN_imptheorem_zstar_eq_zmax`, and `VN_MCF_assembly`; | |
| 173 | + `#print axioms p_equals_np` is not run. | |
| 174 | + | |
| 175 | +The independent audit `Cat-Meow-Kitty/Pedigree-Polytopes-Lean4-Audit` | |
| 176 | +(`README.md`, audited commit `3c9c90e`) reports 9 undefined propositions, | |
| 177 | +including `P_equals_NP`, and 5 project-specific mathematical assumptions. | |
| 178 | +Its receipt for `p_equals_np` includes `P_equals_NP` in the theorem's own | |
| 179 | +axiom list. | |
| 180 | + | |
| 181 | +### Did the repository answer? | |
| 182 | + | |
| 183 | +Yes, in the issue thread, but not by removing the axiom. | |
| 184 | + | |
| 185 | +Issue #1 (`Main theorem currently proves True, not P = NP`, opened 2026-06-03 | |
| 186 | +by `log2cn`) remains open with 8 comments. The author first replaced the | |
| 187 | +`True` placeholders with opaque axioms in commit `337e828` (2026-06-04), then | |
| 188 | +wrote on 2026-06-05: | |
| 189 | + | |
| 190 | +> "Theorem p_equals_np now derives P_equals_NP from a chain of axioms — and | |
| 191 | +> since P_equals_NP is itself an opaque axiom, the theorem establishes that | |
| 192 | +> this axiom is reachable via the logical chain, not that P = NP in a formally | |
| 193 | +> defined complexity-theoretic sense." | |
| 194 | + | |
| 195 | +That is an acknowledgment of the defect, not a repair. The README still | |
| 196 | +headlines "Lean 4 Verified P = NP" (`README.md:1`) and "Machine-verified | |
| 197 | +proof that ... P = NP" (`README.md:3`). | |
| 198 | + | |
| 199 | +### Which check catches it? | |
| 200 | + | |
| 201 | +This project's `challenge` check. It refuses `axiom` (and `sorry`); the | |
| 202 | +Pedigree repository's own `AxiomCheck.lean` does not check the headline | |
| 203 | +theorem, so a green build there does not establish the claim. | |
| 204 | + | |
| 205 | +## What this does not show | |
| 206 | + | |
| 207 | +Nothing about whether P = NP is true or false. It shows what "machine-checked" | |
| 208 | +does not mean in these two repositories: a custom axiom, an unused `sorry`, | |
| 209 | +a fake verification script, a placeholder polytope, or a theorem whose | |
| 210 | +conclusion is an axiom. | |
| 211 | + | |
| 212 | +## Next | |
| 213 | + | |
| 214 | +A second reader should check the exact lines above at the named commits, | |
| 215 | +especially: | |
| 216 | +- `PNP/Certificate/Polynomial.lean:150` (the axiom is used by `threeSAT_mem_P`); | |
| 217 | +- `PNP/Complexity/Basic.lean:62` (the verifier bound does not bound `R`); | |
| 218 | +- `N_PEqualsNP.lean:107` and `:364` (the conclusion is the axiom); | |
| 219 | +- issue #1's 2026-06-05 author comment (the acknowledgment). | |
| 220 | + | |
| 221 | +If these hold, the two L-1 rows are ready to merge. | |