-
Notifications
You must be signed in to change notification settings - Fork 161
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
Knowing that the group is Abelian messes up Sylow and Hall subgroup computation? #707
Comments
In line 2935 of grp.gi you always assign (a pointer to) the same list smallpi. Replace it with
and everything works fine. |
@hulpke Great, thanks! I honestly do not entirely understand the programming difference here (even though I checked out I will include this in a separate PR. |
The thing to remember is that GAP doesn't copy lists when you assign them, it is still the "same list". For example:
|
@ChrisJefferson Thank you. I think I might understand now what happened.
There is something I still do not understand. The nilpotent method for |
@hungaborhorvath : Yes, this is the intended behaviour. The reason we don't put the ShallowCopy in oper1.g is because, in every case I've ever seen previously, there hasn't been a need for a ShallowCopy, as code builds a list to use in a If we always ShallowCopied, it would be (slightly) safer, but much more expensive. |
@ChrisJefferson Ok, thanks. |
@ChrisJefferson I tend to think that this should rather be fixed in oper1.g – the risk of accidentally changing a key and resulting in wrong results seems relatively high to me. However, I'd use Probably, it would make sense to use |
Ok, it seems that there are different preferences, so I reopen this. |
I've never done enough with I have no idea if there are any users of |
This is a bug in the master branch.
I have observed this by PR #706, and I cannot debug it. It is likely that it have been introduced by my PR #535.
Without knowing that the group is abelian everything works fine:
But if the group knows at a certain point that it is Abelian, things become messed up:
Note, that if I only call
HallSubgroup
, then everything is fine.Further, if
IsAbelian
is called beforeSylowSubgroup
, then everything is fine.The main difference is in method selection for
HallSubgroup
. If the group knows itself to be abelian, then the nilpotent method is called ingrp.gi:2927
. I have checked (by puttingPrint(IdGroup(S));
commands into this method everywhere) that this call computes everything properly up until thereturn S
moment, but apparently somehow returns the 2-sylow subgroup and not S. Further, I have no idea why it counts whether first one computesSylowSubgroup
or not, and I have no idea why everything works again ifIsAbelian
is checked at the beginning. Could it be that the pcgs method conflicts with the nilpotent method?The text was updated successfully, but these errors were encountered: