PCP: Post's correspondence problem #
Given a list of pairs of words, is there a nonempty sequence of them whose top words and whose bottom words have the same concatenation? (Post 1946) This file carries the instance encoding – a list of domino pairs, presented as a finite structure – and its semantics; membership in RE lives in the sibling files.
The encoding #
The elements of an instance play three roles at once – dominoes, letters, and
positions inside a word – and, as in DescriptiveComplexity.FINSAT, nothing
forces those roles to be disjoint:
dommarks the dominoes: a solution is a sequence of marked elements, so everything outsidedomis junk that the semantics never reads;uAt d p csays that the top word of the dominodcarries the lettercat the positionp, andvAtthe same for its bottom word;leis a linear order on the instance. A word is a string, so an encoding of one may certainly carry the order of its own positions; there is nothing else a position could be, and the semantics has to read the order to know in which order the letters of a word come.
The positions carrying the letters of a word are not required to form an
initial segment of the order: the word of d is the sequence of its letters
at the positions used, whichever those are. A partial map from a finite linear
order to letters already is a word, canonically, so the extra condition would
be one more thing to check and to establish for the image of a reduction, and
would buy nothing.
The semantics #
DescriptiveComplexity.DecisionProblem.Holds is a predicate on every type,
finite or not, so the word of a domino may not be defined by sorting a
Finset of the universe. Instead the enumeration of the positions is an
existential: DescriptiveComplexity.Pcp.IsWordU d w says that some strictly
increasing list enumerates exactly the positions used by the top word of d
and that w carries the letters at them. Such a list is unique when it exists
(two sorted duplicate-free lists with the same members are equal), so
IsWordU d holds of at most one list, and it holds of one as soon as the used
positions are finite. The problem is then Post's on the nose
(DescriptiveComplexity.Pcp.PcpOn): a nonempty sequence of marked dominoes
whose top words and bottom words have the same concatenation.
What is and is not claimed #
RE is the logically defined class of
DescriptiveComplexity.RecursivelyEnumerable (definability in ∃SO[new]), so
membership of PCP in it is a statement about that logic. RE-hardness is the
computation-history dominoes from the halting problem
(DescriptiveComplexity.halt_ordered_fo_reduction_pcp, in
DescriptiveComplexity.Problems.Pcp.Hardness) – a machine construction of
necessity, since unlike DescriptiveComplexity.FINSAT, PCP is not the
syntactic image of any logic. Together the two halves make PCP RE-complete
and Post's problem undecidable (DescriptiveComplexity.pcp_RE_complete,
DescriptiveComplexity.pcp_not_computable, in
DescriptiveComplexity.Computability.PcpComplete).
Relation symbols of the language of Post correspondence systems.
- le : pcpRel 2
le x y: the order of the positions. - dom : pcpRel 1
dom d: the elementdis one of the dominoes. - uAt : pcpRel 3
uAt d p c: the top word of the dominodhas the lettercat the positionp. - vAt : pcpRel 3
vAt d p c: the bottom word of the dominodhas the lettercat the positionp.
Instances For
Dependency graph
Equations
- FirstOrder.Language.instDecidableEqPcpRel.decEq FirstOrder.Language.pcpRel.le FirstOrder.Language.pcpRel.le = isTrue FirstOrder.Language.instDecidableEqPcpRel.decEq._proof_1
- FirstOrder.Language.instDecidableEqPcpRel.decEq FirstOrder.Language.pcpRel.dom FirstOrder.Language.pcpRel.dom = isTrue FirstOrder.Language.instDecidableEqPcpRel.decEq._proof_2
- FirstOrder.Language.instDecidableEqPcpRel.decEq FirstOrder.Language.pcpRel.uAt FirstOrder.Language.pcpRel.uAt = isTrue FirstOrder.Language.instDecidableEqPcpRel.decEq._proof_3
- FirstOrder.Language.instDecidableEqPcpRel.decEq FirstOrder.Language.pcpRel.uAt FirstOrder.Language.pcpRel.vAt = isFalse FirstOrder.Language.instDecidableEqPcpRel.decEq._proof_4
- FirstOrder.Language.instDecidableEqPcpRel.decEq FirstOrder.Language.pcpRel.vAt FirstOrder.Language.pcpRel.uAt = isFalse FirstOrder.Language.instDecidableEqPcpRel.decEq._proof_5
- FirstOrder.Language.instDecidableEqPcpRel.decEq FirstOrder.Language.pcpRel.vAt FirstOrder.Language.pcpRel.vAt = isTrue FirstOrder.Language.instDecidableEqPcpRel.decEq._proof_6
Instances For
Dependency graph
Dependency graph
The relational vocabulary of Post correspondence systems: marked dominoes carrying two words each, over a universe ordered by the order of the positions of those words.
Equations
- FirstOrder.Language.pcp = { Functions := fun (x : ℕ) => Empty, Relations := FirstOrder.Language.pcpRel }
Instances For
Dependency graph
Dependency graph
The order symbol of the positions.
Instances For
Dependency graph
The symbol marking the dominoes.
Instances For
Dependency graph
The symbol giving the letters of the top words.
Instances For
Dependency graph
The symbol giving the letters of the bottom words.
Instances For
Dependency graph
Reading the encoding #
x precedes y in the order of the positions.
Equations
Instances For
Dependency graph
x strictly precedes y in the order of the positions.
Equations
- DescriptiveComplexity.Pcp.OrdLt x y = (DescriptiveComplexity.Pcp.Ord x y ∧ x ≠ y)
Instances For
Dependency graph
The element d is one of the dominoes.
Equations
Instances For
Dependency graph
The top word of the domino d has the letter c at the position p.
Equations
Instances For
Dependency graph
The bottom word of the domino d has the letter c at the position
p.
Equations
Instances For
Dependency graph
The position p carries a letter of the top word of the domino d.
Equations
- DescriptiveComplexity.Pcp.UsedU d p = ∃ (c : A), DescriptiveComplexity.Pcp.UAt d p c
Instances For
Dependency graph
The position p carries a letter of the bottom word of the domino d.
Equations
- DescriptiveComplexity.Pcp.UsedV d p = ∃ (c : A), DescriptiveComplexity.Pcp.VAt d p c
Instances For
Dependency graph
Well-formedness #
Little is required of an instance, and all of it is first-order: the order
symbol is a linear order, and each of the two word relations is functional in
the position. Functionality is the only shape condition, and it cannot be
dispensed with – without it a “word” would carry a set of letters at some
position rather than a letter, and the letters that the two concatenations of
a solution must agree on would not be determined by the instance. Nothing is
required of the dominoes: an element outside dom may carry whatever letters
it likes, since no solution ever names it.
Well-formedness of a Post correspondence system: the order symbol is a linear order, and each domino carries at most one letter at each position of each of its two words.
- ord_refl (x : A) : Ord x x
The order of the positions is reflexive.
The order of the positions is transitive.
The order of the positions is antisymmetric.
The order of the positions is total.
A top word has at most one letter at each position.
A bottom word has at most one letter at each position.
Instances For
Dependency graph
The words of a domino #
The word of a domino is the sequence of its letters, read in the order of the positions carrying them. The enumeration of those positions is an existential rather than a construction, so that the definition needs no finiteness of the universe: a strictly increasing list whose members are exactly the used positions, together with the letters at them.
The top word of the domino d is w: some strictly increasing list
enumerates exactly the positions used by the top word of d, and w carries
the letters at them.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The bottom word of the domino d is w, as in
DescriptiveComplexity.Pcp.IsWordU.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The problem #
The system has a match: the instance is well-formed and there is a nonempty sequence of dominoes whose top words and whose bottom words have the same concatenation.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Isomorphism-invariance #
Everything the semantics reads is a relation of the instance, so an
isomorphism transports it: the sequence of dominoes and the two lists of words
are carried over by List.map, and the enumerations of the positions with
them. Only one direction is proved; the converse is the same statement at the
inverse isomorphism.
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The same transports read backwards, at the inverse isomorphism: the shape
every field of DescriptiveComplexity.Pcp.isWF_map needs.
Dependency graph
Dependency graph
Dependency graph
Well-formedness transports along an isomorphism.
Dependency graph
Transporting lists #
Two small facts about lists, stated for arbitrary relations because the words
and the sequence of dominoes need them at four different instances: a sorted
list stays sorted under a map preserving the order, and List.Forall₂ is
functorial.
Dependency graph
Dependency graph
The top word of a domino transports along an isomorphism.
Dependency graph
The bottom word of a domino transports along an isomorphism.
Dependency graph
The problem transports along an isomorphism (one direction; the converse
is this statement at e.symm).
Dependency graph
PCP: Post's correspondence problem – has this list of domino pairs a match? (Post 1946) The second problem of the catalog whose certificate is unbounded in the instance, and the first whose certificate is a sequence rather than a structure.
Equations
- DescriptiveComplexity.PCP = { Holds := fun (A : Type) (x : FirstOrder.Language.pcp.Structure A) => DescriptiveComplexity.Pcp.PcpOn A, iso_invariant := @DescriptiveComplexity.PCP._proof_1 }