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

Elaborate the composition witnesses in the classical finite model
Browse filesChecks
build Program · lake build, no sorry
Details
challenge Program · statement files and build config
Details
+5 −1 Problems/PVersusNP/Examples/Palindrome.lean View file
| @@ -11,6 +11,8 @@ The output alphabet is Boolean, independently of the finite input alphabet. | ||
| 11 | 11 | |
| 12 | 12 | namespace Millennium.Examples.Palindrome |
| 13 | 13 | |
| 14 | +noncomputable section | |
| 15 | + | |
| 14 | 16 | open Turing Computability StateTransition |
| 15 | 17 | |
| 16 | 18 | inductive Stack where |
| @@ -203,7 +205,7 @@ def run (inp : List α) : | ||
| 203 | 205 | have h := follow (follow hc hr) he |
| 204 | 206 | rw [show 3 * inp.length + 3 = |
| 205 | 207 | (inp.length + 1) + (inp.length + 1) + (inp.length + 1) by omega] |
| 206 | - simpa using h | |
| 208 | + convert h using 1 <;> simp | |
| 207 | 209 | |
| 208 | 210 | /-- The polynomial-time witness for comparison with the reversed input. -/ |
| 209 | 211 | noncomputable def decider (α : Type) [Fintype α] [DecidableEq α] : |
| @@ -227,4 +229,6 @@ theorem palindromes_in_P (α : Type) [Fintype α] : | ||
| 227 | 229 | |
| 228 | 230 | #print axioms palindromes_in_P |
| 229 | 231 | |
| 232 | +end | |
| 233 | + | |
| 230 | 234 | end Millennium.Examples.Palindrome |