Skip to content

Commit

Permalink
Not all finitely generated magmas are groups
Browse files Browse the repository at this point in the history
... hence we should not set IsFinitelyGeneratedGroup for them.
Instead, only set IsFinitelyGeneratedGroup if the final magma
is actually a group (i.e., associative).
  • Loading branch information
fingolfin committed Mar 29, 2018
1 parent 0069833 commit 56e19c3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/magma.gi
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,15 @@ local M;
family!.defaultMagmaWithInversesByGeneratorsType :=
NewType( FamilyObj( gens ),
IsMagmaWithInverses and IsAttributeStoringRep
and HasGeneratorsOfMagmaWithInverses
and IsFinitelyGeneratedGroup);
and HasGeneratorsOfMagmaWithInverses);
fi;

M:=rec();
ObjectifyWithAttributes( M,family!.defaultMagmaWithInversesByGeneratorsType,
GeneratorsOfMagmaWithInverses, AsList( gens ) );
if HasIsAssociative( M ) and IsAssociative( M ) then
SetIsFinitelyGeneratedGroup( M, true );
fi;
return M;
end;

Expand Down
12 changes: 12 additions & 0 deletions tst/testbugfix/2018-03-21-MagmaWithInversesByGenerators.tst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# GAP used to set the IsFinitelyGeneratedGroup property for every finitely
# generated magma-with-inverses, even those which are not groups.
gap> A:=[[1,2,3,4],[2,1,4,2],[3,4,1,3],[4,2,3,1]];
[ [ 1, 2, 3, 4 ], [ 2, 1, 4, 2 ], [ 3, 4, 1, 3 ], [ 4, 2, 3, 1 ] ]
gap> M:=MagmaWithInversesByMultiplicationTable(A);
<magma-with-inverses with 4 generators>
gap> IsFinitelyGeneratedGroup(M);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `IsFinitelyGeneratedGroup' on 1 argument\
s
gap> IsGroup(M);
false

0 comments on commit 56e19c3

Please sign in to comment.