Documentation

DescriptiveComplexity.Problems.Pcp.Defs

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:

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 element d is one of the dominoes.

  • uAt : pcpRel 3

    uAt d p c: the top word of the domino d has the letter c at the position p.

  • vAt : pcpRel 3

    vAt d p c: the bottom word of the domino d has the letter c at the position p.

Instances For
    Dependency graph
    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
    Instances For
      Dependency graph
      Dependency graph
      @[reducible, inline]

      The order symbol of the positions.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        The symbol marking the dominoes.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The symbol giving the letters of the top words.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            The symbol giving the letters of the bottom words.

            Equations
            Instances For
              Dependency graph

              Reading the encoding #

              Dependency graph

              x strictly precedes y in the order of the positions.

              Equations
              Instances For
                Dependency graph
                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
                    Instances For
                      Dependency graph

                      The position p carries a letter of the bottom word of the domino d.

                      Equations
                      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.

                        • ord_trans (x y z : A) : Ord x yOrd y zOrd x z

                          The order of the positions is transitive.

                        • ord_antisymm (x y : A) : Ord x yOrd y xx = y

                          The order of the positions is antisymmetric.

                        • ord_total (x y : A) : Ord x y Ord y x

                          The order of the positions is total.

                        • uAt_fun (d p c c' : A) : UAt d p cUAt d p c'c = c'

                          A top word has at most one letter at each position.

                        • vAt_fun (d p c c' : A) : VAt d p cVAt d p c'c = c'

                          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.

                                theorem DescriptiveComplexity.Pcp.pairwise_map_of {α β : Type} {R : ααProp} {S : ββProp} (f : αβ) (hf : ∀ (a b : α), R a bS (f a) (f b)) {l : List α} :
                                Dependency graph
                                theorem DescriptiveComplexity.Pcp.forall₂_map_map {α β γ δ : Type} {R : αβProp} {S : γδProp} (f : αγ) (g : βδ) (hfg : ∀ (a : α) (b : β), R a bS (f a) (g b)) {l₁ : List α} {l₂ : List β} :
                                List.Forall₂ R l₁ l₂List.Forall₂ S (List.map f l₁) (List.map g l₂)
                                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
                                Instances For
                                  Dependency graph