Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Star edge colorings and subcubic simple graphs

Definition
opg37271_star_edge_coloring

by hao jia · Sep 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsedge-coloringgraph-theoryopen-problem

This module fixes the graph-theoretic language used for OPG-37271.

For a simple graph GGG and a color type KKK, an edge coloring assigns a member of KKK to every unordered edge. It is proper when distinct edges meeting at a vertex receive distinct colors. A forbidden four-edge path consists of five pairwise distinct consecutive vertices, and a forbidden four-cycle consists of four pairwise distinct cyclic vertices. In either configuration, bichromaticity is represented by equality of the two pairs of opposite-position edge colors.

A star edge coloring is a proper edge coloring with neither forbidden configuration. The proposition

HasStarEdgeColoring⁡(G,k)\operatorname{HasStarEdgeColoring}(G,k)HasStarEdgeColoring(G,k)

means that such a coloring exists with palette Fin⁡(k)\operatorname{Fin}(k)Fin(k). Finally, GGG is subcubic when every neighbor set has extended cardinality at most three. Paths are simple but are not required to be induced, and four-cycles are checked separately.

Definition code
import Mathlib.Combinatorics.SimpleGraph.Bipartite
import Mathlib.Combinatorics.SimpleGraph.Coloring.EdgeLabeling
import Mathlib.Data.Set.Card

namespace OPG37271

universe u

/-- An edge coloring of a simple graph by colors in `K`. -/
abbrev EdgeColoring {V : Type u} (G : SimpleGraph V) (K : Type*) :=
  G.EdgeLabeling K

/-- A proper edge coloring: two distinct edges incident with one vertex
receive different colors. -/
def IsProperEdgeColoring {V : Type u} {G : SimpleGraph V} {K : Type*}
    (c : EdgeColoring G K) : Prop :=
  ∀ (v u w : V) (hvu : G.Adj v u) (hvw : G.Adj v w),
    u ≠ w → c.get v u hvu ≠ c.get v w hvw

/-- A simple path of four edges whose edge colors alternate between two colors. -/
def HasBicoloredPathFour {V : Type u} {G : SimpleGraph V} {K : Type*}
    (c : EdgeColoring G K) : Prop :=
  ∃ v₀ v₁ v₂ v₃ v₄ : V,
    [v₀, v₁, v₂, v₃, v₄].Nodup ∧
    ∃ (h₀₁ : G.Adj v₀ v₁) (h₁₂ : G.Adj v₁ v₂)
      (h₂₃ : G.Adj v₂ v₃) (h₃₄ : G.Adj v₃ v₄),
      c.get v₀ v₁ h₀₁ = c.get v₂ v₃ h₂₃ ∧
      c.get v₁ v₂ h₁₂ = c.get v₃ v₄ h₃₄

/-- A cycle of four edges whose edge colors alternate between two colors. -/
def HasBicoloredCycleFour {V : Type u} {G : SimpleGraph V} {K : Type*}
    (c : EdgeColoring G K) : Prop :=
  ∃ v₀ v₁ v₂ v₃ : V,
    [v₀, v₁, v₂, v₃].Nodup ∧
    ∃ (h₀₁ : G.Adj v₀ v₁) (h₁₂ : G.Adj v₁ v₂)
      (h₂₃ : G.Adj v₂ v₃) (h₃₀ : G.Adj v₃ v₀),
      c.get v₀ v₁ h₀₁ = c.get v₂ v₃ h₂₃ ∧
      c.get v₁ v₂ h₁₂ = c.get v₃ v₀ h₃₀

/-- A star edge coloring is proper and has no bichromatic simple path or cycle
of four edges. Paths need not be induced. -/
def IsStarEdgeColoring {V : Type u} {G : SimpleGraph V} {K : Type*}
    (c : EdgeColoring G K) : Prop :=
  IsProperEdgeColoring c ∧
    ¬ HasBicoloredPathFour c ∧
    ¬ HasBicoloredCycleFour c

/-- Existence of a star edge coloring using a palette of `k` labeled colors. -/
def HasStarEdgeColoring {V : Type u} (G : SimpleGraph V) (k : ℕ) : Prop :=
  ∃ c : EdgeColoring G (Fin k), IsStarEdgeColoring c

/-- A simple graph is subcubic when every vertex has at most three neighbors. -/
def IsSubcubic {V : Type u} (G : SimpleGraph V) : Prop :=
  ∀ v : V, (G.neighborSet v).encard ≤ 3

