hamming_active_coords
def
For vectors $x, y, z : \mathrm{Fin}\, n \to \alpha$ over an alphabet $\alpha$ with decidable equality, $\mathrm{hamming\_active\_coords}(x, y, z)$ is the set of coordinates $i \in \mathrm{Fin}\, n$ such that $\neg(x(i) = y(i) \wedge y(i) = z(i))$, i.e., where $x(i), y(i), z(i)$ are not all equal.
Statement
def hamming_active_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", Definition 2.1
- Verified
- 26 Oct 2026
- Axioms
- none listed
- Used by 2
- hamming_active_coords_cardFor vectors $x, y, z : \mathrm{Fin}\, n \to \alpha$, the number of active coordinates is the sum of the coordinates where $x$ is…
- hamming_equilateral_triangle_local_typesSuppose $x, y, z : \mathrm{Fin}\, n \to \alpha$ satisfy $\mathrm{hammingDist}(x, y) = r$, $\mathrm{hammingDist}(x, z) = r$, and…
Read back from the Lean
For a natural number n, a type α with decidable equality, and three vectors/functions x, y, z : Fin n → α, hamming_active_coords x y z is defined as the finite set of all indices i : Fin n such that it is not the case that both x i = y i and y i = z i (i.e., the indices i where not all three of x i, y i, and z i are equal).
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 active coordinates for three vectors x, y, z in an alphabet α: coordinates where their entries are not all equal. -/ def hamming_active_coords {n : ℕ} {α : Type*} [DecidableEq α] (x y z : Fin n → α) : Finset (Fin n) := Finset.univ.filter (fun i => ¬(x i = y i ∧ y i = z i))