A finite simple graph with an ordered vertex colouring by Fin k in
which every colour is used. This is the Mathlib-side counterpart of
Hex.GraphIso.Colored: the colouring need not be proper, and an
isomorphism has to preserve each colour index.
- graph : SimpleGraph V
The underlying Mathlib graph.
- color : V → Fin k
The ordered colour of each vertex.
- onto : Function.Surjective self.color
Every colour is used.
Instances For
structure
Hex.GraphIso.Mathlib.Colored.Iso
{V : Type u}
{W : Type v}
{k : ℕ}
[Fintype V]
[Fintype W]
(G : Colored V k)
(H : Colored W k)
:
Type (max u v)
A colour-preserving isomorphism of coloured graphs: a graph isomorphism carrying each vertex to a vertex of the same ordered colour.
The underlying graph isomorphism.
Colour indices are preserved.
Instances For
def
Hex.GraphIso.Mathlib.Colored.ofColor?
{V : Type u}
{k : ℕ}
[Fintype V]
[DecidableEq (Fin k)]
(graph : SimpleGraph V)
(color : V → Fin k)
[DecidableEq V]
:
Checked construction from a possibly non-onto colour map: none
exactly when some colour below k is unused.
Equations
Instances For
theorem
Hex.GraphIso.Mathlib.Colored.ofColor?_eq_none_iff
{V : Type u}
{k : ℕ}
[Fintype V]
[DecidableEq (Fin k)]
[DecidableEq V]
{graph : SimpleGraph V}
{color : V → Fin k}
:
Colored.ofColor? returns none exactly when some colour of
Fin k is taken by no vertex.