-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FrattiniSubgroup for nilpotent groups #583
Conversation
Can someone help me how to merge current master and rebase this so I can resolve the conflict in the tst file? Sorry about this. |
General FrattiniSubgroup method is added for nilpotent groups. Now this works for fp-groups, as well, see test examples. Further, the nilpotent permutation p-group case is enhanced. Tests are added.
d25863f
to
cbfea49
Compare
I tried an experimental rebase master, and hopefully, resolved the conflict. |
if q<>0 and not IsPrime(q) then | ||
p := SmallestRootInt(q); | ||
Add(gen, IndependentGeneratorsOfAbelianGroup(G)[i]^p); | ||
fi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling AbelianInvariants
and IndependentGeneratorsOfAbelianGroup
again and again like that makes me cringe. While we cache these values, each of these calls incurs an overhead, as the system has to perform a lookup in a component object. So please store those into temporary variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fingolfin Ok, now I call them in the beginning and then use the elements of this stored list.
The reason I did not want to do this was that if an abelian group has only invariants of 0 and prime then we would not even need to call IndependentGenerators, which could be more expensive than AbelianInvariants.
Except for that minor remark, this looks good to me. Thanks! Though I am not an expert on that code -- as always, I'd feel more comfortable if @hulpke had a brief look, too (if his time permits). And as always, of course everybody else is most welcome to take a look, too (the more, the better ;-). |
@fingolfin Sorry, I forgot to add the theory I used in the first post. Here it goes: For a nilpotent group every maximal subgroup is normal. Thus the factor group exists and is a group without any proper subgroups, i.e. a cyclic group of prime power order. Hence every maximal subgroup contains the commutator and thus it is enough to consider G/G', which is abelian. The Frattini subgroup of a direct product is the direct product of the Frattini subgroups. (Hm, a method probably should be implemented for direct products, as well... :-) ) Thus one only needs to consider cyclic groups. For the infinite group is maximal for every prime, their intersection is 0. For a cyclic group of order p^n there is a unique maximal subgoup of order p^{n-1}. Just before merging I will squash the commits if you want and then add this as comment to document it. |
BTW, I did not make any checks if this method is any faster for pc-groups than the currently installed ones. It really should be (and then it should be ranked higher), but I only checked it in a few examples where this method was in fact slower. On the non-commutative side, constructing So probably the rank should stay as it is for now. |
I really don't like the idea of installing lots of high-ranking methods that force-test properties in the hope that there will bring practical improvements. This might work OK for the examples studies by the author, If a user suspects that properties should be set but are not because of particular constructions/representations, it always would be possible to just set the filters. I therefore would strongly prefer if this method was installed properly for the In the code, instead of calling |
@hulpke Would you prefer to install this method for nilpotent groups and then have a Redispatch? Considering that for infinite groups the only other working method I see is for pcp-groups, it would warrant a redispatch, but from some of your comments I thought that you do not like it. I will look if |
@hulpke I have replaced The only method currently ranked lower than this are at maxsub.gi:335 and grp.gi:1047. If you honestly think that any of these methods would receive a significant hindrance by computing Note, however, that in that case this method will never run, except when the group does know that it is nilpotent. For example for Abelian fp-groups (for which the group does not yet know it is Abelian) the algorithm would never run, because errors out during the radical method. Or, even worse, for infinite pcp-groups (that method ranked higher currently) |
General FrattiniSubgroup method is added for nilpotent groups. Now this
works for fp-groups, as well, see test examples.
Further, the nilpotent permutation p-group case is enhanced (no factorization is needed, only checking if a group is a p-group). I am not entirely sure if this permgroup method here is really needed, though, because this new general method for any nilpotent group should really cover it.
Tests are added.
The test file may conflict with #400 after that has been merged. Further, currently
IsNilpotent
is not really good with nilpotent fp-groups, because in computingLowerCentralSeries
checking if two groups are equal might not terminate.