end OPG37271
Source
Open Problem Garden, OPG-37271, https://www.openproblemgarden.org/comment/reply/37271; definition also stated in Lei--Shi--Song, Star chromatic index of subcubic multigraphs, J. Graph Theory 88 (2018), 566--576, https://arxiv.org/abs/1701.04105v3, Section 1
Read-back

What the Lean code literally says, in plain math · gpt-5.6-luna

EdgeColoring

For a vertex type VVV, a simple graph GGG on VVV, and a color type KKK, EdgeColoring⁡(G,K)\operatorname{EdgeColoring}(G,K)EdgeColoring(G,K) is the type of edge labelings of GGG by elements of KKK: every edge of GGG is assigned a color in KKK. For adjacent vertices v,uv,uv,u, written G.Adj⁡(v,u)G.\operatorname{Adj}(v,u)G.Adj(v,u), the value c.get⁡(v,u,h)c.\operatorname{get}(v,u,h)c.get(v,u,h) is the color assigned by ccc to that edge, using an adjacency proof hhh.

IsProperEdgeColoring

For vertex type VVV, simple graph GGG on VVV, color type KKK, and edge coloring c:EdgeColoring⁡(G,K)c : \operatorname{EdgeColoring}(G,K)c:EdgeColoring(G,K), the predicate asserts that for every three vertices v,u,w∈Vv,u,w\in Vv,u,w∈V, every proof hvuh_{vu}hvu​ that vvv is adjacent to uuu, and every proof hvwh_{vw}hvw​ that vvv is adjacent to www, if u≠wu\ne wu=w, then the two incident edges receive different colors:

u≠w  ⟹  c.get⁡(v,u,hvu)≠c.get⁡(v,w,hvw).u\ne w \;\Longrightarrow\; c.\operatorname{get}(v,u,h_{vu})\ne c.\operatorname{get}(v,w,h_{vw}).u=w⟹c.get(v,u,hvu​)=c.get(v,w,hvw​).

HasBicoloredPathFour

For a vertex type VVV, simple graph GGG on VVV, color type KKK, and edge coloring c:EdgeColoring⁡(G,K)c : \operatorname{EdgeColoring}(G,K)c:EdgeColoring(G,K), the predicate asserts that there exist vertices v0,v1,v2,v3,v4∈Vv_0,v_1,v_2,v_3,v_4\in Vv0​,v1​,v2​,v3​,v4​∈V such that the list [v0,v1,v2,v3,v4][v_0,v_1,v_2,v_3,v_4][v0​,v1​,v2​,v3​,v4​] has no repeated vertices, together with adjacency proofs

h01:G.Adj⁡(v0,v1),h12:G.Adj⁡(v1,v2),h23:G.Adj⁡(v2,v3),h34:G.Adj⁡(v3,v4),h_{01}:G.\operatorname{Adj}(v_0,v_1),\quad h_{12}:G.\operatorname{Adj}(v_1,v_2),\quad h_{23}:G.\operatorname{Adj}(v_2,v_3),\quad h_{34}:G.\operatorname{Adj}(v_3,v_4),h01​:G.Adj(v0​,v1​),h12​:G.Adj(v1​,v2​),h23​:G.Adj(v2​,v3​),h34​:G.Adj(v3​,v4​),

such that the first and third edges have the same color and the second and fourth edges have the same color:

c.get⁡(v0,v1,h01)=c.get⁡(v2,v3,h23)andc.get⁡(v1,v2,h12)=c.get⁡(v3,v4,h34).c.\operatorname{get}(v_0,v_1,h_{01}) = c.\operatorname{get}(v_2,v_3,h_{23}) \quad\text{and}\quad c.\operatorname{get}(v_1,v_2,h_{12}) = c.\operatorname{get}(v_3,v_4,h_{34}).c.get(v0​,v1​,h01​)=c.get(v2​,v3​,h23​)andc.get(v1​,v2​,h12​)=c.get(v3​,v4​,h34​).

HasBicoloredCycleFour

For a vertex type VVV, simple graph GGG on VVV, color type KKK, and edge coloring c:EdgeColoring⁡(G,K)c : \operatorname{EdgeColoring}(G,K)c:EdgeColoring(G,K), the predicate asserts that there exist vertices v0,v1,v2,v3∈Vv_0,v_1,v_2,v_3\in Vv0​,v1​,v2​,v3​∈V such that the list [v0,v1,v2,v3][v_0,v_1,v_2,v_3][v0​,v1​,v2​,v3​] has no repeated vertices, together with adjacency proofs

