AFTD Auto-Formalizing Theoretical Domains

monochromatic_edges

def

Given a finite type V, a simple graph G on V, a natural number k, and a coloring c : V → Fin k, monochromatic_edges G c is defined as the Finset of edges e in G.edgeFinset whose endpoints have the same color under c, filtered via Sym2.lift.

Statement

noncomputable def monochromatic_edges {V : Type*} [Fintype V] (G : SimpleGraph V) {k : ℕ} (c : V → Fin k) : Finset (Sym2 V)
Defined in
arXiv:2610.31489, Section 2
Verified
23 Oct 2026
Axioms
none listed
Used by 1
  • mem_monochromatic_edgesFor a finite type V, a simple graph G on V, a natural number k, a coloring c : V → Fin k, and vertices u and v, the unordered pair s(u, v)…

Read back from the Lean

Given a finite type V, a simple graph G on V, a natural number k, and a vertex coloring c : V → Fin k, monochromatic_edges G c is defined as the Finset (Sym2 V) consisting of all edges e ∈ G.edgeFinset whose endpoints have the same color under c (that is, edges e = s(u, v) such that c u = c v).

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

/-- The finset of monochromatic edges of a graph under a vertex coloring. -/
noncomputable def monochromatic_edges {V : Type*} [Fintype V] (G : SimpleGraph V) {k : ℕ} (c : V → Fin k) : Finset (Sym2 V) := by classical exact G.edgeFinset.filter (fun e => Sym2.lift ⟨fun u v => c u = c v, fun _ _ => propext eq_comm⟩ e)
See it in the graphDiscuss this resultChallenge it