| 1 | # Roadmap |
| 2 | |
| 3 | Each milestone ends with `lake build` passing and its new theorems added to the axiom audit |
| 4 | ([`Audit/Axioms.lean`](Audit/Axioms.lean)). A milestone that only *states* something says so in its |
| 5 | name, and its statement is a `def … : Prop`, never a theorem with `sorry`. |
| 6 | |
| 7 | ## 1. Foundations — done |
| 8 | |
| 9 | Languages, multi-tape machines with finite control, time-bounded deciding / computing / verifying, |
| 10 | the classes P and NP, polynomial-time reductions, NP-hardness and NP-completeness, and the P vs NP |
| 11 | statement. Proved: P ⊆ NP, P closed under complement, reductions reflexive and transitive, P and NP |
| 12 | closed under reductions, an NP-complete language is in P iff P = NP. |
| 13 | |
| 14 | ## 2. Examples — done |
| 15 | |
| 16 | Concrete machines for small languages over `Bool` (the empty word, "starts with `true`"), with their |
| 17 | time bounds proved by running them. Shows the definitions are inhabited by real machines, not only by |
| 18 | constructions. |
| 19 | |
| 20 | Done when: at least two concrete languages are proved in P by explicit machines. Done in |
| 21 | [`PvsNP/Examples/FirstSymbol.lean`](PvsNP/Examples/FirstSymbol.lean): "starts with `true`", the |
| 22 | empty word and the non-empty words, all from one machine that reads a single cell. |
| 23 | |
| 24 | ## 3. Output length from running time |
| 25 | |
| 26 | Prove that a machine running `t` steps on input `x` leaves no non-blank cell outside `[-t, |x| + t)`, |
| 27 | hence `|f x| ≤ |x| + T |x|` for a machine computing `f` within `T`. Then drop the explicit output |
| 28 | bound from `PolyTimeComputable`. |
| 29 | |
| 30 | Done when: `PolyTimeComputable` has no output-length field and every theorem still builds. |
| 31 | |
| 32 | ## 4. Short certificates suffice |
| 33 | |
| 34 | Prove a locality lemma (a run of `t` steps reads only cells within distance `t` of where the heads |
| 35 | started) and conclude: if `V` verifies `L` within `T`, then `x ∈ L ↔ ∃ w, |w| ≤ T |x| ∧ V accepts |
| 36 | (x, w)`. This connects the Sipser-style definition to the textbook one with an explicit length bound. |
| 37 | |
| 38 | ## 5. Boolean formulas |
| 39 | |
| 40 | Formulas and CNF over variables `Nat`, assignments, evaluation, and an encoding of CNF formulas as |
| 41 | `List Bool` with a proof that decoding inverts encoding. |
| 42 | |
| 43 | ## 6. SAT ∈ NP |
| 44 | |
| 45 | Define `SAT : Language Bool` (the encodings of satisfiable CNF formulas) and build a verifier: the |
| 46 | certificate is an assignment, and the verifier evaluates the formula in polynomial time. |
| 47 | |
| 48 | ## 7. Cook–Levin, stated |
| 49 | |
| 50 | `def CookLevin : Prop := NPComplete SAT`, with the consequence `CookLevin → (PNeNP ↔ ¬ InP SAT)` |
| 51 | proved. Stating it is cheap; it is listed separately so that it is never mistaken for a proof. |
| 52 | |
| 53 | ## 8. Cook–Levin, proved |
| 54 | |
| 55 | The tableau construction: from a verifier and an input, a CNF formula whose satisfying assignments are |
| 56 | accepting runs, computed in polynomial time. |
| 57 | |
| 58 | ## 9. Alphabet independence |
| 59 | |
| 60 | P and NP over `Bool` correspond to P and NP over any finite alphabet with at least two symbols, via |
| 61 | block encodings. Until then `PEqNP` is stated over `Bool` only. |
| 62 | |
| 63 | ## Not on the roadmap |
| 64 | |
| 65 | A proof of P ≠ NP or of P = NP. This project formalizes the question; it does not claim an answer. |