AFTD Auto-Formalizing Theoretical Domains

edge_color_class_graph

def

For an arbitrary type V, given an edge coloring c : Sym2 V → Fin 5 and a color k : Fin 5, edge_color_class_graph c k is the simple graph on V where distinct vertices v, w : V are adjacent if and only if c(s(v, w)) = k.

Statement

@[reducible] def edge_color_class_graph {V : Type*} (c : Sym2 V → Fin 5) (k : Fin 5) : SimpleGraph V
Defined in
scout/2610-24484-erd-h-o-s-gy-arf-as-balanced-five-colorings.md:1259
Verified
20 Oct 2026
Axioms
none listed
Used by 3

Read back from the Lean

Given a type V, a function c : Sym2 V → Fin 5 (assigning an element of Fin 5 to each unordered pair of elements of V), and a target value k : Fin 5, edge_color_class_graph c k is the simple graph on the vertex set V where two vertices v, w : V are adjacent if and only if v ≠ w and c s(v, w) = k (i.e., the monochromatic subgraph for color k).

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 monochromatic subgraph for a given color under an edge coloring. -/
@[reducible] def edge_color_class_graph {V : Type*} (c : Sym2 V → Fin 5) (k : Fin 5) : SimpleGraph V where
  Adj v w := v ≠ w ∧ c s(v, w) = k
  symm := ⟨fun _ _ h => ⟨h.1.symm, by rw [Sym2.eq_swap]; exact h.2⟩⟩
  loopless := ⟨fun _ h => h.1 rfl⟩
See it in the graphDiscuss this resultChallenge it