On Mon, Aug 25, 2014 at 11:14:09AM +0300, Jori Mantysalo wrote: > Posets(5) > > which internally does something like > > [x for x in GenerateAllDirectedGrapsh(5) if x.is_poset()]
Semantically, this is correct. Luckily the implementation is more clever than this: it only runs through digraphs that are actually Hasse diagrams. For details, see the section "Graphs up to isomorphism" in sage.combinat.tutorial? > To get lattices of size 5 one says > > [sage.combinat.posets.lattices.FiniteLatticePoset(x) for x in > Posets(5) if x.is_lattice()] > > Because a) FiniteLatticePoset is not available on global namespace > and b) there is no ready method to get lattices of given size. > > Am I right on this? Alas, yes. In theory, the orderly generation technique should be applicable for lattices too, doing an augmentation by vertices (see also the tutorial). However this would require some basic control on how vertices are added (the meet-semi lattice property is stable upon removing largest elements only). Tom Denton had given it a quick shot back in 2010, but it seemed like the orderly generation code did not make it easy to gain such control. I'd love to be proven wrong :-) Cheers, Nicolas -- Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net> http://Nicolas.Thiery.name/ -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at http://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.