is_majority_coloring
def
A partial 2-colouring of a graph satisfies the majority condition if every coloured vertex has at most half its neighbours of the same colour.
Statement
def is_majority_coloring {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (c : V → Option Bool) : Prop
- Defined in
- arXiv:2611.32746 Sec 1, arXiv:2609.37796 Sec 1
- Verified
- 27 Nov 2026
- Axioms
- none listed
Read back from the Lean
For a finite type V with decidable equality, a simple graph G on V with decidable adjacency, and a function c : V → Option Bool, is_majority_coloring G c asserts that for every vertex v : V and every b : Bool, if c v = some b, then the number of neighbors u of v such that c u = some b is at most G.degree v / 2 (using natural number division, i.e., ⌊deg(v) / 2⌋).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- A partial 2-colouring satisfies the majority condition if every coloured vertex has at most half its neighbours of the same colour. -/ def is_majority_coloring {V : Type*} [Fintype V] [DecidableEq V] (G : SimpleGraph V) [DecidableRel G.Adj] (c : V → Option Bool) : Prop := ∀ v b, c v = some b → ((G.neighborFinset v).filter (fun u => c u = some b)).card ≤ G.degree v / 2