triangle_free_loom_grid
The triangle-free loom grid on the vertex type triangle_free_loom_grid_vert r c is the simple graph where two vertices u and v are adjacent iff they share the same column on opposite sides with different rows, or share the same row with columns differing by 1.
Statement
def triangle_free_loom_grid (r c : ℕ) : SimpleGraph (triangle_free_loom_grid_vert r c)- Defined in
- arXiv:2611.09627:380
- Verified
- 09 Nov 2026
- Axioms
- none listed
- Built on 1
- triangle_free_loom_grid_vertFor natural numbers r and c, triangle_free_loom_grid_vert r c is the subtype of elements v in Fin r × Fin c × Bool such that v.2.2 = false…
- Used by 1
- triangle_free_loom_grid_connected_no_mixed_column_is_path_graphIn a triangle-free loom grid T_{r,c}, every nonempty connected vertex set with no mixed column induces a path graph.
Read back from the Lean
The definition triangle_free_loom_grid r c constructs a simple graph on the vertex type triangle_free_loom_grid_vert r c for given natural numbers r and c.
A vertex is a triple (i, j, b) : Fin r × Fin c × Bool such that either b = false, or b = true and j.val + 1 is odd (i.e., j.val is even).
Two vertices u and v are adjacent in the graph (via SimpleGraph.fromRel) if and only if:
1. (Vertical edge) They have the same column index (j_u = j_v), different row indices (i_u ≠ i_v), and opposite boolean flags (one is false and the other is true); OR
2. (Horizontal edge) They have the same row index (i_u = i_v), and their column indices differ by 1 (j_u.val + 1 = j_v.val or j_v.val + 1 = j_u.val), with no restriction on their boolean flags.
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 triangle-free loom grid T_{r,c} with column edges between different rows on opposite sides in odd columns, and horizontal edges between consecutive columns in the same row. -/ def triangle_free_loom_grid (r c : ℕ) : SimpleGraph (triangle_free_loom_grid_vert r c) := SimpleGraph.fromRel fun u v => (u.1.2.1 = v.1.2.1 ∧ u.1.2.2 = false ∧ v.1.2.2 = true ∧ u.1.1 ≠ v.1.1) ∨ (u.1.1 = v.1.1 ∧ u.1.2.1.val + 1 = v.1.2.1.val)