Documentation

DescriptiveComplexity.Problems.GraphIso.Gadget

The digraph-to-graph gadget #

The construction turning a directed graph into a simple one with the same isomorphisms. It is written on a single structure – the doubling that runs it on both sides of an instance is DescriptiveComplexity.GadgetDouble – so everything below speaks about one graph.

Each vertex u gets

Each arc u ⟶ v gets a path of three subdivision nodes,

  V u — A u v — B u v — C u v — V v

together with a pendant P u v hanging off A u v.

Two design points, both forced:

The levels are then recovered from adjacency alone, with no counting beyond “has exactly one neighbor”: the triangle nodes are those lying on a triangle, the vertices those adjacent to one without lying on one, A the nodes with a leaf neighbor, and so on. Points of the tagged power that no clause makes adjacent to anything – an arc node for a pair that is not an arc – are isolated, hence harmless: an isomorphism matches them by degree.

The nodes #

The eight kinds of node: a vertex, its three lollipop nodes, the three subdivision nodes of an arc, and the pendant marking the arc's tail.

  • vtx : GTag

    The copy of a vertex.

  • m₁ : GTag

    The lollipop node attached to a vertex.

  • m₂ : GTag

    One corner of the lollipop triangle.

  • m₃ : GTag

    The other corner of the lollipop triangle.

  • a : GTag

    The subdivision node next to an arc's tail.

  • b : GTag

    The middle subdivision node of an arc.

  • c : GTag

    The subdivision node next to an arc's head.

  • p : GTag

    The pendant marking an arc's tail.

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

    The defining formula #

    def DescriptiveComplexity.GraphGadget.edgeF {α : Type} (t s : GTag) (x₀ x₁ y₀ y₁ : α) :

    The edges of the gadget, tag pair by tag pair. Every clause is stated in both directions, so the result is symmetric; no clause relates a tag to itself on the same point, so it is irreflexive.

    Equations
    Instances For
      Dependency graph

      The gadget: a directed graph becomes a simple graph with the same isomorphisms. Eight tags, dimension two.

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

        The points #

        A point of the construction: a tag and two coordinates. The vertex-side kinds are the diagonal ones.

        Equations
        Instances For
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          theorem DescriptiveComplexity.GraphGadget.pt_eta {G : Type} (q : gadget.Map G) :
          q = pt q.1 (q.2 0) (q.2 1)

          Every point is a named one: one eta lemma for all eight kinds.

          Dependency graph
          theorem DescriptiveComplexity.GraphGadget.pt_tag {G : Type} (t : GTag) (u v : G) :
          (pt t u v).1 = t
          Dependency graph

          Which pairs are edges #

          Dependency graph
          Dependency graph

          Every clause of DescriptiveComplexity.GraphGadget.edgeF, read on general points. The coordinates of a neighbor are not known to be diagonal before the clause is read, so these are the forms the case analysis needs; the diagonal corollaries follow.

          @[simp]
          Dependency graph
          @[simp]
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          Dependency graph
          @[simp]
          Dependency graph
          @[simp]
          Dependency graph
          @[simp]
          Dependency graph
          @[simp]
          Dependency graph
          @[simp]
          theorem DescriptiveComplexity.GraphGadget.edge_a_b {G : Type} [FirstOrder.Language.graph.Structure G] (u v u' v' : G) :
          GEdge (pt GTag.a u v) (pt GTag.b u' v') GAdj u v GAdj u' v' u = u' v = v'
          Dependency graph
          @[simp]
          theorem DescriptiveComplexity.GraphGadget.edge_b_a {G : Type} [FirstOrder.Language.graph.Structure G] (u v u' v' : G) :
          GEdge (pt GTag.b u v) (pt GTag.a u' v') GAdj u v GAdj u' v' u = u' v = v'
          Dependency graph
          @[simp]
          theorem DescriptiveComplexity.GraphGadget.edge_b_c {G : Type} [FirstOrder.Language.graph.Structure G] (u v u' v' : G) :
          GEdge (pt GTag.b u v) (pt GTag.c u' v') GAdj u v GAdj u' v' u = u' v = v'
          Dependency graph
          @[simp]
          theorem DescriptiveComplexity.GraphGadget.edge_c_b {G : Type} [FirstOrder.Language.graph.Structure G] (u v u' v' : G) :
          GEdge (pt GTag.c u v) (pt GTag.b u' v') GAdj u v GAdj u' v' u = u' v = v'
          Dependency graph
          @[simp]
          theorem DescriptiveComplexity.GraphGadget.edge_a_p {G : Type} [FirstOrder.Language.graph.Structure G] (u v u' v' : G) :
          GEdge (pt GTag.a u v) (pt GTag.p u' v') GAdj u v GAdj u' v' u = u' v = v'
          Dependency graph
          @[simp]
          theorem DescriptiveComplexity.GraphGadget.edge_p_a {G : Type} [FirstOrder.Language.graph.Structure G] (u v u' v' : G) :
          GEdge (pt GTag.p u v) (pt GTag.a u' v') GAdj u v GAdj u' v' u = u' v = v'
          Dependency graph

          Which tag pairs can be joined at all #

          The tag pairs the gadget joins: the lollipop's four edges in both directions, the arc path's four, and the pendant's one.

          Equations
          Instances For
            Dependency graph

            An edge joins only the tag pairs the construction lists. The forty-six other pairs need no argument: their defining formula is , so the hypothesis is False.

            Dependency graph

            No clause relates a tag to itself, so the construction has no loops.

            Dependency graph

            The construction is a simple graph #

            theorem DescriptiveComplexity.GraphGadget.edge_symm_pt {G : Type} [FirstOrder.Language.graph.Structure G] (t s : GTag) (u v u' v' : G) :
            GEdge (pt t u v) (pt s u' v') GEdge (pt s u' v') (pt t u v)

            Symmetric: every clause of DescriptiveComplexity.GraphGadget.edgeF is stated in both directions, so the constructed relation is undirected.

            Dependency graph

            Symmetric: every clause of DescriptiveComplexity.GraphGadget.edgeF is stated in both directions, so the constructed relation is undirected.

            Dependency graph

            Irreflexive: no clause relates a tag to itself, so the constructed graph has no loops.

            Dependency graph

            The neighbors of each kind of node #

            theorem DescriptiveComplexity.GraphGadget.nbr_of_vPt {G : Type} [FirstOrder.Language.graph.Structure G] {u : G} {q : gadget.Map G} (h : GEdge (vPt u) q) :
            q = m₁Pt u (∃ (v : G), GAdj u v q = aPt u v) ∃ (w : G), GAdj w u q = cPt w u

            The neighbors of a vertex node: its lollipop, the tail-side subdivision of each arc out of it, and the head-side subdivision of each arc into it.

            Dependency graph
            Dependency graph
            theorem DescriptiveComplexity.GraphGadget.nbr_of_aPt {G : Type} [FirstOrder.Language.graph.Structure G] {u v : G} {q : gadget.Map G} (h : GEdge (aPt u v) q) :
            q = vPt u q = bPt u v q = pPt u v
            Dependency graph
            Dependency graph
            Dependency graph
            Dependency graph

            The structural predicates that recover the levels #

            Lying on a triangle.

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

              Having exactly one neighbor.

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

                The lollipop triangle is a triangle.

                Dependency graph

                A vertex node lies on no triangle: no two of its neighbors are joined.

                Dependency graph

                A tail-side subdivision node lies on no triangle.

                Dependency graph

                A middle subdivision node lies on no triangle.

                Dependency graph

                A head-side subdivision node lies on no triangle.

                Dependency graph

                A pendant lies on no triangle.

                Dependency graph

                Junk points are isolated #

                A point whose coordinates do not fit its tag – a lollipop node off the diagonal, a subdivision node on a pair that is not an arc – is joined to nothing, so an isomorphism can only match it with another such point. This is what lets the recovery below case over all points rather than only the well-formed ones.

                A vtx node off the diagonal is isolated.

                Dependency graph

                A m₁ node off the diagonal is isolated.

                Dependency graph

                A m₂ node off the diagonal is isolated.

                Dependency graph

                A m₃ node off the diagonal is isolated.

                Dependency graph

                An a node on a pair that is not an arc is isolated.

                Dependency graph

                An b node on a pair that is not an arc is isolated.

                Dependency graph

                An c node on a pair that is not an arc is isolated.

                Dependency graph

                An p node on a pair that is not an arc is isolated.

                Dependency graph

                Adjacency to a triangle: the vertices #

                A vertex node is adjacent to its lollipop.

                Dependency graph

                No subdivision node is adjacent to a triangle.

                Dependency graph

                No subdivision node is adjacent to a triangle.

                Dependency graph

                No subdivision node is adjacent to a triangle.

                Dependency graph

                No subdivision node is adjacent to a triangle.

                Dependency graph

                The other two corners of a lollipop lie on its triangle too.

                Dependency graph

                The other two corners of a lollipop lie on its triangle too.

                Dependency graph

                The vertices are recoverable from adjacency alone: they are the nodes adjacent to a triangle without lying on one. Junk points fail the test by being isolated, lollipop nodes by lying on their triangle, and subdivision nodes and pendants by touching no triangle.

                Dependency graph

                Leaves: the pendant marks the tail #

                The pendant of an arc is a leaf.

                Dependency graph

                A middle subdivision node is not a leaf: it has both an a and a c neighbor, and those have different tags.

                Dependency graph

                A vertex node incident to an arc is not a leaf: it has its lollipop and the arc's subdivision node.

                Dependency graph

                A vertex node incident to an arc is not a leaf: it has its lollipop and the arc's subdivision node.

                Dependency graph

                Which nodes have a leaf neighbor: the tail side #

                The tail-side subdivision node has the pendant as a neighbor.

                Dependency graph

                The head-side subdivision node has none: its neighbors are the middle node and the head, and the head is incident to this very arc.

                Dependency graph

                The arcs are recoverable #

                An arc of the input is a guarded path of length four between the two vertex nodes. Each guard rules out a concrete impostor: without ¬OnTri the lollipop of an isolated vertex closes the chain, without ¬AdjTri it turns back through the vertex node, without ¬Leaf it goes out to the pendant and back, and without ¬HasLeafNbr it returns along the tail-side node – each of which would claim an arc from a vertex to itself. The direction of the arc is carried by HasLeafNbr: only the tail side has a pendant.

                Dependency graph

                An isomorphism of the constructions is one of the inputs #

                An isomorphism preserves and reflects the constructed adjacency.

                Dependency graph
                Dependency graph
                Dependency graph
                Dependency graph

                Being a leaf is preserved: the uniqueness clause transfers because every neighbor of the image is the image of a neighbor.

                Dependency graph
                Dependency graph
                Dependency graph

                The gadget reflects isomorphism: an isomorphism of the constructed graphs restricts to the vertex nodes, and the arcs are read off it by DescriptiveComplexity.GraphGadget.arc_iff. Together with functoriality – free for an interpretation – this says the construction is faithful.

                Dependency graph