5bdcd988 / ROADMAP.md

1# Roadmap
2
3Each 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
5name, and its statement is a `def … : Prop`, never a theorem with `sorry`.
6
7## 1. Foundations — done
8
9Languages, multi-tape machines with finite control, time-bounded deciding / computing / verifying,
10the classes P and NP, polynomial-time reductions, NP-hardness and NP-completeness, and the P vs NP
11statement. Proved: P ⊆ NP, P closed under complement, reductions reflexive and transitive, P and NP
12closed under reductions, an NP-complete language is in P iff P = NP.
13
14## 2. Examples — done
15
16Concrete machines for small languages over `Bool` (the empty word, "starts with `true`"), with their
17time bounds proved by running them. Shows the definitions are inhabited by real machines, not only by
18constructions.
19
20Done 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
22empty word and the non-empty words, all from one machine that reads a single cell.
23
24## 3. Output length from running time
25
26Prove that a machine running `t` steps on input `x` leaves no non-blank cell outside `[-t, |x| + t)`,
27hence `|f x| ≤ |x| + T |x|` for a machine computing `f` within `T`. Then drop the explicit output
28bound from `PolyTimeComputable`.
29
30Done when: `PolyTimeComputable` has no output-length field and every theorem still builds.
31
32## 4. Short certificates suffice
33
34Prove a locality lemma (a run of `t` steps reads only cells within distance `t` of where the heads
35started) 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
40Formulas 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
45Define `SAT : Language Bool` (the encodings of satisfiable CNF formulas) and build a verifier: the
46certificate 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)`
51proved. Stating it is cheap; it is listed separately so that it is never mistaken for a proof.
52
53## 8. Cook–Levin, proved
54
55The tableau construction: from a verifier and an input, a CNF formula whose satisfying assignments are
56accepting runs, computed in polynomial time.
57
58## 9. Alphabet independence
59
60P and NP over `Bool` correspond to P and NP over any finite alphabet with at least two symbols, via
61block encodings. Until then `PEqNP` is stated over `Bool` only.
62
63## Not on the roadmap
64
65A proof of P ≠ NP or of P = NP. This project formalizes the question; it does not claim an answer.