ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 30 Aug 2020 22:21:09 +0200Obtaining the poset of the Catalan monoidhttps://ask.sagemath.org/question/53219/obtaining-the-poset-of-the-catalan-monoid/The poset $P_n$ is defined as the poset consisting of subsets of { 1,...,n } where for two subsets $X \leq Y$ if and only if $X$ and $Y$ have the same cardinality and if X= {x_1 < ... < x_k } and Y= {y_1 < ... < y_k } we have $x_i \leq y_i$ for $i=1,...,k$. See for example https://arxiv.org/pdf/1806.06531.pdf .
My question is whether the is an easy way to obtain this poset for a given $n$ with Sage?Sun, 30 Aug 2020 15:36:26 +0200https://ask.sagemath.org/question/53219/obtaining-the-poset-of-the-catalan-monoid/Answer by FrédéricC for <p>The poset $P_n$ is defined as the poset consisting of subsets of { 1,...,n } where for two subsets $X \leq Y$ if and only if $X$ and $Y$ have the same cardinality and if X= {x_1 < ... < x_k } and Y= {y_1 < ... < y_k } we have $x_i \leq y_i$ for $i=1,...,k$. See for example <a href="https://arxiv.org/pdf/1806.06531.pdf">https://arxiv.org/pdf/1806.06531.pdf</a> .</p>
<p>My question is whether the is an easy way to obtain this poset for a given $n$ with Sage?</p>
https://ask.sagemath.org/question/53219/obtaining-the-poset-of-the-catalan-monoid/?answer=53222#post-id-53222Like this maybe (not checked)
sage: def cata(n):
....: S = Subsets(list(range(n)))
....: def rel(x, y):
....: return len(x)==len(y) and all(u<=v for u, v in zip(sorted(x),sorted(y)))
....: return Poset((S, rel))
sage: cata(4)
Finite poset containing 16 elements
Sun, 30 Aug 2020 19:24:17 +0200https://ask.sagemath.org/question/53219/obtaining-the-poset-of-the-catalan-monoid/?answer=53222#post-id-53222Comment by klaaa for <p>Like this maybe (not checked)</p>
<pre><code>sage: def cata(n):
....: S = Subsets(list(range(n)))
....: def rel(x, y):
....: return len(x)==len(y) and all(u<=v for u, v in zip(sorted(x),sorted(y)))
....: return Poset((S, rel))
sage: cata(4)
Finite poset containing 16 elements
</code></pre>
https://ask.sagemath.org/question/53219/obtaining-the-poset-of-the-catalan-monoid/?comment=53223#post-id-53223Thank you very much. Here is an interesting observations: Appending a unique minimum and maximum to this poset gives a lattice. The width of this lattice starts with 2, 3, 4, 6, 8, 13, 20, 32, 52, 90, 152 for $n=1,...,11$ and it seems likely that it is given by https://oeis.org/A084239 . Is there any direct connection to this sequence?Sun, 30 Aug 2020 21:39:26 +0200https://ask.sagemath.org/question/53219/obtaining-the-poset-of-the-catalan-monoid/?comment=53223#post-id-53223Comment by klaaa for <p>Like this maybe (not checked)</p>
<pre><code>sage: def cata(n):
....: S = Subsets(list(range(n)))
....: def rel(x, y):
....: return len(x)==len(y) and all(u<=v for u, v in zip(sorted(x),sorted(y)))
....: return Poset((S, rel))
sage: cata(4)
Finite poset containing 16 elements
</code></pre>
https://ask.sagemath.org/question/53219/obtaining-the-poset-of-the-catalan-monoid/?comment=53224#post-id-53224Another observation: For $n=1,2,3,4$ the Coxeter transformation of the distributive lattice of order ideals of this poset was periodic with periods 6,12,30,42.Sun, 30 Aug 2020 22:21:09 +0200https://ask.sagemath.org/question/53219/obtaining-the-poset-of-the-catalan-monoid/?comment=53224#post-id-53224