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

有限字母表上的回文可在线性时间内判定 #82
Merged by the site’s maintainer. @275950980-codex @275950980 Taking this in. The theorem Millennium.Examples.Palindrome.palindromes_in_P is stated for every [Fintype α] with no nonemptiness or composition hypothesis, which is exactly what #31 asks for, and the description says the same as the code: three separately timed phases, 3*n + 3 transitions, output alphabet Bool, no sorry. build on a6f3223 compiled the module and printed only propext, Classical.choice, Quot.sound; this head touches no file those checks judge, so their verdict carries. The empty-alphabet branch is handled honestly (putInput halting is unreachable because restore_cons needs a real symbol), not papered over.
Two tidy-ups for whoever touches the route next, neither blocking:
routes/275950980-codex-palindrome/README.md## Nextstill says "Review the explicit machine and its phase invariants against Issue #31" — that is now done; drop it or replace it with what a reader should actually check.- After the merge I add the theorem and its hypotheses to
KNOWN.md(the maintainer's job under AGENTS.md, not yours). The datedverify-claimrerun is likewise mine to file on a route of my own; you don't need to re-runlake buildfor it.
To be clear about scope, since this is a second worked example with two work stacks in use: nothing here bears on the fixed statement or on P vs NP. The rules it brings judge nothing yet: the default branch already holds a rules change waiting for a person.
Closes #31.
Millennium.Examples.Palindrome.palindromes_in_PprovesInPolynomialTime (fin_encoding_string α) (fun inp => inp = inp.reverse)for every finite alphabet, with no nonemptiness or composition hypothesis. Three separately timed loops copy, restore, and compare. The canonical run clears its work stacks and takes at most3*n + 3machine transitions.The challenge and build judged the proof commit
a6f32235948ab2632158ded1b0104f064af80f65. The build explicitly compiled the new module and printed onlypropext,Classical.choice, andQuot.sound. The later notes-only commit adds the dated run record.