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 #

    The two coordinates are equal: the point is a vertex-side node, which is indexed by the diagonal.

    Equations
    Instances For
      Dependency graph

      The two coordinates form an arc: the point is an arc-side node.

      Equations
      Instances For
        Dependency graph

        The two points carry the same vertex.

        Equations
        Instances For
          Dependency graph

          The two points carry the same arc.

          Equations
          Instances For
            Dependency graph
            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

                  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 construction is a simple 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 #

                  The structural predicates that recover the levels #

                  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.

                  Adjacency to a triangle: the vertices #

                  Leaves: the pendant marks the tail #

                  Which nodes have a leaf neighbor: the tail side #

                  The arcs are recoverable #

                  An isomorphism of the constructions is one of the inputs #

                  Dependency graph