Finding distributive lattices up to an identification

asked 2019-03-26 04:45:26 -0500

sagequstions gravatar image

updated 2019-03-26 05:02:19 -0500

I want for a given natural number n obtain all distributive lattices on n points where two such distributive lattices $L_1$ and $L_2$ get identified in case they are isomorphic as posets or $L_1$ is isomorphic to the opposite of $L_2$.

I know how to obtain the distributive lattices as follows in sage:

n=5

posets = [p for p in Posets(n) if p.has_bottom() and p.has_top() and p.is_lattice()]

lattices = [p for p in posets if LatticePoset(p).is_distributive()]

But I am not sure how to add the further condition as stated above.

So for n=5 the result should for example be that there are 2 distributive lattices up to the above identification.

edit retag flag offensive close merge delete

Comments

1

You should rather iterate over all posets and use P.order_ideals_lattice.

FrédéricC gravatar imageFrédéricC ( 2019-03-30 15:06:42 -0500 )edit