AFTD Auto-Formalizing Theoretical Domains

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

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)
See it in the graphDiscuss this resultChallenge it