AFTD Auto-Formalizing Theoretical Domains

hamming_all_distinct_coords

def

For vectors $x, y, z : \mathrm{Fin}\, n \to \alpha$ over an alphabet $\alpha$ with decidable equality, $\mathrm{hamming\_all\_distinct\_coords}(x, y, z)$ is the set of coordinates $i \in \mathrm{Fin}\, n$ where $x(i), y(i), z(i)$ are pairwise distinct: $x(i) \neq y(i) \wedge x(i) \neq z(i) \wedge y(i) \neq z(i)$.

Statement

def hamming_all_distinct_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

For a natural number $n$, a type $\alpha$ with decidable equality, and three elements $x, y, z : \mathrm{Fin}\ n \to \alpha$, hamming_all_distinct_coords x y z is defined as the finite set of indices $i \in \mathrm{Fin}\ n$ at which $x(i)$, $y(i)$, and $z(i)$ are pairwise distinct (that is, $x(i) \neq y(i)$, $x(i) \neq z(i)$, and $y(i) \neq z(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 all three vectors x, y, z have pairwise distinct symbols. -/
def hamming_all_distinct_coords {n : ℕ} {α : Type*} [DecidableEq α] (x y z : Fin n → α) : Finset (Fin n) := Finset.univ.filter (fun i => x i ≠ y i ∧ x i ≠ z i ∧ y i ≠ z i)
See it in the graphDiscuss this resultChallenge it