G := Sym(10); G; X := {"apple", "pear", "peach"}; H:=Sym(X); H; for x in H do print x;end for; e := elt; e; f := G!(4,5)(6,7)(8,9); f; a := elt; a; b := H!("pear","apple"); b; a eq b; // Permutation groups, Subgroups // Construct the automorphism group of the Cube P := PermutationGroup<8|(1,2,3,4)(5,6,7,8),(2,4,5)(6,3,8),(1,5)(2,6)(3,7)(4,8)>; S := sub; S; C := sub; C; Q := P/C; Q; // Abelian Groups A := AbelianGroup(GrpPerm, [2,6]); A; A := AbelianGroup([2,6]); A; // Alternating Groups A := Alt(10); A; // Direct Product P2 := DirectProduct(Sym(4), CyclicGroup(2)); P2; // Basic Operations P.1,P.2,P.3; P.4; Degree(P); Degree(P2); Generic(P); Generic(P2); Parent(a); GSet(G); GSet(H); Order(P); #P; FactoredOrder(P); Index(P,S); Index(P,C); FactoredIndex(P,C); Representative(P); Representative(H); Sym(8)!(1,2,3,4)(5,6) in P; Sym(8)!(1,2)(3,4)(5,6)(7,8) in P; Sym(8)!(2,4,5)(6,3,8) eq P.2; // Images, Orbits, Stabilizers, etc. 1^P.1; 1^P; "peach"^H; Orbits(P); Orbits(P2); Stabilizer(P,1); Stabilizer(P,{1,2}); Stabilizer(P,[1,2]); // Interlude : a little function to compute the order of a group function GroupOrder(g); order := 1; o := Orbits(g); i := 1; while i le #o do if #o[i] ne 1 then order *:= #o[i]; r := Representative(o[i]); g := Stabilizer(g,r); o := Orbits(g); i := 1; else i := i+1; end if; end while; return order; end function; time GroupOrder(Sym(100)); time #Sym(101); // Conjugated elements IsConjugate(P,P.1, P.1^-1); cc := ConjugacyClasses(P); cc; // Cosets, etc. C1 := C*P.1; C1; D1 := C*P.1*C; D1; t:=Transversal(P,S); for x in t do print x;end for; // Subgroups S2 := S^P.2; S2 meet S; NS := Normalizer(P,S); NS; NC := Normalizer(P,C); NC; S3 := SylowSubgroup(P,3); S3; S2 := SylowSubgroup(P,2); S2; l := SubgroupLattice(Alt(5):Properties:=true); l; l := SubgroupLattice(P:Properties:=true); l; n := NormalSubgroups(P); n; G := PSL(2,11); G; load m24; G; // O'Nan sporadic simple group F := FreeGroup(7); G := quo; H := sub; V := CosetSpace(G, H); ON := CosetImage(V); #ON; Degree(ON); MaximalSubgroups(ON); // Databases TransitiveGroupDatabaseLimit(); PrimitiveGroupDatabaseLimit(); NumberOfPrimitiveGroups(10); for x in PrimitiveGroups(10) do print #x;end for; SmallGroupDatabaseLimit(); NumberOfSmallGroups(660); count := 0; for x in SmallGroups(660) do if IsSoluble(x) then count := count+1;end if;end for; count; s:=[]; for x in SmallGroups(660) do if not(IsSoluble(x)) then Append(~s,x);end if;end for; s; SubgroupLattice(s[1]:Properties:=true); IsIsomorphic(s[1],PSL(2,11)); SubgroupLattice(s[2]:Properties:=true); n:=NormalSubgroups(s[2]); n; IsSimple(n[3]`subgroup); q:=s[2]/n[3]`subgroup; q; IsIsomorphic(q,CyclicGroup(11)); IsCyclic(q); IsIsomorphic(s[2],DirectProduct(CyclicGroup(11),Alt(5))); CompositionFactors(s[1]); CompositionFactors(s[2]);