# D-Complete Posets¶

AUTHORS:

• Stefan Grosser (06-2020): initial implementation

class sage.combinat.posets.d_complete.DCompletePoset(hasse_diagram, elements, category, facade, key)

A d-complete poset.

D-complete posets are a class of posets introduced by Proctor in [Proc1999]. It includes common families such as shapes, shifted shapes, and rooted forests. Proctor showed in [PDynk1999] that d-complete posets have decompositions in irreducible posets, and showed in [Proc2014] that d-complete posets admit a hook-length formula (see Wikipedia article Hook_length_formula). A complete proof of the hook-length formula can be found in [KY2019].

EXAMPLES:

```sage: from sage.combinat.posets.poset_examples import Posets
sage: P = Posets.DoubleTailedDiamond(2)
sage: TestSuite(P).run()
```
get_hook(elmt)

Return the hook length of the element `elmt`.

EXAMPLES:

```sage: from sage.combinat.posets.d_complete import DCompletePoset
sage: P = DCompletePoset(DiGraph({0: , 1: }))
sage: P.get_hook(1)
2
```
get_hooks()

Return all the hook lengths as a dictionary.

EXAMPLES:

```sage: from sage.combinat.posets.d_complete import DCompletePoset
sage: P = DCompletePoset(DiGraph({0: [1, 2], 1: , 2: , 3: []}))
sage: P.get_hooks()
{0: 1, 1: 2, 2: 2, 3: 3}
sage: from sage.combinat.posets.poset_examples import Posets
sage: P = DCompletePoset(Posets.YoungDiagramPoset(Partition([3,2,1]))._hasse_diagram.reverse())
sage: P.get_hooks()
{0: 5, 1: 3, 2: 1, 3: 3, 4: 1, 5: 1}
```
hook_product()

Return the hook product for the poset.