codeword_supp
def
The support of a codeword $x : \mathrm{Fin}\, n \to \alpha$ over an alphabet $\alpha$ with decidable equality and zero is the finite set ($\mathrm{Finset}(\mathrm{Fin}\, n)$) of coordinates $i$ such that $x_i \ne 0$, defined by filtering $\mathrm{Finset.univ}$ by $x_i \ne 0$.
Statement
def codeword_supp {n : ℕ} {α : Type*} [DecidableEq α] [Zero α] (x : Fin n → α) : Finset (Fin n)
- Defined in
- arXiv:2610.30613, Section 2
- Verified
- 25 Oct 2026
- Axioms
- none listed
- Used by 8
- codeword_supp_zeroThe support of the all-zero codeword $0 : \mathrm{Fin}\, n \to \alpha$ is the empty Finset $\emptyset$.
- codeword_supp_diff_card_le_hammingDistFor any two codewords $x, y : \mathrm{Fin}\, n \to \alpha$, the sum of the cardinalities of the set differences of their supports,…
- two_four_code_four_supports_intersect_ge_twoLet $\alpha$ be an alphabet with decidable equality and a distinguished element $0$. Let…
- codeword_ne_of_supp_inter_singletonLet $\alpha$ be an alphabet with decidable equality and zero element $0$. If $x, y : \mathrm{Fin}\, n \to \alpha$ are codewords such that…
- two_four_code_sync_single_coordLet $\alpha$ be an alphabet with decidable equality and a distinguished element $0$. Let…
- four_supportsThe family of four-supports of a code $\mathcal{C} \subseteq (\mathrm{Fin}\, n \to \alpha)$ is the set of all Finsets…
- hammingDist_eq_of_codeword_supp_inter_singletonLet $\alpha$ be an alphabet with decidable equality and zero element $0$. For any two codewords $x, y : \mathrm{Fin}\, n \to \alpha$ whose…
- card_codeword_suppThe cardinality of the support $\mathrm{codeword\_supp}(x)$ of a codeword $x : \mathrm{Fin}\, n \to \alpha$ equals its Hamming weight…
Read back from the Lean
For a natural number n, a type α with decidable equality and a zero element, and a function x : Fin n → α, codeword_supp x is defined as the finite set of indices i : Fin n such that x i ≠ 0 (specifically, the sub-finset of Finset.univ consisting of elements satisfying x i ≠ 0).
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 support of a codeword x : Fin n → α is the Finset of coordinate indices where x is nonzero. -/ def codeword_supp {n : ℕ} {α : Type*} [DecidableEq α] [Zero α] (x : Fin n → α) : Finset (Fin n) := Finset.univ.filter (fun i => x i ≠ 0)