Code demonstration for Tamari interval-posets in Sage
This code is related to the paper:
[1] Grégory Châtel and Viviane Pons. Counting smaller elements in the Tamari and m-Tamari lattices, to appear in Journal of Combinatorial Theory, Series A.
Creating an interval-poset.
The tamari interval of size 4 induced by relations [(2, 4), (3, 4), (3, 1), (2, 1)]
''
Creating from a binary tree or a Dyck path.
The tamari interval of size 4 induced by relations [(2, 4), (3, 4), (3, 1), (2, 1)]
The tamari interval of size 4 induced by relations [(2, 4), (3, 4), (3, 1), (2, 1)]
The tamari interval of size 4 induced by relations [(2, 4), (3, 4), (3, 1), (2, 1)]
The tamari interval of size 4 induced by relations [(2, 4), (3, 4), (3, 1), (2, 1)]
Computing its endpoints as binary trees and list the binary trees of the interval.
[[., [[., .], .]], .]
[., [[., [., .]], .]]
''
''
[., [[., [., .]], .]]
[[., [., [., .]]], .]
[., [[[., .], .], .]]
[[., [[., .], .]], .]
Computing its end points as Dyck paths and list the Dyck path of the interval.
[1, 1, 0, 1, 0, 0, 1, 0]
[1, 1, 1, 0, 0, 1, 0, 0]
[1, 1, 1, 0, 0, 1, 0, 0]
[1, 1, 1, 0, 0, 0, 1, 0]
[1, 1, 0, 1, 0, 1, 0, 0]
[1, 1, 0, 1, 0, 0, 1, 0]
In [1], we define a composition of interval-posets. Below are the methods corresponding to this composition.
Here is an example of computation that corresponds to Figure 13 of [1].
[The tamari interval of size 8 induced by relations [(1, 2), (2, 4), (3, 4), (6, 7), (8, 7), (3, 2)], The tamari interval of size 8 induced by relations [(1, 2), (2, 4), (3, 4), (6, 7), (8, 7), (5, 4), (3, 2)], The tamari interval of size 8 induced by relations [(1, 2), (2, 4), (3, 4), (6, 7), (8, 7), (6, 4), (5, 4), (3, 2)], The tamari interval of size 8 induced by relations [(1, 2), (2, 4), (3, 4), (6, 7), (8, 7), (7, 4), (6, 4), (5, 4), (3, 2)]]
''
''
''
''
There is also a -composition defined in [1] which is implemented below.
Here is an example corresponding to (4.16) of [1].
[The tamari interval of size 10 induced by relations [(1, 3), (2, 3), (4, 7), (5, 7), (6, 7), (8, 9), (10, 9), (8, 7), (6, 5), (4, 3), (2, 1)], The tamari interval of size 10 induced by relations [(1, 3), (2, 3), (4, 7), (5, 7), (6, 7), (8, 9), (10, 9), (8, 7), (6, 5), (5, 3), (4, 3), (2, 1)], The tamari interval of size 10 induced by relations [(1, 3), (2, 3), (4, 7), (5, 7), (6, 7), (8, 9), (10, 9), (8, 7), (7, 3), (6, 5), (5, 3), (4, 3), (2, 1)], The tamari interval of size 10 induced by relations [(1, 3), (2, 3), (4, 7), (5, 7), (6, 7), (8, 9), (10, 9), (9, 3), (8, 7), (7, 3), (6, 5), (5, 3), (4, 3), (2, 1)], The tamari interval of size 10 induced by relations [(1, 3), (2, 3), (4, 7), (5, 7), (6, 7), (8, 9), (10, 9), (8, 7), (6, 5), (5, 4), (4, 3), (2, 1)], The tamari interval of size 10 induced by relations [(1, 3), (2, 3), (4, 7), (5, 7), (6, 7), (8, 9), (10, 9), (8, 7), (7, 3), (6, 5), (5, 4), (4, 3), (2, 1)], The tamari interval of size 10 induced by relations [(1, 3), (2, 3), (4, 7), (5, 7), (6, 7), (8, 9), (10, 9), (9, 3), (8, 7), (7, 3), (6, 5), (5, 4), (4, 3), (2, 1)]]
''
''
''
''
''
''
''