IsColorable
DefinitionP1_01_IsColorableDefinition code
import Mathlib
namespace P1_01
open scoped unitInterval
open Classical in
/-- Printed: "A graph is $(d_1,\dots,d_k)$-colorable if its vertex set can be partitioned into
$k$ nonempty subsets so that the subgraph induced by the $i$th part has maximum degree at most
$d_i$ for each $i\in[k]$." Parts are indexed by `Fin k`; part `i` is `{v | c v = i}`. -/
def IsColorable {V : Type*} [Fintype V] (G : SimpleGraph V) (k : ℕ) (d : Fin k → ℕ) : Prop :=
∃ c : V → Fin k,
(∀ i, ∃ v, c v = i) ∧
(∀ i, (G.induce {v | c v = i}).maxDegree ≤ d i)
end P1_01