Documentation

HexGraphIso.Ops

Compute the canonical form of a coloured graph together with the label producing it: the checked-label transcription of the pinned nauty search. Total; worst-case cost is factorial. Its answer is the one the certificate replay validates (canonicalize_eq_certifyCanon), which is how every theorem below reaches it.

Equations
Instances For
    def Hex.GraphIso.canon {n k : Nat} (G : Colored n k) :

    The canonical form of a coloured graph.

    Equations
    Instances For
      def Hex.GraphIso.label {n k : Nat} (G : Colored n k) :

      The label producing the canonical form.

      Equations
      Instances For

        The transcription's answer is the certificate-checked one.

        The canonical form is the declarative specification form.

        theorem Hex.GraphIso.relabel_label {n k : Nat} (G : Colored n k) :

        Relabelling by the canonical label produces the canonical form.

        The canonical form has contiguous colour cells in their original order.

        theorem Hex.GraphIso.canon_iso {n k : Nat} (G : Colored n k) :

        Every coloured graph is isomorphic to its canonical form.

        theorem Hex.GraphIso.canon_invariant {n k : Nat} {G H : Colored n k} (h : Isomorphic G H) :

        Isomorphic coloured graphs have equal canonical forms.

        theorem Hex.GraphIso.iso_iff_canon_eq {n k : Nat} (G H : Colored n k) :

        Two coloured graphs are isomorphic exactly when their canonical forms are equal. The biconditional compares canonical coloured graphs, not the labels: label arrays refer to different input vertex names and generally differ for isomorphic inputs.

        def Hex.GraphIso.findIso {n k : Nat} (G H : Colored n k) :

        Find one isomorphism from G to H when one exists: the forward transporter through the two canonical forms, the canonical label of H composed with the inverse of the canonical label of G (in forward permutation convention).

        Equations
        Instances For
          def Hex.GraphIso.isIso {n k : Nat} (G H : Colored n k) :

          The Boolean isomorphism decision.

          Equations
          Instances For
            theorem Hex.GraphIso.findIso_sound {n k : Nat} {G H : Colored n k} {p : Perm n} (h : findIso G H = some p) :
            IsIso G H p

            Soundness of the search: any permutation it returns really is an isomorphism. This is the theorem to use after a successful findIso. It says nothing about the none case, for which see findIso_isSome_iff.

            Completeness of the search: it returns a permutation exactly when one exists. Together with findIso_sound this makes findIso a decision procedure rather than a one-sided test.

            theorem Hex.GraphIso.isIso_eq_true_iff {n k : Nat} (G H : Colored n k) :

            The decision answers true exactly on isomorphic pairs.

            The decision answers false exactly on non-isomorphic pairs. This is the negative direction the graph_iso tactic needs, and it is a genuine refutation rather than a failure to find a witness.

            theorem Hex.GraphIso.isomorphic_of_isIso {n k : Nat} {G H : Colored n k} (h : isIso G H = true) :

            A positive answer proves isomorphism.