The areas / V30. Combinatorics
Mathlib.Combinatorics.SimpleGraph.Coloring.Vertex
95 declarations and 2 deprecated aliases. Mathlib docs · Source
Graph Coloring
This module defines colorings of simple graphs (also known as proper colorings in the literature). A graph coloring is the attribution of "colors" to all of its vertices such that adjacent vertices have different colors. A coloring can be represented as a homomorphism into a complete graph, whose vertices represent the colors.
Main definitions
-
G.Coloring αis the type ofα-colorings of a simple graphG, withαbeing the set of available colors. The type is defined to be homomorphisms fromGinto the complete graph onα, and colorings have a coercion toV → α. -
G.Colorable nis the proposition thatGisn-colorable, which is whether there exists a coloring with at most n colors. -
G.chromaticNumberis the minimalnsuch thatGisn-colorable, or⊤if it cannot be colored with finitely many colors. (Cardinal-valued chromatic numbers are more niche, so we stick toℕ∞.) We writeG.chromaticNumber ≠ ⊤to mean a graph is colorable with finitely many colors. -
C.colorClass cis the set of vertices colored byc : αin the coloringC : G.Coloring α. -
C.colorClassesis the set containing all color classes.
TODO
-
Gather material from:
- https://github.com/leanprover-community/mathlib/blob/simple_graph_matching/src/combinatorics/simple_graph/coloring.lean
- https://github.com/kmill/lean-graphcoloring/blob/master/src/graph.lean
-
Trees
-
Planar graphs
-
Chromatic polynomials
-
develop API for partial colorings, likely as colorings of subgraphs (
H.coe.Coloring α)
Cliques
Isomorphisms
abbrev SimpleGraph.Coloring E1 #
{V : Type u} → SimpleGraph V → Type v → Type (max u v)
An α-coloring of a simple graph G is a homomorphism of G into the complete graph on α.
This is also known as a proper coloring.
theorem SimpleGraph.Coloring.valid E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} (C : G.Coloring α) {v w : V}, G.Adj v w → C v ≠ C w
theorem SimpleGraph.Coloring.injective_comp_of_pairwise_adj E1 #
∀ {V : Type u} {G : SimpleGraph V} {ι : Type u_1} {α : Type u_2} (C : G.Coloring α) (f : ι → V),
(Pairwise fun i j ↦ G.Adj (f i) (f j)) → Function.Injective (⇑C ∘ f)
def SimpleGraph.Coloring.mk E1 #
{V : Type u} →
{G : SimpleGraph V} → {α : Type u_2} → (color : V → α) → (∀ {v w : V}, G.Adj v w → color v ≠ color w) → G.Coloring α
Construct a term of SimpleGraph.Coloring using a function that
assigns vertices to colors and a proof that it is as proper coloring.
(Note: this is a definitionally the constructor for SimpleGraph.Hom,
but with a syntactically better proper coloring hypothesis.)
def SimpleGraph.Coloring.colorClass E1 #
{V : Type u} → {G : SimpleGraph V} → {α : Type u_2} → G.Coloring α → α → Set V
The color class of a given color.
def SimpleGraph.Coloring.colorClasses E1 #
{V : Type u} → {G : SimpleGraph V} → {α : Type u_2} → G.Coloring α → Set (Set V)
The set containing all color classes.
theorem SimpleGraph.Coloring.mem_colorClass E0 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} (C : G.Coloring α) (v : V), v ∈ C.colorClass (C v)
theorem SimpleGraph.Coloring.colorClasses_isPartition E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} (C : G.Coloring α), Setoid.IsPartition C.colorClasses
theorem SimpleGraph.Coloring.mem_colorClasses E0 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} (C : G.Coloring α) {v : V}, C.colorClass (C v) ∈ C.colorClasses
theorem SimpleGraph.Coloring.colorClasses_finite E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} (C : G.Coloring α) [Finite α], C.colorClasses.Finite
theorem SimpleGraph.Coloring.card_colorClasses_le E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} (C : G.Coloring α) [inst : Fintype α]
[inst_1 : Fintype ↑C.colorClasses], Fintype.card ↑C.colorClasses ≤ Fintype.card α
theorem SimpleGraph.Coloring.not_adj_of_mem_colorClass E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} (C : G.Coloring α) {c : α} {v w : V},
v ∈ C.colorClass c → w ∈ C.colorClass c → ¬G.Adj v w
theorem SimpleGraph.Coloring.isIndepSet_colorClass E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} (C : G.Coloring α) (c : α), G.IsIndepSet (C.colorClass c)
abbrev SimpleGraph.Coloring.comap E1 #
{V : Type u} →
{G : SimpleGraph V} →
{V' : Type u_4} → {G' : SimpleGraph V'} → {α : Type u_5} → G'.Coloring α → G →g G' → G.Coloring α
Coloring induced from a homomorphism to a colored graph.
instance SimpleGraph.instFintypeColoring E0 #
{V : Type u} → {G : SimpleGraph V} → {α : Type u_2} → [Fintype V] → [Fintype α] → Fintype (G.Coloring α)
instance SimpleGraph.instDecidablePredMemSetColorClassOfDecidableEq E0 #
{V : Type u} →
{G : SimpleGraph V} →
{α : Type u_2} → (C : G.Coloring α) → [DecidableEq α] → {c : α} → DecidablePred fun x ↦ x ∈ C.colorClass c
instance SimpleGraph.instNontrivialColoringOfNonempty E0 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} [Nonempty (G.Coloring α)] [Nontrivial α] [Nonempty V],
Nontrivial (G.Coloring α)
instance SimpleGraph.instInfiniteColoringOfNonempty E0 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} [Nonempty (G.Coloring α)] [Infinite α] [Nonempty V],
Infinite (G.Coloring α)
def SimpleGraph.Colorable E1 #
{V : Type u} → SimpleGraph V → ℕ → Prop
Whether a graph can be colored by at most n colors.
def SimpleGraph.Coloring.ofIsEmpty E1 #
{V : Type u} → {G : SimpleGraph V} → {α : Type u_2} → [IsEmpty V] → G.Coloring α
The coloring of an empty graph.
theorem SimpleGraph.Colorable.of_isEmpty E1 #
∀ {V : Type u} {G : SimpleGraph V} [IsEmpty V] (n : ℕ), G.Colorable n
theorem SimpleGraph.colorable_zero_iff E0 #
∀ {V : Type u} {G : SimpleGraph V}, G.Colorable 0 ↔ IsEmpty V
theorem SimpleGraph.Colorable.isEmpty E1 #
∀ {V : Type u} {G : SimpleGraph V}, G.Colorable 0 → IsEmpty V
Alias of the forward direction of SimpleGraph.colorable_zero_iff.
theorem SimpleGraph.colorable_one_iff E0 #
∀ {V : Type u} {G : SimpleGraph V}, G.Colorable 1 ↔ G = ⊥
abbrev SimpleGraph.Coloring.homMap E1 #
{V : Type u} → {G : SimpleGraph V} → {α : Type u_4} → (f : G.Coloring α) → G →g SimpleGraph.map (⇑f) G
A coloring of a graph G is a homomorphism from it to the mapped graph.
This is Hom.map spelled using colorings. The mapped graph G.map f can be thought of as taking
the original graph G and considering every color class (independent set) as a single vertex.
theorem SimpleGraph.Colorable.map E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ} {β : Type u_3} (f : V ↪ β) [NeZero n],
G.Colorable n → (SimpleGraph.map (⇑f) G).Colorable n
If G is n-colorable, then mapping the vertices of G produces an n-colorable simple
graph.
theorem SimpleGraph.Colorable.card_le_of_pairwise_adj E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ} {ι : Type u_1},
G.Colorable n → ∀ (f : ι → V), (Pairwise fun i j ↦ G.Adj (f i) (f j)) → Nat.card ι ≤ n
def SimpleGraph.selfColoring E1 #
{V : Type u} → (G : SimpleGraph V) → G.Coloring V
The "tautological" coloring of a graph, using the vertices of the graph as colors.
def SimpleGraph.chromaticNumber E1 #
{V : Type u} → SimpleGraph V → ℕ∞
The chromatic number of a graph is the minimal number of colors needed to color it.
This is ⊤ (infinity) iff G isn't colorable with finitely many colors.
If G is colorable, then ENat.toNat G.chromaticNumber is the ℕ-valued chromatic number.
theorem SimpleGraph.le_chromaticNumber_iff_colorable E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, ↑n ≤ G.chromaticNumber ↔ ∀ (m : ℕ), G.Colorable m → n ≤ m
theorem SimpleGraph.le_chromaticNumber_iff_coloring E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, ↑n ≤ G.chromaticNumber ↔ ∀ (m : ℕ) (a : G.Coloring (Fin m)), n ≤ m
theorem SimpleGraph.le_chromaticNumber_of_pairwise_adj E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ} {ι : Type u_1},
n ≤ Nat.card ι → ∀ (f : ι → V), (Pairwise fun i j ↦ G.Adj (f i) (f j)) → ↑n ≤ G.chromaticNumber
theorem SimpleGraph.chromaticNumber_eq_biInf E1 #
∀ {V : Type u} (G : SimpleGraph V), G.chromaticNumber = ⨅ n ∈ Set.ofPred G.Colorable, ↑n
theorem SimpleGraph.chromaticNumber_eq_iInf E1 #
∀ {V : Type u} (G : SimpleGraph V), G.chromaticNumber = ⨅ n, ↑↑n
theorem SimpleGraph.Colorable.chromaticNumber_eq_sInf E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, G.Colorable n → G.chromaticNumber = ↑(sInf {n' | G.Colorable n'})
def SimpleGraph.recolorOfEmbedding E1 #
{V : Type u} → (G : SimpleGraph V) → {α : Type u_4} → {β : Type u_5} → (α ↪ β) → G.Coloring α ↪ G.Coloring β
Given an embedding, there is an induced embedding of colorings.
theorem SimpleGraph.coe_recolorOfEmbedding E0 #
∀ {V : Type u} (G : SimpleGraph V) {α : Type u_2} {β : Type u_3} (f : α ↪ β),
⇑(G.recolorOfEmbedding f) = (SimpleGraph.Embedding.completeGraph f).toHom.comp
def SimpleGraph.recolorOfEquiv E1 #
{V : Type u} → (G : SimpleGraph V) → {α : Type u_4} → {β : Type u_5} → α ≃ β → G.Coloring α ≃ G.Coloring β
Given an equivalence, there is an induced equivalence between colorings.
theorem SimpleGraph.coe_recolorOfEquiv E0 #
∀ {V : Type u} (G : SimpleGraph V) {α : Type u_2} {β : Type u_3} (f : α ≃ β),
⇑(G.recolorOfEquiv f) = (SimpleGraph.Embedding.completeGraph f.toEmbedding).toHom.comp
def SimpleGraph.recolorOfCardLE E1 #
{V : Type u} →
(G : SimpleGraph V) →
{α : Type u_4} →
{β : Type u_5} →
[inst : Fintype α] → [inst_1 : Fintype β] → Fintype.card α ≤ Fintype.card β → G.Coloring α ↪ G.Coloring β
There is a noncomputable embedding of α-colorings to β-colorings if
β has at least as large a cardinality as α.
theorem SimpleGraph.coe_recolorOfCardLE E0 #
∀ {V : Type u} (G : SimpleGraph V) {α : Type u_2} {β : Type u_3} [inst : Fintype α] [inst_1 : Fintype β]
(hαβ : Fintype.card α ≤ Fintype.card β),
⇑(G.recolorOfCardLE hαβ) = (SimpleGraph.Embedding.completeGraph ⋯.some).toHom.comp
theorem SimpleGraph.Colorable.mono E1 #
∀ {V : Type u} {G : SimpleGraph V} {n m : ℕ}, n ≤ m → G.Colorable n → G.Colorable m
theorem SimpleGraph.Coloring.colorable E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} [inst : Fintype α] (C : G.Coloring α), G.Colorable (Fintype.card α)
theorem SimpleGraph.colorable_of_fintype E1 #
∀ {V : Type u} (G : SimpleGraph V) [inst : Fintype V], G.Colorable (Fintype.card V)
def SimpleGraph.Colorable.toColoring E1 #
{V : Type u} →
{G : SimpleGraph V} →
{α : Type u_2} → [inst : Fintype α] → {n : ℕ} → G.Colorable n → n ≤ Fintype.card α → G.Coloring α
Noncomputably get a coloring from colorability.
theorem SimpleGraph.Colorable.of_hom E1 #
∀ {V : Type u} {G : SimpleGraph V} {V' : Type u_4} {G' : SimpleGraph V'} {n : ℕ} (f : G →g G'),
G'.Colorable n → G.Colorable n
theorem SimpleGraph.colorable_iff_exists_bdd_nat_coloring E1 #
∀ {V : Type u} {G : SimpleGraph V} (n : ℕ), G.Colorable n ↔ ∃ C, ∀ (v : V), C v < n
theorem SimpleGraph.colorable_iff_forall_connectedComponent E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, G.Colorable n ↔ ∀ (c : G.ConnectedComponent), c.toSimpleGraph.Colorable n
theorem SimpleGraph.colorable_set_nonempty_of_colorable E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, G.Colorable n → {n | G.Colorable n}.Nonempty
theorem SimpleGraph.chromaticNumber_bddBelow E1 #
∀ {V : Type u} {G : SimpleGraph V}, BddBelow {n | G.Colorable n}
theorem SimpleGraph.Colorable.chromaticNumber_le E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, G.Colorable n → G.chromaticNumber ≤ ↑n
theorem SimpleGraph.chromaticNumber_ne_top_iff_exists E1 #
∀ {V : Type u} {G : SimpleGraph V}, G.chromaticNumber ≠ ⊤ ↔ ∃ n, G.Colorable n
theorem SimpleGraph.chromaticNumber_le_iff_colorable E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, G.chromaticNumber ≤ ↑n ↔ G.Colorable n
theorem SimpleGraph.chromaticNumber_eq_iff_colorable_not_colorable E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, G.chromaticNumber = ↑n + 1 ↔ G.Colorable (n + 1) ∧ ¬G.Colorable n
If the chromatic number of G is n + 1, then G is colorable in no fewer than n + 1
colors.
theorem SimpleGraph.colorable_chromaticNumber E1 #
∀ {V : Type u} {G : SimpleGraph V} {m : ℕ}, G.Colorable m → G.Colorable G.chromaticNumber.toNat
theorem SimpleGraph.colorable_chromaticNumber_of_fintype E1 #
∀ {V : Type u} (G : SimpleGraph V) [Finite V], G.Colorable G.chromaticNumber.toNat
theorem SimpleGraph.chromaticNumber_le_one_of_subsingleton E1 #
∀ {V : Type u} (G : SimpleGraph V) [Subsingleton V], G.chromaticNumber ≤ 1
theorem SimpleGraph.Colorable.chromaticNumber_pos E1 #
∀ {V : Type u} {G : SimpleGraph V} [Nonempty V] {n : ℕ}, G.Colorable n → 0 < G.chromaticNumber
theorem SimpleGraph.colorable_of_chromaticNumber_ne_top E1 #
∀ {V : Type u} {G : SimpleGraph V}, G.chromaticNumber ≠ ⊤ → G.Colorable G.chromaticNumber.toNat
theorem SimpleGraph.Colorable.mono_left E1 #
∀ {V : Type u} {G G' : SimpleGraph V}, G ≤ G' → ∀ {n : ℕ}, G'.Colorable n → G.Colorable n
theorem SimpleGraph.chromaticNumber_le_of_forall_imp E1 #
∀ {V : Type u} {G : SimpleGraph V} {V' : Type u_4} {G' : SimpleGraph V'},
(∀ (n : ℕ), G'.Colorable n → G.Colorable n) → G.chromaticNumber ≤ G'.chromaticNumber
theorem SimpleGraph.chromaticNumber_mono E1 #
∀ {V : Type u} {G : SimpleGraph V} (G' : SimpleGraph V), G ≤ G' → G.chromaticNumber ≤ G'.chromaticNumber
theorem SimpleGraph.chromaticNumber_mono_of_hom E1 #
∀ {V : Type u} {G : SimpleGraph V} {V' : Type u_4} {G' : SimpleGraph V'} (f : G →g G'),
G.chromaticNumber ≤ G'.chromaticNumber
theorem SimpleGraph.card_le_chromaticNumber_iff_forall_surjective E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} [inst : Fintype α],
↑(Fintype.card α) ≤ G.chromaticNumber ↔ ∀ (C : G.Coloring α), Function.Surjective ⇑C
theorem SimpleGraph.le_chromaticNumber_iff_forall_surjective E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, ↑n ≤ G.chromaticNumber ↔ ∀ (C : G.Coloring (Fin n)), Function.Surjective ⇑C
theorem SimpleGraph.chromaticNumber_eq_card_iff_forall_surjective E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} [inst : Fintype α],
G.Colorable (Fintype.card α) → (G.chromaticNumber = ↑(Fintype.card α) ↔ ∀ (C : G.Coloring α), Function.Surjective ⇑C)
theorem SimpleGraph.chromaticNumber_eq_iff_forall_surjective E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ},
G.Colorable n → (G.chromaticNumber = ↑n ↔ ∀ (C : G.Coloring (Fin n)), Function.Surjective ⇑C)
theorem SimpleGraph.chromaticNumber_bot E1 #
∀ {V : Type u} [Nonempty V], ⊥.chromaticNumber = 1
theorem SimpleGraph.chromaticNumber_top E0 #
∀ {V : Type u} [inst : Fintype V], ⊤.chromaticNumber = ↑(Fintype.card V)
theorem SimpleGraph.chromaticNumber_top_eq_top_of_infinite E0 #
∀ (V : Type u_4) [Infinite V], ⊤.chromaticNumber = ⊤
theorem SimpleGraph.chromaticNumber_top_eq_enat_card E0 #
∀ {V : Type u}, ⊤.chromaticNumber = ENat.card V
theorem SimpleGraph.chromaticNumber_eq_card_iff E0 #
∀ {V : Type u} {G : SimpleGraph V} [inst : Fintype V], G.chromaticNumber = ↑(Fintype.card V) ↔ G = ⊤
theorem SimpleGraph.chromaticNumber_le_card E1 #
∀ {V : Type u} {G : SimpleGraph V} [inst : Fintype V], G.chromaticNumber ≤ ↑(Fintype.card V)
theorem SimpleGraph.two_le_chromaticNumber_of_adj E1 #
∀ {V : Type u} {G : SimpleGraph V} {u v : V}, G.Adj u v → 2 ≤ G.chromaticNumber
theorem SimpleGraph.chromaticNumber_eq_zero_iff E0 #
∀ {V : Type u} {G : SimpleGraph V}, G.chromaticNumber = 0 ↔ IsEmpty V
theorem SimpleGraph.chromaticNumber_eq_zero_of_isEmpty E0 #
∀ {V : Type u} {G : SimpleGraph V} [IsEmpty V], G.chromaticNumber = 0
theorem SimpleGraph.chromaticNumber_eq_one_iff E0 #
∀ {V : Type u} {G : SimpleGraph V}, G.chromaticNumber = 1 ↔ G = ⊥ ∧ Nonempty V
theorem SimpleGraph.two_le_chromaticNumber_iff_ne_bot E1 #
∀ {V : Type u} {G : SimpleGraph V}, 2 ≤ G.chromaticNumber ↔ G ≠ ⊥
def SimpleGraph.CompleteBipartiteGraph.bicoloring E1 #
(V : Type u_4) → (W : Type u_5) → (completeBipartiteGraph V W).Coloring Bool
The bicoloring of a complete bipartite graph using whether a vertex is on the left or on the right.
theorem SimpleGraph.CompleteBipartiteGraph.chromaticNumber E1 #
∀ {V : Type u_4} {W : Type u_5} [Nonempty V] [Nonempty W], (completeBipartiteGraph V W).chromaticNumber = 2
theorem SimpleGraph.IsClique.card_le_of_colorable E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ} {s : Finset V}, G.IsClique ↑s → G.Colorable n → s.card ≤ n
theorem SimpleGraph.IsClique.card_le_of_coloring E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} {s : Finset V},
G.IsClique ↑s → ∀ [inst : Fintype α] (C : G.Coloring α), s.card ≤ Fintype.card α
theorem SimpleGraph.IsClique.card_le_chromaticNumber E1 #
∀ {V : Type u} {G : SimpleGraph V} {s : Finset V}, G.IsClique ↑s → ↑s.card ≤ G.chromaticNumber
theorem SimpleGraph.cliqueNum_le_chromaticNumber E1 #
∀ {V : Type u} {G : SimpleGraph V}, ↑G.cliqueNum ≤ G.chromaticNumber
theorem SimpleGraph.Colorable.cliqueFree E1 #
∀ {V : Type u} {G : SimpleGraph V} {n m : ℕ}, G.Colorable n → n < m → G.CliqueFree m
theorem SimpleGraph.cliqueFree_of_chromaticNumber_lt E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ}, G.chromaticNumber < ↑n → G.CliqueFree n
theorem SimpleGraph.Coloring.surjOn_of_card_le_isClique E1 #
∀ {V : Type u} {G : SimpleGraph V} {α : Type u_2} [inst : Fintype α] {s : Finset V},
G.IsClique ↑s → Fintype.card α ≤ s.card → ∀ (C : G.Coloring α), Set.SurjOn (⇑C) (↑s) Set.univ
Given a coloring α of G, and a clique of size at least the number of colors, the clique
contains a vertex of each color.
def SimpleGraph.completeMultipartiteGraph.coloring E1 #
{ι : Type u_4} → (V : ι → Type u_5) → (SimpleGraph.completeMultipartiteGraph V).Coloring ι
The canonical ι-coloring of a completeMultipartiteGraph with parts indexed by ι
theorem SimpleGraph.completeMultipartiteGraph.colorable E1 #
∀ {ι : Type u_4} (V : ι → Type u_5) [inst : Fintype ι],
(SimpleGraph.completeMultipartiteGraph V).Colorable (Fintype.card ι)
theorem SimpleGraph.completeMultipartiteGraph.chromaticNumber E1 #
∀ {ι : Type u_4} (V : ι → Type u_5) [inst : Fintype ι] (f : (i : ι) → V i),
(SimpleGraph.completeMultipartiteGraph V).chromaticNumber = ↑(Fintype.card ι)
theorem SimpleGraph.completeMultipartiteGraph.colorable_of_cliqueFree E1 #
∀ {n : ℕ} {ι : Type u_4} (V : ι → Type u_5) (f : (i : ι) → V i),
(SimpleGraph.completeMultipartiteGraph V).CliqueFree n → (SimpleGraph.completeMultipartiteGraph V).Colorable (n - 1)
theorem SimpleGraph.free_of_colorable E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ} {W : Type u_4} {H : SimpleGraph W}, ¬H.Colorable n → G.Colorable n → H.Free G
If H is not n-colorable and G is n-colorable, then G is H.Free.
def SimpleGraph.coloringCongr E1 #
{V : Type u} →
{G : SimpleGraph V} →
{α : Type u_2} →
{β : Type u_3} → {W : Type u_4} → {H : SimpleGraph W} → G ≃g H → α ≃ β → G.Coloring α ≃ H.Coloring β
Equivalence of colorings induced by isomorphisms of graphs and equivalence of colors.
theorem SimpleGraph.colorable_congr E1 #
∀ {V : Type u} {G : SimpleGraph V} {n : ℕ} {W : Type u_4} {H : SimpleGraph W} (f : G ≃g H),
G.Colorable n ↔ H.Colorable n
theorem SimpleGraph.chromaticNumber_congr E1 #
∀ {V : Type u} {G : SimpleGraph V} {W : Type u_4} {H : SimpleGraph W} (f : G ≃g H),
G.chromaticNumber = H.chromaticNumber
Deprecated aliases
| Name | New name | Since |
|---|---|---|
SimpleGraph.chromaticNumber_pos | SimpleGraph.Colorable.chromaticNumber_pos | 2026-05-20 |
SimpleGraph.colorable_iff_forall_connectedComponents | SimpleGraph.colorable_iff_forall_connectedComponent | 2026-07-12 |