Documentation

DescriptiveComplexity.Problems.Machine.Interp

The transcription: SAT ≤ᶠᵒ[≤] NTMAccept #

The first-order half of the reduction. The machine of a CNF formula was built semantically in DescriptiveComplexity.Problems.Machine.Hardness – plain predicates on tagged tuples, with its correctness DescriptiveComplexity.satMachine_accepts_iff_satisfiable proved there. This file writes the defining formulas of an interpretation of Language.turing in ordered CNF instances, shows each formula realizes exactly the corresponding predicate of the machine, and bundles the result as the ordered first-order reduction DescriptiveComplexity.SatTM.sat_ordered_fo_reduction_ntmAccept.

Method #

Everything is arranged so that no simp call ever faces a tag match:

The transfer to DescriptiveComplexity.NTMAccept is then a fieldwise DescriptiveComplexity.TMData.Agree along the identity equivalence: the machine the interpreted structure describes agrees with DescriptiveComplexity.satMachine, so acceptance and well-formedness transport, and correctness is inherited from the semantic layer.

Formulas for the clause order #

noncomputable def DescriptiveComplexity.SatTM.minClF {α : Type} (c : α) :

c is the lowest clause, as a formula.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    Dependency graph
    noncomputable def DescriptiveComplexity.SatTM.maxClF {α : Type} (c : α) :

    c is the highest clause, as a formula.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Dependency graph
      noncomputable def DescriptiveComplexity.SatTM.nextClF {α : Type} (c c' : α) :

      c' is the clause immediately above c, as a formula.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        Dependency graph
        theorem DescriptiveComplexity.SatTM.realize_minClF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {x : α} {c : A} (h : v x = c) :
        Dependency graph
        theorem DescriptiveComplexity.SatTM.realize_maxClF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {x : α} {c : A} (h : v x = c) :
        Dependency graph
        theorem DescriptiveComplexity.SatTM.realize_nextClF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {α : Type} {v : αA} {x y : α} {c c' : A} (hx : v x = c) (hy : v y = c') :
        Dependency graph
        Dependency graph

        The two shapes of the machine's elements, as formulas #

        The second argument of a binary symbol is the constant element cst s: its tag is s – checked statically – and its payload is the pair of minima.

        Equations
        Instances For
          Dependency graph
          noncomputable def DescriptiveComplexity.SatTM.oneF (s : SatTag) (x : Fin 2 × Fin 2) (t' : SatTag) :

          The second argument of a binary symbol is one s (v x): its tag is s, its payload carries the value of the variable x and the minimum.

          Equations
          Instances For
            Dependency graph
            theorem DescriptiveComplexity.SatTM.realize_cstF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 2 × Fin 2A} {s : SatTag} {q : SatV A} (h0 : v (1, 0) = q.2 0) (h1 : v (1, 1) = q.2 1) :
            (cstF s q.1).Realize v q = cst s
            Dependency graph
            theorem DescriptiveComplexity.SatTM.realize_oneF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {v : Fin 2 × Fin 2A} {s : SatTag} {x : Fin 2 × Fin 2} {q : SatV A} (h0 : v (1, 0) = q.2 0) (h1 : v (1, 1) = q.2 1) :
            (oneF s x q.1).Realize v q = one s (v x)
            Dependency graph

            The defining formulas #

            The literal test on the source structure, for the statically known truth value v: this is where the transition relation reads the input formula.

            Equations
            Instances For
              Dependency graph
              Dependency graph
              Dependency graph
              Dependency graph

              Defining formula for acc: any payload – acceptance is read off the tag alone, exactly as DescriptiveComplexity.SatAcc does.

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

                The interpretation of machine instances in ordered CNF instances. The order is DescriptiveComplexity.lexLeF, so its linearity comes from DescriptiveComplexity.tagTupleOrder with no tag-pair analysis; every other symbol matches on its first tag only, the shape of the second being delegated to DescriptiveComplexity.SatTM.cstF and DescriptiveComplexity.SatTM.oneF.

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

                  The realization lemmas #

                  One per symbol of Language.turing, each saying its defining formula defines the corresponding predicate of DescriptiveComplexity.satMachine. The universe of the interpreted structure is definitionally DescriptiveComplexity.SatV A; DescriptiveComplexity.SatTM.satMapEquiv names the identity equivalence, along which the machines will be shown to agree.

                  The identity equivalence between the tagged tuples and the interpreted universe.

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

                    The three shapes of the initial tape, per tag of the cell.

                    Dependency graph
                    Dependency graph
                    Dependency graph
                    Dependency graph
                    Dependency graph
                    Dependency graph
                    Dependency graph
                    theorem DescriptiveComplexity.SatTM.realize_chkLitF {A : Type} [FirstOrder.Language.sat.Structure A] [LinearOrder A] {b : Bool} {c x : A} {v : Fin 2 × Fin 2A} (h0 : v (0, 0) = c) (h1 : v (0, 1) = x) :

                    The check clause's new flag, realized: the literal test on the source.

                    Dependency graph
                    Dependency graph

                    The machines agree, and the reduction #

                    The interpreted structure describes the machine of the instance: every field of DescriptiveComplexity.tmData on the interpreted structure agrees, along the identity equivalence, with DescriptiveComplexity.satMachine.

                    Dependency graph

                    Correctness of the interpretation: the interpreted structure is a yes-instance of machine acceptance exactly when the CNF instance is satisfiable. Well-formedness holds unconditionally (DescriptiveComplexity.satMachine_wellFormed), and acceptance is DescriptiveComplexity.satMachine_accepts_iff_satisfiable, both transported along the agreement.

                    Dependency graph

                    SAT reduces to acceptance by a nondeterministic machine: the ordered first-order reduction building M_φ inside the instance.

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