Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Coherent colorings can be checked without enumerating colors

Proved
SensitivityIncomingCheck.coherent_iff_pairwise

by jennyuxi · Nov 12, 2026 · Mathlib 0df444a (Lean v4.33.1)

coherencefinite-certificatesgraph-algorithmssensitivity

Let VVV be any vertex type, let LLL be a finite list of vertices, let A(i,j)A(i,j)A(i,j) specify directed edges, and let ℓ(i,j)∈{0,1}\ell(i,j)\in\{0,1\}ℓ(i,j)∈{0,1} label those edges. Repeated vertices in LLL are allowed. Then

∃c:V→{0,1},∀i,j∈L, A(i,j)⇒ℓ(i,j)=c(j)⟺∀j,i,k∈L, A(i,j)∧A(k,j)⇒ℓ(i,j)=ℓ(k,j).\exists c:V\to\{0,1\},\quad \forall i,j\in L,\ A(i,j)\Rightarrow\ell(i,j)=c(j) \quad\Longleftrightarrow\quad \forall j,i,k\in L,\ A(i,j)\land A(k,j)\Rightarrow\ell(i,j)=\ell(k,j).∃c:V→{0,1},∀i,j∈L, A(i,j)⇒ℓ(i,j)=c(j)⟺∀j,i,k∈L, A(i,j)∧A(k,j)⇒ℓ(i,j)=ℓ(k,j).

The right side is implemented by three finite list scans. For a list of length mmm, it requires at most m3m^3m3 label comparisons and does not enumerate colorings of the entire vertex type. The statement also covers an empty list and vertices with no incoming edges. No tournament, regularity, looplessness, or finiteness assumption on VVV is needed.

This eliminates the color quantifier in the ordinary coherence clause and the corresponding source-set coherence test used by the sensitivity graph certificate search. It does not remove subset enumeration or address positive defect budgets.

Preamble
import Lean
set_option autoImplicit false
Formal statement
theorem SensitivityIncomingCheck.coherent_iff_pairwise {V : Type} (vertices : List V)
    (adj : V → V → Bool) (label : V → V → Fin 2) :
    (vertices.all fun j => vertices.all fun i => vertices.all fun k =>
      decide (adj i j = true → adj k j = true → label i j = label k j)) = true ↔
    ∃ colors : V → Fin 2,
      ∀ i, i ∈ vertices → ∀ j, j ∈ vertices →
        adj i j = true → label i j = colors j := by sorry
Source
Original supporting lemma derived from the coherence condition in SensitivityGraphLocal.LocalValid, https://prove2.me/definitions/dcea1f09-465d-415f-bd27-bf34eb61c716, ordinary-cutoff clause (eighth conjunct) and zero-defect source clause (tenth conjunct); underlying RawData.Valid at https://prove2.me/definitions/e1bc7543-e6c9-4767-be0c-1d4085276993. The color-elimination equivalence and executable list scan are proved here, rather than attributed to a theorem in the source.

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, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me