Catalog/Sparsity/ColoringNumbers/Full.lean
1import Mathlib.Combinatorics.SimpleGraph.Walk.Basic
2import Mathlib.Combinatorics.SimpleGraph.Paths
3import Mathlib.Data.Set.Card
4
5namespace Catalog.Sparsity.ColoringNumbers
6
7variable {V : Type*} [DecidableEq V] [Fintype V] [LinearOrder V]
8
9/-- The set of vertices strongly r-reachable from `v` with respect to the
10 linear order on `V`. A vertex `u ≤ v` is in `SReach G r v` when there
11 exists a path of length ≤ r from `v` to `u` whose internal vertices
12 are all strictly greater than `v`. (Def 2.1) -/
13def SReach (G : SimpleGraph V) (r : ℕ) (v : V) : Set V :=
14 {u | u ≤ v ∧ ∃ p : G.Walk v u, p.IsPath ∧ p.length ≤ r ∧
15 ∀ i : ℕ, 0 < i → i < p.length → v < p.getVert i}
16
17/-- The set of vertices weakly r-reachable from `v` with respect to the
18 linear order on `V`. A vertex `u ≤ v` is in `WReach G r v` when there
19 exists a path of length ≤ r from `v` to `u` whose internal vertices
20 are all strictly greater than `u`. (Def 2.1) -/
21def WReach (G : SimpleGraph V) (r : ℕ) (v : V) : Set V :=
22 {u | u ≤ v ∧ ∃ p : G.Walk v u, p.IsPath ∧ p.length ≤ r ∧
23 ∀ i : ℕ, 0 < i → i < p.length → u < p.getVert i}
24
25open Classical in
26/-- The weak r-coloring number of `G` (per ordering). (Def 2.3) -/
27noncomputable def wcol (G : SimpleGraph V) (r : ℕ) : ℕ :=
28 Finset.sup Finset.univ (fun v => (WReach G r v).ncard)
29
30open Classical in
31/-- The strong r-coloring number of `G` (per ordering). (Def 2.3) -/
32noncomputable def scol (G : SimpleGraph V) (r : ℕ) : ℕ :=
33 Finset.sup Finset.univ (fun v => (SReach G r v).ncard)
34
35end Catalog.Sparsity.ColoringNumbers
36