Documentation

DescriptiveComplexity.Problems.Hamilton.Gadget

The Vertex Cover → Hamilton Circuit gadget interpretation #

This file defines the relativized ordered first-order interpretation DescriptiveComplexity.hamInterp that reduces VERTEX COVER (on marked graphs) to (undirected) HAMILTON CIRCUIT (on digraphs read symmetrically), the classical twelve-vertex cover-testing-gadget reduction of Karp 1972, read in the tagged framework.

The output graph hamInterp.MapRel A has these vertices (all carried by a pair of input vertices, dim = 2, cut down by a domain formula – hence a relativized interpretation, DescriptiveComplexity.RelFOInterpretation):

The gadget's edges force, in any Hamilton circuit, one of exactly three traversals of {u, v}: through the u-side, through the v-side, or both – never neither. So each edge is covered, and the number of vertices whose chains are traversed – the cover – is at most the number of selectors, the marked set. This file only builds the interpretation and characterizes its adjacency; the two directions of correctness are in Forward and Reverse.

@[reducible, inline]

The ordered expansion of the marked-graph vocabulary, the source language of the reduction.

Equations
Instances For
    Dependency graph
    @[reducible, inline]

    The adjacency symbol over the ordered expansion of marked graphs.

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      The mark symbol over the ordered expansion of marked graphs.

      Equations
      Instances For
        Dependency graph

        Edge and neighbor-order formulas #

        noncomputable def DescriptiveComplexity.adjOrF {α : Type} (s t : α) :

        Symmetric adjacency: an arc in either direction.

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

          The two variables name an (undirected) edge: adjacent in some direction, and distinct.

          Equations
          Instances For
            Dependency graph
            noncomputable def DescriptiveComplexity.minNbrF {α : Type} (a b : α) :

            b is the least neighbor of a: it is ≤ every neighbor of a.

            Equations
            Instances For
              Dependency graph
              noncomputable def DescriptiveComplexity.maxNbrF {α : Type} (a b : α) :

              b is the greatest neighbor of a.

              Equations
              Instances For
                Dependency graph
                noncomputable def DescriptiveComplexity.succNbrF {α : Type} (a b c : α) :

                c is the immediate neighbor-successor of b in a's neighbor list: c is a neighbor of a, b < c, and no neighbor of a lies strictly between b and c.

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

                  Edge predicate on the input #

                  The undirected edge relation on the input: adjacent in some direction, and distinct.

                  Equations
                  Instances For
                    Dependency graph
                    Dependency graph

                    Realization of the edge and neighbor formulas #

                    @[simp]
                    theorem DescriptiveComplexity.realize_adjOrF {A : Type} [FirstOrder.Language.markedGraph.Structure A] [LinearOrder A] {α : Type} (v : α → A) (s t : α) :
                    (adjOrF s t).Realize v ↔ MGAdj (v s) (v t) ∨ MGAdj (v t) (v s)
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.realize_edgeF {A : Type} [FirstOrder.Language.markedGraph.Structure A] [LinearOrder A] {α : Type} (v : α → A) (s t : α) :
                    (edgeF s t).Realize v ↔ HEdge (v s) (v t)
                    Dependency graph

                    The tags and the interpretation #

                    The tags of the interpreted structure. Six gadget-node indices (the side, u vs v, is encoded by which endpoint owns the carrying tuple), one selector, one degenerate-case hub. Named constructors, not Fin 8, so the tag match inside the defining formulas reduces definitionally in the characterizations.

                    • g0 : HTag

                      Gadget node 0: the entrance of a side.

                    • g1 : HTag

                      Gadget node 1.

                    • g2 : HTag

                      Gadget node 2.

                    • g3 : HTag

                      Gadget node 3.

                    • g4 : HTag

                      Gadget node 4.

                    • g5 : HTag

                      Gadget node 5: the exit of a side.

                    • sel : HTag

                      A selector, one per marked vertex.

                    • hub : HTag

                      The degenerate-case hub.

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

                      The chain edge from an exit ⟨g5, (a, b)⟩ to the next entrance ⟨g0, (a, c)⟩: same owner, and c the neighbor-successor of b.

                      Equations
                      Instances For
                        Dependency graph

                        The chain edge the other way, from ⟨g0, (a, c)⟩ to ⟨g5, (a, b)⟩.

                        Equations
                        Instances For
                          Dependency graph

                          No vertex is marked.

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

                            The reduction of Vertex Cover into Hamilton Circuit: the twelve-vertex cover-testing gadget of each edge, chained along every vertex's neighbor list, with the marked vertices as selectors.

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

                              Realization of the degenerate-case guards #

                              The vertices of the interpreted graph #

                              The domain formula of a gadget tag says the tuple is an edge.

                              Dependency graph
                              Dependency graph

                              The adjacency of the interpreted graph #

                              The intended (symmetric) adjacency of the interpreted graph, on raw tagged tuples: the ten horizontal gadget edges, the four cross edges, the two chain edges, the selector–entrance and selector–exit edges, the selector clique and the hub self-loop. This is exactly what DescriptiveComplexity.hamInterp realizes (DescriptiveComplexity.dgArc_iff).

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

                                DGArc on the interpreted graph is symmetric, so the symmetric reading DescriptiveComplexity.DGEdge used by HAMILTON CIRCUIT coincides with it.

                                Dependency graph

                                The vertices, as named constructors #

                                A gadget vertex ⟨t, (a, b)⟩ for a gadget tag t over an edge (a, b).

                                Equations
                                Instances For
                                  Dependency graph

                                  A selector vertex, one per marked input vertex.

                                  Equations
                                  Instances For
                                    Dependency graph
                                    @[simp]
                                    theorem DescriptiveComplexity.gPt_tag {A : Type} [FirstOrder.Language.markedGraph.Structure A] [LinearOrder A] (t : HTag) (ht : t ≠ HTag.sel ∧ t ≠ HTag.hub) {a b : A} (h : HEdge a b) :
                                    (↑(gPt t ht h)).1 = t
                                    Dependency graph
                                    @[simp]
                                    theorem DescriptiveComplexity.gPt_fst {A : Type} [FirstOrder.Language.markedGraph.Structure A] [LinearOrder A] (t : HTag) (ht : t ≠ HTag.sel ∧ t ≠ HTag.hub) {a b : A} (h : HEdge a b) :
                                    (↑(gPt t ht h)).2 0 = a
                                    Dependency graph
                                    @[simp]
                                    theorem DescriptiveComplexity.gPt_snd {A : Type} [FirstOrder.Language.markedGraph.Structure A] [LinearOrder A] (t : HTag) (ht : t ≠ HTag.sel ∧ t ≠ HTag.hub) {a b : A} (h : HEdge a b) :
                                    (↑(gPt t ht h)).2 1 = b
                                    Dependency graph
                                    Dependency graph
                                    Dependency graph