AFTD Auto-Formalizing Theoretical Domains

hamming_exceptional_coords

def

For vectors $x, y, z : \mathrm{Fin}\, n \to \alpha$ over an alphabet $\alpha$ with decidable equality, $\mathrm{hamming\_exceptional\_coords}(x, y, z)$ is the set of coordinates $i \in \mathrm{Fin}\, n$ where $x$ is exceptional, meaning $y(i) = z(i)$ and $x(i) \neq y(i)$.

Statement

def hamming_exceptional_coords {n : ℕ} {α : Type*} [DecidableEq α] (x y z : Fin n → α) : Finset (Fin n)
Defined in
arXiv:2610.32789 "Triangle-Free Sets in Exact-Distance Hamming Graphs", Section 2.1
Verified
26 Oct 2026
Axioms
none listed
Used by 3

Read back from the Lean

Definition of hamming_exceptional_coords: for a natural number n, a type α with decidable equality, and three elements x, y, z : Fin n → α, hamming_exceptional_coords x y z is the finite set of indices i : Fin n such that y i = z i and x i ≠ y i.

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 set of coordinates where the first vector x is exceptional among (x, y, z): y i = z i and x i ≠ y i. -/
def hamming_exceptional_coords {n : ℕ} {α : Type*} [DecidableEq α] (x y z : Fin n → α) : Finset (Fin n) := Finset.univ.filter (fun i => y i = z i ∧ x i ≠ y i)
See it in the graphDiscuss this resultChallenge it