r_ext_c4_matrix
For any natural number r, the (r + 2) by 4 boolean matrix (with entries in Bool) representing the incidence matrix of the r-extension of the 4-cycle, whose entry at row i and column j is true if i.val < r - 2, and otherwise true if (i.val - (r - 2)) % 4 equals j.val or (j.val + 1) % 4, and false otherwise.
Statement
def r_ext_c4_matrix (r : ℕ) : Matrix (Fin (r + 2)) (Fin 4) Bool- Defined in
- arXiv:2610.13987, line 131
- Verified
- 23 Oct 2026
- Axioms
- none listed
Read back from the Lean
Definition of a function r_ext_c4_matrix taking a natural number r : ℕ and returning an (r + 2) × 4 matrix of Booleans (Matrix (Fin (r + 2)) (Fin 4) Bool).
For a given row index i : Fin (r + 2) and column index j : Fin 4:
- If i.val < r - 2 (under truncated natural number subtraction), the matrix entry is true.
- Otherwise, letting row_idx := (i.val - (r - 2)) % 4, the matrix entry is true if row_idx = j.val or row_idx = (j.val + 1) % 4, and false 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
/-- The (r+2) x 4 boolean incidence matrix of the r-extension of C_4. -/ def r_ext_c4_matrix (r : ℕ) : Matrix (Fin (r + 2)) (Fin 4) Bool := fun i j => if i.val < r - 2 then true else let row_idx := (i.val - (r - 2)) % 4 (row_idx == j.val) || (row_idx == (j.val + 1) % 4)