AFTD Auto-Formalizing Theoretical Domains

kempe_swap

def

The two-colour Kempe swap of a finite colouring c on a set U: vertices of U get a and b exchanged, and any other colour (and every vertex outside U) is left alone.

Statement

def kempe_swap {V : Type*} [DecidableEq V] {C : Type*} [DecidableEq C] (c : V → C) (a b : C) (U : Finset V) : V → C
Source
step towards op874_three_component_swaps_cannot_separate_example
Verified
28 Nov 2026
Axioms
none listed

Lean source view module on GitHub

/-- The two-colour component swap: exchange colours `a` and `b` on `U`. -/
def kempe_swap {V : Type*} [DecidableEq V] {C : Type*} [DecidableEq C] (c : V → C) (a b : C) (U : Finset V) : V → C := fun x => if x ∈ U then (if c x = a then b else if c x = b then a else c x) else c x
See it in the graphDiscuss this resultChallenge it