Finding distributive lattices up to an identification

asked 2019-03-26 10:45:26 +0200

sagequstions gravatar image

updated 2019-03-26 11:02:19 +0200

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:


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



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

FrédéricC gravatar imageFrédéricC ( 2019-03-30 21:06:42 +0200 )edit