ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 11 Feb 2021 11:59:45 -0600Mapping isomorphism for posets or graphshttps://ask.sagemath.org/question/55675/mapping-isomorphism-for-posets-or-graphs/I know that we can check if two posets/graphs are isomorphic using is_isomorphic(), but is there any way that I can get Sage to output a possible mapping between the two posets/graphs that are isomorphic?sunflowerThu, 11 Feb 2021 11:59:45 -0600https://ask.sagemath.org/question/55675/Not getting correct output while computing posets with some conditions.https://ask.sagemath.org/question/54386/not-getting-correct-output-while-computing-posets-with-some-conditions/I want to compute finite posets on 6 elements. Also, I want the following conditions on the posets: 2 covers 0, 4 covers 2, 3 covers 1, 5 covers 3. Also, 0, 1 are incomparable and 4, 5 are incomparable. For that I am giving the following commands:
A=[]
P = Posets(6)
for p in P:
if p.covers(0, 2) and p.covers(2, 4) and p.covers(1, 3) and p.covers(3, 5) and p.compare_elements(1, 0) is None and p.compare_elements(4, 5) is None:
A.append(p);
print(A)
The output I am getting is not correct. There is only one element in sage output but that is not true. Is there any issue with my code?
DharmWed, 25 Nov 2020 23:42:33 -0600https://ask.sagemath.org/question/54386/Posets with infinite outer automorphism grouphttps://ask.sagemath.org/question/54449/posets-with-infinite-outer-automorphism-group/This is probably very complicated, but is there a quick method to see whether the outer automorphism group of the incidence algebra of a finite connected poset over the rationals is finite using SAGE?
We can assume that the poset is additionally such that the underlying graph of the Hasse quiver is not a tree and such that there is no element x in the poset that is comparable to all other elements (see https://ask.sagemath.org/question/54438/filtering-certain-posets/ ), since in those cases the outer automorphism group is indeed finite or the incidence algebra is heredity (in which case it is rather boring).
Im interested in infinite outer automorphism groups to construct some exotic examples, but such posets seem to be rather rare.klaaaSun, 29 Nov 2020 12:19:10 -0600https://ask.sagemath.org/question/54449/Filtering certain posetshttps://ask.sagemath.org/question/54438/filtering-certain-posets/I want to filter the set of all connected posets with n points using sage.
I want to filter out the posets whose underlying undirected graph of its Hasse diagram is not a tree (equivalently, the incidence algebra is not hereditary) and such that there is no element x in the poset P such that any other element of P is comparable to y.
Is there an easy method to do this with sage?klaaaSun, 29 Nov 2020 04:17:39 -0600https://ask.sagemath.org/question/54438/Obtaining all posets from binary trees up to isomorphismhttps://ask.sagemath.org/question/54030/obtaining-all-posets-from-binary-trees-up-to-isomorphism/One can obtain all posets of binary trees for a given n as follows in Sage:
n=4
posets = [bt.to_poset() for bt in BinaryTrees(n)]
Is there a quick method to obtain the list of all such posets up to isomorphism?klaaaSun, 25 Oct 2020 18:43:45 -0500https://ask.sagemath.org/question/54030/Refinement between Lists of listshttps://ask.sagemath.org/question/53797/refinement-between-lists-of-lists/ Consider the following lists of lists L1 = [[0,1,2],[1,2],[2,2]] and L2 = [[0,1],[2],[1,2],[1,2]]. We say that L2 is a refinement of L1. How to check whether a list of lists is a refinement of another list of lists in Sage.
In the case of set partitions, we have the option refinement. But I need to work with the multisets and its multi partitions. So I am using lists and there is no refinement option for lists of lists.
Kindly help me with how to implement this.
Thank you.GA3165Thu, 08 Oct 2020 22:38:52 -0500https://ask.sagemath.org/question/53797/Obtaining certain minimal elements for latticeshttps://ask.sagemath.org/question/53804/obtaining-certain-minimal-elements-for-lattices/Let $L$ be a finite lattice and $L^{op}$ the opposite lattice. We can then look at the product lattice $U=L^{op} \times L$ and inside $U$ the poset $S_L=$ { $ (r_1,r_2 ) \in L^{op} \times L | r_2 \nleq r_1 $ }.
My question is whether there is an easy way to obtain the poset $S_L$ for a given lattice $L$ together with the minimal elements $min(S_L)$ of $S_L$.klaaaFri, 09 Oct 2020 09:41:50 -0500https://ask.sagemath.org/question/53804/Obtaining a simplicial complex associated to a poset with the help of Sagehttps://ask.sagemath.org/question/53752/obtaining-a-simplicial-complex-associated-to-a-poset-with-the-help-of-sage/I want to associate to a finite poset a simplicial complex $\Delta(P)$ and study the homology(with coefficients in the rational numbers or a finite field) and the topological type of this simplicial complex using Sage. I have not yet used sage for this and wanted to ask whether there is an easy method to do this.
Let $P$ be a a finite poset with at least two elements and for $p \in P$ define two subsets as follows:
$J(p):=$ { $ g \in P | p \nleq g $ } and $I(p):=$ { $g \in P | g \leq p $ }.
For a subset $S$ of $P$ (we view $P$ also as set of its vertices) we then define
$J(S):= \bigcap\limits_{p \in S}^{}{J(p)}$ and $I(S):= \bigcup\limits_{p \in S}^{}{I(p)}$.
We set $J( \emptyset)=P, J(P)=\emptyset$ and $I(\emptyset)=\emptyset$, $I(P)=P$.
Then the simplicial complex $\Delta(P)$ is defined as the set of all subsets $S \subseteq P$ with $J(S^c) \subseteq I(S^c)$, where fore a subset $S \subseteq P$ we denote by $S^c$ the complement of $S$ in $P$.
For example when the poset $P$ is a chain with $n$-elements then $\Delta(P)$ should have topological type of the $(n-2)$-sphere.
I can obtain the sets $J(p)$ and $I(p)$ for elements but not for subsets in Sage, but I would think there is an easy trick.
Here is an example in Sage for a given poset $P$ :
P=posets.BooleanLattice(2)
display(P)
p=P[2]
I=[u for u in P if P.is_lequal(u,p)]
J=[u for u in P if not P.is_lequal(p,u)]
display(I)
display(J)
Thanks for any help.klaaaWed, 07 Oct 2020 02:50:02 -0500https://ask.sagemath.org/question/53752/Checking Koszulness for incidence algebras of posets via Sagehttps://ask.sagemath.org/question/53723/checking-koszulness-for-incidence-algebras-of-posets-via-sage/In theorem 1.6. in the article https://www.sciencedirect.com/science/article/pii/S0001870810000538?via%3Dihub there is the characterisation that the incidence algebra kP over the field k of a given graded poset P is Koszul if and only if every open intervall (x,y) in P is Cohen-Macaulay over the field k.
My first question is whether one can check for a given bounded (meaning it has a global maximum and a global minimum) and graded poset P whether it is Koszul using Sage.
Im especially interested in the cases where k is the rational number or the field with 3 elements.
My second question is wheter it is possible to check whether a given incidence algebra kP of a bounded poset is quadratic (this does not depend on the field k), which means that the quiver algebra kQ/I isomorphic to kP has admissible relations I where the relations are quadratic (so it contains only commutativity relations of length 2).
Thanks for any help.klaaaSun, 04 Oct 2020 16:07:09 -0500https://ask.sagemath.org/question/53723/Obtaining a poset associated to a finite grouphttps://ask.sagemath.org/question/53428/obtaining-a-poset-associated-to-a-finite-group/ Let $G$ be a finite group and use Cayley's theorem to embed $G$ into the symmetric group $S_n$.
Is it possible via Sage to get the subposet of the strong Bruhat order (or the weak Bruhat order) on $S_n$ that has the points of $G$ inside $S_n$ with the induced poset structure?
klaaaSat, 12 Sep 2020 15:41:43 -0500https://ask.sagemath.org/question/53428/Computing maximal acyclic matchingshttps://ask.sagemath.org/question/53313/computing-maximal-acyclic-matchings/Hi, Is there a function to compute the maximal acyclic (Morse) matching (defined below) of a given finite poset?
A matching M in a poset X is a subset M of X x X such that:
1) if (x, y) is in M, then x is an immediate predecessor of y (x<y and there is no element z such that x<z<y)
2) each element x of X belongs to at most one element in M.
In order to represent the matching on the associated Hasse Diagram of the poset, we just reverse the arrows which are not in the matching. The matching is acyclic (Morse) if the matching represented on its Hasse Diagram is acyclic.
By maximal matching I mean one with the maximal number of elements.
Any help would be appreciated.daltopSat, 05 Sep 2020 06:25:44 -0500https://ask.sagemath.org/question/53313/Obtaining 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?klaaaSun, 30 Aug 2020 08:36:26 -0500https://ask.sagemath.org/question/53219/Finding the list of isomorphism classes of objects of another listhttps://ask.sagemath.org/question/53156/finding-the-list-of-isomorphism-classes-of-objects-of-another-list/ Given a finite list L of connected posets in Sage. Is there a quick way to obtain the list L2 of all isomorphism classes of posets in L?
So in the list L there might be isomorphic posets, and the goal is to obtain a list L2 where that contains exactly one poset of each isomorphism class of L.
For example the list L might contain the posets $B_2, B_3, B_3 , B_4$, where $B_n$ denotes the Boolean lattice.
Then the list L2 would contain the posets $B_2,B_3,B_4$.
Of course in the list, two posets might be isomorphic even when they look very different.klaaaMon, 24 Aug 2020 01:29:47 -0500https://ask.sagemath.org/question/53156/