# Finding distributive lattices up to an identification

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.

You should rather iterate over all posets and use

`P.order_ideals_lattice`

.