Skip to content

Commit

Permalink
Fix incorrect IsFinitelyGeneratedMonoid method
Browse files Browse the repository at this point in the history
A finite generating set implies finite generation; but an infinite
generating set does not mean that there cannot be a finite one, too.
  • Loading branch information
fingolfin committed Mar 22, 2018
1 parent 1c4dd9d commit 8a338d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/monofree.gi
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ InstallGlobalFunction( FreeMonoid, function( arg )
SetIsTrivial( M, false );
SetIsFinite( M, false );
SetIsCommutative(M, false );
SetIsFinitelyGeneratedMonoid(M, false);
fi;

SetIsFreeMonoid( M, true);
Expand Down
5 changes: 4 additions & 1 deletion lib/monoid.gi
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,10 @@ end);
InstallMethod( IsFinitelyGeneratedMonoid, "for a monoid",
[ IsMonoid and HasGeneratorsOfMonoid ],
function(M)
return IsFinite(GeneratorsOfMonoid(M));
if IsFinite(GeneratorsOfMonoid(M)) then
return true;
fi;
TryNextMethod();
end);


Expand Down

0 comments on commit 8a338d7

Please sign in to comment.