-
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
Fix stabilizer computation in alternating groups which could sometimes return a wrong result #5811
Conversation
@stertooy can you confirm this fixes the issue for you? |
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.
Thank you -- indeed this has been an awkward oversight.
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.
The fix works perfectly, many thanks!
I do have one small suggestion for the test.
gap> stab := Stabilizer( G, One(G), tc );; | ||
gap> Size(stab); | ||
5 |
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.
Perhaps something along the lines of
gap> stab := Stabilizer( G, One(G), tc );;
gap> Set( stab ) = Set( Filtered( G, g -> tc( One( G ), g ) = One( G ) ) );
true
would be safer?
This would ensure the following case (which I only discovered just now, and which is fixed by this PR) is also caught:
gap> G := AlternatingGroup( 6 );;
gap> hom1 := GroupHomomorphismByImages( G, G, [ (1,2,3,4,5), (4,5,6) ], [ (1,2,6,3,5), (1,4,5) ] );;
gap> hom2 := IdentityMapping( G );;
gap> tc := function ( g, h ) return (h^hom2)^-1 * g * h^hom1; end;;
gap> stab := Stabilizer( G, One(G), tc );;
gap> Size(stab);
5
gap> Set( stab ) = Set( Filtered( G, g -> tc( One(G), g ) = One(G) ) );
false
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.
I've added your second test case, and made the checks more robust
2d3b6db
to
47e60dc
Compare
Fixes #5808