hamming_all_distinct_coords
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
- 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…
- hamming_dist_eq_exceptional_add_all_distinctFor vectors $x, y, z : \mathrm{Fin}\, n \to \alpha$, the Hamming distance $\mathrm{hammingDist}(x, y)$ equals the number of coordinates…
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)