GAP - Finding Number of Subgroups I am new here, new in abstract algebra as well. I am currently trying to find number of subgroups. Did some search and I have the following:
gap> x:=DirectProduct(c3,c9);
gap> Sum(List(ConjugacyClassesSubgroups(x),Size));
10
gap> List(ConjugacyClassesSubgroups(x));
[ Group(  of ... )^G, Group( [ f3 ] )^G, Group( [ f1 ] )^G, Group( [ f1*f3 ] )^G, Group( [ f1*f3^2 ] )^G, Group( [ f3, f1 ] )^G, Group( [ f3, f2 ] )^G, Group( [ f3, f1*f2 ] )^G, Group( [ f3, f1*f2^2 ] )^G, 
  Group( [ f3, f1, f2 ] )^G ]
I have two questions:


*

*Is the way to find number of subgroups correct? It is right in this example but I am not sure if it is correct for all.

*When I use List(ConjugacyClassesSubgroups(x)), it gives a list of groups. But I am not sure what is it representing? For eg, Group( [ f3, f1 ] )^G means?
Thank you.
 A: *

*Yes. You can use the shorter form Sum(ConjugacyClassesSubgroups(x),Size); as well. Personally, I like using the slightly more expensive LatticeSubgroups(x); which tells you how many subgroups there are and how many conjugacy classes (it also calculates a lot more). 

*^G means “conjugacy class”. f3 and f1 are elements of x. f1 is the generator of c3, f2 is the generator of c9, and f3 = f2^3.
In your case (assuming you didn't use counterintuitive names), x is an abelian group and there is not much difference between a subgroup h and its conjugacy class h^G = [ h ].
Also notice GAP doesn't keep track of names internally. The elements of x are named after a group f that was used to construct the direct product, and the conjugacy classes are labelled by ^G using G as a generic name for a group, rather than the name you might like, such as x. I have found that it is usually not worth the effort to convince GAP to use your names, but it can be helpful to know it is renaming things internally.
