From feb7cf2c31f6580f13250b3f582d97d1c4b55420 Mon Sep 17 00:00:00 2001 From: Wilf Wilson Date: Sun, 25 Nov 2018 21:14:15 +0100 Subject: [PATCH] properties: the empty semigroup is not monogenic --- gap/attributes/properties.gi | 2 +- tst/standard/properties.tst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gap/attributes/properties.gi b/gap/attributes/properties.gi index f4afca5b9..9a108e800 100644 --- a/gap/attributes/properties.gi +++ b/gap/attributes/properties.gi @@ -777,7 +777,7 @@ function(S) gens := GeneratorsOfSemigroup(S); if Length(gens) <= 1 then SetMinimalSemigroupGeneratingSet(S, gens); - return true; + return Length(gens) = 1; elif CanEasilyCompareElements(gens) and ForAll([2 .. Length(gens)], i -> gens[1] = gens[i]) then SetMinimalSemigroupGeneratingSet(S, [gens[1]]); diff --git a/tst/standard/properties.tst b/tst/standard/properties.tst index 87c90e0ff..8eade7aae 100644 --- a/tst/standard/properties.tst +++ b/tst/standard/properties.tst @@ -945,6 +945,11 @@ gap> x := MinimalSemigroupGeneratingSet(S)[1];; gap> S := Semigroup(x, x, x);; gap> IsMonogenicSemigroup(S); true +gap> S := Subsemigroup(FullTransformationMonoid(2), []);; +gap> IsEmpty(S); +true +gap> IsMonogenicSemigroup(S); +false # properties: IsMonogenicInverseSemigroup, 1 gap> IsMonogenicInverseSemigroup(AsSemigroup(IsBooleanMatSemigroup,