From c239b9d0e1974eb1e9be6861fe252565c330194a Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Tue, 31 Oct 2023 13:35:20 +0000 Subject: [PATCH] Don't know --- gap/semigroups/semicons.gd | 2 ++ gap/semigroups/semicons.gi | 22 +++++++++++++++++++++- gap/semigroups/semiex.gi | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/gap/semigroups/semicons.gd b/gap/semigroups/semicons.gd index 6a5c16d77..693e64de5 100644 --- a/gap/semigroups/semicons.gd +++ b/gap/semigroups/semicons.gd @@ -20,6 +20,8 @@ DeclareGlobalFunction("LeftZeroSemigroup"); DeclareGlobalFunction("RightZeroSemigroup"); DeclareConstructor("BrandtSemigroupCons", [IsSemigroup, IsGroup, IsPosInt]); DeclareGlobalFunction("BrandtSemigroup"); +DeclareConstructor("FreeSemilatticeCons", [IsSemigroup, IsPosInt]); +DeclareGlobalFunction("FreeSemilattice"); DeclareCategory("IsSSSE", IsAssociativeElement); DeclareCategoryCollections("IsSSSE"); diff --git a/gap/semigroups/semicons.gi b/gap/semigroups/semicons.gi index 56dccef8d..7d8353615 100644 --- a/gap/semigroups/semicons.gi +++ b/gap/semigroups/semicons.gi @@ -718,7 +718,7 @@ function(arg) S := BrandtSemigroupCons(arg[1], arg[2], arg[3]); else ErrorNoReturn("the arguments must be a positive integer or a filter and", - " a positive integer, or a perm group and positive ", + " a positive integer, or a perm group and positive ", "integer, or a filter, perm group, and positive ", "integer"); fi; @@ -796,6 +796,26 @@ for _IsXSemigroup in ["IsTransformationSemigroup", od; Unbind(_IsXSemigroup); +InstallGlobalFunction(FreeSemilattice, +function(arg) + local S; + + if Length(arg) = 0 then + S := TrivialSemigroupCons(IsTransformationSemigroup, 0); + elif Length(arg) = 1 and IsInt(arg[1]) and arg[1] >= 0 then + S := TrivialSemigroupCons(IsTransformationSemigroup, arg[1]); + elif Length(arg) = 1 and IsOperation(arg[1]) then + S := TrivialSemigroupCons(arg[1], 0); + elif Length(arg) = 2 and IsOperation(arg[1]) and IsInt(arg[2]) + and arg[2] >= 0 then + S := TrivialSemigroupCons(arg[1], arg[2]); + else + ErrorNoReturn("the arguments must be a non-negative integer or ", + "a filter and a non-negative integer"); + fi; + SetIsTrivial(S, true); + return S; +end); InstallMethod(StrongSemilatticeOfSemigroups, "for a digraph, a list, and a list", [IsDigraph, IsList, IsList], diff --git a/gap/semigroups/semiex.gi b/gap/semigroups/semiex.gi index 3743b2298..ace6bd1ec 100644 --- a/gap/semigroups/semiex.gi +++ b/gap/semigroups/semiex.gi @@ -1,7 +1,7 @@ ############################################################################# ## ## semigroups/semiex.gi -## Copyright (C) 2013-2022 James D. Mitchell +## Copyright (C) 2013-2023 James D. Mitchell ## ## Licensing information can be found in the README file of this package. ##