Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here is a snippet of code that can be used to produce the desired quotient poset. It is not meant to be the most optimal way, but it does return the desired object.

sage: G = PermutationGroup([[(1,2)],[(3,4)]])
sage: S = Set([1,2,3,4])
sage: GroundSet = S.subsets()
sage: Orbits = Set([Set(G.orbit(s, action = "OnSets")) for s in GroundSet])
sage: def quotient_order(a,b):
....:     for s1 in a:
....:         ss1 = set(s1)
....:         for s2 in b:
....:             ss2 = set(s2)
....:             if ss1.issubset(ss2):
....:                 return True
....:     return False
....: 
sage: QuotientPoset = Poset((Orbits,quotient_order))
sage: QuotientPoset.show()

Two things:

  • To obtain all of them, one should then loop over all permutation subgroups of $S_n$
  • Be careful with the above function quotient_order as G is a global variable in this case. As far as I know, there isn't really a good way to define this order without using this work around.

Here is a snippet of code that can be used to produce the desired quotient poset. It is not meant to be the most optimal way, but it does return the desired object.

sage: G = PermutationGroup([[(1,2)],[(3,4)]])
sage: S = Set([1,2,3,4])
sage: GroundSet = S.subsets()
sage: Orbits = Set([Set(G.orbit(s, action = "OnSets")) for s in GroundSet])
sage: def quotient_order(a,b):
....:     for s1 in a:
....:         ss1 = set(s1)
....:         for s2 in b:
....:             ss2 = set(s2)
....:             if ss1.issubset(ss2):
....:                 return True
....:     return False
....: 
sage: QuotientPoset = Poset((Orbits,quotient_order))
sage: QuotientPoset.show()

Two things:

  • To obtain all of them, the quotient posets, one should then loop over all permutation subgroups of $S_n$
  • Be careful with the above function $S_n$. These subgroups can be obtained this way:

    quotient_ordersage: SG = SymmetricGroup(4)
    sage: SG.subgroups()
     as G is a global variable in this case. As far as I know, there isn't really a good way to define this order without using this work around.