h01:G.Adj⁡(v0,v1),h12:G.Adj⁡(v1,v2),h23:G.Adj⁡(v2,v3),h30:G.Adj⁡(v3,v0),h_{01}:G.\operatorname{Adj}(v_0,v_1),\quad h_{12}:G.\operatorname{Adj}(v_1,v_2),\quad h_{23}:G.\operatorname{Adj}(v_2,v_3),\quad h_{30}:G.\operatorname{Adj}(v_3,v_0),h01​:G.Adj(v0​,v1​),h12​:G.Adj(v1​,v2​),h23​:G.Adj(v2​,v3​),h30​:G.Adj(v3​,v0​),

such that opposite edges have matching colors:

c.get⁡(v0,v1,h01)=c.get⁡(v2,v3,h23)andc.get⁡(v1,v2,h12)=c.get⁡(v3,v0,h30).c.\operatorname{get}(v_0,v_1,h_{01}) = c.\operatorname{get}(v_2,v_3,h_{23}) \quad\text{and}\quad c.\operatorname{get}(v_1,v_2,h_{12}) = c.\operatorname{get}(v_3,v_0,h_{30}).c.get(v0​,v1​,h01​)=c.get(v2​,v3​,h23​)andc.get(v1​,v2​,h12​)=c.get(v3​,v0​,h30​).

IsStarEdgeColoring

For a vertex type VVV, simple graph GGG on VVV, color type KKK, and edge coloring c:EdgeColoring⁡(G,K)c : \operatorname{EdgeColoring}(G,K)c:EdgeColoring(G,K), the predicate asserts all of the following: for every v,u,w∈Vv,u,w\in Vv,u,w∈V, every hvu:G.Adj⁡(v,u)h_{vu}:G.\operatorname{Adj}(v,u)hvu​:G.Adj(v,u), and every hvw:G.Adj⁡(v,w)h_{vw}:G.\operatorname{Adj}(v,w)hvw​:G.Adj(v,w), u≠wu\ne wu=w implies

c.get⁡(v,u,hvu)≠c.get⁡(v,w,hvw);c.\operatorname{get}(v,u,h_{vu})\ne c.\operatorname{get}(v,w,h_{vw});c.get(v,u,hvu​)=c.get(v,w,hvw​);

there do not exist five pairwise distinct vertices v0,…,v4v_0,\ldots,v_4v0​,…,v4​ with the four consecutive adjacencies v0 ⁣− ⁣v1 ⁣− ⁣v2 ⁣− ⁣v3 ⁣− ⁣v4v_0\!-\!v_1\!-\!v_2\!-\!v_3\!-\!v_4v0​−v1​−v2​−v3​−v4​ whose first and third edge colors agree and whose second and fourth edge colors agree; and there do not exist four pairwise distinct vertices v0,…,v3v_0,\ldots,v_3v0​,…,v3​ with adjacencies v0 ⁣− ⁣v1v_0\!-\!v_1v0​−v1​, v1 ⁣− ⁣v2v_1\!-\!v_2v1​−v2​, v2 ⁣− ⁣v3v_2\!-\!v_3v2​−v3​, and v3 ⁣− ⁣v0v_3\!-\!v_0v3​−v0​ whose opposite edge colors agree in the two corresponding pairs.

HasStarEdgeColoring

For a vertex type VVV, a simple graph GGG on VVV, and a natural number kkk, the predicate asserts that there exists an edge coloring

c:EdgeColoring⁡(G,Fin⁡(k)),c:\operatorname{EdgeColoring}(G,\operatorname{Fin}(k)),c:EdgeColoring(G,Fin(k)),

where Fin⁡(k)\operatorname{Fin}(k)Fin(k) is the type of the kkk available finite colors, such that ccc satisfies the full IsStarEdgeColoring condition described above: it is proper, has no bicolored path of the specified four-edge form, and has no bicolored cycle of the specified four-edge form. No assumption that k>0k>0k>0 is included; in particular, k=0k=0k=0 is allowed.

IsSubcubic

For a vertex type VVV and a simple graph GGG on VVV, the predicate asserts that every vertex v∈Vv\in Vv∈V has at most three distinct neighbors:

encard⁡({u∈V∣G.Adj⁡(v,u)})≤3.\operatorname{encard}\bigl(\{u\in V\mid G.\operatorname{Adj}(v,u)\}\bigr)\le 3.encard({u∈V∣G.Adj(v,u)})≤3.

Here the neighbor set consists exactly of the vertices adjacent to vvv, and the assertion is made for every vertex, with no separate finiteness assumption.

Human review
  • Endorsed by Shuze Chen · Sep 7, 2026

  • Endorsed by hao jia · Sep 7, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactJoin Slack© 2026 Prove2Me