Ask Your Question
0

Finding the list of isomorphism classes of objects of another list

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

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
1

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

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):
            table[dp].append(po)
    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

Stats

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

Seen: 55 times

Last updated: Aug 24