Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168731
Image: ubuntu2004
G = SymmetricGroup(7) S = [H for H in G.conjugacy_classes_subgroups() if H.order() == 12] print len(S)
13
P = [] for s in S: s_in_P = False for p in P: if s.is_isomorphic(p): s_in_P = True break if not s_in_P: P.append(s) print P
[Permutation Group with generators [(4,5)(6,7), (4,6)(5,7), (5,6,7)], Permutation Group with generators [(5,6,7), (1,2)(3,4), (1,3)(2,4)], Permutation Group with generators [(5,6,7), (3,4)(6,7), (1,2)(6,7)], Permutation Group with generators [(5,6,7), (1,2)(3,4), (1,3,2,4)(6,7)], Permutation Group with generators [(5,6,7), (1,2)(3,4), (1,3,2,4)]]
G = SymmetricGroup(7) S = [H for H in G.conjugacy_classes_subgroups() if H.order() == 12] print reduce(lambda P, s: P if any(map(lambda p: s.is_isomorphic(p), P)) else P+[s], S, [])
[Permutation Group with generators [(4,5)(6,7), (4,6)(5,7), (5,6,7)], Permutation Group with generators [(5,6,7), (1,2)(3,4), (1,3)(2,4)], Permutation Group with generators [(5,6,7), (3,4)(6,7), (1,2)(6,7)], Permutation Group with generators [(5,6,7), (1,2)(3,4), (1,3,2,4)(6,7)], Permutation Group with generators [(5,6,7), (1,2)(3,4), (1,3,2,4)]]