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

              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] {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] {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] {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] {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] {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 #

                        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] {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] {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] {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] {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 #

                                            The shapes that repeat #

                                            The conditions on the certificate #

                                            What the kernel says #

                                            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