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.Fri, 09 Oct 2020 16:41:50 +0200Obtaining 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 16:41:50 +0200https://ask.sagemath.org/question/53804/Translating GAP-output into sage for latticeshttps://ask.sagemath.org/question/53709/translating-gap-output-into-sage-for-lattices/Hi,
I mainly use GAP for computations so my experience with Sage is very little.
I wonder whether there is an easy method to translate a GAP statistic for posets into a sage statistic for lattices that can be used to enter in the database http://www.findstat.org/ . The following example illustrates the problem:
The GAP output in this example is:
[ [ [ [ 1, 1, 1, 1, 1 ], [ 0, 1, 0, 0, 1 ], [ 0, 0, 1, 0, 1 ], [ 0, 0, 0, 1, 1 ], [ 0, 0, 0, 0, 1 ] ], 2 ],
[ [ [ 1, 1, 1, 1, 1 ], [ 0, 1, 0, 1, 1 ], [ 0, 0, 1, 1, 1 ], [ 0, 0, 0, 1, 1 ], [ 0, 0, 0, 0, 1 ] ], 2 ],
[ [ [ 1, 1, 1, 1, 1 ], [ 0, 1, 0, 0, 1 ], [ 0, 0, 1, 1, 1 ], [ 0, 0, 0, 1, 1 ], [ 0, 0, 0, 0, 1 ] ], 2 ],
[ [ [ 1, 1, 1, 1, 1 ], [ 0, 1, 1, 1, 1 ], [ 0, 0, 1, 1, 1 ], [ 0, 0, 0, 1, 1 ], [ 0, 0, 0, 0, 1 ] ], 1 ],
[ [ [ 1, 1, 1, 1, 1 ], [ 0, 1, 1, 1, 1 ], [ 0, 0, 1, 0, 1 ], [ 0, 0, 0, 1, 1 ], [ 0, 0, 0, 0, 1 ] ], 2 ] ]
This is a list with 5 entries where the first entry is for example [ [ [ 1, 1, 1, 1, 1 ], [ 0, 1, 0, 0, 1 ], [ 0, 0, 1, 0, 1 ], [ 0, 0, 0, 1, 1 ], [ 0, 0, 0, 0, 1 ] ], 2 ]. So this first entry is a list with two entries, the first is the matrix [ [ [ 1, 1, 1, 1, 1 ], [ 0, 1, 0, 0, 1 ], [ 0, 0, 1, 0, 1 ], [ 0, 0, 0, 1, 1 ], [ 0, 0, 0, 0, 1 ] ] that is the leq-matrix of a lattice, namely the diamond lattice (which in sage can be entered as ([(0,1),(0,2),(0,3),(1,4),(2,4),(3,4)],5) ) and the second entry is the number 2, which is the value of the statistic.
So to every of the five entries in the big list, there corresponds a lattice with a number (statistic).
Now I try to obtain the same statistic in sage that can be entered in the findstat database and the text should look as follows:
([(0,1),(0,2),(0,3),(1,4),(2,4),(3,4)],5) => 2
([(0,2),(0,3),(2,4),(3,4),(4,1)],5) => 2
([(0,2),(0,3),(1,4),(2,4),(3,1)],5) => 2
([(0,4),(2,3),(3,1),(4,2)],5) => 1
([(0,3),(1,4),(2,4),(3,1),(3,2)],5) => 2
Is there an easy way to translate bigger lists such as the above GAP list automatically into the needed sage output to enter in the findstat database?
Thanks for any help!klaaaSat, 03 Oct 2020 13:16:30 +0200https://ask.sagemath.org/question/53709/Obtaining a group from distributive latticeshttps://ask.sagemath.org/question/53455/obtaining-a-group-from-distributive-lattices/Let $P$ be a finite lattice with incidence algebra $I(P,K)$ over a field $K$.
A function $f$ in $I(P,K)$ is called strongly multiplicative if $f(x \land y , x \lor y)=f(x \land y, x) f(x \land y ,y )$ for all $x,y \in P$. $P$ is distributive if and only if the strongly multiplicative invertible functions form a group.
My question is whether there is an easy way to obtain this group using Sage for a given $P$.klaaaMon, 14 Sep 2020 18:29:47 +0200https://ask.sagemath.org/question/53455/Free modular lattice on 3 generators in Sagehttps://ask.sagemath.org/question/52657/free-modular-lattice-on-3-generators-in-sage/Is there an easy/quick way to obtain the free modular lattice on 3 generators in Sage (it has 28 elements)?
I searched a bit but was not able to find a good way.
See https://blogs.ams.org/visualinsight/2016/01/01/free-modular-lattice-on-3-generators/ for the definition/visualization.
By the way, is there a reference for what the free modular lattice on 2 generators is? I have a guess but I am not sure.
Is the poset of join-irreducible elements of the free modular lattice on 3 generators a special poset? Does it have a name?klaaaFri, 24 Jul 2020 23:17:56 +0200https://ask.sagemath.org/question/52657/Obtaining quotient posets of the Boolean lattice via Sagehttps://ask.sagemath.org/question/53119/obtaining-quotient-posets-of-the-boolean-lattice-via-sage/Let $G$ be a subgroup of the symmetric group $S_n$ that acts in a natural way on the Boolean lattice $B_n$, see for example chapter 5 of the book on algebraic combinatorics by Stanley.
$B_n/G$ for a subgroup $G$ of the symmetric group $S_n$ (that acts naturally on $B_n$) is defined as the poset of orbits under the natural order (that is one orbit $a$ is $\geq$ another orbit $b$ if and only if there exists elements $a' \in a$ and $b' \in b$ such that $a' \geq b'$).
The posets $B_n /G$ are graded of rank $n$, rank-symmetric, rank-unimodal, and Sperner. See theorem 5.8. in the book of Stanley. In this book one can also find open problems about such posets and thus it might be a good class to study in Sage.
For example when $n=3$ and $G$ is generated by the permutation (1,2) then the resulting poset is isomorphic to the product of the chain with 2 elements and the chain with 3 elements.
My question is how one can obtain the quotient poset $B_n /G$ in Sage when one inputs the group G generated by cycles?
The Boolean lattice on n points can be obtained in Sage via B4=posets.BooleanLattice(4) . Im not sure how to obtain a subgroup of the symmetric group acting on $B_n$ in SAGE and the resulting quotient poset.
Also is it possible to obtain the list of all connected posets obtained in this way for a given $n$? (meaning all connected posets of the form $B_n /G$ where $G$ is a subgroup of $S_n$).
This will be a huge list but maybe for n<=5 it is possible to obtain it via sage.klaaaThu, 20 Aug 2020 15:34:56 +0200https://ask.sagemath.org/question/53119/Obtaining the free distributive lattice in Sagehttps://ask.sagemath.org/question/49518/obtaining-the-free-distributive-lattice-in-sage/Is there a way to obtain the free distributive lattice on $n$ generators with Sage
(empty joins and empty meets are disallowed would be preferable,
but the other case is also fine)?
See
- [https://en.wikipedia.org/wiki/Distributive_lattice#Free_distributive_lattices](https://en.wikipedia.org/wiki/Distributive_lattice#Free_distributive_lattices)
I'm especially interested in the case $n = 4$, where this lattice would have $166$ points.klaaaSun, 12 Jan 2020 17:46:24 +0100https://ask.sagemath.org/question/49518/Lattice of subspaces of a finite field vector spacehttps://ask.sagemath.org/question/53067/lattice-of-subspaces-of-a-finite-field-vector-space/Let $V$ be a vector space over a finite field with $q$ elements and dimension $n$.
How one can obtain the lattice $L_{n,q}$ of subspaces of $V$ as a poset in Sage?klaaaSun, 16 Aug 2020 18:22:51 +0200https://ask.sagemath.org/question/53067/Automorphisms of distributive lattices via sagehttps://ask.sagemath.org/question/52023/automorphisms-of-distributive-lattices-via-sage/ Let L be a finite distributive lattice.
Is it possible to calculate the automorphism group G of L via SAGE? Can one display all the elements of G and their orders?klaaaMon, 15 Jun 2020 21:38:04 +0200https://ask.sagemath.org/question/52023/Obtaining the rowmotion bijection on distributive lattices via sagehttps://ask.sagemath.org/question/51669/obtaining-the-rowmotion-bijection-on-distributive-lattices-via-sage/ In the article https://arxiv.org/abs/1108.1172 a bijection F on finite distributive lattices called rowmotion is introduced.
Given a poset P and let L(P) denote the distributive lattice of order ideals of P, the bijection F: L(P) -> L(P) is defined as F(I)=the order ideal generated by the minimal elements of P not in I for a given order ideal I.
Is there a way to obtain this bijection F and its inverse for an explictly given distributive lattice in SAGE?
So the input in sage is a distributive lattice such as
B4=posets.BooleanLattice(4)
display(B4)
and the output should be the bijection F (and its inverse) as a map on the points of the distributive lattice.klaaaMon, 01 Jun 2020 11:00:06 +0200https://ask.sagemath.org/question/51669/Lattice of antichains in SAGEhttps://ask.sagemath.org/question/49553/lattice-of-antichains-in-sage/ Given a finite poset P in SAGE. Can one obtain the lattice of antichains or the lattice of order ideals of P as a lattice in SAGE? I just saw how to obtain those things as sets but not as posets.klaaaTue, 14 Jan 2020 21:40:09 +0100https://ask.sagemath.org/question/49553/Lattices via sagehttps://ask.sagemath.org/question/49380/lattices-via-sage/ I have three questions on lattices:
-Is there a way to obtain the minimal number of generators of a lattices with sage?
-Is there a way to obtain the lattice of all subspaces of a vector space over a finite field with q elements in sage?
-Is there a quick way to obtain all distributive lattices on n points in sage (that is, without filtering them from the set of all posets on n points).
klaaaSun, 05 Jan 2020 20:01:53 +0100https://ask.sagemath.org/question/49380/Obtaining lattices quickly in SAGEhttps://ask.sagemath.org/question/38936/obtaining-lattices-quickly-in-sage/At the moment I use
posets = [p for p in Posets(n) if p.is_connected() and p.is_lattice()]
to obtain all connected lattices via SAGE.
But this takes terrible long for n>=8. Is there a quicker way? It would somehow be natural when the connected lattices (or just connected posets) are saved in SAGE for some small n so that one does not have to filter trough the very large set of all posets. For example there are 53 connected lattices with 7 points , while there are 2045 posets on 7 points.sagequstionsThu, 21 Sep 2017 22:52:33 +0200https://ask.sagemath.org/question/38936/bond lattice of a graphhttps://ask.sagemath.org/question/26392/bond-lattice-of-a-graph/ I want to know whether bond lattice of a graph has been implemented in sage or not. If it is implemented what is the sage code for implementing bond lattice. Kindly tell related packages also in this case.
Thanks for your valuable time.GA316Tue, 31 Mar 2015 04:23:07 +0200https://ask.sagemath.org/question/26392/