Documentation

Mathlib.Combinatorics.SimpleGraph.Coloring.Constructions

Concrete colorings of common graphs #

This file defines colorings for some common graphs.

Main declarations #

Bicoloring of a path graph

Equations
Instances For

    Embedding of pathGraph 2 into the first two elements of pathGraph n for 2 ≤ n

    Equations
    Instances For
      theorem SimpleGraph.Coloring.even_length_iff_congr {α : Type u_1} {G : SimpleGraph α} (c : G.Coloring Bool) {u v : α} (p : G.Walk u v) :
      Even p.length ↔ (c u = true ↔ c v = true)
      theorem SimpleGraph.Coloring.odd_length_iff_not_congr {α : Type u_1} {G : SimpleGraph α} (c : G.Coloring Bool) {u v : α} (p : G.Walk u v) :
      Odd p.length ↔ (¬c u = true ↔ c v = true)

      Bicoloring of a cycle graph of even size

      Equations
      Instances For

        Tricoloring of a cycle graph

        Equations
        Instances For

          The injection (x₁, x₂) ↦ x₁ is always an r-coloring of a completeEquipartiteGraph r ·.

          Equations
          Instances For

            Taking the remainder upon dividing by r produces an r-coloring of turanGraph n r for nonzero r.

            Equations
            Instances For
              @[simp]
              theorem SimpleGraph.Coloring.turanGraph_apply (n r : ℕ) [NeZero r] (x✝ : Fin n) :
              (Coloring.turanGraph n r) x✝ = Fin.ofNat r ↑x✝
              @[deprecated SimpleGraph.isBipartite_iff_forall_walk_even_length (since := "2026-08-12")]
              theorem SimpleGraph.two_colorable_iff_forall_loop_even {V : Type u_1} {G : SimpleGraph V} :
              G.IsBipartite ↔ ∀ (v : V) (p : G.Walk v v), Even p.length

              Alias of SimpleGraph.isBipartite_iff_forall_walk_even_length.