diff --git a/lib/semitran.gi b/lib/semitran.gi index f0376f5b39..13962665ca 100644 --- a/lib/semitran.gi +++ b/lib/semitran.gi @@ -214,13 +214,16 @@ InstallMethod(IsFullTransformationSemigroup, "for a transformation semigroup", [IsTransformationSemigroup], function(s) local n, t; + + n := DegreeOfTransformationSemigroup(s); - n:=DegreeOfTransformationSemigroup(s); - if HasSize(s) then + if n = 0 and HasIsTrivial(s) and IsTrivial(s) then + return true; + elif HasSize(s) then return Size(s)=n^n; fi; - t:=FullTransformationSemigroup(n); + t:=FullTransformationSemigroup(DegreeOfTransformationSemigroup(s)); return ForAll(GeneratorsOfSemigroup(t), x-> x in s); end); diff --git a/tst/testinstall/semitrans.tst b/tst/testinstall/semitrans.tst new file mode 100644 index 0000000000..e67b0c7f77 --- /dev/null +++ b/tst/testinstall/semitrans.tst @@ -0,0 +1,27 @@ +############################################################################# +## +#W semitrans.tst +#Y James D. Mitchell +## +############################################################################# +## + +# +gap> START_TEST("trans.tst"); +gap> display := UserPreference("TransformationDisplayLimit");; +gap> notation := UserPreference("NotationForTransformations");; +gap> SetUserPreference("TransformationDisplayLimit", 100);; +gap> SetUserPreference("NotationForTransformations", "input");; + +# Test IsFullTransformationSemigroup in trivial cases +gap> IsFullTransformationSemigroup(Semigroup(Transformation([1]))); +true +gap> IsFullTransformationSemigroup(Semigroup(Transformation([1, 1]))); +false + +# +gap> SetUserPreference("TransformationDisplayLimit", display);; +gap> SetUserPreference("NotationForTransformations", notation);; + +# +gap> STOP_TEST("trans.tst", 74170000);