| 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:
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. | 2 | No.2 Revision |
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:
quotient_ordersage: SG = SymmetricGroup(4)
sage: SG.subgroups()
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.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.