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

P-2 (#20): note the change and its verdicts; status done
Browse filesCo-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
+28 −9 routes/trial-ben-claude/p2-hierarchy-docstrings/README.md View file
| @@ -1,19 +1,38 @@ | ||
| 1 | 1 | --- |
| 2 | 2 | issue: 20 |
| 3 | -status: working | |
| 3 | +status: done | |
| 4 | 4 | --- |
| 5 | 5 | |
| 6 | 6 | # trial-ben-claude/p2-hierarchy-docstrings |
| 7 | 7 | |
| 8 | -P-2: exact docstrings for `Problems/PVersusNP/PolynomialHierarchy.lean`, plus the lemmas that hold by | |
| 9 | -unfolding: `polynomial_hierarchy_sigma_level 0 ea L ↔ InPolynomialTime ea L`, the Π level as the Σ | |
| 10 | -level of the complement, and that a language of level `k` is in `polynomial_hierarchy`. | |
| 8 | +P-2 (#20): exact docstrings for `Problems/PVersusNP/PolynomialHierarchy.lean`, plus the three lemmas | |
| 9 | +the issue names, all by unfolding. Pull request: https://shoal.club/shoal/p-vs-np/pull/65 | |
| 11 | 10 | |
| 12 | -Changes that file only. No change to `Millennium.lean`, `Tests/PVersusNP/Sanity.lean`, `checks/`, | |
| 13 | -`lakefile.toml` or the toolchain. | |
| 11 | +## What changed | |
| 12 | + | |
| 13 | +One file, `Problems/PVersusNP/PolynomialHierarchy.lean`. Each definition's docstring now says what it | |
| 14 | +literally states: the witness alphabet `β` with `fin_encoding_string β`, the | |
| 15 | +`pair_encoding ea (fin_encoding_string β)` reading of the inner language, the polynomial bound | |
| 16 | +`Polynomial.eval (ea.encode a).length p` for some `p : Polynomial ℕ`, and the quantifier over `α`, its | |
| 17 | +`Primcodable` instance and `ea` in `polynomial_hierarchy_collapses` / `polynomial_hierarchy_does_not_collapse`. | |
| 18 | + | |
| 19 | +The lemmas: | |
| 20 | + | |
| 21 | +- `polynomial_hierarchy_sigma_level_zero_iff : polynomial_hierarchy_sigma_level 0 ea L ↔ InPolynomialTime ea L` | |
| 22 | +- `polynomial_hierarchy_pi_level_iff_sigma_complement : polynomial_hierarchy_pi_level k ea L ↔ polynomial_hierarchy_sigma_level k ea (complement L)` | |
| 23 | +- `polynomial_hierarchy_sigma_level_mem : polynomial_hierarchy_sigma_level k ea L → polynomial_hierarchy ea L` | |
| 24 | + | |
| 25 | +Hypotheses: only `[Primcodable α]` and `ea : FinEncoding α`. `Iff.rfl` for the first two, `⟨k, h⟩` | |
| 26 | +for the third. | |
| 27 | + | |
| 28 | +## Verdicts on cd191b0 (the pull request's head) | |
| 29 | + | |
| 30 | +- `challenge` success: `ok: 2 challenge files and the build configuration as approved; 3 Lean files, 2264 lines, toolchain leanprover/lean4:v4.31.0` | |
| 31 | +- `build` success: `ok: lake build passes with no sorry` | |
| 14 | 32 | |
| 15 | 33 | ## Next |
| 16 | 34 | |
| 17 | -Write the docstrings so each says what its definition literally states (witness alphabet `β` with | |
| 18 | -`fin_encoding_string β`, the `Primcodable` instances, `Polynomial.eval` on `(ea.encode a).length`), then | |
| 19 | -the three `Iff`/implication lemmas by `rfl`/`⟨k, h⟩`. | |
| 35 | +The maintainer reviews pull request #65 against `AGENTS.md`: one change, the description names the | |
| 36 | +main theorem and every hypothesis, and both checks passed. Then merge. Nothing here is progress on | |
| 37 | +P vs NP itself; S-4 (Σ₁ = NP) and V-16 (whether this quantifier form is the textbook hierarchy) stay | |
| 38 | +open. | |