GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1[1X2 [33X[0;0YNumerical Semigroups[133X[101X23[33X[0;0YThis chapter describes how to create numerical semigroups in [5XGAP[105X and perform4some basic tests.[133X567[1X2.1 [33X[0;0YGenerating Numerical Semigroups[133X[101X89[33X[0;0YWe recall some definitions from Chapter [14X1[114X.[133X1011[33X[0;0YA numerical semigroup is a subset of the set [22XN[122X of nonnegative integers that12is closed under addition, contains [22X0[122X and whose complement in [22XN[122X is finite.[133X1314[33X[0;0YWe refer to the elements in a numerical semigroup that are less than or15equal to the conductor as [13Xsmall elements[113X of the semigroup.[133X1617[33X[0;0YA [13Xgap[113X of a numerical semigroup [22XS[122X is a nonnegative integer not belonging to18[22XS[122X. The [13Xfundamental gaps[113X of [22XS[122X are those gaps that are maximal with respect to19the partial order induced by division in [22XN[122X.[133X2021[33X[0;0YGiven a numerical semigroup [22XS[122X and a nonzero element [22Xs[122X in it, one can22consider for every integer [22Xi[122X ranging from [22X0[122X to [22Xs-1[122X, the smallest element in23[22XS[122X congruent with [22Xi[122X modulo [22Xs[122X, say [22Xw(i)[122X (this element exists since the24complement of [22XS[122X in [22XN[122X is finite). Clearly [22Xw(0)=0[122X. The set [22XAp(S,s)={25w(0),w(1),..., w(s-1)}[122X is called the [13XApéry set[113X of [22XS[122X with respect to [22Xs[122X.[133X2627[33X[0;0YLet [22Xa,b,c,d[122X be positive integers such that [22Xa/b < c/d[122X, and let [22XI=[a/b,c/d][122X.28Then the set [22XS(I)= N∩ ⋃_n≥ 0 n I[122X is a numerical semigroup. This class of29numerical semigroups coincides with that of sets of solutions to equations30of the form [22XA x mod B ≤ C x[122X with [22XA,B,C[122X positive integers. A numerical31semigroup in this class is said to be [13Xproportionally modular[113X. If [22XC = 1[122X, then32it is said to be [13Xmodular[113X.[133X3334[33X[0;0YThere are different ways to specify a numerical semigroup [22XS[122X, namely, by its35generators; by its gaps, its fundamental or special gaps by its Apéry set,36just to name some. In this section we describe functions that may be used to37specify, in one of these ways, a numerical semigroup in [5XGAP[105X.[133X3839[1X2.1-1 NumericalSemigroupByGenerators[101X4041[29X[2XNumericalSemigroupByGenerators[102X( [3XList[103X ) [32X function42[29X[2XNumericalSemigroup[102X( [3XString[103X, [3XList[103X ) [32X function4344[33X[0;0Y[10XList[110X is a list of nonnegative integers with greatest common divisor equal to45one. These integers may be given as a list or by a sequence of individual46elements. The output is the numerical semigroup spanned by [10XList[110X.[133X4748[33X[0;0Y[10XString[110X does not need to be present. When it is present, it must be49[10X"generators"[110X.[133X5051[4X[32X Example [32X[104X52[4X[25Xgap>[125X [27Xs1 := NumericalSemigroupByGenerators(3,5,7); [127X[104X53[4X[28X<Numerical semigroup with 3 generators>[128X[104X54[4X[25Xgap>[125X [27Xs2 := NumericalSemigroupByGenerators([3,5,7]);[127X[104X55[4X[28X<Numerical semigroup with 3 generators>[128X[104X56[4X[25Xgap>[125X [27Xs3 := NumericalSemigroup("generators",3,5,7); [127X[104X57[4X[28X<Numerical semigroup with 3 generators>[128X[104X58[4X[25Xgap>[125X [27Xs4 := NumericalSemigroup("generators",[3,5,7]);[127X[104X59[4X[28X<Numerical semigroup with 3 generators>[128X[104X60[4X[25Xgap>[125X [27Xs5 := NumericalSemigroup(3,5,7); [127X[104X61[4X[28X<Numerical semigroup with 3 generators>[128X[104X62[4X[25Xgap>[125X [27Xs6 := NumericalSemigroup([3,5,7]);[127X[104X63[4X[28X<Numerical semigroup with 3 generators>[128X[104X64[4X[25Xgap>[125X [27Xs1=s2;s2=s3;s3=s4;s4=s5;s5=s6;[127X[104X65[4X[28Xtrue[128X[104X66[4X[28Xtrue[128X[104X67[4X[28Xtrue[128X[104X68[4X[28Xtrue[128X[104X69[4X[28Xtrue[128X[104X70[4X[32X[104X7172[1X2.1-2 NumericalSemigroupBySubAdditiveFunction[101X7374[29X[2XNumericalSemigroupBySubAdditiveFunction[102X( [3XList[103X ) [32X function75[29X[2XNumericalSemigroup[102X( [3XString[103X, [3XList[103X ) [32X function7677[33X[0;0YA periodic subadditive function with period [22Xm[122X is given through the list of78images of the integers from [22X1[122X to [22Xm[122X. The image of [22Xm[122X has to be [22X0[122X. The output79is the numerical semigroup determined by this subadditive function.[133X8081[33X[0;0YIn the second form, [10XString[110X must be [10X"subadditive"[110X.[133X8283[4X[32X Example [32X[104X84[4X[25Xgap>[125X [27Xs := NumericalSemigroupBySubAdditiveFunction([5,4,2,0]);[127X[104X85[4X[28X<Numerical semigroup>[128X[104X86[4X[25Xgap>[125X [27Xt := NumericalSemigroup("subadditive",[5,4,2,0]);; [127X[104X87[4X[25Xgap>[125X [27Xs=t;[127X[104X88[4X[28Xtrue[128X[104X89[4X[32X[104X9091[1X2.1-3 NumericalSemigroupByAperyList[101X9293[29X[2XNumericalSemigroupByAperyList[102X( [3XList[103X ) [32X function94[29X[2XNumericalSemigroup[102X( [3XString[103X, [3XList[103X ) [32X function9596[33X[0;0Y[10XList[110X is an Apéry list. The output is the numerical semigroup whose Apéry set97with respect to the length of given list is [10XList[110X.[133X9899[33X[0;0YIn the second form, [10XString[110X must be [10X"apery"[110X.[133X100101[4X[32X Example [32X[104X102[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,11);;[127X[104X103[4X[25Xgap>[125X [27Xap := AperyListOfNumericalSemigroupWRTElement(s,20);[127X[104X104[4X[28X[ 0, 21, 22, 3, 24, 25, 6, 27, 28, 9, 30, 11, 12, 33, 14, 15, 36, 17, 18, 39 ][128X[104X105[4X[25Xgap>[125X [27Xt:=NumericalSemigroupByAperyList(ap);;[127X[104X106[4X[25Xgap>[125X [27Xr := NumericalSemigroup("apery",ap);;[127X[104X107[4X[25Xgap>[125X [27Xs=t;t=r;[127X[104X108[4X[28Xtrue[128X[104X109[4X[28Xtrue[128X[104X110[4X[32X[104X111112[1X2.1-4 NumericalSemigroupBySmallElements[101X113114[29X[2XNumericalSemigroupBySmallElements[102X( [3XList[103X ) [32X function115[29X[2XNumericalSemigroup[102X( [3XString[103X, [3XList[103X ) [32X function116117[33X[0;0Y[10XList[110X is the set of small elements of a numerical semigroup, that is, the set118of all elements not greater than the conductor. The output is the numerical119semigroup with this set of small elements. When no such semigroup exists, an120error is returned.[133X121122[33X[0;0YIn the second form, [10XString[110X must be [10X"elements"[110X.[133X123124[4X[32X Example [32X[104X125[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,11);;[127X[104X126[4X[25Xgap>[125X [27Xse := SmallElements(s);[127X[104X127[4X[28X[ 0, 3, 6, 9, 11, 12, 14, 15, 17, 18, 20 ][128X[104X128[4X[25Xgap>[125X [27Xt := NumericalSemigroupBySmallElements(se);;[127X[104X129[4X[25Xgap>[125X [27Xr := NumericalSemigroup("elements",se);;[127X[104X130[4X[25Xgap>[125X [27Xs=t;t=r; [127X[104X131[4X[28Xtrue[128X[104X132[4X[28Xtrue[128X[104X133[4X[25Xgap>[125X [27Xe := [ 0, 3, 6, 9, 11, 14, 15, 17, 18, 20 ]; [127X[104X134[4X[28X[ 0, 3, 6, 9, 11, 14, 15, 17, 18, 20 ][128X[104X135[4X[25Xgap>[125X [27XNumericalSemigroupBySmallElements(e);[127X[104X136[4X[28XError, The argument does not represent a numerical semigroup called from[128X[104X137[4X[28X<function "NumericalSemigroupBySmallElements">( <arguments> )[128X[104X138[4X[28X called from read-eval loop at line 35 of *stdin*[128X[104X139[4X[28Xyou can 'quit;' to quit to outer loop, or[128X[104X140[4X[28Xyou can 'return;' to continue[128X[104X141[4X[26Xbrk>[126X [27X[127X[104X142[4X[32X[104X143144[1X2.1-5 NumericalSemigroupByGaps[101X145146[29X[2XNumericalSemigroupByGaps[102X( [3XList[103X ) [32X function147[29X[2XNumericalSemigroup[102X( [3XString[103X, [3XList[103X ) [32X function148149[33X[0;0Y[10XList[110X is the set of gaps of a numerical semigroup. The output is the150numerical semigroup with this set of gaps. When no semigroup exists with the151given set as set of gaps, an error is returned.[133X152153[33X[0;0YIn the second form, [10XString[110X must be [10X"gaps"[110X.[133X154155[4X[32X Example [32X[104X156[4X[25Xgap>[125X [27Xg := [ 1, 2, 4, 5, 7, 8, 10, 13, 16 ];;[127X[104X157[4X[25Xgap>[125X [27Xs := NumericalSemigroupByGaps(g);;[127X[104X158[4X[25Xgap>[125X [27Xt := NumericalSemigroup("gaps",g);;[127X[104X159[4X[25Xgap>[125X [27Xs=t;[127X[104X160[4X[28Xtrue[128X[104X161[4X[25Xgap>[125X [27Xh := [ 1, 2, 5, 7, 8, 10, 13, 16 ];; [127X[104X162[4X[25Xgap>[125X [27XNumericalSemigroupByGaps(h);[127X[104X163[4X[28XError, The argument does not represent the gaps of a numerical semigroup called[128X[104X164[4X[28X from[128X[104X165[4X[28X<function "NumericalSemigroupByGaps">( <arguments> )[128X[104X166[4X[28X called from read-eval loop at line 34 of *stdin*[128X[104X167[4X[28Xyou can 'quit;' to quit to outer loop, or[128X[104X168[4X[28Xyou can 'return;' to continue[128X[104X169[4X[26Xbrk>[126X [27X[127X[104X170[4X[32X[104X171172[1X2.1-6 NumericalSemigroupByFundamentalGaps[101X173174[29X[2XNumericalSemigroupByFundamentalGaps[102X( [3XList[103X ) [32X function175[29X[2XNumericalSemigroup[102X( [3XString[103X, [3XList[103X ) [32X function176177[33X[0;0Y[10XList[110X is the set of fundamental gaps of a numerical semigroup. The output is178the numerical semigroup determined by these gaps. When the given set179contains elements (which will be gaps) that are not fundamental gaps, they180are silently removed.[133X181182[33X[0;0YIn the second form, [10XString[110X must be [10X"fundamentalgaps"[110X.[133X183184[4X[32X Example [32X[104X185[4X[25Xgap>[125X [27Xfg := [ 11, 14, 17, 20, 23, 26, 29, 32, 35 ];;[127X[104X186[4X[25Xgap>[125X [27XNumericalSemigroupByFundamentalGaps(fg);[127X[104X187[4X[28X<Numerical semigroup>[128X[104X188[4X[25Xgap>[125X [27XNumericalSemigroup("fundamentalgaps",fg); [127X[104X189[4X[28X<Numerical semigroup>[128X[104X190[4X[25Xgap>[125X [27Xlast=last2;[127X[104X191[4X[28Xtrue[128X[104X192[4X[25Xgap>[125X [27Xgg := [ 11, 17, 20, 22, 23, 26, 29, 32, 35 ];; #22 is not fundamental[127X[104X193[4X[25Xgap>[125X [27XNumericalSemigroup("fundamentalgaps",fg); [127X[104X194[4X[28X<Numerical semigroup>[128X[104X195[4X[32X[104X196197[1X2.1-7 NumericalSemigroupByAffineMap[101X198199[29X[2XNumericalSemigroupByAffineMap[102X( [3Xa[103X, [3Xb[103X, [3Xc[103X ) [32X function200[29X[2XNumericalSemigroup[102X( [3XString[103X, [3Xa[103X, [3Xb[103X ) [32X function201202[33X[0;0YGiven three nonnegative integers [3Xa[103X, [3Xb[103X and [3Xc[103X, with [22Xa,c>0[122X and [22Xgcd(b,c)=1[122X, this203function returns the least (with restpect to set order inclusion) numerical204semigroup containing [3Xc[103X and closed under the map [22Xx↦ ax+b[122X. The procedure is205explained in [Ugo16].[133X206207[33X[0;0YIn the second form, [10XString[110X must be [10X"affinemap"[110X.[133X208209[4X[32X Example [32X[104X210[4X[25Xgap>[125X [27Xs:=NumericalSemigroupByAffineMap(3,1,3);[127X[104X211[4X[28X<Numerical semigroup with 3 generators>[128X[104X212[4X[25Xgap>[125X [27XSmallElements(s);[127X[104X213[4X[28X[ 0, 3, 6, 9, 10, 12, 13, 15, 16, 18 ][128X[104X214[4X[25Xgap>[125X [27Xt:=NumericalSemigroup("affinemap",3,1,3);;[127X[104X215[4X[25Xgap>[125X [27Xs=t;[127X[104X216[4X[28Xtrue[128X[104X217[4X[32X[104X218219[1X2.1-8 ModularNumericalSemigroup[101X220221[29X[2XModularNumericalSemigroup[102X( [3Xa[103X, [3Xb[103X ) [32X function222[29X[2XNumericalSemigroup[102X( [3XString[103X, [3Xa[103X, [3Xb[103X ) [32X function223224[33X[0;0YGiven two positive integers [3Xa[103X and [3Xb[103X, this function returns a modular225numerical semigroup satisfying [22Xax mod b le x[122X.[133X226227[33X[0;0YIn the second form, [10XString[110X must be [10X"modular"[110X.[133X228229[4X[32X Example [32X[104X230[4X[25Xgap>[125X [27XModularNumericalSemigroup(3,7);[127X[104X231[4X[28X<Modular numerical semigroup satisfying 3x mod 7 <= x >[128X[104X232[4X[25Xgap>[125X [27XNumericalSemigroup("modular",3,7); [127X[104X233[4X[28X<Modular numerical semigroup satisfying 3x mod 7 <= x >[128X[104X234[4X[32X[104X235236[1X2.1-9 ProportionallyModularNumericalSemigroup[101X237238[29X[2XProportionallyModularNumericalSemigroup[102X( [3Xa[103X, [3Xb[103X, [3Xc[103X ) [32X function239[29X[2XNumericalSemigroup[102X( [3XString[103X, [3Xa[103X, [3Xb[103X ) [32X function240241[33X[0;0YGiven three positive integers [3Xa[103X, [3Xb[103X and [3Xc[103X, this function returns a242proportionally modular numerical semigroup satisfying [22Xaxmod b le cx[122X.[133X243244[33X[0;0YIn the second form, [10XString[110X must be [10X"propmodular"[110X.[133X245246[4X[32X Example [32X[104X247[4X[25Xgap>[125X [27XProportionallyModularNumericalSemigroup(3,7,12);[127X[104X248[4X[28X<Proportionally modular numerical semigroup satisfying 3x mod 7 <= 12x >[128X[104X249[4X[25Xgap>[125X [27XNumericalSemigroup("propmodular",3,7,12);[127X[104X250[4X[28X<Proportionally modular numerical semigroup satisfying 3x mod 7 <= 12x >[128X[104X251[4X[32X[104X252253[33X[0;0YWhen [22Xc=1[122X, the semigroup is seen as a modular numerical semigroup.[133X254255[4X[32X Example [32X[104X256[4X[25Xgap>[125X [27XNumericalSemigroup("propmodular",67,98,1);[127X[104X257[4X[28X<Modular numerical semigroup satisfying 67x mod 98 <= x >[128X[104X258[4X[32X[104X259260[33X[0;0YNumerical semigroups generated by an interval of positive integers are known261to be proportionally modular, and thus they are treated as such, since262membership and other problems can be solved efficiently for these263semigroups.[133X264265[1X2.1-10 NumericalSemigroupByInterval[101X266267[29X[2XNumericalSemigroupByInterval[102X( [3XList[103X ) [32X function268[29X[2XNumericalSemigroup[102X( [3XString[103X, [3XList[103X ) [32X function269270[33X[0;0YThe input is a list of rational numbers defining a closed interval. The271output is the semigroup of numerators of all rational numbers in this272interval.[133X273274[33X[0;0Y[10XString[110X does not need to be present. When it is present, it must be275[10X"interval"[110X.[133X276277[4X[32X Example [32X[104X278[4X[25Xgap>[125X [27XNumericalSemigroupByInterval(7/5,5/3);[127X[104X279[4X[28X<Proportionally modular numerical semigroup satisfying 25x mod 35 <= 4x >[128X[104X280[4X[25Xgap>[125X [27XNumericalSemigroup("interval",[7/5,5/3]);[127X[104X281[4X[28X<Proportionally modular numerical semigroup satisfying 25x mod 35 <= 4x >[128X[104X282[4X[25Xgap>[125X [27XSmallElements(last);[127X[104X283[4X[28X[ 0, 3, 5 ][128X[104X284[4X[32X[104X285286[1X2.1-11 NumericalSemigroupByOpenInterval[101X287288[29X[2XNumericalSemigroupByOpenInterval[102X( [3XList[103X ) [32X function289[29X[2XNumericalSemigroup[102X( [3XString[103X, [3XList[103X ) [32X function290291[33X[0;0YThe input is a list of rational numbers defining a open interval. The output292is the semigroup of numerators of all rational numbers in this interval.[133X293294[33X[0;0Y[10XString[110X does not need to be present. When it is present, it must be295[10X"openinterval"[110X.[133X296297[4X[32X Example [32X[104X298[4X[25Xgap>[125X [27XNumericalSemigroupByOpenInterval(7/5,5/3);[127X[104X299[4X[28X<Numerical semigroup>[128X[104X300[4X[25Xgap>[125X [27XNumericalSemigroup("openinterval",[7/5,5/3]);[127X[104X301[4X[28X<Numerical semigroup>[128X[104X302[4X[25Xgap>[125X [27XSmallElements(last); [127X[104X303[4X[28X[ 0, 3, 6, 8 ] [128X[104X304[4X[32X[104X305306307[1X2.2 [33X[0;0YSome basic tests[133X[101X308309[33X[0;0YThis section describes some basic tests on numerical semigroups. The first310described tests refer to what the semigroup is currently known to be (not311necessarily the way it was created). Then are presented functions to test if312a given list represents the small elements, gaps or the Apéry set (see [14X1.[114X)313of a numerical semigroup; to test if an integer belongs to a numerical314semigroup and if a numerical semigroup is a subsemigroup of another one.[133X315316[1X2.2-1 IsNumericalSemigroup[101X317318[29X[2XIsNumericalSemigroup[102X( [3XNS[103X ) [32X attribute319[29X[2XIsNumericalSemigroupByGenerators[102X( [3XNS[103X ) [32X attribute320[29X[2XIsNumericalSemigroupByMinimalGenerators[102X( [3XNS[103X ) [32X attribute321[29X[2XIsNumericalSemigroupByInterval[102X( [3XNS[103X ) [32X attribute322[29X[2XIsNumericalSemigroupByOpenInterval[102X( [3XNS[103X ) [32X attribute323[29X[2XIsNumericalSemigroupBySubAdditiveFunction[102X( [3XNS[103X ) [32X attribute324[29X[2XIsNumericalSemigroupByAperyList[102X( [3XNS[103X ) [32X attribute325[29X[2XIsNumericalSemigroupBySmallElements[102X( [3XNS[103X ) [32X attribute326[29X[2XIsNumericalSemigroupByGaps[102X( [3XNS[103X ) [32X attribute327[29X[2XIsNumericalSemigroupByFundamentalGaps[102X( [3XNS[103X ) [32X attribute328[29X[2XIsProportionallyModularNumericalSemigroup[102X( [3XNS[103X ) [32X attribute329[29X[2XIsModularNumericalSemigroup[102X( [3XNS[103X ) [32X attribute330331[33X[0;0Y[3XNS[103X is a numerical semigroup and these attributes are available (their names332should be self explanatory).[133X333334[4X[32X Example [32X[104X335[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7);[127X[104X336[4X[28X<Numerical semigroup with 2 generators>[128X[104X337[4X[25Xgap>[125X [27XAperyListOfNumericalSemigroupWRTElement(s,30);;[127X[104X338[4X[25Xgap>[125X [27Xt:=NumericalSemigroupByAperyList(last);[127X[104X339[4X[28X<Numerical semigroup>[128X[104X340[4X[25Xgap>[125X [27XIsNumericalSemigroupByGenerators(s);[127X[104X341[4X[28Xtrue[128X[104X342[4X[25Xgap>[125X [27XIsNumericalSemigroupByGenerators(t);[127X[104X343[4X[28Xfalse[128X[104X344[4X[25Xgap>[125X [27XIsNumericalSemigroupByAperyList(s);[127X[104X345[4X[28Xfalse[128X[104X346[4X[25Xgap>[125X [27XIsNumericalSemigroupByAperyList(t);[127X[104X347[4X[28Xtrue[128X[104X348[4X[32X[104X349350[1X2.2-2 RepresentsSmallElementsOfNumericalSemigroup[101X351352[29X[2XRepresentsSmallElementsOfNumericalSemigroup[102X( [3XL[103X ) [32X attribute353354[33X[0;0YTests if the list [3XL[103X (which has to be a set) may represent the ``small"355elements of a numerical semigroup.[133X356357[4X[32X Example [32X[104X358[4X[25Xgap>[125X [27XL:=[ 0, 3, 6, 9, 11, 12, 14, 15, 17, 18, 20 ];[127X[104X359[4X[28X[ 0, 3, 6, 9, 11, 12, 14, 15, 17, 18, 20 ][128X[104X360[4X[25Xgap>[125X [27XRepresentsSmallElementsOfNumericalSemigroup(L);[127X[104X361[4X[28Xtrue[128X[104X362[4X[25Xgap>[125X [27XL:=[ 6, 9, 11, 12, 14, 15, 17, 18, 20 ];[127X[104X363[4X[28X[ 6, 9, 11, 12, 14, 15, 17, 18, 20 ][128X[104X364[4X[25Xgap>[125X [27XRepresentsSmallElementsOfNumericalSemigroup(L);[127X[104X365[4X[28Xfalse[128X[104X366[4X[32X[104X367368[1X2.2-3 RepresentsGapsOfNumericalSemigroup[101X369370[29X[2XRepresentsGapsOfNumericalSemigroup[102X( [3XL[103X ) [32X attribute371372[33X[0;0YTests if the list [3XL[103X may represent the gaps (see [14X1.[114X) of a numerical373semigroup.[133X374375[4X[32X Example [32X[104X376[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7);[127X[104X377[4X[28X<Numerical semigroup with 2 generators>[128X[104X378[4X[25Xgap>[125X [27XL:=GapsOfNumericalSemigroup(s);[127X[104X379[4X[28X[ 1, 2, 4, 5, 8, 11 ][128X[104X380[4X[25Xgap>[125X [27XRepresentsGapsOfNumericalSemigroup(L);[127X[104X381[4X[28Xtrue[128X[104X382[4X[25Xgap>[125X [27XL:=Set(List([1..21],i->RandomList([1..50])));[127X[104X383[4X[28X[ 2, 6, 7, 8, 10, 12, 14, 19, 24, 28, 31, 35, 42, 50 ][128X[104X384[4X[25Xgap>[125X [27XRepresentsGapsOfNumericalSemigroup(L);[127X[104X385[4X[28Xfalse[128X[104X386[4X[32X[104X387388[1X2.2-4 IsAperyListOfNumericalSemigroup[101X389390[29X[2XIsAperyListOfNumericalSemigroup[102X( [3XL[103X ) [32X function391392[33X[0;0YTests whether a list [3XL[103X of integers may represent the Apéry list of a393numerical semigroup. It returns [9Xtrue[109X when the periodic function represented394by [3XL[103X is subadditive (see [2XRepresentsPeriodicSubAdditiveFunction[102X ([14XA.2-1[114X)) and395the remainder of the division of [10XL[i][110X by the length of [3XL[103X is [10Xi[110X and returns396[9Xfalse[109X otherwise (the criterium used is the one explained in [Ros96b]).[133X397398[4X[32X Example [32X[104X399[4X[25Xgap>[125X [27XIsAperyListOfNumericalSemigroup([0,21,7,28,14]);[127X[104X400[4X[28Xtrue[128X[104X401[4X[32X[104X402403[1X2.2-5 IsSubsemigroupOfNumericalSemigroup[101X404405[29X[2XIsSubsemigroupOfNumericalSemigroup[102X( [3XS[103X, [3XT[103X ) [32X function406407[33X[0;0Y[3XS[103X and [3XT[103X are numerical semigroups. Tests whether [3XT[103X is contained in [3XS[103X.[133X408409[4X[32X Example [32X[104X410[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);[127X[104X411[4X[28X<Modular numerical semigroup satisfying 5x mod 53 <= x >[128X[104X412[4X[25Xgap>[125X [27XT:=NumericalSemigroup(2,3);[127X[104X413[4X[28X<Numerical semigroup with 2 generators>[128X[104X414[4X[25Xgap>[125X [27XIsSubsemigroupOfNumericalSemigroup(T,S);[127X[104X415[4X[28Xtrue[128X[104X416[4X[25Xgap>[125X [27XIsSubsemigroupOfNumericalSemigroup(S,T);[127X[104X417[4X[28Xfalse[128X[104X418[4X[32X[104X419420[1X2.2-6 IsSubset[101X421422[29X[2XIsSubset[102X( [3XS[103X, [3XT[103X ) [32X attribute423424[33X[0;0Y[3XS[103X is a numerical semigroup. [3XT[103X can be a numerical semigroup, in which case425the function is just a synonym of [2XIsSubsemigroupOfNumericalSemigroup[102X426([14X2.2-5[114X), or a list of integers, in which case tests whether all elements of427the list belong to [3XS[103X.[133X428429[4X[32X Example [32X[104X430[4X[25Xgap>[125X [27Xns1 := NumericalSemigroup(5,7);;[127X[104X431[4X[25Xgap>[125X [27Xns2 := NumericalSemigroup(5,7,11);;[127X[104X432[4X[25Xgap>[125X [27XIsSubset(ns1,ns2);[127X[104X433[4X[28Xfalse[128X[104X434[4X[25Xgap>[125X [27XIsSubset(ns2,[5,15]);[127X[104X435[4X[28Xtrue[128X[104X436[4X[25Xgap>[125X [27XIsSubset(ns1,[5,11]);[127X[104X437[4X[28Xfalse[128X[104X438[4X[25Xgap>[125X [27XIsSubset(ns2,ns1); [127X[104X439[4X[28Xtrue[128X[104X440[4X[32X[104X441442[1X2.2-7 BelongsToNumericalSemigroup[101X443444[29X[2XBelongsToNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X operation445[29X[2X\in[102X( [3Xn[103X, [3XS[103X ) [32X operation446447[33X[0;0Y[3Xn[103X is an integer and [3XS[103X is a numerical semigroup. Tests whether [3Xn[103X belongs to448[3XS[103X. [10X\in(n,S)[110X calls the infix variant [10Xn in S[110X, and both can be seen as a short449for [10XBelongsToNumericalSemigroup(n,S)[110X.[133X450451[4X[32X Example [32X[104X452[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);[127X[104X453[4X[28X<Modular numerical semigroup satisfying 5x mod 53 <= x >[128X[104X454[4X[25Xgap>[125X [27XBelongsToNumericalSemigroup(15,S);[127X[104X455[4X[28Xfalse[128X[104X456[4X[25Xgap>[125X [27X15 in S;[127X[104X457[4X[28Xfalse[128X[104X458[4X[25Xgap>[125X [27XSmallElementsOfNumericalSemigroup(S);[127X[104X459[4X[28X[ 0, 11, 12, 13, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ][128X[104X460[4X[25Xgap>[125X [27XBelongsToNumericalSemigroup(13,S);[127X[104X461[4X[28Xtrue[128X[104X462[4X[25Xgap>[125X [27X13 in S;[127X[104X463[4X[28Xtrue[128X[104X464[4X[32X[104X465466467468