Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 4183461[1X3 [33X[0;0YBasic operations with numerical semigroups[133X[101X234[1X3.1 [33X[0;0YInvariants[133X[101X56[1X3.1-1 Multiplicity[101X78[29X[2XMultiplicity[102X( [3XNS[103X ) [32X attribute9[29X[2XMultiplicityOfNumericalSemigroup[102X( [3XNS[103X ) [32X attribute1011[33X[0;0Y[3XNS[103X is a numerical semigroup. Returns the multiplicity of [3XNS[103X, which is the12smallest positive integer belonging to [3XNS[103X.[133X1314[4X[32X Example [32X[104X15[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 7,53);[127X[104X16[4X[28X<Modular numerical semigroup satisfying 7x mod 53 <= x >[128X[104X17[4X[25Xgap>[125X [27XMultiplicityOfNumericalSemigroup(S);[127X[104X18[4X[28X8[128X[104X19[4X[25Xgap>[125X [27XNumericalSemigroup(3,5);[127X[104X20[4X[28X<Numerical semigroup with 2 generators>[128X[104X21[4X[25Xgap>[125X [27XMultiplicity(last);[127X[104X22[4X[28X3[128X[104X23[4X[32X[104X2425[1X3.1-2 GeneratorsOfNumericalSemigroup[101X2627[29X[2XGeneratorsOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute28[29X[2XGenerators[102X( [3XS[103X ) [32X attribute29[29X[2XMinimalGeneratingSystemOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute30[29X[2XMinimalGeneratingSystem[102X( [3XS[103X ) [32X attribute31[29X[2XMinimalGenerators[102X( [3XS[103X ) [32X attribute3233[33X[0;0Y[3XS[103X is a numerical semigroup. [10XGeneratorsOfNumericalSemigroup[110X returns a set of34generators of [10XS[110X, which may not be minimal.35[10XMinimalGeneratingSystemOfNumericalSemigroup[110X returns the minimal set of36generators of [10XS[110X.[133X3738[33X[0;0YFrom Version 0.980, [10XReducedSetOfGeneratorsOfNumericalSemigroup[110X is a synonym39of [10XMinimalGeneratingSystemOfNumericalSemigroup[110X;40[10XGeneratorsOfNumericalSemigroupNC[110X is a synonym of41[10XGeneratorsOfNumericalSemigroup[110X. The names are kept for compatibility with42code produced for previous versions, but will be removed in the future.[133X4344[4X[32X Example [32X[104X45[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);[127X[104X46[4X[28X<Modular numerical semigroup satisfying 5x mod 53 <= x >[128X[104X47[4X[25Xgap>[125X [27XGeneratorsOfNumericalSemigroup(S);[127X[104X48[4X[28X[ 11, 12, 13, 32, 53 ][128X[104X49[4X[25Xgap>[125X [27XS := NumericalSemigroup(3, 5, 53);[127X[104X50[4X[28X<Numerical semigroup with 3 generators>[128X[104X51[4X[25Xgap>[125X [27XGeneratorsOfNumericalSemigroup(S);[127X[104X52[4X[28X[ 3, 5, 53 ][128X[104X53[4X[25Xgap>[125X [27XMinimalGeneratingSystemOfNumericalSemigroup(S);[127X[104X54[4X[28X[ 3, 5 ][128X[104X55[4X[25Xgap>[125X [27XMinimalGeneratingSystem(S)=MinimalGeneratingSystemOfNumericalSemigroup(S);[127X[104X56[4X[28Xtrue[128X[104X57[4X[25Xgap>[125X [27Xs := NumericalSemigroup(3,5,7,15);[127X[104X58[4X[28X<Numerical semigroup with 4 generators>[128X[104X59[4X[25Xgap>[125X [27XHasGenerators(s);[127X[104X60[4X[28Xtrue[128X[104X61[4X[25Xgap>[125X [27XHasMinimalGenerators(s);[127X[104X62[4X[28Xfalse[128X[104X63[4X[25Xgap>[125X [27XMinimalGenerators(s);[127X[104X64[4X[28X[ 3, 5, 7 ][128X[104X65[4X[25Xgap>[125X [27XGenerators(s);[127X[104X66[4X[28X[ 3, 5, 7, 15 ][128X[104X67[4X[32X[104X6869[1X3.1-3 EmbeddingDimension[101X7071[29X[2XEmbeddingDimension[102X( [3XNS[103X ) [32X attribute72[29X[2XEmbeddingDimensionOfNumericalSemigroup[102X( [3XNS[103X ) [32X attribute7374[33X[0;0Y[10XNS[110X is a numerical semigroup. It returns the cardinality of its minimal75generating system.[133X7677[4X[32X Example [32X[104X78[4X[25Xgap>[125X [27Xs := NumericalSemigroup(3,5,7,15);[127X[104X79[4X[28X<Numerical semigroup with 4 generators>[128X[104X80[4X[25Xgap>[125X [27XEmbeddingDimension(s);[127X[104X81[4X[28X3[128X[104X82[4X[25Xgap>[125X [27XEmbeddingDimensionOfNumericalSemigroup(s);[127X[104X83[4X[28X3[128X[104X84[4X[32X[104X8586[1X3.1-4 SmallElements[101X8788[29X[2XSmallElements[102X( [3XNS[103X ) [32X attribute89[29X[2XSmallElementsOfNumericalSemigroup[102X( [3XNS[103X ) [32X attribute9091[33X[0;0Y[10XNS[110X is a numerical semigroup. It returns the list of small elements of [10XNS[110X. Of92course, the time consumed to return a result may depend on the way the93semigroup is given.[133X9495[4X[32X Example [32X[104X96[4X[25Xgap>[125X [27XSmallElementsOfNumericalSemigroup(NumericalSemigroup(3,5,7));[127X[104X97[4X[28X[ 0, 3, 5 ][128X[104X98[4X[25Xgap>[125X [27XSmallElements(NumericalSemigroup(3,5,7));[127X[104X99[4X[28X[ 0, 3, 5 ][128X[104X100[4X[32X[104X101102[1X3.1-5 FirstElementsOfNumericalSemigroup[101X103104[29X[2XFirstElementsOfNumericalSemigroup[102X( [3Xn[103X, [3XNS[103X ) [32X function105106[33X[0;0Y[10XNS[110X is a numerical semigroup. It returns the list with the first [3Xn[103X elements107of [10XNS[110X.[133X108109[4X[32X Example [32X[104X110[4X[25Xgap>[125X [27XFirstElementsOfNumericalSemigroup(2,NumericalSemigroup(3,5,7));[127X[104X111[4X[28X[ 0, 3 ][128X[104X112[4X[25Xgap>[125X [27XFirstElementsOfNumericalSemigroup(10,NumericalSemigroup(3,5,7));[127X[104X113[4X[28X[ 0, 3, 5, 6, 7, 8, 9, 10, 11, 12 ][128X[104X114[4X[32X[104X115116[1X3.1-6 RthElementOfNumericalSemigroup[101X117118[29X[2XRthElementOfNumericalSemigroup[102X( [3XS[103X, [3Xr[103X ) [32X operation119120[33X[0;0Y[3XS[103X is a numerical semigroup and [3Xr[103X is an integer. It returns the [3Xr[103X-th element121of [3XS[103X.[133X122123[4X[32X Example [32X[104X124[4X[25Xgap>[125X [27XS := NumericalSemigroup(7,8,17);;[127X[104X125[4X[25Xgap>[125X [27XRthElementOfNumericalSemigroup(S,53);[127X[104X126[4X[28X68[128X[104X127[4X[32X[104X128129[1X3.1-7 AperyList[101X130131[29X[2XAperyList[102X( [3XS[103X, [3Xn[103X ) [32X attribute132[29X[2XAperyListOfNumericalSemigroupWRTElement[102X( [3XS[103X, [3Xn[103X ) [32X operation133134[33X[0;0Y[3XS[103X is a numerical semigroup and [3Xn[103X is a positive element of [3XS[103X. Computes the135Apéry list of [3XS[103X with respect to [3Xn[103X. It contains for every [22Xi∈ {0,...,[3Xn[103X-1}[122X, in136the [22Xi+1[122Xth position, the smallest element in the semigroup congruent with [22Xi[122X137modulo [3Xn[103X.[133X138139[4X[32X Example [32X[104X140[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);;[127X[104X141[4X[25Xgap>[125X [27XAperyListOfNumericalSemigroupWRTElement(S,12);[127X[104X142[4X[28X[ 0, 13, 26, 39, 52, 53, 54, 43, 32, 33, 22, 11 ][128X[104X143[4X[25Xgap>[125X [27XAperyList(S,12);[127X[104X144[4X[28X[ 0, 13, 26, 39, 52, 53, 54, 43, 32, 33, 22, 11 ][128X[104X145[4X[32X[104X146147[1X3.1-8 AperyList[101X148149[29X[2XAperyList[102X( [3XS[103X ) [32X attribute150[29X[2XAperyListOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute151152[33X[0;0Y[3XS[103X is a numerical semigroup. It computes the Apéry list of [3XS[103X with respect to153the multiplicity of [3XS[103X.[133X154155[4X[32X Example [32X[104X156[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);;[127X[104X157[4X[25Xgap>[125X [27XAperyListOfNumericalSemigroup(S);[127X[104X158[4X[28X[ 0, 12, 13, 25, 26, 38, 39, 51, 52, 53, 32 ][128X[104X159[4X[25Xgap>[125X [27XAperyList(NumericalSemigroup(5,7,11));[127X[104X160[4X[28X[ 0, 11, 7, 18, 14 ][128X[104X161[4X[32X[104X162163[1X3.1-9 AperyList[101X164165[29X[2XAperyList[102X( [3XS[103X, [3Xn[103X ) [32X attribute166[29X[2XAperyListOfNumericalSemigroupWRTInteger[102X( [3XS[103X, [3Xm[103X ) [32X function167168[33X[0;0Y[3XS[103X is a numerical semigroup and [3Xm[103X is an integer. Computes the Apéry list of [3XS[103X169with respect to [3Xm[103X, that is, the set of elements [22Xx[122X in [3XS[103X such that [22Xx-[122X[3Xm[103X is not170in [3XS[103X. If [3Xm[103X is an element in [3XS[103X, then the output of171[10XAperyListOfNumericalSemigroupWRTInteger[110X, as sets, is the same as172[10XAperyListOfNumericalSemigroupWRTElement[110X, though without side effects, in the173sense that this information is no longer used by the package. The output of174[10XAperyList[110X is the same as [10XAperyListOfNumericalSemigroupWRTElement[110X.[133X175176[4X[32X Example [32X[104X177[4X[25Xgap>[125X [27X s:=NumericalSemigroup(10,13,19,27);;[127X[104X178[4X[25Xgap>[125X [27XAperyListOfNumericalSemigroupWRTInteger(s,11);[127X[104X179[4X[28X[ 0, 10, 13, 19, 20, 23, 26, 27, 29, 32, 33, 36, 39, 42, 45, 46, 52, 55 ][128X[104X180[4X[25Xgap>[125X [27XAperyList(s,11);[127X[104X181[4X[28X[ 0, 10, 13, 19, 20, 23, 26, 27, 29, 32, 33, 36, 39, 42, 45, 46, 52, 55 ][128X[104X182[4X[25Xgap>[125X [27XLength(last);[127X[104X183[4X[28X18[128X[104X184[4X[25Xgap>[125X [27XAperyListOfNumericalSemigroupWRTInteger(s,10);[127X[104X185[4X[28X[ 0, 13, 19, 26, 27, 32, 38, 45, 51, 54 ][128X[104X186[4X[25Xgap>[125X [27XAperyListOfNumericalSemigroupWRTElement(s,10);[127X[104X187[4X[28X[ 0, 51, 32, 13, 54, 45, 26, 27, 38, 19 ][128X[104X188[4X[25Xgap>[125X [27XLength(last);[127X[104X189[4X[28X10[128X[104X190[4X[25Xgap>[125X [27XAperyList(s,10);[127X[104X191[4X[28X[ 0, 51, 32, 13, 54, 45, 26, 27, 38, 19 ][128X[104X192[4X[32X[104X193194[1X3.1-10 AperyListOfNumericalSemigroupAsGraph[101X195196[29X[2XAperyListOfNumericalSemigroupAsGraph[102X( [3Xap[103X ) [32X function197198[33X[0;0Y[3Xap[103X is the Apéry list of a numerical semigroup. This function returns the199adjacency list of the graph [22X(ap, E)[122X where the edge [22Xu -> v[122X is in [22XE[122X iff [22Xv - u[122X200is in [22Xap[122X. The 0 is ignored.[133X201202[4X[32X Example [32X[104X203[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,7);;[127X[104X204[4X[25Xgap>[125X [27XAperyListOfNumericalSemigroupWRTElement(s,10);[127X[104X205[4X[28X[ 0, 21, 12, 3, 14, 15, 6, 7, 18, 9 ][128X[104X206[4X[25Xgap>[125X [27XAperyListOfNumericalSemigroupAsGraph(last);[127X[104X207[4X[28X[ ,, [ 3, 6, 9, 12, 15, 18, 21 ],,, [ 6, 9, 12, 15, 18, 21 ],[128X[104X208[4X[28X[ 7, 14, 21 ],, [ 9, 12, 15, 18, 21 ],,, [ 12, 15, 18, 21 ],,[128X[104X209[4X[28X[ 14, 21 ], [ 15, 18, 21 ],,, [ 18, 21 ],,, [ 21 ] ][128X[104X210[4X[32X[104X211212[1X3.1-11 KunzCoordinatesOfNumericalSemigroup[101X213214[29X[2XKunzCoordinatesOfNumericalSemigroup[102X( [3XS[103X, [3Xm[103X ) [32X function215216[33X[0;0Y[3XS[103X is a numerical semigroup, and [3Xm[103X is a nonzero element of [3XS[103X. The second217argument is optional, and if missing it is assumed to be the multiplicity of218[3XS[103X.[133X219220[33X[0;0YThen the Apéry set of [3Xm[103X in [3XS[103X has the form [22X[0,k_1m+1,...,k_m-1m+m-1][122X, and the221output is the [22X(m-1)[122X-uple [22X[k_1,k_2,...,k_m-1][122X[133X222223[4X[32X Example [32X[104X224[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);[127X[104X225[4X[28X<Numerical semigroup with 3 generators>[128X[104X226[4X[25Xgap>[125X [27XKunzCoordinatesOfNumericalSemigroup(s);[127X[104X227[4X[28X[ 2, 1 ][128X[104X228[4X[25Xgap>[125X [27XKunzCoordinatesOfNumericalSemigroup(s,5);[127X[104X229[4X[28X[ 1, 1, 0, 1 ][128X[104X230[4X[32X[104X231232[1X3.1-12 KunzPolytope[101X233234[29X[2XKunzPolytope[102X( [3Xm[103X ) [32X function235236[33X[0;0Y[3Xm[103X is a positive integer.[133X237238[33X[0;0YThe Kunz coordinates of the semigroups with multiplicity [3Xm[103X are solutions of239a system of inequalities [22XAxge b[122X (see [CAGGB02]). The output is the matrix240[22X(A|-b)[122X.[133X241242[4X[32X Example [32X[104X243[4X[25Xgap>[125X [27XKunzPolytope(3);[127X[104X244[4X[28X[ [ 1, 0, -1 ], [ 0, 1, -1 ], [ 2, -1, 0 ], [ -1, 2, 1 ] ][128X[104X245[4X[32X[104X246247[1X3.1-13 CocycleOfNumericalSemigroupWRTElement[101X248249[29X[2XCocycleOfNumericalSemigroupWRTElement[102X( [3XS[103X, [3Xm[103X ) [32X function250251[33X[0;0Y[3XS[103X is a numerical semigroup, and [3Xm[103X is a nonzero element of [3XS[103X. The output is252the matrix [22Xh(i,j)=(w(i)+w(j)-w((i+j)mod m))/m[122X, where [22Xw(i)[122X is the smallest253element in [3XS[103X congruent with [22Xi[122X modulo [22Xm[122X (and thus it is in the Apéry set of254[22Xm[122X), [GSHKR17].[133X255256[4X[32X Example [32X[104X257[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X258[4X[25Xgap>[125X [27XCocycleOfNumericalSemigroupWRTElement(s,3);[127X[104X259[4X[28X[ [ 0, 0, 0 ], [ 0, 3, 4 ], [ 0, 4, 1 ] ][128X[104X260[4X[32X[104X261262[1X3.1-14 FrobeniusNumber[101X263264[29X[2XFrobeniusNumber[102X( [3XNS[103X ) [32X attribute265[29X[2XFrobeniusNumberOfNumericalSemigroup[102X( [3XNS[103X ) [32X attribute266267[33X[0;0YThe largest nonnegative integer not belonging to a numerical semigroup [22XS[122X is268the [13XFrobenius number[113X of [22XS[122X. If [22XS[122X is the set of nonnegative integers, then269clearly its Frobenius number is [22X-1[122X, otherwise its Frobenius number coincides270with the maximum of the gaps (or fundamental gaps) of [22XS[122X.[133X271272[33X[0;0Y[10XNS[110X is a numerical semigroup. It returns the Frobenius number of [10XNS[110X. Of273course, the time consumed to return a result may depend on the way the274semigroup is given or on the knowledge already produced on the semigroup.[133X275276[4X[32X Example [32X[104X277[4X[25Xgap>[125X [27XFrobeniusNumberOfNumericalSemigroup(NumericalSemigroup(3,5,7));[127X[104X278[4X[28X4[128X[104X279[4X[25Xgap>[125X [27XFrobeniusNumber(NumericalSemigroup(3,5,7));[127X[104X280[4X[28X4[128X[104X281[4X[32X[104X282283[1X3.1-15 Conductor[101X284285[29X[2XConductor[102X( [3XNS[103X ) [32X attribute286[29X[2XConductorOfNumericalSemigroup[102X( [3XNS[103X ) [32X attribute287288[33X[0;0YThis is just a synonym of [10X FrobeniusNumberOfNumericalSemigroup[110X ([10XNS[110X)[22X+1[122X.[133X289290[4X[32X Example [32X[104X291[4X[25Xgap>[125X [27XConductorOfNumericalSemigroup(NumericalSemigroup(3,5,7));[127X[104X292[4X[28X5[128X[104X293[4X[25Xgap>[125X [27XConductor(NumericalSemigroup(3,5,7));[127X[104X294[4X[28X5[128X[104X295[4X[32X[104X296297[1X3.1-16 PseudoFrobeniusOfNumericalSemigroup[101X298299[29X[2XPseudoFrobeniusOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute300301[33X[0;0YAn integer [22Xz[122X is a [13Xpseudo-Frobenius number[113X of [22XS[122X if [22Xz+S∖{0}⊆ S[122X.[133X302303[33X[0;0Y[10XS[110X is a numerical semigroup. It returns set of pseudo-Frobenius numbers of [3XS[103X.[133X304305[4X[32X Example [32X[104X306[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);[127X[104X307[4X[28X<Modular numerical semigroup satisfying 5x mod 53 <= x >[128X[104X308[4X[25Xgap>[125X [27XPseudoFrobeniusOfNumericalSemigroup(S);[127X[104X309[4X[28X[ 21, 40, 41, 42 ][128X[104X310[4X[32X[104X311312[1X3.1-17 TypeOfNumericalSemigroup[101X313314[29X[2XTypeOfNumericalSemigroup[102X( [3XNS[103X ) [32X attribute315316[33X[0;0YStands for [10XLength(PseudoFrobeniusOfNumericalSemigroup (NS))[110X.[133X317318[4X[32X Example [32X[104X319[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);[127X[104X320[4X[28X<Modular numerical semigroup satisfying 5x mod 53 <= x >[128X[104X321[4X[25Xgap>[125X [27XType(S);[127X[104X322[4X[28X4[128X[104X323[4X[25Xgap>[125X [27XTypeOfNumericalSemigroup(S);[127X[104X324[4X[28X4[128X[104X325[4X[32X[104X326327[1X3.1-18 Gaps[101X328329[29X[2XGaps[102X( [3XNS[103X ) [32X attribute330[29X[2XGapsOfNumericalSemigroup[102X( [3XNS[103X ) [32X attribute331332[33X[0;0YA [13Xgap[113X of a numerical semigroup [22XS[122X is a nonnegative integer not belonging to333[22XS[122X. [10XNS[110X is a numerical semigroup. Both return the set of gaps of [10XNS[110X.[133X334335[4X[32X Example [32X[104X336[4X[25Xgap>[125X [27XGapsOfNumericalSemigroup(NumericalSemigroup(3,5,7));[127X[104X337[4X[28X[ 1, 2, 4 ][128X[104X338[4X[25Xgap>[125X [27XGaps(NumericalSemigroup(5,7,11));[127X[104X339[4X[28X[ 1, 2, 3, 4, 6, 8, 9, 13 ][128X[104X340[4X[32X[104X341342[1X3.1-19 DesertsOfNumericalSemigroup[101X343344[29X[2XDesertsOfNumericalSemigroup[102X( [3XNS[103X ) [32X function345346[33X[0;0Y[3XNS[103X is a numerical semigroup. The output is the list with the runs of gaps of347[3XNS[103X.[133X348349[4X[32X Example [32X[104X350[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X351[4X[25Xgap>[125X [27XDesertsOfNumericalSemigroup(s);[127X[104X352[4X[28X[ [ 1, 2 ], [ 4 ] ][128X[104X353[4X[32X[104X354355[1X3.1-20 IsOrdinaryNumericalSemigroup[101X356357[29X[2XIsOrdinaryNumericalSemigroup[102X( [3XNS[103X ) [32X property358[29X[2XIsOrdinary[102X( [3XNS[103X ) [32X property359360[33X[0;0Y[3XNS[103X is a numerical semigroup. Dectects if the semigroup is ordinary, that is,361with less than two deserts.[133X362363[4X[32X Example [32X[104X364[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X365[4X[25Xgap>[125X [27XIsOrdinary(s);[127X[104X366[4X[28Xfalse[128X[104X367[4X[32X[104X368369[1X3.1-21 IsAcuteNumericalSemigroup[101X370371[29X[2XIsAcuteNumericalSemigroup[102X( [3XNS[103X ) [32X property372[29X[2XIsAcute[102X( [3XNS[103X ) [32X property373374[33X[0;0Y[3XNS[103X is a numerical semigroup. Dectects if the semigroup is acute, that is, it375is either ordinary or its last desert (the one with the Frobenius number)376has less elements than the preceding one ([BA04]).[133X377378[4X[32X Example [32X[104X379[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X380[4X[25Xgap>[125X [27XIsAcute(s);[127X[104X381[4X[28Xtrue[128X[104X382[4X[32X[104X383384[1X3.1-22 Holes[101X385386[29X[2XHoles[102X( [3XNS[103X ) [32X attribute387[29X[2XHolesOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute388389[33X[0;0Y[10XS[110X is a numerical semigroup. Returns the set of gaps [22Xx[122X of [10XS[110X such that [22XF(S)-x[122X390is also a gap, where [22XF(S)[122X stands for the Frobenius number of [10XS[110X.[133X391392[4X[32X Example [32X[104X393[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5);;[127X[104X394[4X[25Xgap>[125X [27XHoles(s);[127X[104X395[4X[28X[ ][128X[104X396[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X397[4X[25Xgap>[125X [27XHolesOfNumericalSemigroup(s);[127X[104X398[4X[28X[ 2 ][128X[104X399[4X[32X[104X400401[1X3.1-23 LatticePathAssociatedToNumericalSemigroup[101X402403[29X[2XLatticePathAssociatedToNumericalSemigroup[102X( [3XS[103X, [3Xp[103X, [3Xq[103X ) [32X attribute404405[33X[0;0Y[10XS[110X is a numerical semigroup and [10Xp,q[110X are two elements in [10XS[110X.[133X406407[33X[0;0YIn this setting [10XS[110X is an oversemigroup of [22X⟨ p,q⟩[122X, and consequently every gap408of [10XS[110X is a gap of [22X⟨ p,q⟩[122X. If [22Xc[122X is the conductor of [22X⟨ p,q⟩[122X, then every gap [22Xg[122X409of [22X⟨ p,q⟩[122X can be written uniquely as [22Xg=c-1-(ap+bp)[122X for some nonnegative410integers [22Xa,b[122X. We say that [22X(a,b)[122X are the coordinates associated to [22Xg[122X.[133X411412[33X[0;0YThe output is a path in [22XN^2[122X such that coordinates of the gaps of [22XS[122X413correspond exactly with the points in [22XN^2[122X that are between the path in the414line [22Xax+by=c-1[122X. See [KW14].[133X415416[4X[32X Example [32X[104X417[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(16,17,71,72);;[127X[104X418[4X[25Xgap>[125X [27XLatticePathAssociatedToNumericalSemigroup(s,16,17);[127X[104X419[4X[28X[ [ 0, 14 ], [ 1, 13 ], [ 2, 12 ], [ 3, 11 ], [ 4, 10 ], [ 5, 9 ], [ 6, 8 ],[128X[104X420[4X[28X [ 7, 7 ], [ 8, 6 ], [ 9, 5 ], [ 10, 4 ], [ 11, 3 ], [ 12, 2 ], [ 13, 1 ],[128X[104X421[4X[28X [ 14, 0 ] ][128X[104X422[4X[32X[104X423424[1X3.1-24 Genus[101X425426[29X[2XGenus[102X( [3XNS[103X ) [32X attribute427[29X[2XGenusOfNumericalSemigroup[102X( [3XNS[103X ) [32X attribute428429[33X[0;0Y[10XNS[110X is a numerical semigroup. It returns the number of gaps of [10XNS[110X.[133X430431[4X[32X Example [32X[104X432[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(16,17,71,72);;[127X[104X433[4X[25Xgap>[125X [27XGenusOfNumericalSemigroup(s);[127X[104X434[4X[28X80[128X[104X435[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);[127X[104X436[4X[28X<Modular numerical semigroup satisfying 5x mod 53 <= x >[128X[104X437[4X[25Xgap>[125X [27XGenus(S);[127X[104X438[4X[28X26[128X[104X439[4X[32X[104X440441[1X3.1-25 FundamentalGaps[101X442443[29X[2XFundamentalGaps[102X( [3XS[103X ) [32X attribute444[29X[2XFundamentalGapsOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute445446[33X[0;0Y[10XS[110X The [13Xfundamental gaps[113X of [22XS[122X are those gaps that are maximal with respect to447the partial order induced by division in [22XN[122X. is a numerical semigroup. It448returns the set of fundamental gaps of [3XS[103X.[133X449450[4X[32X Example [32X[104X451[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);[127X[104X452[4X[28X<Modular numerical semigroup satisfying 5x mod 53 <= x >[128X[104X453[4X[25Xgap>[125X [27XFundamentalGapsOfNumericalSemigroup(S);[127X[104X454[4X[28X[ 16, 17, 18, 19, 27, 28, 29, 30, 31, 40, 41, 42 ][128X[104X455[4X[25Xgap>[125X [27XGapsOfNumericalSemigroup(S);[127X[104X456[4X[28X[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29,[128X[104X457[4X[28X 30, 31, 40, 41, 42 ][128X[104X458[4X[25Xgap>[125X [27XGaps(NumericalSemigroup(5,7,11));[127X[104X459[4X[28X[ 1, 2, 3, 4, 6, 8, 9, 13 ][128X[104X460[4X[25Xgap>[125X [27XFundamentalGaps(NumericalSemigroup(5,7,11));[127X[104X461[4X[28X[ 6, 8, 9, 13 ][128X[104X462[4X[32X[104X463464[1X3.1-26 SpecialGaps[101X465466[29X[2XSpecialGaps[102X( [3XS[103X ) [32X attribute467[29X[2XSpecialGapsOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute468469[33X[0;0YThe [13Xspecial gaps[113X of a numerical semigroup [22XS[122X, are those fundamental gaps such470that if they are added to the given numerical semigroup, then the resulting471set is again a numerical semigroup. [10XS[110X is a numerical semigroup. It returns472the special gaps of [3XS[103X.[133X473474[4X[32X Example [32X[104X475[4X[25Xgap>[125X [27XS := NumericalSemigroup("modular", 5,53);[127X[104X476[4X[28X<Modular numerical semigroup satisfying 5x mod 53 <= x >[128X[104X477[4X[25Xgap>[125X [27XSpecialGaps(S);[127X[104X478[4X[28X[ 40, 41, 42 ][128X[104X479[4X[25Xgap>[125X [27XSpecialGapsOfNumericalSemigroup(S);[127X[104X480[4X[28X[ 40, 41, 42 ][128X[104X481[4X[32X[104X482483484[1X3.2 [33X[0;0YWilf's conjecture[133X[101X485486[33X[0;0YLet [22XS[122X be a numerical semigroup, with conductor [22Xc[122X and embedding dimension [22Xe[122X.487Denote by [22Xl[122X the cardinality of the set of elements in [22XS[122X smaller than [22Xc[122X. Wilf488in [Wil78] asked whether or not [22Xl/cge 1/e[122X for all numerical semigroups. In489this section we give some functions to experiment with this conjecture, as490defined in [Eli15].[133X491492[1X3.2-1 WilfNumber[101X493494[29X[2XWilfNumber[102X( [3XS[103X ) [32X attribute495[29X[2XWilfNumberOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute496497[33X[0;0Y[10XS[110X is a numerical semigroup. Let [22Xc[122X, [22Xe[122X and [22Xl[122X be the conductor, embedding498dimension and number of elements smaller than [22Xc[122X in [3XS[103X. Returns [22Xe l-c[122X, which499was conjetured by Wilf to be nonnegative.[133X500501[4X[32X Example [32X[104X502[4X[25Xgap>[125X [27Xl:=NumericalSemigroupsWithGenus(10);;[127X[104X503[4X[25Xgap>[125X [27XFiltered(l, s->WilfNumberOfNumericalSemigroup(s)<0); [127X[104X504[4X[28X[ ][128X[104X505[4X[25Xgap>[125X [27XMaximum(Set(l, s->WilfNumberOfNumericalSemigroup(s)));[127X[104X506[4X[28X70[128X[104X507[4X[25Xgap>[125X [27Xs := NumericalSemigroup(13,25,37);;[127X[104X508[4X[25Xgap>[125X [27XWilfNumber(s); [127X[104X509[4X[28X96[128X[104X510[4X[32X[104X511512[1X3.2-2 EliahouNumber[101X513514[29X[2XEliahouNumber[102X( [3XS[103X ) [32X attribute515[29X[2XTruncatedWilfNumberOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute516517[33X[0;0Y[10XS[110X is a numerical semigroup. Let [22Xc[122X, [22Xm[122X, [22Xs[122X and [22Xl[122X be the conductor,518multiplicity, number of generators smaller than [22Xc[122X, and number of elements519smaller than [22Xc[122X in [3XS[103X, respectively. Let [22Xq[122X and [22Xr[122X be the quotient and negative520remainder of the division of [22Xc[122X by [22Xm[122X, that is, [22Xc=qm-r[122X. Returns [22Xs l-qd_q+r[122X,521where [22Xd_q[122X corresponds with the number of integers in [22X[c,c+m[[122X that are not522minimal generators of [3XS[103X.[133X523524[4X[32X Example [32X[104X525[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,9);;[127X[104X526[4X[25Xgap>[125X [27XTruncatedWilfNumberOfNumericalSemigroup(s);[127X[104X527[4X[28X4[128X[104X528[4X[25Xgap>[125X [27Xs:=NumericalSemigroupWithGivenElementsAndFrobenius([14,22,23],55);;[127X[104X529[4X[25Xgap>[125X [27XEliahouNumber(s);[127X[104X530[4X[28X-1[128X[104X531[4X[32X[104X532533[1X3.2-3 ProfileOfNumericalSemigroup[101X534535[29X[2XProfileOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute536537[33X[0;0Y[10XS[110X is a numerical semigroup. Let [22Xc[122X and [22Xm[122X be the conductor and multiplicity of538[3XS[103X, respectively. Let [22Xq[122X and [22Xr[122X be the quotient and nonpositive remainder of539the division of [22Xc[122X by [22Xm[122X, that is, [22Xc=qm-r[122X. Returns a list of lists of540integers, each list is the cardinality of [22XS ∩ [jm-r, (j+1)m-r[[122X with [22Xj[122X in541[1..q-1].[133X542543[4X[32X Example [32X[104X544[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,9);;[127X[104X545[4X[25Xgap>[125X [27XProfileOfNumericalSemigroup(s);[127X[104X546[4X[28X[ 2, 1 ][128X[104X547[4X[25Xgap>[125X [27Xs:=NumericalSemigroupWithGivenElementsAndFrobenius([14,22,23],55);;[127X[104X548[4X[25Xgap>[125X [27XProfileOfNumericalSemigroup(s);[127X[104X549[4X[28X[ 3, 0, 0 ][128X[104X550[4X[32X[104X551552[1X3.2-4 EliahouSlicesOfNumericalSemigroup[101X553554[29X[2XEliahouSlicesOfNumericalSemigroup[102X( [3XS[103X ) [32X attribute555556[33X[0;0Y[10XS[110X is a numerical semigroup. Let [22Xc[122X and [22Xm[122X be the conductor and multiplicity of557[3XS[103X, respectively. Let [22Xq[122X and [22Xr[122X be the quotient and negative remainder of the558division of [22Xc[122X by [22Xm[122X, that is, [22Xc=qm-r[122X. Returns a list of lists of integers,559each list is the set [22XS ∩ [jm-r, (j+1)m-r[[122X with [22Xj[122X in [1..q]. So this is a560partition of the set of small elements of [3XS[103X (without [22X0[122X).[133X561562[4X[32X Example [32X[104X563[4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,9);; [127X[104X564[4X[25Xgap>[125X [27XEliahouSlicesOfNumericalSemigroup(s);[127X[104X565[4X[28X[ [ 5, 7 ], [ 9, 10, 12 ] ][128X[104X566[4X[25Xgap>[125X [27XSmallElements(s);[127X[104X567[4X[28X[ 0, 5, 7, 9, 10, 12, 14 ][128X[104X568[4X[32X[104X569570571572