Ask Your Question

# Finding the list of isomorphism classes of objects of another list

Given a finite list L of connected posets in Sage. Is there a quick way to obtain the list L2 of all isomorphism classes of posets in L?

So in the list L there might be isomorphic posets, and the goal is to obtain a list L2 where that contains exactly one poset of each isomorphism class of L.

For example the list L might contain the posets $B_2, B_3, B_3 , B_4$, where $B_n$ denotes the Boolean lattice. Then the list L2 would contain the posets $B_2,B_3,B_4$. Of course in the list, two posets might be isomorphic even when they look very different.

edit retag close merge delete

## 1 Answer

Sort by » oldest newest most voted

Here is a tentative

def filtre_iso(liste_posets):
from collections import defaultdict
table = defaultdict(list)
for po in liste_posets:
dp = po.degree_polynomial()
connus = table[dp]
if not any(q.is_isomorphic(po) for q in connus):
table[dp].append(po)
return table

more

## Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

## Stats

Asked: 2020-08-24 08:29:47 +0200

Seen: 74 times

Last updated: Aug 24 '20