nielsr's picture
nielsr HF Staff
Add Formal Conjectures (snapshot 86a2f58): statements + files parquet, Lean project (part 7)
8ca48d7 verified
Raw History Blame Contribute Delete
1.26 kB
25
def YoungDiagram.Cell (μ : YoungDiagram) : Type := μ.cells
27
instance (μ : YoungDiagram) : Fintype μ.Cell :=
body · 1 line
  inferInstanceAs (Fintype μ.cells)
30
instance (μ : YoungDiagram) : DecidableEq μ.Cell :=
body · 1 line
  inferInstanceAs (DecidableEq μ.cells)

The simple graph of a Young diagram: two distinct cells are adjacent iff they lie in the same row or in the same column.

35
def YoungDiagram.toSimpleGraph (μ : YoungDiagram) : SimpleGraph μ.Cell :=
body · 1 line
  .fromRel fun a b => a.val.fst = b.val.fst ∨ a.val.snd = b.val.snd