Skip to content
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 regression in group constructors for matrix groups #1077

Merged
merged 1 commit into from
Jan 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions grp/basic.gd
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ BindGlobal( "AbelianGroup", function ( arg )
fi;
return AbelianGroupCons( IsPcGroup, arg[1] );
elif IsOperation(arg[1]) then

if Length(arg) = 2 then
return AbelianGroupCons( arg[1], arg[2] );
fi;
Expand Down Expand Up @@ -257,9 +256,11 @@ BindGlobal( "CyclicGroup", function ( arg )
fi;
return CyclicGroupCons( IsPcGroup, arg[1] );
elif IsOperation(arg[1]) then

if Length(arg) = 2 then
return CyclicGroupCons( arg[1], arg[2] );
elif Length(arg) = 3 then
# some filters require extra arguments, e.g. IsMatrixGroup + field
return CyclicGroupCons( arg[1], arg[2], arg[3] );
fi;
fi;
Error( "usage: CyclicGroup( [<filter>, ]<size> )" );
Expand Down Expand Up @@ -311,7 +312,6 @@ BindGlobal( "DihedralGroup", function ( arg )
if Length(arg) = 1 then
return DihedralGroupCons( IsPcGroup, arg[1] );
elif IsOperation(arg[1]) then

if Length(arg) = 2 then
return DihedralGroupCons( arg[1], arg[2] );
fi;
Expand Down Expand Up @@ -368,9 +368,11 @@ BindGlobal( "QuaternionGroup", function ( arg )
if Length(arg) = 1 then
return QuaternionGroupCons( IsPcGroup, arg[1] );
elif IsOperation(arg[1]) then

if Length(arg) = 2 then
return QuaternionGroupCons( arg[1], arg[2] );
elif Length(arg) = 3 then
# some filters require extra arguments, e.g. IsMatrixGroup + field
return QuaternionGroupCons( arg[1], arg[2], arg[3] );
fi;
fi;
Error( "usage: QuaternionGroup( [<filter>, ]<size> )" );
Expand Down Expand Up @@ -422,7 +424,6 @@ BindGlobal( "ElementaryAbelianGroup", function ( arg )
if Length(arg) = 1 then
return ElementaryAbelianGroupCons( IsPcGroup, arg[1] );
elif IsOperation(arg[1]) then

if Length(arg) = 2 then
return ElementaryAbelianGroupCons( arg[1], arg[2] );
fi;
Expand Down Expand Up @@ -474,7 +475,6 @@ BindGlobal( "FreeAbelianGroup", function ( arg )
if Length(arg) = 1 then
return FreeAbelianGroupCons( IsFpGroup, arg[1] );
elif IsOperation(arg[1]) then

if Length(arg) = 2 then
return FreeAbelianGroupCons( arg[1], arg[2] );
fi;
Expand Down Expand Up @@ -539,7 +539,6 @@ BindGlobal( "ExtraspecialGroup", function ( arg )
if Length(arg) = 2 then
return ExtraspecialGroupCons( IsPcGroup, arg[1], arg[2] );
elif IsOperation(arg[1]) then

if Length(arg) = 3 then
return ExtraspecialGroupCons( arg[1], arg[2], arg[3] );
fi;
Expand Down Expand Up @@ -592,7 +591,6 @@ BindGlobal( "MathieuGroup", function( arg )
if Length( arg ) = 1 then
return MathieuGroupCons( IsPermGroup, arg[1] );
elif IsOperation( arg[1] ) then

if Length( arg ) = 2 then
return MathieuGroupCons( arg[1], arg[2] );
fi;
Expand Down
10 changes: 10 additions & 0 deletions tst/testinstall/grp/basic.tst
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ gap> CyclicGroup(IsPermGroup,4);
Group([ (1,2,3,4) ])
gap> CyclicGroup(IsFpGroup,4);
<fp group of size 4 on the generators [ a ]>
gap> G:=CyclicGroup(IsMatrixGroup, GF(2), 12);
<matrix group of size 12 with 1 generators>
gap> FieldOfMatrixGroup(G); DimensionOfMatrixGroup(G);
GF(2)
12

#
gap> CyclicGroup(2,3);
Expand Down Expand Up @@ -112,6 +117,11 @@ gap> QuaternionGroup(IsPermGroup,8);
Group([ (1,5,3,7)(2,8,4,6), (1,2,3,4)(5,6,7,8) ])
gap> QuaternionGroup(IsFpGroup,8);
<fp group of size 8 on the generators [ r, s ]>
gap> G:=QuaternionGroup(IsMatrixGroup, GF(3), 8);
<matrix group of size 8 with 2 generators>
gap> FieldOfMatrixGroup(G); DimensionOfMatrixGroup(G);
GF(3)
4

#
gap> QuaternionGroup(2,3);
Expand Down