Is there any function in GAP finding all maximal elementary abelian subgroup of a $p$-group $P$? I know how to obtain all subgroups of a group in GAP. Is there any function in GAP (or algorithm that I could implemnt myself) for obtaining all maximal elementary abelian subgroups of a $p$-group $P$?
 A: There is no ready-made function that does this. As for implementing it yourself, clearly you can restrict to the $p$-Sylow subgroups. For each such subgroup, you could use the cyclic extension method, restricting to elementary abelian subgroups for extension, to find all elementary abelian subgroups. For example:
gap> g:=PrimitiveGroup(100,4);Size(g);
HS:2
88704000
gap> s:=SylowSubgroup(g,2);
<permutation group of size 1024 with 10 generators>
gap> lat:=LatticeByCyclicExtension(u,IsElementaryAbelian);;
gap> reps:=List(ConjugacyClassesSubgroups(lat),Representative);;
gap> reps:=Filtered(reps,IsElementaryAbelian);; # the filter does not eliminate wrong candidates
gap> List(reps,Size);
[ 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  4, 4, 8, 8, 8, 8, 8 ]

Then fuse under the group:
gap> reps:=List(SubgroupsOrbitsAndNormalizers(g,reps,false),x->x.representative);;
gap> List(reps,Size);
[ 1, 2, 2, 4, 4, 4, 4, 8, 8, 8 ]

Finally (testing for conjugacy with maximal subgroups) one could filter out those that are not maximal.
