theorem
Hex.GraphIso.Mathlib.Sparse.iso_iff_canon_eq
{V : Type u}
{W : Type v}
[Fintype V]
[Fintype W]
{n k : ℕ}
{G : Colored V k}
{H : Colored W k}
[DecidableRel G.graph.Adj]
[DecidableRel H.graph.Adj]
(eV : V ≃ Fin n)
(eW : W ≃ Fin n)
:
Equality of native sparse canonical forms characterizes Mathlib coloured graph isomorphism for any two finite enumerations.
theorem
Hex.GraphIso.Mathlib.Sparse.canon_encode_eq
{V : Type u}
[Fintype V]
{n k : ℕ}
{G : Colored V k}
[DecidableRel G.graph.Adj]
(e e' : V ≃ Fin n)
:
Changing the finite enumeration does not change the canonical form computed by the actual sparse search. This includes the empty graph.
theorem
Hex.GraphIso.Mathlib.Sparse.isIso_iff
{V : Type u}
{W : Type v}
[Fintype V]
[Fintype W]
{n k : ℕ}
{G : Colored V k}
{H : Colored W k}
[DecidableRel G.graph.Adj]
[DecidableRel H.graph.Adj]
(eV : V ≃ Fin n)
(eW : W ≃ Fin n)
:
The executable sparse decision is a complete Mathlib isomorphism test.
def
Hex.GraphIso.Mathlib.Sparse.isoOfFindIso
{V : Type u}
{W : Type v}
[Fintype V]
[Fintype W]
{n k : ℕ}
{G : Colored V k}
{H : Colored W k}
[DecidableRel G.graph.Adj]
[DecidableRel H.graph.Adj]
(eV : V ≃ Fin n)
(eW : W ≃ Fin n)
{p : Perm n}
(h : Sparse.findIso (encode eV G) (encode eW H) = some p)
:
G.Iso H
Decode the transporter returned by the total native sparse search.