Lax251941.PostCorrespondenceReduction
The acceptance problem reduces to the Post correspondence problem
concepts/Lax251941/PostCorrespondenceReduction.lean · lax-251941
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Theorem
If the Post correspondence problem were decidable, then the acceptance problem for Turing machines would be decidable as well (Sipser, Theorem 5.15, as a many-one reduction). From a machine and an input one constructs, by Sipser's seven kinds of dominos, an instance whose matches are exactly the accepting computation histories of on — the strings of consecutive configurations from to a configuration in the accept state, each obtained from the previous one by a step of the machine; the passage through the modified problem, in which a match must start with the first domino, is the trick. The construction is effective, indeed primitive recursive, which is the part of the argument that the textbook takes for granted.
Lean source view on GitHub
| 1 | import Mathlib.Computability.Halting |
| 2 | import Lax251941.TuringMachines |
| 3 | import Lax251941.PostCorrespondence |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: The acceptance problem reduces to the Post correspondence problem |
| 8 | type: theorem |
| 9 | --- |
| 10 | If the Post correspondence problem were decidable, then the acceptance problem |
| 11 | for Turing machines would be decidable as well (Sipser, Theorem 5.15, as a |
| 12 | many-one reduction). From a machine and an input one constructs, by |
| 13 | Sipser's seven kinds of dominos, an instance whose matches are exactly the |
| 14 | accepting computation histories of on — the strings |
| 15 | of consecutive configurations from |
| 16 | to a configuration in the accept state, each obtained from the previous |
| 17 | one by a step of the machine; the passage through the modified problem, in |
| 18 | which a match must start with the first domino, is the trick. The |
| 19 | construction is effective, indeed primitive recursive, which is the part of the |
| 20 | argument that the textbook takes for granted. |
| 21 | |
| 22 | # Formalization notes |
| 23 | |
| 24 | Both problems are stated over the alphabet `ℕ` with mathlib's |
| 25 | `ComputablePred`: Sipser's instance is built over the alphabet `Sym` of |
| 26 | configurations and histories, and the proof transports it to `ℕ` along an |
| 27 | injective encoding of `Sym`, which preserves and reflects the existence of a |
| 28 | match. |
| 29 | -/ |
| 30 | |
| 31 | namespace Lax251941.PostCorrespondenceReduction |
| 32 | |
| 33 | open Lax251941.TuringMachines Lax251941.PostCorrespondence |
| 34 | |
| 35 | /-- A decision procedure for the Post correspondence problem would decide the |
| 36 | acceptance problem for Turing machines. -/ |
| 37 | axiom computablePred_accepts_of_hasMatch |
| 38 | (h : ComputablePred fun P : Inst ℕ => HasMatch P) : |
| 39 | ComputablePred fun p : TM × List ℕ => p.1.Accepts p.2 |
| 40 | |
| 41 | end Lax251941.PostCorrespondenceReduction |
| 42 |
Formalization notes
Both problems are stated over the alphabet with mathlib's : Sipser's instance is built over the alphabet of configurations and histories, and the proof transports it to along an injective encoding of , which preserves and reflects the existence of a match.
Used by
none
From Mathlib
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments