Documentation

DescriptiveComplexity.Problems.DagIso.Defs

DAG Isomorphism: vocabulary and semantics #

DAG ISOMORPHISM: are the two directed acyclic graphs of the instance isomorphic? This file fixes the vocabulary and the yes-instance predicate; the two halves of GI-completeness live in DescriptiveComplexity.Problems.DagIso.ToDigraphIso and DescriptiveComplexity.Problems.DagIso.FromDigraphIso.

Why the instances carry a topological order #

Acyclicity is not first-order definable, so a problem whose yes-instances are “both sides acyclic and isomorphic” could not be reduced back to DescriptiveComplexity.DigraphIso: the reduction would have to decide acyclicity first-order, and no first-order interpretation can (a directed cycle is a reachability question). A classical polynomial-time reduction simply tests acyclicity and maps a cyclic instance to a fixed no-instance; an FO reduction, computable in AC⁰, cannot.

The instances therefore carry their acyclicity witness: besides the two arc relations, each side has a relation asked to be a strict partial order containing its arcs (DescriptiveComplexity.TopoOn) – a topological order of the DAG, in the partial-order form, which is exactly what DescriptiveComplexity.acyclicRel_iff_exists_order certifies acyclicity by. Being a strict partial order containing the arcs is first-order, so a reduction can test it, and the well-formed instances are precisely the pairs of DAGs (DescriptiveComplexity.acyclicOn_iff_exists_topoOn: a finite relation admits such a witness exactly when it is acyclic). The witness is data of the instance, not of the problem: the isomorphism asked for by DescriptiveComplexity.HasDagIso relates the arcs only and may ignore the two orders entirely, so this is DAG isomorphism and not isomorphism of ordered DAGs.

This is the same “junk is ignorable” discipline as everywhere in the catalog, one level up: elements outside both marks are junk, and instances whose order relation is not a witness are no-instances.

@[reducible, inline]

hostV a: a is a vertex of the host DAG.

Equations
Instances For
    Dependency graph
    Dependency graph
    @[reducible, inline]

    patV a: a is a vertex of the pattern DAG.

    Equations
    Instances For
      Dependency graph
      @[reducible, inline]

      patLt a b: a precedes b in the pattern's topological order.

      Equations
      Instances For
        Dependency graph

        The relational language of two directed acyclic graphs: two arc relations sharing a universe, each with its own vertex mark and its own topological order.

        Equations
        Instances For
          Dependency graph
          Dependency graph
          @[reducible, inline]

          patArc a b: there is an arc of the pattern DAG from a to b.

          Equations
          Instances For
            Dependency graph
            @[reducible, inline]

            hostLt a b: a precedes b in the host's topological order.

            Equations
            Instances For
              Dependency graph

              The relation symbols of the language.

              Instances For
                Dependency graph
                Dependency graph
                @[reducible, inline]

                hostArc a b: there is an arc of the host DAG from a to b.

                Equations
                Instances For
                  Dependency graph

                  The acyclicity witness #

                  def DescriptiveComplexity.TopoOn {A : Type} (V : AProp) (Lt Arc : AAProp) :

                  Lt is a topological order for the arcs Arc on the marked set V: a strict partial order (on V) containing the arcs. Its existence is exactly the acyclicity of the arcs (DescriptiveComplexity.acyclicOn_iff_exists_topoOn), and it is first-order checkable, which acyclicity itself is not.

                  Equations
                  • DescriptiveComplexity.TopoOn V Lt Arc = ((∀ (x : A), V x¬Lt x x) (∀ (x y z : A), V xV yV zLt x yLt y zLt x z) ∀ (x y : A), V xV yArc x yLt x y)
                  Instances For
                    Dependency graph
                    theorem DescriptiveComplexity.TopoOn.of_equiv {A B : Type} (u : B A) {VB : BProp} {LtB ArcB : BBProp} {VA : AProp} {LtA ArcA : AAProp} (hV : ∀ (b : B), VB b VA (u b)) (hLt : ∀ (b b' : B), LtB b b' LtA (u b) (u b')) (hArc : ∀ (b b' : B), ArcB b b' ArcA (u b) (u b')) (h : TopoOn VB LtB ArcB) :
                    TopoOn VA LtA ArcA

                    TopoOn transports along an equivalence commuting with the three predicates.

                    Dependency graph
                    theorem DescriptiveComplexity.TopoOn.equiv_iff {A B : Type} (u : B A) {VB : BProp} {LtB ArcB : BBProp} {VA : AProp} {LtA ArcA : AAProp} (hV : ∀ (b : B), VB b VA (u b)) (hLt : ∀ (b b' : B), LtB b b' LtA (u b) (u b')) (hArc : ∀ (b b' : B), ArcB b b' ArcA (u b) (u b')) :
                    TopoOn VB LtB ArcB TopoOn VA LtA ArcA

                    TopoOn transports along an equivalence, iff version.

                    Dependency graph
                    theorem DescriptiveComplexity.acyclicOn_iff_exists_topoOn {A : Type} (V : AProp) (Arc : AAProp) :
                    (AcyclicRel fun (x y : { x : A // V x }) => Arc x y) ∃ (Lt : AAProp), TopoOn V Lt Arc

                    The well-formed instances are exactly the DAGs: the arcs of a marked set admit a topological order precisely when they are acyclic on it. Left to right a cycle would give Lt x x; right to left the transitive closure is the order (DescriptiveComplexity.acyclicRel_iff_exists_order, on the subtype of marked elements).

                    This is why carrying the witness costs no generality: every DAG is a yes-instance-shaped instance, and no other structure is.

                    Dependency graph

                    The problem #

                    Dependency graph
                    Dependency graph
                    Dependency graph
                    Dependency graph
                    Dependency graph

                    patLt a b: a precedes b in the pattern's topological order.

                    Equations
                    Instances For
                      Dependency graph

                      Both sides are well-formed – each order relation is a topological order of its arcs, so both marked arc relations are acyclic – and the two DAGs are isomorphic. The isomorphism relates the arcs only: the two orders are the instance's acyclicity witnesses, not part of the structure being matched.

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

                        DAG ISOMORPHISM, as a problem on two-DAG structures: are the two marked DAGs isomorphic? Well-formedness – each side's order relation being a topological order of its arcs – is part of the yes-condition, and is first-order, unlike acyclicity itself.

                        Equations
                        Instances For
                          Dependency graph