Draft — mutable and not usable as a dependency; its citation marks the draft state.

Lax251941.PostCorrespondenceReduction

The acceptance problem reduces to the Post correspondence problem

concepts/Lax251941/PostCorrespondenceReduction.lean · lax-251941

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Concept map

    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Evidence

    Each proof establishes this claim relative to its assumptions.

    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 MM and an input ww one constructs, by Sipser's seven kinds of dominos, an instance whose matches are exactly the accepting computation histories of MM on ww — the strings #C1#C2##Ck#\#\,C_1\,\#\,C_2\,\#\cdots\#\,C_k\,\# of consecutive configurations from q0wq_0 w 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 \star 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

    1import Mathlib.Computability.Halting
    2import Lax251941.TuringMachines
    3import Lax251941.PostCorrespondence
    4
    5/-!
    6---
    7title: The acceptance problem reduces to the Post correspondence problem
    8type: theorem
    9---
    10If the Post correspondence problem were decidable, then the acceptance problem
    11for Turing machines would be decidable as well (Sipser, Theorem 5.15, as a
    12many-one reduction). From a machine MM and an input ww one constructs, by
    13Sipser's seven kinds of dominos, an instance whose matches are exactly the
    14accepting computation histories of MM on ww — the strings
    15#C1#C2##Ck#\#\,C_1\,\#\,C_2\,\#\cdots\#\,C_k\,\# of consecutive configurations from
    16q0wq_0 w to a configuration in the accept state, each obtained from the previous
    17one by a step of the machine; the passage through the modified problem, in
    18which a match must start with the first domino, is the \star trick. The
    19construction is effective, indeed primitive recursive, which is the part of the
    20argument that the textbook takes for granted.
    21
    22# Formalization notes
    23
    24Both problems are stated over the alphabet `ℕ` with mathlib's
    25`ComputablePred`: Sipser's instance is built over the alphabet `Sym` of
    26configurations and histories, and the proof transports it to `ℕ` along an
    27injective encoding of `Sym`, which preserves and reflects the existence of a
    28match.
    29-/
    30
    31namespace Lax251941.PostCorrespondenceReduction
    32
    33open Lax251941.TuringMachines Lax251941.PostCorrespondence
    34
    35/-- A decision procedure for the Post correspondence problem would decide the
    36acceptance problem for Turing machines. -/
    37axiom computablePred_accepts_of_hasMatch
    38 (h : ComputablePred fun P : Inst ℕ => HasMatch P) :
    39 ComputablePred fun p : TM × List ℕ => p.1.Accepts p.2
    40
    41end Lax251941.PostCorrespondenceReduction
    42
    Show Proof

    Formalization notes

    Both problems are stated over the alphabet N with mathlib's ComputablePredComputablePred: Sipser's instance is built over the alphabet SymSym of configurations and histories, and the proof transports it to N along an injective encoding of SymSym, which preserves and reflects the existence of a match.

    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

    Loading discussion…