Documentation

DescriptiveComplexity.Problems.FinSat.Membership

FINSAT is in RE #

The membership half of Trakhtenbrot's theorem: finite satisfiability of an encoded sentence is definable in ∃SO[new] (DescriptiveComplexity.finsat_sigmaSONewDefinable), the logic defining RE.

The mathematical content is DescriptiveComplexity.FinSat.finSatOn_iff_cert: an encoded sentence has a finite model exactly when a finite set of invented values carries a certificate – a model, environments with their graph, and truth values for the nodes and for the atoms. This file is that statement written out in syntax:

The second-order block #

The relation variables of the ∃SO[new] definition of FINSAT: the model, the environments, the graph of an environment, the truth values of the nodes and the truth values of the atoms.

  • elt : CertIx

    The elements of the model.

  • env : CertIx

    The environments.

  • val : CertIx

    val e x d: the environment e gives the variable x the value d.

  • gv : CertIx

    gv g e: the node g holds under the environment e.

  • hv : CertIx

    hv g e: the atom at g holds under the environment e.

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
      @[reducible, inline]

      The vocabulary of the kernel: that of the instance, the marker old of the original elements, and the five relation variables.

      Equations
      Instances For
        Dependency graph
        @[reducible, inline]

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

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          The marker of the original elements, in the kernel's vocabulary.

          Equations
          Instances For
            Dependency graph
            Dependency graph
            Dependency graph
            Dependency graph
            Dependency graph
            Dependency graph

            The extended universe #

            @[instance_reducible]

            The vocabulary of the instance, read on the extended universe: a relation holds only of original elements, and there of what it holds of in the instance.

            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 five relation variables, read at the sorts they are meant for: the model and the environments among the invented values, the graph of an environment and the truth values across the two sorts. These are the components of the certificate DescriptiveComplexity.FinSat.CertOK the kernel says the assignment is.

                Atomic formulas #

                Dependency graph
                Dependency graph
                Dependency graph
                Dependency graph
                Dependency graph
                Dependency graph
                Dependency graph
                noncomputable def DescriptiveComplexity.FinSat.gF {γ : Type} (g e : γ) :

                The node g holds under the environment e.

                Equations
                Instances For
                  Dependency graph
                  noncomputable def DescriptiveComplexity.FinSat.hF {γ : Type} (g e : γ) :

                  The atom at g holds under the environment e.

                  Equations
                  Instances For
                    Dependency graph
                    Dependency graph
                    Dependency graph
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.FinSat.realize_oldF {A : Type} [FirstOrder.Language.finsat.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.FinSat.realize_eltF {A : Type} [FirstOrder.Language.finsat.Structure A] {m : ℕ} {ρ : certBlock.Assignment (A ⊕ Fin m)} {γ : Type} (x : γ) (v : γ → A ⊕ Fin m) :
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.FinSat.realize_envF {A : Type} [FirstOrder.Language.finsat.Structure A] {m : ℕ} {ρ : certBlock.Assignment (A ⊕ Fin m)} {γ : Type} (x : γ) (v : γ → A ⊕ Fin m) :
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.FinSat.realize_valF {A : Type} [FirstOrder.Language.finsat.Structure A] {m : ℕ} {ρ : certBlock.Assignment (A ⊕ Fin m)} {γ : Type} (e x d : γ) (v : γ → A ⊕ Fin m) :
                    (valF e x d).Realize v ↔ ρ CertIx.val ![v e, v x, v d]
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.FinSat.realize_gF {A : Type} [FirstOrder.Language.finsat.Structure A] {m : ℕ} {ρ : certBlock.Assignment (A ⊕ Fin m)} {γ : Type} (g e : γ) (v : γ → A ⊕ Fin m) :
                    (gF g e).Realize v ↔ ρ CertIx.gv ![v g, v e]
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.FinSat.realize_hF {A : Type} [FirstOrder.Language.finsat.Structure A] {m : ℕ} {ρ : certBlock.Assignment (A ⊕ Fin m)} {γ : Type} (g e : γ) (v : γ → A ⊕ Fin m) :
                    (hF g e).Realize v ↔ ρ CertIx.hv ![v g, v e]
                    Dependency graph
                    noncomputable def DescriptiveComplexity.FinSat.eqF {γ : Type} (x y : γ) :

                    Equality of two variables.

                    Equations
                    Instances For
                      Dependency graph
                      @[simp]
                      theorem DescriptiveComplexity.FinSat.realize_eqF {A : Type} [FirstOrder.Language.finsat.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

                      Naming the symbols of the instance #

                      Dependency graph
                      Dependency graph
                      Dependency graph
                      Dependency graph
                      noncomputable def DescriptiveComplexity.FinSat.exNF {γ : Type} (g : γ) :

                      The node g is an existential quantifier.

                      Equations
                      Instances For
                        Dependency graph
                        noncomputable def DescriptiveComplexity.FinSat.childF {γ : Type} (g c : γ) :

                        The node c is a child of the node g.

                        Equations
                        Instances For
                          Dependency graph
                          noncomputable def DescriptiveComplexity.FinSat.bindF {γ : Type} (g x : γ) :

                          The quantifier node g binds the variable x.

                          Equations
                          Instances For
                            Dependency graph
                            noncomputable def DescriptiveComplexity.FinSat.eqLF {γ : Type} (g x y : γ) :

                            The node g is the literal x = y.

                            Equations
                            Instances For
                              Dependency graph
                              noncomputable def DescriptiveComplexity.FinSat.neqLF {γ : Type} (g x y : γ) :

                              The node g is the literal x ≠ y.

                              Equations
                              Instances For
                                Dependency graph
                                noncomputable def DescriptiveComplexity.FinSat.posLF {γ : Type} (g s : γ) :

                                The node g is a positive atom of the symbol s.

                                Equations
                                Instances For
                                  Dependency graph
                                  noncomputable def DescriptiveComplexity.FinSat.negLF {γ : Type} (g s : γ) :

                                  The node g is a negated atom of the symbol s.

                                  Equations
                                  Instances For
                                    Dependency graph
                                    noncomputable def DescriptiveComplexity.FinSat.argF {γ : Type} (g p x : γ) :

                                    The argument of the atom g at position p is the variable x.

                                    Equations
                                    Instances For
                                      Dependency graph
                                      noncomputable def DescriptiveComplexity.FinSat.sigF {γ : Type} (s p : γ) :

                                      The symbol s has an argument position p.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        noncomputable def DescriptiveComplexity.FinSat.rootF {γ : Type} (g : γ) :

                                        The node g is the root of the encoded sentence.

                                        Equations
                                        Instances For
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph
                                          Dependency graph

                                          Guarded quantifiers #

                                          Every quantifier of the kernel ranges over one of the two sorts of the extended universe – the original elements, marked by old, and the invented values – and is guarded accordingly. The guards are not decoration: one missing in a hypothesis position (inside the update relation of the universal-quantifier clause, or in the agreement hypotheses of g_ext and atom_coh) makes the kernel demand of an assignment more than the certificate gives, and that direction of the correspondence no longer closes.

                                          A variable is named by its distance from its binder: vr0 is bound by the innermost guarded quantifier, vr1 by the one just outside it, and so on – so passing under one more quantifier increments every index, and up is that same shift applied to a variable given by name.

                                          @[reducible, inline]
                                          abbrev DescriptiveComplexity.FinSat.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 original elements.

                                                            Equations
                                                            Instances For
                                                              Dependency graph
                                                              Dependency graph
                                                              Dependency graph

                                                              ∀ d, ¬old d → φ: a quantifier over the invented values.

                                                              Equations
                                                              • One or more equations did not get rendered due to their size.
                                                              Instances For
                                                                Dependency graph
                                                                theorem DescriptiveComplexity.FinSat.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.FinSat.realize_exOldF {A : Type} [FirstOrder.Language.finsat.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.FinSat.realize_allOldF {A : Type} [FirstOrder.Language.finsat.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.FinSat.realize_exNewF {A : Type} [FirstOrder.Language.finsat.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.FinSat.realize_allNewF {A : Type} [FirstOrder.Language.finsat.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 #

                                                                The kernel has to check well-formedness, since junk instances are no-instances: each condition of DescriptiveComplexity.FinSat.IsWF is one conjunct, every quantifier ranging over the original elements.

                                                                The truth definition #

                                                                DescriptiveComplexity.FinSat.CertStep written out: one disjunct per kind of node, the environments and the values of the model ranging over the invented values and everything read off the encoding over the original elements.

                                                                The certificate #

                                                                One conjunct per field of DescriptiveComplexity.FinSat.CertOK.

                                                                The kernel #

                                                                The assignment a certificate determines #

                                                                Membership #

                                                                FINSAT is definable in ∃SO[new], the logic defining RE: the invented values carry a finite model of the encoded sentence together with the environments – a certificate (DescriptiveComplexity.FinSat.finSatOn_iff_certFin) – and the first-order kernel DescriptiveComplexity.FinSat.kernelS checks that the encoding is well formed and that the guessed relations are one.

                                                                The number of invented values is unbounded in the instance, which is exactly what takes the problem beyond NP: a finite model of a satisfiable sentence can be arbitrarily larger than the sentence.

                                                                Dependency graph
                                                                Dependency graph