Documentation

DescriptiveComplexity.Problems.Pcp.Membership

PCP is in RE #

The syntax half of DescriptiveComplexity.Pcp.pcpOn_iff_cert: the certificate of a match is written as an ∃SO[new] sentence, the logic defining RE.

The deep conjunct is the one saying the matching reflects the lexicographic order of the two parses: eight guarded quantifiers, alternating slot and position, which is why the variables are named by their distance from their binder, exactly as in DescriptiveComplexity.Problems.CodeHalt.Membership.

Nothing here is a machine model: DescriptiveComplexity.pcp_mem_RE is a statement about the logic ∃SO[new], and it is what makes Post's problem reduce to finite satisfiability (DescriptiveComplexity.pcp_le_finsat). RE-hardness of PCP is a different matter – the computation-history dominoes of DescriptiveComplexity.Problems.Pcp.Hardness – and with it Post's problem is RE-complete (DescriptiveComplexity.pcp_RE_complete).

The second-order block #

The relation variables of the ∃SO[new] definition of PCP: the order of the slots, the domino at a slot, and the matching between the two parses.

  • sle : CertIx

    The order of the slots.

  • dm : CertIx

    The domino at a slot.

  • mt : CertIx

    The matching between the two parses.

Instances For
    Dependency graph
    Dependency graph
    @[instance_reducible]
    Equations
    • One or more equations did not get rendered due to their size.
    Dependency graph

    The single existential block of the definition.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph
      Dependency graph
      @[reducible, inline]

      A relation symbol of the instance, in the kernel's vocabulary.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

        The symbol marking the original elements.

        Equations
        Instances For
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph

          The extended universe #

          @[instance_reducible]

          The vocabulary of the instance, read on the extended universe.

          Equations
          Instances For
            Dependency graph
            @[instance_reducible]

            The structure the kernel is read in: the extended structure together with an assignment of the relation variables.

            Equations
            Instances For
              Dependency graph

              The instance, read on the extended universe #

              A relation of the instance holds on the extended universe only of original elements, and there of what it holds of in the instance – so at original arguments the kernel reads the instance itself.

              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph

              The certificate an assignment carries #

              The certificate an assignment carries: the relation variables read at the sorts they are meant for – slots among the invented values, dominoes and positions among the original elements.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Dependency graph
                @[simp]
                Dependency graph
                @[simp]
                theorem DescriptiveComplexity.Pcp.certOf_dm {A : Type} {m : } (ρ : certBlock.Assignment (A Fin m)) (s : Fin m) (d : A) :
                Dependency graph
                @[simp]
                theorem DescriptiveComplexity.Pcp.certOf_mt {A : Type} {m : } (ρ : certBlock.Assignment (A Fin m)) (s : Fin m) (p : A) (s' : Fin m) (p' : A) :
                Dependency graph

                Atomic formulas #

                An atom of a unary relation of the instance.

                Equations
                Instances For
                  Dependency graph
                  Dependency graph
                  Dependency graph
                  Dependency graph
                  noncomputable def DescriptiveComplexity.Pcp.eqF {γ : Type} (x y : γ) :

                  Equality of two variables.

                  Equations
                  Instances For
                    Dependency graph
                    Dependency graph
                    noncomputable def DescriptiveComplexity.Pcp.dmF {γ : Type} (s d : γ) :

                    The domino d sits at the slot s.

                    Equations
                    Instances For
                      Dependency graph
                      noncomputable def DescriptiveComplexity.Pcp.mtF {γ : Type} (s p s' p' : γ) :

                      The top index (s, p) is matched with the bottom index (s', p').

                      Equations
                      Instances For
                        Dependency graph
                        Dependency graph
                        Dependency graph
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.Pcp.realize_oldF {A : Type} [FirstOrder.Language.pcp.Structure A] [Nonempty A] {m : } {ρ : certBlock.Assignment (A Fin m)} {γ : Type} (x : γ) (v : γA Fin m) :
                        (oldF x).Realize v IsOld (v x)
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.Pcp.realize_eqF {A : Type} [FirstOrder.Language.pcp.Structure A] [Nonempty A] {m : } {ρ : certBlock.Assignment (A Fin m)} {γ : Type} (x y : γ) (v : γA Fin m) :
                        (eqF x y).Realize v v x = v y
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.Pcp.realize_sleF {A : Type} [FirstOrder.Language.pcp.Structure A] [Nonempty A] {m : } {ρ : certBlock.Assignment (A Fin m)} {γ : Type} (s t : γ) (v : γA Fin m) :
                        (sleF s t).Realize v ρ CertIx.sle ![v s, v t]
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.Pcp.realize_dmF {A : Type} [FirstOrder.Language.pcp.Structure A] [Nonempty A] {m : } {ρ : certBlock.Assignment (A Fin m)} {γ : Type} (s d : γ) (v : γA Fin m) :
                        (dmF s d).Realize v ρ CertIx.dm ![v s, v d]
                        Dependency graph
                        @[simp]
                        theorem DescriptiveComplexity.Pcp.realize_mtF {A : Type} [FirstOrder.Language.pcp.Structure A] [Nonempty A] {m : } {ρ : certBlock.Assignment (A Fin m)} {γ : Type} (s p s' p' : γ) (v : γA Fin m) :
                        (mtF s p s' p').Realize v ρ CertIx.mt ![v s, v p, v s', v p']
                        Dependency graph

                        Naming the symbols of the instance #

                        noncomputable def DescriptiveComplexity.Pcp.ordF {γ : Type} (x y : γ) :

                        The position x precedes the position y.

                        Equations
                        Instances For
                          Dependency graph
                          noncomputable def DescriptiveComplexity.Pcp.domF {γ : Type} (d : γ) :

                          The element d is one of the dominoes.

                          Equations
                          Instances For
                            Dependency graph
                            noncomputable def DescriptiveComplexity.Pcp.uAtF {γ : Type} (d p : γ) :

                            The top word of d carries the letter at the position p.

                            Equations
                            Instances For
                              Dependency graph
                              noncomputable def DescriptiveComplexity.Pcp.vAtF {γ : Type} (d p : γ) :

                              The bottom word of d carries the letter at the position p.

                              Equations
                              Instances For
                                Dependency graph

                                Guarded quantifiers #

                                Every quantifier of the kernel ranges over one of the two sorts of the extended universe – the elements of the instance, marked by old, and the slots – and is guarded accordingly. A variable is named by its distance from its binder.

                                @[reducible, inline]
                                abbrev DescriptiveComplexity.Pcp.up {γ : Type} (x : γ) :

                                A variable of the enclosing scope, seen from inside one guarded quantifier.

                                Equations
                                Instances For
                                  Dependency graph
                                  @[reducible, inline]

                                  The variable bound by the innermost guarded quantifier.

                                  Equations
                                  Instances For
                                    Dependency graph
                                    @[reducible, inline]

                                    The variable bound one guarded quantifier further out.

                                    Equations
                                    Instances For
                                      Dependency graph
                                      @[reducible, inline]

                                      The variable bound two guarded quantifiers further out.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        @[reducible, inline]

                                        The variable bound three guarded quantifiers further out.

                                        Equations
                                        Instances For
                                          Dependency graph
                                          @[reducible, inline]

                                          The variable bound four guarded quantifiers further out.

                                          Equations
                                          Instances For
                                            Dependency graph
                                            @[reducible, inline]

                                            The variable bound five guarded quantifiers further out.

                                            Equations
                                            Instances For
                                              Dependency graph
                                              @[reducible, inline]

                                              The variable bound six guarded quantifiers further out.

                                              Equations
                                              Instances For
                                                Dependency graph
                                                @[reducible, inline]

                                                The variable bound seven guarded quantifiers further out.

                                                Equations
                                                Instances For
                                                  Dependency graph

                                                  ∃ x, old x ∧ φ: a quantifier over the elements of the instance.

                                                  Equations
                                                  Instances For
                                                    Dependency graph
                                                    Dependency graph
                                                    Dependency graph
                                                    Dependency graph
                                                    theorem DescriptiveComplexity.Pcp.exists_inr_of_not_isOld {A : Type} {m : } {x : A Fin m} (h : ¬IsOld x) :
                                                    ∃ (j : Fin m), x = Sum.inr j
                                                    Dependency graph
                                                    @[simp]
                                                    theorem DescriptiveComplexity.Pcp.realize_exOldF {A : Type} [FirstOrder.Language.pcp.Structure A] [Nonempty A] {m : } {ρ : certBlock.Assignment (A Fin m)} {γ : Type} (φ : certLang.Formula (γ Unit)) (v : γA Fin m) :
                                                    (exOldF φ).Realize v ∃ (a : A), φ.Realize (Sum.elim v fun (x : Unit) => Sum.inl a)
                                                    Dependency graph
                                                    @[simp]
                                                    theorem DescriptiveComplexity.Pcp.realize_allOldF {A : Type} [FirstOrder.Language.pcp.Structure A] [Nonempty A] {m : } {ρ : certBlock.Assignment (A Fin m)} {γ : Type} (φ : certLang.Formula (γ Unit)) (v : γA Fin m) :
                                                    (allOldF φ).Realize v ∀ (a : A), φ.Realize (Sum.elim v fun (x : Unit) => Sum.inl a)
                                                    Dependency graph
                                                    @[simp]
                                                    theorem DescriptiveComplexity.Pcp.realize_exNewF {A : Type} [FirstOrder.Language.pcp.Structure A] [Nonempty A] {m : } {ρ : certBlock.Assignment (A Fin m)} {γ : Type} (φ : certLang.Formula (γ Unit)) (v : γA Fin m) :
                                                    (exNewF φ).Realize v ∃ (j : Fin m), φ.Realize (Sum.elim v fun (x : Unit) => Sum.inr j)
                                                    Dependency graph
                                                    @[simp]
                                                    theorem DescriptiveComplexity.Pcp.realize_allNewF {A : Type} [FirstOrder.Language.pcp.Structure A] [Nonempty A] {m : } {ρ : certBlock.Assignment (A Fin m)} {γ : Type} (φ : certLang.Formula (γ Unit)) (v : γA Fin m) :
                                                    (allNewF φ).Realize v ∀ (j : Fin m), φ.Realize (Sum.elim v fun (x : Unit) => Sum.inr j)
                                                    Dependency graph

                                                    Well-formedness of the instance #

                                                    Dependency graph

                                                    The order of the positions is transitive.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      Dependency graph

                                                      The order of the positions is antisymmetric.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        Dependency graph

                                                        The order of the positions is total.

                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For
                                                          Dependency graph

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

                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            Dependency graph

                                                            A bottom word carries at most one letter at each position.

                                                            Equations
                                                            • One or more equations did not get rendered due to their size.
                                                            Instances For
                                                              Dependency graph

                                                              The instance is a well-formed Post system: the six conditions of DescriptiveComplexity.Pcp.IsWF, conjoined.

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                Dependency graph

                                                                The shapes that repeat #

                                                                noncomputable def DescriptiveComplexity.Pcp.ordLtF {γ : Type} (x y : γ) :

                                                                The position x strictly precedes the position y.

                                                                Equations
                                                                Instances For
                                                                  Dependency graph
                                                                  noncomputable def DescriptiveComplexity.Pcp.sltF {γ : Type} (s t : γ) :

                                                                  The slot s strictly precedes the slot t.

                                                                  Equations
                                                                  Instances For
                                                                    Dependency graph
                                                                    noncomputable def DescriptiveComplexity.Pcp.usedUF {γ : Type} (d p : γ) :

                                                                    The position p carries a letter of the top word of d.

                                                                    Equations
                                                                    • One or more equations did not get rendered due to their size.
                                                                    Instances For
                                                                      Dependency graph
                                                                      noncomputable def DescriptiveComplexity.Pcp.usedVF {γ : Type} (d p : γ) :

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

                                                                      Equations
                                                                      • One or more equations did not get rendered due to their size.
                                                                      Instances For
                                                                        Dependency graph
                                                                        noncomputable def DescriptiveComplexity.Pcp.topIxF {γ : Type} (s p : γ) :

                                                                        (s, p) is an index of the top parse.

                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          Dependency graph
                                                                          noncomputable def DescriptiveComplexity.Pcp.botIxF {γ : Type} (s p : γ) :

                                                                          (s, p) is an index of the bottom parse.

                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            Dependency graph
                                                                            noncomputable def DescriptiveComplexity.Pcp.lexLtF {γ : Type} (s p t q : γ) :

                                                                            (s, p) precedes (t, q) in the lexicographic order of a parse.

                                                                            Equations
                                                                            Instances For
                                                                              Dependency graph

                                                                              The conditions on the certificate #

                                                                              Dependency graph

                                                                              The order of the slots is transitive.

                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For
                                                                                Dependency graph

                                                                                The order of the slots is antisymmetric.

                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For
                                                                                  Dependency graph

                                                                                  The order of the slots is total.

                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For
                                                                                    Dependency graph

                                                                                    The slots are linearly ordered.

                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For
                                                                                      Dependency graph
                                                                                      Dependency graph

                                                                                      Every slot carries a domino.

                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Instances For
                                                                                        Dependency graph

                                                                                        A slot carries only one domino.

                                                                                        Equations
                                                                                        • One or more equations did not get rendered due to their size.
                                                                                        Instances For
                                                                                          Dependency graph

                                                                                          What a slot carries is a domino of the instance.

                                                                                          Equations
                                                                                          • One or more equations did not get rendered due to their size.
                                                                                          Instances For
                                                                                            Dependency graph

                                                                                            The matching relates an index of the top parse to one of the bottom parse.

                                                                                            Equations
                                                                                            • One or more equations did not get rendered due to their size.
                                                                                            Instances For
                                                                                              Dependency graph

                                                                                              Every index of the top parse is matched.

                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For
                                                                                                Dependency graph

                                                                                                Every index of the bottom parse is matched.

                                                                                                Equations
                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                Instances For
                                                                                                  Dependency graph

                                                                                                  The matching reflects the lexicographic order of the two parses. Eight guarded quantifiers, alternating slot and position: the two matched pairs on the top side and the two on the bottom side.

                                                                                                  Equations
                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                  Instances For
                                                                                                    Dependency graph

                                                                                                    Matched indices carry the same letter.

                                                                                                    Equations
                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                    Instances For
                                                                                                      Dependency graph

                                                                                                      The assignment is a certificate: the ten conditions of DescriptiveComplexity.Pcp.CertOK beyond well-formedness, conjoined.

                                                                                                      Equations
                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                      Instances For
                                                                                                        Dependency graph

                                                                                                        The kernel: the instance is a well-formed Post system, and the invented slots carry a match of it.

                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          Dependency graph

                                                                                                          What the kernel says #

                                                                                                          Dependency graph

                                                                                                          The assignment a certificate induces #

                                                                                                          Read back by DescriptiveComplexity.Pcp.certOf, this is the identity definitionally, which is what makes the round trip a rfl.

                                                                                                          The assignment a certificate induces.

                                                                                                          Equations
                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                          Instances For
                                                                                                            Dependency graph
                                                                                                            @[simp]
                                                                                                            Dependency graph

                                                                                                            The theorems #

                                                                                                            PCP is definable in ∃SO[new]: the invented values are the slots of the sequence of dominoes, and the kernel says that they carry a match – with the common word never written down, only the matching between the two ways of cutting it into blocks.

                                                                                                            Dependency graph

                                                                                                            PCP is in RE. The certificate is a sequence of dominoes together with a matching between the two parses of the word it spells – a finite object, but no function of the instance bounds its length: that is exactly the difference between Σ₁ and ∃SO[new], and between NP and RE.

                                                                                                            Dependency graph

                                                                                                            PCP first-order-reduces to finite satisfiability. No new hardness work is needed: DescriptiveComplexity.finsat_hard_of_sigmaSONewDefinable is proved for an arbitrary source vocabulary, so putting a problem in RE reduces it to DescriptiveComplexity.FINSAT at once.

                                                                                                            Dependency graph