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

Not all finitely generated magmas are groups (alternative to PR #2276) #2311

Merged
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
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