Documentation

DescriptiveComplexity.Problems.Hamilton.Forward

A Hamilton circuit presented as a cyclic list #

The forward direction of the Vertex Cover → Hamilton Circuit reduction builds its circuit as an explicit sequence of vertices – selectors interleaved with the chains of the cover vertices – so it is convenient to introduce a tour from a list: a duplicate-free list containing every vertex, along which consecutive elements are adjacent and whose last element is adjacent to its first, is a tour (DescriptiveComplexity.tourOn_of_cycleList).

theorem DescriptiveComplexity.tourOn_of_cycleList {H : Type} {R : H → H → Prop} [Finite H] (l : List H) (hne : l ≠ []) (nd : l.Nodup) (hcov : ∀ (x : H), x ∈ l) (hchain : List.IsChain R l) (hwrap : R (l.getLast hne) (l.head hne)) :

A cyclic list is a tour. A duplicate-free list containing every element, along which consecutive elements are R-related and whose last element is R-related to its first, presents a tour of R.

Dependency graph

The traversal of a single gadget (the snake) #

@[reducible, inline]

The gadget vertex of index i over the ordered edge (a, b) (owner a).

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

    The traversal of gadget {a, b} when b is also in the cover: only the a-side is walked, a straight horizontal path 0-1-2-3-4-5.

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

      The traversal of gadget {a, b} when b is not in the cover: the a-through path visiting all twelve vertices, dipping into the b-side.

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

        Distinctness of gadget vertices #

        Which vertices a snake contains (for covering) #

        The sorted neighbor list of a vertex #

        The neighbors of a in the input, listed in increasing order.

        Equations
        Instances For
          Dependency graph

          A cover vertex's chain #

          The snake of gadget {a, b} in a chain of a: the a-side-only path if b is in the cover C, the through-path otherwise (empty if a, b is not an edge, which never happens on the neighbor list).

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

            The chain of the cover vertex a: its gadgets' snakes, concatenated in neighbor order.

            Equations
            Instances For
              Dependency graph

              Minima and maxima of the neighbor list #

              Selector edges #

              Which vertices a chain contains (for covering) #

              The endpoints of a chain #

              Chains of distinct cover vertices are disjoint #

              theorem DescriptiveComplexity.snakeBoth_tuple {A : Type} [FirstOrder.Language.markedGraph.Structure A] [LinearOrder A] {a b : A} (h : HEdge a b) {p : hamInterp.MapRel A} (hp : p ∈ snakeBoth h) :
              (↑p).2 0 = a ∧ (↑p).2 1 = b
              Dependency graph
              theorem DescriptiveComplexity.snakeThrough_tuple {A : Type} [FirstOrder.Language.markedGraph.Structure A] [LinearOrder A] {a b : A} (h : HEdge a b) {p : hamInterp.MapRel A} (hp : p ∈ snakeThrough h) :
              (↑p).2 0 = a ∧ (↑p).2 1 = b ∨ (↑p).2 0 = b ∧ (↑p).2 1 = a
              Dependency graph
              theorem DescriptiveComplexity.snakeOf_tuple {A : Type} [FirstOrder.Language.markedGraph.Structure A] [LinearOrder A] {C : A → Prop} {w b : A} (hwb : HEdge w b) {p : hamInterp.MapRel A} (hp : p ∈ snakeOf C w b) :
              (↑p).2 0 = w ∧ (↑p).2 1 = b ∨ (↑p).2 0 = b ∧ (↑p).2 1 = w
              Dependency graph

              The blocks of the cycle #

              A block of the cycle: a selector, optionally followed by a cover vertex's chain. The cp is that chain when the selector is paired with a cover vertex, and [] for a leftover selector.

              Equations
              Instances For
                Dependency graph
                Dependency graph
                Dependency graph
                Dependency graph

                The marked and cover lists #

                The marked vertices of the input: the selectors.

                Equations
                Instances For
                  Dependency graph
                  Dependency graph
                  Dependency graph

                  The cycle and its correctness #