Row and column graphs
Lax762056.ColumnGraph · concepts/Lax762056/ColumnGraph.lean · lax-762056
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
For a row set and columns, the graph has vertices . Each column induces a complete bipartite graph between its two sides. Within a row, every vertex is adjacent to both vertices in each consecutive column. There are no other edges.
Concept map
In the paper
- page 3 of this submission's paper
Lean source view on GitHub
| 1 | import Mathlib.Combinatorics.SimpleGraph.Basic |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Row and column graphs |
| 6 | type: definition |
| 7 | --- |
| 8 | For a row set and columns, the graph has vertices |
| 9 | . Each column induces a |
| 10 | complete bipartite graph between its two sides. Within a row, every vertex |
| 11 | is adjacent to both vertices in each consecutive column. There are no other |
| 12 | edges. |
| 13 | -/ |
| 14 | |
| 15 | namespace Lax762056.ColumnGraph |
| 16 | |
| 17 | open SimpleGraph |
| 18 | |
| 19 | abbrev Vertex (R : Type*) (c : ℕ) := R × Fin c × Bool |
| 20 | |
| 21 | def columnGraph (R : Type*) (c : ℕ) : SimpleGraph (Vertex R c) := |
| 22 | fromRel fun (row, column, side) (row', column', side') => |
| 23 | (column = column' ∧ side ≠ side') ∨ |
| 24 | (row = row' ∧ (column.val + 1 = column'.val ∨ column'.val + 1 = column.val)) |
| 25 | |
| 26 | end Lax762056.ColumnGraph |
| 27 |
Builds on
none
From Mathlib
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments