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
The canonical form of a coloured graph.
Equations
Instances For
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.
The canonical form has contiguous colour cells in their original order.
Every coloured graph is isomorphic to its canonical form.
Isomorphic coloured graphs have equal canonical forms.
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.
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
- Hex.GraphIso.findIso G H = if Hex.GraphIso.canon G = Hex.GraphIso.canon H then some ((Hex.GraphIso.label H).toPerm.inv.comp (Hex.GraphIso.label G).toPerm) else none
Instances For
The Boolean isomorphism decision.
Equations
- Hex.GraphIso.isIso G H = (Hex.GraphIso.findIso G H).isSome
Instances For
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.
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.
A positive answer proves isomorphism.