Ask Your Question

Finding the list of isomorphism classes of objects of another list

asked 2020-08-24 01:29:47 -0600

klaaa gravatar image

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 flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2020-08-24 02:29:02 -0600

FrédéricC gravatar image

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):
    return table
edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower


Asked: 2020-08-24 01:29:47 -0600

Seen: 64 times

Last updated: Aug 24 '20