← All papers
First page of A detailed verification of Neary's PCP(5) construction

A detailed verification of Neary's PCP(5) construction

Vesa Halava

cs.FL Nov 22, 2026 · v2 cs.LO
A companion Lean formalization proves the constructed binary PCP instance has five pairs and is solvable iff the source machine halts.
Neary proved that the Post correspondence problem remains undecidable for instances with five pairs of words. We give a detailed verification of his construction. We first verify the undecidability of the restricted binary tag-system halting problem used in the reduction. We then prove both directions of the reduction to the five-pair problem, using the longer closing pair proposed by Rote. In particular, we show that every solution of the constructed PCP instance yields a halting computation of the simulated tag system. A companion Lean development verifies that the constructed PCP instance has exactly five pairs and admits a solution if and only if the source machine halts.

Neary proved that the Post correspondence problem with five pairs (PCP(5)) over a binary alphabet is undecidable, using binary tag systems. A detailed check of both directions of this reduction, in particular that every PCP solution yields a halting tag computation, was lacking.

The paper first verifies undecidability of the restricted binary tag-system halting problem, starting from a Turing machine and going through clockwise Turing machines and cyclic tag systems. It modifies one doubling pass in the Neary–Woods simulation. It then builds five binary pairs, using Rote's longer closing pair, and proves both directions of the reduction by analyzing blocks of zeros and lower overhangs. A companion Lean development, built with Lean agents provided by AgentFormers, formalizes the end-to-end reduction.

Both directions of the five-pair reduction are proved, establishing undecidability of binary PCP(5). The Lean theorem Pcp5Lean.EndToEnd.source_halts_iff_pcp5 checks that the instance has exactly five pairs and admits a nonempty solution if and only if the source machine halts.