Documentation

CslibFrontier.Foundations.Combinatorics.SimpleGraph.ProperColoring

Proper colorings as functions #

Sampling and counting arguments for colorings ([LP17], Sections 3.3.1 and 14.3–14.4) work with arbitrary maps x : V → Fin q, proper or not, rather than with the bundled SimpleGraph.Coloring. This file provides the predicate SimpleGraph.IsProperColoring, the finset SimpleGraph.properColorings of proper q-colorings, and the colors allowed at a vertex, SimpleGraph.allowedColors: those absent from its neighbors. At most Δ colors are excluded (SimpleGraph.sub_maxDegree_le_card_allowedColors), and recoloring a vertex of a proper coloring with an allowed color keeps it proper (SimpleGraph.IsProperColoring.update_of_mem). The proper colorings agreeing with a fixed coloring b off a vertex set U, SimpleGraph.frozenColorings, are the state spaces of the approximate counting algorithm of [LP17], Section 14.4.2.

Main definitions #

Main results #

References #

def SimpleGraph.IsProperColoring {V : Type u_1} {q : ℕ} (G : SimpleGraph V) (x : V → Fin q) :

x is a proper coloring of G: adjacent vertices have different colors.

Instances For
    theorem SimpleGraph.isProperColoring_iff {V : Type u_1} {q : ℕ} (G : SimpleGraph V) {x : V → Fin q} :
    G.IsProperColoring x ↔ ∀ (u v : V), G.Adj u v → x u ≠ x v
    theorem SimpleGraph.isProperColoring_iff_exists_coloring {V : Type u_1} {q : ℕ} (G : SimpleGraph V) {x : V → Fin q} :
    G.IsProperColoring x ↔ ∃ (C : G.Coloring (Fin q)), ⇑C = x

    Proper colorings are the colorings of G in the sense of SimpleGraph.Coloring.

    def SimpleGraph.allowedColors {V : Type u_1} {q : ℕ} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (x : V → Fin q) (w : V) :

    The colors absent from the neighbors of w under the coloring x ([LP17], Section 3.3.1).

    theorem SimpleGraph.mem_allowedColors {V : Type u_1} {q : ℕ} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] {x : V → Fin q} {w : V} {c : Fin q} :
    c ∈ G.allowedColors x w ↔ ∀ (u : V), G.Adj w u → x u ≠ c
    theorem SimpleGraph.sub_maxDegree_le_card_allowedColors {V : Type u_1} {q : ℕ} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (x : V → Fin q) (w : V) :

    At most Δ colors are excluded.

    theorem SimpleGraph.allowedColors_nonempty {V : Type u_1} {q : ℕ} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] (hq : G.maxDegree < q) (x : V → Fin q) (w : V) :
    theorem SimpleGraph.allowedColors_congr {V : Type u_1} {q : ℕ} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] {x y : V → Fin q} {w : V} (h : ∀ (u : V), G.Adj w u → x u = y u) :

    The allowed colors at w depend only on the colors of the neighbors of w.

    @[instance_reducible]
    theorem SimpleGraph.IsProperColoring.mem_allowedColors {V : Type u_1} {q : ℕ} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj] {x : V → Fin q} (hx : G.IsProperColoring x) (w : V) :
    x w ∈ G.allowedColors x w
    def SimpleGraph.properColorings {V : Type u_1} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (q : ℕ) :
    Finset (V → Fin q)

    The proper q-colorings of G.

    Greedy coloring: if Δ < q, proper q-colorings exist.

    def SimpleGraph.frozenColorings {V : Type u_1} [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj] [DecidableEq V] (q : ℕ) (U : Finset V) (b : V → Fin q) :
    Finset (V → Fin q)

    The proper colorings agreeing with b off U, the state space X_k of [LP17], Section 14.4.2, when U is the set of the first k vertices.

    theorem SimpleGraph.mem_frozenColorings {V : Type u_1} {q : ℕ} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj] [DecidableEq V] {U : Finset V} {b x : V → Fin q} :
    x ∈ G.frozenColorings q U b ↔ G.IsProperColoring x ∧ ∀ u ∉ U, x u = b u
    theorem SimpleGraph.mem_frozenColorings_self {V : Type u_1} {q : ℕ} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj] [DecidableEq V] {U : Finset V} {b : V → Fin q} (hb : G.IsProperColoring b) :
    theorem SimpleGraph.frozenColorings_empty {V : Type u_1} {q : ℕ} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj] [DecidableEq V] {b : V → Fin q} (hb : G.IsProperColoring b) :

    With every vertex frozen, only b itself remains.

    theorem SimpleGraph.frozenColorings_erase {V : Type u_1} {q : ℕ} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj] [DecidableEq V] (U : Finset V) (b : V → Fin q) (v : V) :
    G.frozenColorings q (U.erase v) b = {x ∈ G.frozenColorings q U b | x v = b v}

    Freezing one more vertex v at its color in b keeps the colorings with x v = b v.

    theorem SimpleGraph.IsProperColoring.update_of_mem {V : Type u_1} {q : ℕ} [Fintype V] {G : SimpleGraph V} [DecidableRel G.Adj] [DecidableEq V] {x : V → Fin q} (hx : G.IsProperColoring x) {w : V} {c : Fin q} (hc : c ∈ G.allowedColors x w) :

    Recoloring a vertex of a proper coloring with an allowed color gives a proper coloring.