column_indicator
def
The column indicator of an s by n matrix over ZMod 2 evaluates to 1 at a vector if it appears as a column of the matrix, and 0 otherwise.
Statement
open scoped Classical open Matrix in noncomputable def column_indicator {s n : ℕ} (S : Matrix (Fin s) (Fin n) (ZMod 2)) : (Fin s → ZMod 2) → ZMod 2
- Defined in
- arXiv:2610.09341, Section 3.1
- Verified
- 24 Oct 2026
- Axioms
- none listed
Read back from the Lean
Given natural numbers s and n and an s × n matrix S over ZMod 2, column_indicator S is the function taking a vector β : Fin s → ZMod 2 to 1 : ZMod 2 if there exists an index j : Fin n such that the j-th column of S (the j-th row of Sᵀ) equals β, and to 0 : ZMod 2 otherwise.
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
open scoped Classical open Matrix in /-- The column indicator function of an s by n matrix over ZMod 2. -/ noncomputable def column_indicator {s n : ℕ} (S : Matrix (Fin s) (Fin n) (ZMod 2)) : (Fin s → ZMod 2) → ZMod 2 := fun β => if ∃ j : Fin n, Sᵀ j = β then 1 else 0