Ask Your Question

Revision history [back]

It is not usual to bundle a database of combinatorial objects coming with Sage by default.

It would be nice to have a (fast) enumerated set of all lattices on a given number of elements. Although my impression is that the set of lattices on a given number of vertices is not easy to generate recursively. Indeed, the lattice property of a poset does not behave well with respect to inclusion, so a recursive enumeration would not work as smoothly as it does for posets.

That said, depending on what you want to do, you could use an iterator:

n_elmt=7
connected_lattice_iterator = (p for p in Posets(n_elmt) if p.is_connected() and p.is_lattice())


to generate all connected lattices one by one.

It is not usual to bundle a database of combinatorial objects coming with Sage by default.

It would be nice to have a (fast) enumerated set of all lattices on a given number of elements. Although my impression is that the set of lattices on a given number of vertices is not easy to generate recursively. Indeed, the lattice property of a poset does not behave well with respect to inclusion, so a recursive enumeration would not work as smoothly as it does for posets.

That said, depending on what you want to do, you could use an iterator:

n_elmt=7
n_elmt = 7
connected_lattice_iterator = (p for p in Posets(n_elmt) if p.is_connected() and p.is_lattice())


to generate all connected lattices one by one.

It is not usual to bundle a database of combinatorial objects coming with Sage by default.

It would be nice to have a (fast) enumerated set of all lattices on a given number of elements. Although my impression is that the set of lattices on a given number of vertices is not easy to generate recursively. Indeed, the lattice property of a poset does not behave well with respect to inclusion, so a recursive enumeration would not work as smoothly as it does for posets.

That said, depending on what you want to do, you could use an iterator:

n_elmt = 7
connected_lattice_iterator = (p for p in Posets(n_elmt) if p.is_connected() and p.is_lattice())


to generate all connected lattices one by one.one, but it does not increase the speed of generation...