6
$\begingroup$

Is there a way to obtain in GAP the Hasse diagrams of famous posets like the partition lattice or the divisor lattice of an integer? If they are not saved, is there a way to get them somehow else, like with using SAGE? If not, is there a trick to obtain the Hasse diagram easily without programming everything from the start? Are small posets or lattice saved in GAP? Like the ones with at most 7 points.

$\endgroup$
3
  • 1
    $\begingroup$ I suggest to look at FindStat, especially findstat.org/Posets. See also arxiv.org/abs/1401.3690 $\endgroup$ Sep 9 '17 at 22:23
  • $\begingroup$ @AlexanderKonovalov thanks, so in GAP (or a GAP package) alone no librarys or similar things exist for posets? $\endgroup$
    – Mare
    Sep 9 '17 at 23:20
  • 1
    $\begingroup$ Not that I am aware of. You may ask the GAP Forum in case someone may have it (perhaps in some list encoding, since GAP has now such data type, but hopefully readable in GAP then). I have listed some standalone mathematical databases here - will be interested to add it to the list, if it exists. $\endgroup$ Sep 10 '17 at 16:04
5
$\begingroup$

Sage has a built-in Poset class with pretty broad functionality. This Sage cell gives a pretty boring example:

P = posets(5)
for p in P:
    p.show()
    print('\n')

For something more specific, you can look at the catalog of posets/lattices and use some of the graph plotting options:

posets.IntegerPartitions(10).hasse_diagram().show(figsize=[10,10])

partitions of 10 as lattice

For a better experience you'll probably want to be more sophisticated with the plot options, such as using this option:

heights A dictionary mapping heights to the list of vertices at this height.

$\endgroup$
2
$\begingroup$

Concerning the specific question: No, GAP has no formal ``poset'' data type and thus also does not have a library of posets. However it is likely that such a library exists as a standalone resource on the web.

$\endgroup$
1
  • $\begingroup$ and for lattices? $\endgroup$ Sep 15 '17 at 15:19
2
$\begingroup$

Although GAP has no formal poset data type, the homology package does have such a type, and has some of the examples that you speak of built-in. It's difficult to build the compiled portion of the library, but pretty much all of the poset stuff should work without compiling. Unfortunately, I don't think the poset support in this package is hooked up to anything that will display Hasse diagrams.

There are two ways I know of to display Hasse diagrams of subgroup lattices in GAP, both requiring some additional software:

It's not too difficult to display Hasse diagrams in xgap or Gap.app. The built-in code handles only subgroup lattices. I have (unpolished) code that draws partition lattices in these systems. For what it's worth, I'll post it to my webpage. It at least will serve as a model for how to display Hasse diagrams of new posets in xgap or Gap.app.

Note that you need Xwindows (on Linux or other Unix-like system) to run xgap, or a Mac to run Gap.app.

You could also look at the routine DotFileLatticeSubgroups. That exports a subgroup lattice to a GraphViz file, which you can then turn into a picture of the Hasse diagram. See e.g. this question.

$\endgroup$
2
$\begingroup$

It does, it's mentioned in Macaulay2's docs here

The GAP package Simplicial Homology, available at http://www.eecis.udel.edu/~dumas/Homology/, provides methods for using posets within GAP. According to the documentation, posets are stored in GAP in the following manor: The ground set is the set of integers 1..n+1 and the relations are stored in a list of length n, where the ith entry is the set of vertices which cover i in the poset. In particular, 1 should be the unique minimal element and n+1 should be the unique maximal element.

The link is now dead, and seems to be https://ljk.imag.fr/membres/Jean-Guillaume.Dumas/Homology/ instead now. You can find the old link on the Wayback Machine.

Note that this is not the simpcomp package.

I'm looking into the same problem and didn't know about the heights parameter in Sage, I'll probably use that instead but leaving this note in case it helps.

Specifically, I was trying to see if it was simple to make an integer partition lattice like it is in Sage, but it doesn't seem to be.

$\endgroup$
1
  • 1
    $\begingroup$ Thanks for finding this! The package has never been submitted for the redistribution with GAP (I don't recollect all the details, but installing it seemed highly non-trivial). It may be worth checking how it is compatible with GAP 4.11, maybe also try to provide it in a Docker container based on hub.docker.com/r/gapsystem/gap-docker ... $\endgroup$ Jul 8 '20 at 21:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.