extension_of_colourings_via_um_selectors
Let G be a graph on vertex type V. Let S be a subset of V and let φ : S → Fin p be such that (S, φ) is a UM-selector in G of width p. Let ψ : Sᶜ → Fin q be a colouring of the induced subgraph G - S. Then the extension colouring σ = simple_graph_um_selector_extension S φ ψ is an iUMc-colouring of G. If G has no isolated vertices and for every s ∈ S the maximum colour of ψ on N(s) is attained exactly once, then σ is also an iUMo-colouring of G. Furthermore, if ψ is a proper colouring of G - S, then σ is a proper colouring of G.
Statement
theorem extension_of_colourings_via_um_selectors {V : Type*} (G : SimpleGraph V) {p q : ℕ} (S : Set V) (φ : ↥S → Fin p) (hφ : simple_graph_is_um_selector G S φ) (ψ : ↥(Sᶜ) → Fin q) : simple_graph_is_iumc_coloring G (simple_graph_um_selector_extension S φ ψ) ∧ ((∀ v : V, ¬ G.IsIsolated v) → (∀ s : ↥S, ∃ u : ↥(Sᶜ), G.Adj s.1 u.1 ∧ ∀ w : ↥(Sᶜ), G.Adj s.1 w.1 → w ≠ u → ψ w < ψ u) → simple_graph_is_iumo_coloring G (simple_graph_um_selector_extension S φ ψ)) ∧ ((∀ (u v : ↥(Sᶜ)), (G.induce Sᶜ).Adj u v → ψ u ≠ ψ v) → ∀ {u v : V}, G.Adj u v → simple_graph_um_selector_extension S φ ψ u ≠ simple_graph_um_selector_extension S φ ψ v)
- Formalizes
- arXiv:2611.23478 Lemma 5
- Verified
- 20 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 6
- simple_graph_is_um_selectorA UM-selector of width p in a graph G is a pair (S, φ) where S is an independent set in G and φ : S → {1, ..., p} such that for every…
- simple_graph_um_selector_extensionGiven a type V, a subset S : Set V, natural numbers p and q, a function φ : S → Fin p, a function ψ : Sᶜ → Fin q, and an element v : V,…
- simple_graph_is_iumc_coloringA vertex colouring of a graph G is an iUMc-colouring (unique-maximum colouring with respect to closed neighbourhoods) if, for every vertex…
- simple_graph_is_iumo_coloringA vertex colouring of a graph G is an iUMo-colouring (unique-maximum colouring with respect to open neighbourhoods) if, for every vertex…
- LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or…
Read back from the Lean
Let $V$ be a type, $G$ a simple graph on $V$, and $p, q \in \mathbb{N}$. Let $S \subseteq V$, let $\varphi : S \to \mathrm{Fin}\ p$, and let $\psi : S^c \to \mathrm{Fin}\ q$. Assume that $\varphi$ is a unique-maximum selector (UM-selector) for $G$ on $S$, meaning that $S$ is an independent set of $G$, and for every $x \in V$, there exists $u \in S$ in the closed neighborhood $\{x\} \cup N_G(x)$ such that for every $w \in S$ in $\{x\} \cup N_G(x)$ with $w \neq u$, $\varphi(w) < \varphi(u)$. Define the extended coloring $c : V \to \mathrm{Fin}(q + p)$ by $c(v) = q + \varphi(v)$ for $v \in S$ and $c(v) = \psi(v)$ for $v \in S^c$. Then the following three conditions hold simultaneously: 1. $c$ is an injective/unique-maximum closed-neighborhood coloring (IUMC coloring) of $G$: for every $v \in V$, there exists $u \in \{v\} \cup N_G(v)$ such that for all $w \in \{v\} \cup N_G(v)$ with $w \neq u$, $c(w) < c(u)$. 2. If $G$ has no isolated vertices (every vertex has degree at least 1) and for every $s \in S$ there exists a neighbor $u \in S^c$ of $s$ such that for all neighbors $w \in S^c$ of $s$ with $w \neq u$, $\psi(w) < \psi(u)$, then $c$ is an injective/unique-maximum open-neighborhood coloring (IUMO coloring) of $G$: for every $v \in V$, there exists $u \in N_G(v)$ such that for all $w \in N_G(v)$ with $w \neq u$, $c(w) < c(u)$. 3. If $\psi$ is a proper coloring of the induced subgraph $G[S^c]$ (i.e., for all $u, v \in S^c$, if they are adjacent in $G[S^c]$ then $\psi(u) \neq \psi(v)$), then $c$ is a proper coloring of $G$ (i.e., for all $u, v \in V$, if $G.\mathrm{Adj}\ u\ v$ then $c(u) \neq c(v)$).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
The proof shows that extending a UM-selector colouring φ on an independent set S by a colouring ψ on Sᶜ produces an iUMc-colouring, an iUMo-colouring (under unique neighbourhood maximums), and a proper colouring (if ψ is proper). The extension places all colours of S strictly above all colours of Sᶜ while preserving the relative orders within S and within Sᶜ. For any vertex, the UM-selector provides a unique maximum in S whose colour dominates all neighbours in Sᶜ, ensuring the iUMc and iUMo properties; properness holds because S is independent and colours between S and Sᶜ are strictly separated.
For any vertex v in S, the extension colouring evaluates to q + φ(v).
Unfolding the definition of the extension colouring gives a conditional checking whether v is in S. Since v is assumed to be in S, the positive branch applies.
uses
dif_posunfold simple_graph_um_selector_extension rw [dif_pos h]
For any vertex v not in S, the extension colouring evaluates to ψ(v) cast into Fin (q + p).
Unfolding the definition gives the same conditional; since v is not in S, the negative branch applies.
uses
dif_negunfold simple_graph_um_selector_extension rw [dif_neg h]
Any vertex u outside S receives a strictly smaller colour than any vertex w in S. automation
Rewriting by the definitions of the extension on u and w reduces the inequality to comparing the natural number values: the value of ψ(u) is less than q, while the value of φ(w) shifted by q is at least q. Linear arithmetic confirms the strict inequality.
uses
dif_neg,dif_pos,Fin.lt_def,Fin.val_castAdd,Fin.val_natAddrw [simple_graph_um_selector_extension, dif_neg hu, simple_graph_um_selector_extension, dif_pos hw] rw [Fin.lt_def] have := (ψ ⟨u, hu⟩).isLt have := (φ ⟨w, hw⟩).isLt have h1 : (Fin.castAdd p (ψ ⟨u, hu⟩) : Fin (q + p)).val = (ψ ⟨u, hu⟩).val := Fin.val_castAdd p _ have h2 : (Fin.natAdd q (φ ⟨w, hw⟩) : Fin (q + p)).val = q + (φ ⟨w, hw⟩).val := Fin.val_natAdd q _ omega
For any two vertices u and w in S, their extension colours satisfy σ(u) < σ(w) if and only if φ(u) < φ(w).
Both values are shifted by q via Fin.natAdd; this shift preserves and reflects strict inequalities.
uses
dif_pos,Fin.natAdd_lt_natAdd_iffrw [simple_graph_um_selector_extension, dif_pos hu, simple_graph_um_selector_extension, dif_pos hw] exact Fin.natAdd_lt_natAdd_iff q
For any two vertices u and w outside S, their extension colours satisfy σ(u) < σ(w) if and only if ψ(u) < ψ(w).
Both values are embedded into Fin (q + p) via Fin.castAdd; strict monotonicity of this embedding preserves and reflects strict inequalities.
uses
dif_neg,Fin.strictMono_castAddrw [simple_graph_um_selector_extension, dif_neg hu, simple_graph_um_selector_extension, dif_neg hw] exact (Fin.strictMono_castAdd p).lt_iff_lt
The main theorem reduces to three independent goals: proving σ is an iUMc-colouring, an iUMo-colouring, and a proper colouring.
The conclusion is a conjunction of three statements, so we split it into three separate proof obligations.
refine ⟨?_, ?_, ?_⟩The extension colouring σ is an iUMc-colouring of G.
For any vertex v, the UM-selector property provides a vertex u in S ∩ N[v] that uniquely maximizes φ among vertices of S ∩ N[v]. For any other vertex w in N[v], if w is in S, then φ(w) < φ(u), so σ(w) < σ(u) by order preservation on S. If w is not in S, then σ(w) < σ(u) because every vertex outside S receives a colour strictly smaller than any vertex in S. Thus u uniquely maximizes σ on N[v].
uses
extension_of_colourings_via_um_selectors_ext_lt_of_mem_mem,extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem· intro v rcases hφ.2 v with ⟨u, hu_mem, hu_max⟩ refine ⟨u.1, hu_mem, ?_⟩ intro w hw_mem hwu by_cases hwS : w ∈ S · have h_ne : (⟨w, hwS⟩ : ↥S) ≠ u := by intro h_eq apply hwu exact congr_arg Subtype.val h_eq have h_lt := hu_max ⟨w, hwS⟩ hw_mem h_ne rwa [extension_of_colourings_via_um_selectors_ext_lt_of_mem_mem S φ ψ hwS u.2] · exact extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem S φ ψ hwS u.2
Under the uniqueness assumption on ψ, any vertex v in S has a unique maximum neighbour under σ.
By hypothesis, v has a neighbour u outside S that uniquely maximizes ψ on N(v) ∩ Sᶜ. Since S is an independent set, every neighbour w of v must lie outside S. By choice of u, ψ(w) < ψ(u) for all w ≠ u, and because both vertices are outside S, their order under σ coincides with their order under ψ, so σ(w) < σ(u).
uses
extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_not_mem· intros _h_no_iso h_max v by_cases hv : v ∈ S · rcases h_max ⟨v, hv⟩ with ⟨u, hu_adj, hu_max⟩ refine ⟨u.1, hu_adj, ?_⟩ intro w hw_adj hwu have hwS : w ∉ S := by intro hwS exact hφ.1 hv hwS hw_adj.ne hw_adj have h_ne : (⟨w, hwS⟩ : ↥(Sᶜ)) ≠ u := by intro h_eq apply hwu exact congr_arg Subtype.val h_eq have h_lt := hu_max ⟨w, hwS⟩ hw_adj h_ne rwa [extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_not_mem S φ ψ hwS u.2]
Any vertex v outside S has a unique maximum neighbour under σ.
The UM-selector gives a vertex u in S ∩ N[v] maximizing φ. Since v is not in S while u is in S, u cannot equal v, so u is in the open neighbourhood N(v). Any other neighbour w in N(v) satisfies σ(w) < σ(u): if w is in S, this follows from the maximality of u under φ; if w is outside S, its colour is automatically smaller than the colour of u in S.
uses
Set.mem_insert_of_mem,extension_of_colourings_via_um_selectors_ext_lt_of_mem_mem,extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem· rcases hφ.2 v with ⟨u, hu_mem, hu_max⟩ have hu_ne_v : u.1 ≠ v := by rintro rfl exact hv u.2 have hu_adj : u.1 ∈ G.neighborSet v := by rcases Set.mem_insert_iff.mp hu_mem with rfl | h · exact (hu_ne_v rfl).elim · exact h refine ⟨u.1, hu_adj, ?_⟩ intro w hw_adj hwu by_cases hwS : w ∈ S · have h_ne : (⟨w, hwS⟩ : ↥S) ≠ u := by intro h_eq apply hwu exact congr_arg Subtype.val h_eq have hw_mem : w ∈ insert v (G.neighborSet v) := Set.mem_insert_of_mem _ hw_adj have h_lt := hu_max ⟨w, hwS⟩ hw_mem h_ne rwa [extension_of_colourings_via_um_selectors_ext_lt_of_mem_mem S φ ψ hwS u.2] · exact extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem S φ ψ hwS u.2
If u is in S, any edge uv connects vertices of different colours under σ.
If v were also in S, that would contradict S being an independent set. Hence v is outside S, which implies σ(v) < σ(u), so σ(u) ≠ σ(v) by irreflexivity of strict inequality.
uses
extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem,lt_irrefl· intro hψ u v hadj by_cases hu : u ∈ S · by_cases hv : v ∈ S · exact (hφ.1 hu hv hadj.ne hadj).elim · intro h_eq have := extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem S φ ψ hv hu rw [h_eq] at this exact lt_irrefl _ this
If u is outside S and v is in S, uv connects vertices of different colours under σ.
Since u is outside S and v is in S, σ(u) < σ(v), which again contradicts equality by irreflexivity of <.
uses
extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem,lt_irrefl· by_cases hv : v ∈ S · intro h_eq have := extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem S φ ψ hu hv rw [h_eq] at this exact lt_irrefl _ this
If both u and v are outside S, and ψ is proper on G - S, then σ(u) ≠ σ(v).
The edge uv lies entirely in G - S, so properness of ψ gives ψ(u) ≠ ψ(v). Since the extension on Sᶜ simply embeds ψ via an injective map Fin.castAdd, σ(u) = σ(v) would force ψ(u) = ψ(v), a contradiction.
uses
extension_of_colourings_via_um_selectors_ext_not_in· intro h_eq have hadj' : (G.induce Sᶜ).Adj ⟨u, hu⟩ ⟨v, hv⟩ := G.induce_adj.mpr hadj have hne := hψ ⟨u, hu⟩ ⟨v, hv⟩ hadj' rw [extension_of_colourings_via_um_selectors_ext_not_in S φ ψ hu, extension_of_colourings_via_um_selectors_ext_not_in S φ ψ hv] at h_eq have : ψ ⟨u, hu⟩ = ψ ⟨v, hv⟩ := Fin.castAdd_inj.mp h_eq exact hne this
dif_pos- In a dependent if-then-else, if the condition is true, the expression evaluates to the then-branch.
dif_neg- In a dependent if-then-else, if the condition is false, the expression evaluates to the else-branch.
Fin.lt_def- Strict inequality on Fin n is defined by the strict inequality on the underlying natural numbers.
Fin.val_castAdd- Casting an element of Fin n into Fin (n + m) preserves its numerical value.
Fin.val_natAdd- Adding an offset n to an element of Fin m produces an element with numerical value n + value of the element.
Fin.natAdd_lt_natAdd_iff- Adding an offset to both sides of an inequality of Fin elements preserves the strict inequality.
Fin.strictMono_castAdd- Casting an element of Fin n into Fin (n + m) is strictly monotone.
extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem- Under the extension colouring, a vertex outside S has strictly smaller colour than a vertex in S.
extension_of_colourings_via_um_selectors_ext_lt_of_mem_mem- Under the extension colouring, the colour order between two vertices in S matches their order under φ.
extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_not_mem- Under the extension colouring, the colour order between two vertices outside S matches their order under ψ.
lt_irrefl- Strict inequality is irreflexive; no element is strictly less than itself.
Set.mem_insert_of_mem- An element of the neighbourhood of v is also an element of the closed neighbourhood insert v N(v).
extension_of_colourings_via_um_selectors_ext_not_in- The extension colouring on a vertex outside S is given by casting its colour under ψ.
Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
lemma extension_of_colourings_via_um_selectors_ext_in {V : Type*} (S : Set V) {p q : ℕ} (φ : ↥S → Fin p) (ψ : ↥(Sᶜ) → Fin q) {v : V} (h : v ∈ S) : simple_graph_um_selector_extension S φ ψ v = Fin.natAdd q (φ ⟨v, h⟩) := by unfold simple_graph_um_selector_extension rw [dif_pos h]lemma extension_of_colourings_via_um_selectors_ext_not_in {V : Type*} (S : Set V) {p q : ℕ} (φ : ↥S → Fin p) (ψ : ↥(Sᶜ) → Fin q) {v : V} (h : v ∉ S) : simple_graph_um_selector_extension S φ ψ v = Fin.castAdd p (ψ ⟨v, h⟩) := by unfold simple_graph_um_selector_extension rw [dif_neg h]lemma extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem {V : Type*} (S : Set V) {p q : ℕ} (φ : ↥S → Fin p) (ψ : ↥(Sᶜ) → Fin q) {u w : V} (hu : u ∉ S) (hw : w ∈ S) : simple_graph_um_selector_extension S φ ψ u < simple_graph_um_selector_extension S φ ψ w := by rw [simple_graph_um_selector_extension, dif_neg hu, simple_graph_um_selector_extension, dif_pos hw] rw [Fin.lt_def] have := (ψ ⟨u, hu⟩).isLt have := (φ ⟨w, hw⟩).isLt have h1 : (Fin.castAdd p (ψ ⟨u, hu⟩) : Fin (q + p)).val = (ψ ⟨u, hu⟩).val := Fin.val_castAdd p _ have h2 : (Fin.natAdd q (φ ⟨w, hw⟩) : Fin (q + p)).val = q + (φ ⟨w, hw⟩).val := Fin.val_natAdd q _ omegalemma extension_of_colourings_via_um_selectors_ext_lt_of_mem_mem {V : Type*} (S : Set V) {p q : ℕ} (φ : ↥S → Fin p) (ψ : ↥(Sᶜ) → Fin q) {u w : V} (hu : u ∈ S) (hw : w ∈ S) : simple_graph_um_selector_extension S φ ψ u < simple_graph_um_selector_extension S φ ψ w ↔ φ ⟨u, hu⟩ < φ ⟨w, hw⟩ := by rw [simple_graph_um_selector_extension, dif_pos hu, simple_graph_um_selector_extension, dif_pos hw] exact Fin.natAdd_lt_natAdd_iff qlemma extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_not_mem {V : Type*} (S : Set V) {p q : ℕ} (φ : ↥S → Fin p) (ψ : ↥(Sᶜ) → Fin q) {u w : V} (hu : u ∉ S) (hw : w ∉ S) : simple_graph_um_selector_extension S φ ψ u < simple_graph_um_selector_extension S φ ψ w ↔ ψ ⟨u, hu⟩ < ψ ⟨w, hw⟩ := by rw [simple_graph_um_selector_extension, dif_neg hu, simple_graph_um_selector_extension, dif_neg hw] exact (Fin.strictMono_castAdd p).lt_iff_lt/-- Lemma 5: Extension of colourings via unique-maximum selectors into iUMc-, iUMo-, and proper colourings. -/theorem extension_of_colourings_via_um_selectors {V : Type*} (G : SimpleGraph V) {p q : ℕ} (S : Set V) (φ : ↥S → Fin p) (hφ : simple_graph_is_um_selector G S φ) (ψ : ↥(Sᶜ) → Fin q) : simple_graph_is_iumc_coloring G (simple_graph_um_selector_extension S φ ψ) ∧ ((∀ v : V, ¬ G.IsIsolated v) → (∀ s : ↥S, ∃ u : ↥(Sᶜ), G.Adj s.1 u.1 ∧ ∀ w : ↥(Sᶜ), G.Adj s.1 w.1 → w ≠ u → ψ w < ψ u) → simple_graph_is_iumo_coloring G (simple_graph_um_selector_extension S φ ψ)) ∧ ((∀ (u v : ↥(Sᶜ)), (G.induce Sᶜ).Adj u v → ψ u ≠ ψ v) → ∀ {u v : V}, G.Adj u v → simple_graph_um_selector_extension S φ ψ u ≠ simple_graph_um_selector_extension S φ ψ v) := by refine ⟨?_, ?_, ?_⟩ · intro v rcases hφ.2 v with ⟨u, hu_mem, hu_max⟩ refine ⟨u.1, hu_mem, ?_⟩ intro w hw_mem hwu by_cases hwS : w ∈ S · have h_ne : (⟨w, hwS⟩ : ↥S) ≠ u := by intro h_eq apply hwu exact congr_arg Subtype.val h_eq have h_lt := hu_max ⟨w, hwS⟩ hw_mem h_ne rwa [extension_of_colourings_via_um_selectors_ext_lt_of_mem_mem S φ ψ hwS u.2] · exact extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem S φ ψ hwS u.2 · intros _h_no_iso h_max v by_cases hv : v ∈ S · rcases h_max ⟨v, hv⟩ with ⟨u, hu_adj, hu_max⟩ refine ⟨u.1, hu_adj, ?_⟩ intro w hw_adj hwu have hwS : w ∉ S := by intro hwS exact hφ.1 hv hwS hw_adj.ne hw_adj have h_ne : (⟨w, hwS⟩ : ↥(Sᶜ)) ≠ u := by intro h_eq apply hwu exact congr_arg Subtype.val h_eq have h_lt := hu_max ⟨w, hwS⟩ hw_adj h_ne rwa [extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_not_mem S φ ψ hwS u.2] · rcases hφ.2 v with ⟨u, hu_mem, hu_max⟩ have hu_ne_v : u.1 ≠ v := by rintro rfl exact hv u.2 have hu_adj : u.1 ∈ G.neighborSet v := by rcases Set.mem_insert_iff.mp hu_mem with rfl | h · exact (hu_ne_v rfl).elim · exact h refine ⟨u.1, hu_adj, ?_⟩ intro w hw_adj hwu by_cases hwS : w ∈ S · have h_ne : (⟨w, hwS⟩ : ↥S) ≠ u := by intro h_eq apply hwu exact congr_arg Subtype.val h_eq have hw_mem : w ∈ insert v (G.neighborSet v) := Set.mem_insert_of_mem _ hw_adj have h_lt := hu_max ⟨w, hwS⟩ hw_mem h_ne rwa [extension_of_colourings_via_um_selectors_ext_lt_of_mem_mem S φ ψ hwS u.2] · exact extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem S φ ψ hwS u.2 · intro hψ u v hadj by_cases hu : u ∈ S · by_cases hv : v ∈ S · exact (hφ.1 hu hv hadj.ne hadj).elim · intro h_eq have := extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem S φ ψ hv hu rw [h_eq] at this exact lt_irrefl _ this · by_cases hv : v ∈ S · intro h_eq have := extension_of_colourings_via_um_selectors_ext_lt_of_not_mem_mem S φ ψ hu hv rw [h_eq] at this exact lt_irrefl _ this · intro h_eq have hadj' : (G.induce Sᶜ).Adj ⟨u, hu⟩ ⟨v, hv⟩ := G.induce_adj.mpr hadj have hne := hψ ⟨u, hu⟩ ⟨v, hv⟩ hadj' rw [extension_of_colourings_via_um_selectors_ext_not_in S φ ψ hu, extension_of_colourings_via_um_selectors_ext_not_in S φ ψ hv] at h_eq have : ψ ⟨u, hu⟩ = ψ ⟨v, hv⟩ := Fin.castAdd_inj.mp h_eq exact hne this