Star edge colorings and subcubic simple graphs
Definitionopg37271_star_edge_coloringThis module fixes the graph-theoretic language used for OPG-37271.
For a simple graph and a color type , an edge coloring assigns a member of 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
means that such a coloring exists with palette . Finally, 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.
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 OPG37271Read-back
What the Lean code literally says, in plain math · gpt-5.6-luna
EdgeColoring
For a vertex type , a simple graph on , and a color type , is the type of edge labelings of by elements of : every edge of is assigned a color in . For adjacent vertices , written , the value is the color assigned by to that edge, using an adjacency proof .
IsProperEdgeColoring
For vertex type , simple graph on , color type , and edge coloring , the predicate asserts that for every three vertices , every proof that is adjacent to , and every proof that is adjacent to , if , then the two incident edges receive different colors:
HasBicoloredPathFour
For a vertex type , simple graph on , color type , and edge coloring , the predicate asserts that there exist vertices such that the list has no repeated vertices, together with adjacency proofs
such that the first and third edges have the same color and the second and fourth edges have the same color:
HasBicoloredCycleFour
For a vertex type , simple graph on , color type , and edge coloring , the predicate asserts that there exist vertices such that the list has no repeated vertices, together with adjacency proofs
such that opposite edges have matching colors:
IsStarEdgeColoring
For a vertex type , simple graph on , color type , and edge coloring , the predicate asserts all of the following: for every , every , and every , implies
there do not exist five pairwise distinct vertices with the four consecutive adjacencies whose first and third edge colors agree and whose second and fourth edge colors agree; and there do not exist four pairwise distinct vertices with adjacencies , , , and whose opposite edge colors agree in the two corresponding pairs.
HasStarEdgeColoring
For a vertex type , a simple graph on , and a natural number , the predicate asserts that there exists an edge coloring
where is the type of the available finite colors, such that 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 is included; in particular, is allowed.
IsSubcubic
For a vertex type and a simple graph on , the predicate asserts that every vertex has at most three distinct neighbors:
Here the neighbor set consists exactly of the vertices adjacent to , and the assertion is made for every vertex, with no separate finiteness assumption.
Confirmed by the mission captain (proposal self-audit).