FactorizeInGenerators := function(G,gens,e) local i,n,F,hom,fgens; n := Length(gens); F :=FreeGroup(n); fgens := GeneratorsOfGroup(F); hom := GroupHomomorphismByImages(F,G,fgens,gens); return PreImagesRepresentative(hom,e); end; #Z12 G := CyclicGroup(12); Elements(G); List(Elements(G),Order); List(NormalSubgroups(G),Order); g := (1,2,3,4,5,6,7,8,9,10,11,12); G := Group(g); g^2; g^3; Elements(G); List([1..12], k->Order(g^k)); h := (2,12)(3,11)(4,10)(5,9)(6,8); DIHED:= Group(g,h); h^2; g^12; g*h; h*g^(-1); FactorizeInGenerators(DIHED,[g,h],g^4*h); FactorizeInGenerators(DIHED,[g,h],(1,2,3)); NS := NormalSubgroups(DIHED); List(NS, Order); Elements(NS[2]); List(Elements(NS[2]), e->FactorizeInGenerators(DIHED,[g,h],e)); List(Elements(NS[4]), e->FactorizeInGenerators(DIHED,[g,h],e)); KVOT := DIHED/NS[4]; List(Elements(KVOT),Order); QQ := List(NS, Q -> DIHED/Q); List(QQ,Order); QQ[5]; List(Elements(QQ[5]),Order); # Ny permgrupp moves := [(1,2,3),(7,8,9),(1,4,7),(3,6,9)]; NG := Group(moves); Order(NG); Factorial(8)/Order(NG); FactorizeInGenerators(NG,moves, (1,2)(7,8)); moves[1]*moves[3]^-1*moves[1]*moves[3]*moves[1]^-1*moves[3]^-1*moves[2]*moves[3]*moves[2]^-1*moves[3]^-1*moves[2]^-1