  
  [1X9 [33X[0;0YNonunique invariants for factorizations in numerical semigroups[133X[101X
  
  [33X[0;0YLet  [22XS[122X  be  a  numerical  semigroup  minimally generated by [22X{m_1,...,m_n}[122X. A
  [13Xfactorization[113X   of  an  element  [22Xs∈  S[122X  is  an  n-tuple  [22Xa=(a_1,...,a_n)[122X  of
  nonnegative  integers  such  that  [22Xn=a_1  n_1+⋯+a_n  m_n[122X. The [13Xlength[113X of [22Xa[122X is
  [22X|a|=a_1+⋯+a_n[122X. Given two factorizations [22Xa[122X and [22Xb[122X of [22Xn[122X, the [13Xdistance[113X between [22Xa[122X
  and     [22Xb[122X     is     [22Xd(a,b)=max    {    |a-gcd(a,b)|,|b-gcd(a,b)|}[122X,    where
  [22Xgcd((a_1,...,a_n),(b_1,...,b_n))=(min(a_1,b_1),...,min(a_n,b_n))[122X.   In   the
  literature,   factorizations   are   sometimes   called  representations  or
  expressions of the element in terms of the generators.[133X
  
  [33X[0;0YIf [22Xl_1>⋯ > l_k[122X are the lengths of all the factorizations of [22Xs ∈ S[122X, the [13Xdelta
  set[113X associated to [22Xs[122X is [22X∆(s)={l_1-l_2,...,l_k-l_k-1}[122X.[133X
  
  [33X[0;0YThe  [13Xcatenary degree[113X of an element in [22XS[122X is the least positive integer [22Xc[122X such
  that  for  any  two  of  its factorizations [22Xa[122X and [22Xb[122X, there exists a chain of
  factorizations  starting  in  [22Xa[122X  and  ending  in  [22Xb[122X and so that the distance
  between  two consecutive links is at most [22Xc[122X. The [13Xcatenary degree[113X of [22XS[122X is the
  supremum of the catenary degrees of the elements in [22XS[122X.[133X
  
  [33X[0;0YThe  [13Xtame  degree[113X  of  [22XS[122X  is  the least positive integer [22Xt[122X such that for any
  factorization  [22Xa[122X  of  an element [22Xs[122X in [22XS[122X, and any [22Xi[122X such that [22Xs-m_i∈ S[122X, there
  exists  another  factorization [22Xb[122X of [22Xs[122X so that the distance to [22Xa[122X is at most [22Xt[122X
  and [22Xb_inot = 0[122X.[133X
  
  [33X[0;0YThe  [13X[22Xω[122X-primality[113X  of  an element [22Xs[122X in [22XS[122X is the least positive integer [22Xk[122X such
  that if [22X(∑_i∈ I s_i)-s∈ S, s_i∈ S[122X, then there exists [22XΩ⊆ I[122X with cardinality [22Xk[122X
  such  that  [22X(∑_i∈  Ω  s_i)-s∈  S[122X. The [13X[22Xω[122X-primality[113X of [22XS[122X is the maximum of the
  [22Xω[122X-primality of its minimal generators.[133X
  
  [33X[0;0YThe  basic  properties  of  these  constants  can  be  found  in [GH06]. The
  algorithm  used  to compute the catenary and tame degree is an adaptation of
  the algorithms appearing in [CGL+06] for numerical semigroups (see [CGD07]).
  The  computation  of  the elasticity of a numerical semigroup reduces to [22Xm/n[122X
  with [22Xm[122X the multiplicity of the semigroup and [22Xn[122X its largest minimal generator
  (see [CHM06] or [GH06]).[133X
  
  
  [1X9.1 [33X[0;0YFactorizations in Numerical Semigroups[133X[101X
  
  [33X[0;0YDenumerants,  sets  of factorizations, R-classes, and L-shapes are described
  in this section.[133X
  
  [1X9.1-1 FactorizationsIntegerWRTList[101X
  
  [33X[1;0Y[29X[2XFactorizationsIntegerWRTList[102X( [3Xn[103X, [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X  is  a  list  of  integers  and  [3Xn[103X  an  integer. The output is the set of
  factorizations  of  [3Xn[103X in terms of the elements in the list [3Xls[103X. This function
  uses [2XRestrictedPartitions[102X ([14XReference: RestrictedPartitions[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XFactorizationsIntegerWRTList(100,[11,13,15,19]);[127X[104X
    [4X[28X[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ],[128X[104X
    [4X[28X  [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ][128X[104X
  [4X[32X[104X
  
  [1X9.1-2 Factorizations[101X
  
  [33X[1;0Y[29X[2XFactorizations[102X( [3Xn[103X, [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XFactorizations[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XFactorizationsElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a numerical semigroup and [3Xn[103X an element of [3XS[103X. The output is the set of
  factorizations of [3Xn[103X in terms of the minimal generating set of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27XFactorizations(1100,s);[127X[104X
    [4X[28X[ [ 0, 8, 1, 0, 0, 0 ], [ 0, 0, 0, 2, 2, 0 ], [ 5, 1, 1, 0, 0, 1 ],[128X[104X
    [4X[28X  [ 0, 2, 3, 0, 0, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27XFactorizations(s,1100)=Factorizations(1100,s);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XFactorizationsElementWRTNumericalSemigroup(1100,s)=Factorizations(1100,s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X9.1-3 FactorizationsElementListWRTNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XFactorizationsElementListWRTNumericalSemigroup[102X( [3Xl[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup and [3Xl[103X a list of elements of [3XS[103X.[133X
  
  [33X[0;0YComputes the factorizations of all the elements in [3Xl[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);[127X[104X
    [4X[28X<Numerical semigroup with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XFactorizationsElementListWRTNumericalSemigroup([100,101,103],s);[127X[104X
    [4X[28X[ [ [ 0, 2, 6 ], [ 1, 7, 1 ], [ 3, 4, 2 ], [ 5, 1, 3 ], [ 10, 0, 0 ] ],[128X[104X
    [4X[28X  [ [ 0, 8, 1 ], [ 1, 0, 7 ], [ 2, 5, 2 ], [ 4, 2, 3 ], [ 9, 1, 0 ] ],[128X[104X
    [4X[28X  [ [ 0, 7, 2 ], [ 2, 4, 3 ], [ 4, 1, 4 ], [ 7, 3, 0 ], [ 9, 0, 1 ] ] ][128X[104X
    [4X[28X    [128X[104X
  [4X[32X[104X
  
  [1X9.1-4 RClassesOfSetOfFactorizations[101X
  
  [33X[1;0Y[29X[2XRClassesOfSetOfFactorizations[102X( [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X  is a set of factorizations (a list of lists of nonnegative integers with
  the  same length). The output is the set of [22Xmathcal R[122X-classes of this set of
  factorizations as defined in Chapter 7 of [RG09].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,19,23);;[127X[104X
    [4X[25Xgap>[125X [27XBettiElements(s);[127X[104X
    [4X[28X[ 30, 33, 42, 57, 69 ][128X[104X
    [4X[25Xgap>[125X [27XFactorizations(69,s);[127X[104X
    [4X[28X[ [ 5, 0, 1, 0 ], [ 2, 1, 2, 0 ], [ 0, 0, 0, 3 ] ][128X[104X
    [4X[25Xgap>[125X [27XRClassesOfSetOfFactorizations(last);[127X[104X
    [4X[28X[ [ [ 2, 1, 2, 0 ], [ 5, 0, 1, 0 ] ], [ [ 0, 0, 0, 3 ] ] ][128X[104X
  [4X[32X[104X
  
  [1X9.1-5 LShapes[101X
  
  [33X[1;0Y[29X[2XLShapes[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XLShapesOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a numerical semigroup. The output is the number of LShapes associated
  to  [3XS[103X. These are ways of arranging the set of factorizations of the elements
  in the Apéry set of the largest generator, so that if one factorization [22Xx[122X is
  chosen for [22Xw[122X and [22Xw-w'∈ S[122X, then only the factorization of [22Xx'[122X of [22Xw'[122X with [22Xx'≤ x[122X
  can  be in the LShape (and if there is no such a factorization, then we have
  no LShape with [22Xx[122X in it), see [AG10].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,9);;[127X[104X
    [4X[25Xgap>[125X [27XLShapes(s);[127X[104X
    [4X[28X[ [ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ], [ 2, 0 ], [ 1, 1 ], [ 0, 2 ], [ 2, 1 ],[128X[104X
    [4X[28X      [ 1, 2 ], [ 2, 2 ] ],[128X[104X
    [4X[28X  [ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ], [ 2, 0 ], [ 1, 1 ], [ 3, 0 ], [ 2, 1 ],[128X[104X
    [4X[28X      [ 4, 0 ], [ 5, 0 ] ] ][128X[104X
    [4X[25Xgap>[125X [27XLShapesOfNumericalSemigroup(s) = LShapes(s);[127X[104X
    [4X[28Xtrue     [128X[104X
  [4X[32X[104X
  
  [1X9.1-6 RFMatrices[101X
  
  [33X[1;0Y[29X[2XRFMatrices[102X( [3Xf[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup, and [3Xf[103X is a pseudo-Frobenius number of [3XS[103X.[133X
  
  [33X[0;0YThe  output  is the list of RF-matrices associated to [3Xf[103X. The ith row of each
  matrix  contains  the  coefficients  of  a  combination of [3Xf[103X in terms of the
  minimal  generators  of  the  semigroup,  obtained  by  substraction the ith
  generator  to  the  factorizations  of  [3Xf[103X  plus  the ith generator of [3XS[103X, see
  [Mos16].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(6, 7, 9, 10);;[127X[104X
    [4X[25Xgap>[125X [27XRFMatrices(8,s);[127X[104X
    [4X[28X[ [ [ -1, 2, 0, 0 ], [ 1, -1, 1, 0 ], [ 0, 1, -1, 1 ], [ 3, 0, 0, -1 ] ],[128X[104X
    [4X[28X  [ [ -1, 2, 0, 0 ], [ 1, -1, 1, 0 ], [ 0, 1, -1, 1 ], [ 0, 0, 2, -1 ] ] ][128X[104X
  [4X[32X[104X
  
  [1X9.1-7 DenumerantOfElementInNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XDenumerantOfElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup  and  [3Xn[103X a positive integer. The output is the
  number of factorizations of [3Xn[103X in terms of the minimal generating set of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,195,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27XDenumerantOfElementInNumericalSemigroup(1311,s);[127X[104X
    [4X[28X6[128X[104X
  [4X[32X[104X
  
  [1X9.1-8 DenumerantFunction[101X
  
  [33X[1;0Y[29X[2XDenumerantFunction[102X( [3XS[103X ) [32X operation[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup.  The output is a function that for a given [22Xn[122X
  computes  the  number  of  factorizations  of  [3Xn[103X  in  terms  of  the minimal
  generating set of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,195,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27XDenumerantFunction(s)(1311);[127X[104X
    [4X[28X6[128X[104X
  [4X[32X[104X
  
  [1X9.1-9 DenumerantIdeal[101X
  
  [33X[1;0Y[29X[2XDenumerantIdeal[102X( [3Xn[103X, [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XDenumerantIdeal[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical semigroup and [3Xn[103X a nonnegative integer. The output is the
  ideal  of  elements  in [3XS[103X with more than [3Xn[103X factorizations. If we add zero to
  this set, we obtain what is is called in [Kom24] an [3Xn[103X-semigroup.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,195,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27X1311 in DenumerantIdeal(6,s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27X1311 in DenumerantIdeal(5,s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X9.2 [33X[0;0YInvariants based on lengths[133X[101X
  
  [33X[0;0YThis  section  is  devoted  to  nonunique  factorization invariants based on
  lengths  of  factorizations. There are some families of numerical semigroups
  related  to  maximal  denumerantes;  membership tests for these families are
  provede here.[133X
  
  [1X9.2-1 LengthsOfFactorizationsIntegerWRTList[101X
  
  [33X[1;0Y[29X[2XLengthsOfFactorizationsIntegerWRTList[102X( [3Xn[103X, [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X  is a list of integers and [3Xn[103X an integer. The output is the set of lengths
  of the factorizations of [3Xn[103X in terms of the elements in [3Xls[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XLengthsOfFactorizationsIntegerWRTList(100,[11,13,15,19]);[127X[104X
    [4X[28X[ 6, 8 ][128X[104X
  [4X[32X[104X
  
  [1X9.2-2 LengthsOfFactorizationsElementWRTNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XLengthsOfFactorizationsElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a numerical semigroup and [3Xn[103X an element of [3XS[103X. The output is the set of
  lengths of the factorizations of [3Xn[103X in terms of the minimal generating set of
  [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);[127X[104X
    [4X[28X<Numerical semigroup with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XLengthsOfFactorizationsElementWRTNumericalSemigroup(1100,s);[127X[104X
    [4X[28X[ 4, 6, 8, 9 ][128X[104X
  [4X[32X[104X
  
  [1X9.2-3 Elasticity[101X
  
  [33X[1;0Y[29X[2XElasticity[102X( [3Xn[103X, [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XElasticity[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XElasticityOfFactorizationsElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is a numerical semigroup and [3Xn[103X an element of [3XS[103X. The output is the maximum
  length  divided by the minimum length of the factorizations of [3Xn[103X in terms of
  the minimal generating set of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27Xe := Elasticity(1100,s);[127X[104X
    [4X[28X9/4[128X[104X
    [4X[25Xgap>[125X [27XElasticity(1100,s) = Elasticity(s,1100);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XElasticityOfFactorizationsElementWRTNumericalSemigroup(1100,s)= e;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X9.2-4 Elasticity[101X
  
  [33X[1;0Y[29X[2XElasticity[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XElasticityOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup. The output is the elasticity of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27XElasticity(s);[127X[104X
    [4X[28X286/101[128X[104X
    [4X[25Xgap>[125X [27XElasticityOfNumericalSemigroup(s);[127X[104X
    [4X[28X286/101[128X[104X
  [4X[32X[104X
  
  [1X9.2-5 DeltaSet[101X
  
  [33X[1;0Y[29X[2XDeltaSet[102X( [3Xls[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XDeltaSetOfSetOfIntegers[102X( [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X  is  list of integers. The output is the Delta set of the elements in [3Xls[103X,
  that is, the set of differences of consecutive elements in the list.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XLengthsOfFactorizationsIntegerWRTList(100,[11,13,15,19]);[127X[104X
    [4X[28X[ 6, 8 ][128X[104X
    [4X[25Xgap>[125X [27XDeltaSet(last);[127X[104X
    [4X[28X[ 2 ][128X[104X
    [4X[25Xgap>[125X [27XDeltaSetOfSetOfIntegers(last2);[127X[104X
    [4X[28X[ 2 ][128X[104X
  [4X[32X[104X
  
  [1X9.2-6 DeltaSet[101X
  
  [33X[1;0Y[29X[2XDeltaSet[102X( [3Xn[103X, [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XDeltaSet[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XDeltaSetOfFactorizationsElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical semigroup and [3Xn[103X an element of [3XS[103X. The output is the Delta
  set of the factorizations of [3Xn[103X in terms of the minimal generating set of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27Xd := DeltaSet(1100,s);[127X[104X
    [4X[28X[ 1, 2 ][128X[104X
    [4X[25Xgap>[125X [27XDeltaSet(s,1100) = d;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XDeltaSetOfFactorizationsElementWRTNumericalSemigroup(1100,s) = d;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X9.2-7 DeltaSetPeriodicityBoundForNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XDeltaSetPeriodicityBoundForNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a numerical semigroup. Computes the bound were the periodicity starts
  for Delta sets of the elements in [3XS[103X; see [GMV15].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,11);;[127X[104X
    [4X[25Xgap>[125X [27XDeltaSetPeriodicityBoundForNumericalSemigroup(s);[127X[104X
    [4X[28X60[128X[104X
    [4X[28X    [128X[104X
  [4X[32X[104X
  
  [1X9.2-8 DeltaSetPeriodicityStartForNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XDeltaSetPeriodicityStartForNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YComputes  the  element  were  the  periodicity  starts for Delta sets of the
  elements in [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,11);;[127X[104X
    [4X[25Xgap>[125X [27XDeltaSetPeriodicityStartForNumericalSemigroup(s);[127X[104X
    [4X[28X21[128X[104X
    [4X[28X    [128X[104X
  [4X[32X[104X
  
  [1X9.2-9 DeltaSetListUpToElementWRTNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XDeltaSetListUpToElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup, [3Xn[103X an integer.[133X
  
  [33X[0;0YComputes  the  Delta  sets  of  the  integers up to (and including) [3Xn[103X, if an
  integer is not in [3XS[103X, the corresponding Delta set is empty.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,11);;[127X[104X
    [4X[25Xgap>[125X [27XDeltaSetListUpToElementWRTNumericalSemigroup(31,s);[127X[104X
    [4X[28X[ [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ],[128X[104X
    [4X[28X  [  ], [  ], [  ], [  ], [  ], [  ], [  ], [  ], [ 2 ], [  ], [  ], [ 2 ], [  ],[128X[104X
    [4X[28X  [ 2 ], [  ], [ 2 ], [ 2 ], [  ] ][128X[104X
    [4X[28X    [128X[104X
  [4X[32X[104X
  
  [1X9.2-10 DeltaSetUnionUpToElementWRTNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XDeltaSetUnionUpToElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup, [3Xn[103X a nonnegative integer.[133X
  
  [33X[0;0YComputes  the  union  of  the  delta  sets  of  the  elements of [3XS[103X up to and
  including [3Xn[103X, using a ring buffer to conserve memory.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,11);;[127X[104X
    [4X[25Xgap>[125X [27XDeltaSetUnionUpToElementWRTNumericalSemigroup(60,s);[127X[104X
    [4X[28X[ 2 ][128X[104X
    [4X[28X    [128X[104X
  [4X[32X[104X
  
  [1X9.2-11 DeltaSet[101X
  
  [33X[1;0Y[29X[2XDeltaSet[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XDeltaSetOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YComputes the Delta set of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,11);;[127X[104X
    [4X[25Xgap>[125X [27XDeltaSet(s);[127X[104X
    [4X[28X[ 2 ][128X[104X
    [4X[25Xgap>[125X [27XDeltaSetOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 2 ][128X[104X
    [4X[28X    [128X[104X
  [4X[32X[104X
  
  [1X9.2-12 MaximumDegree[101X
  
  [33X[1;0Y[29X[2XMaximumDegree[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XMaximumDegreeOfElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical semigroup and [3Xn[103X a nonnegative integer. The output is the
  maximum length of the factorizations of [3Xn[103X in terms of the minimal generating
  set of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);[127X[104X
    [4X[28X<Numerical semigroup with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XMaximumDegree(1100,s);[127X[104X
    [4X[28X9[128X[104X
    [4X[25Xgap>[125X [27XMaximumDegreeOfElementWRTNumericalSemigroup(1100,s);[127X[104X
    [4X[28X9[128X[104X
  [4X[32X[104X
  
  [1X9.2-13 IsAdditiveNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XIsAdditiveNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X   is   a   numerical  semigroup.  Detects  if  [3XS[103X  is  additive,  that  is,
  [22Xord(m+x)=ord(x)+1[122X  for  all  [22Xx[122X  in  [3XS[103X, where [22Xm[122X is the multiplicity of [3XS[103X ([22Xord[122X
  corresponds  to  [2XMaximumDegreeOfElementWRTNumericalSemigroup[102X  ([14X9.2-12[114X);  see
  Section   [14X9.8[114X   for   an   alternate   definition).   For  these  semigroups
  [22Xgr_mathfrakm(K[[S]])[122X is Cohen-Macaulay (see [BH13]).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xl:=IrreducibleNumericalSemigroupsWithFrobeniusNumber(31);;[127X[104X
    [4X[25Xgap>[125X [27XLength(l);[127X[104X
    [4X[28X109[128X[104X
    [4X[25Xgap>[125X [27XLength(Filtered(l,IsAdditiveNumericalSemigroup));[127X[104X
    [4X[28X20[128X[104X
  [4X[32X[104X
  
  [1X9.2-14 MaximalDenumerant[101X
  
  [33X[1;0Y[29X[2XMaximalDenumerant[102X( [3Xn[103X, [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XMaximalDenumerant[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XMaximalDenumerantOfElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a numerical semigroup and [3Xn[103X an element of [3XS[103X. The output is the number
  of  factorizations  of  [3Xn[103X  in  terms of the minimal generating set of [3XS[103X with
  maximal length.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27XMaximalDenumerant(1100,s);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27XMaximalDenumerant(s,1311);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XMaximalDenumerantOfElementInNumericalSemigroup(1311,s);[127X[104X
    [4X[28X2[128X[104X
  [4X[32X[104X
  
  [1X9.2-15 MaximalDenumerantOfSetOfFactorizations[101X
  
  [33X[1;0Y[29X[2XMaximalDenumerantOfSetOfFactorizations[102X( [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X  is  list of factorizations (a list of lists of nonnegative integers with
  the  same  length).  The  output  is  number  of elements in [3Xls[103X with maximal
  length.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XFactorizationsIntegerWRTList(100,[11,13,15,19]);[127X[104X
    [4X[28X[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ],[128X[104X
    [4X[28X  [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XMaximalDenumerantOfSetOfFactorizations(last);[127X[104X
    [4X[28X6[128X[104X
  [4X[32X[104X
  
  [1X9.2-16 MaximalDenumerant[101X
  
  [33X[1;0Y[29X[2XMaximalDenumerant[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XMaximalDenumerantOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is a numerical semigroup. The output is the maximal denumerant of [3XS[103X, that
  is,  the  maximum  of  the  maximal  denumerants  of  the elements in [3XS[103X (see
  [BH13]).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27XMaximalDenumerant(s);[127X[104X
    [4X[28X4[128X[104X
    [4X[25Xgap>[125X [27XMaximalDenumerantOfNumericalSemigroup(s);[127X[104X
    [4X[28X4[128X[104X
  [4X[32X[104X
  
  [1X9.2-17 Adjustment[101X
  
  [33X[1;0Y[29X[2XAdjustment[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XAdjustmentOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is a numerical semigroup. The output is the adjustment of [3XS[103X as defined in
  [BH13].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);;[127X[104X
    [4X[25Xgap>[125X [27Xa := Adjustment(s);[127X[104X
    [4X[28X[ 0, 12, 24, 36, 48, 60, 72, 84, 95, 96, 107, 108, 119, 120, 131, 132, 143,[128X[104X
    [4X[28X  144, 155, 156, 167, 168, 171, 177, 179, 180, 183, 185, 189, 190, 191, 192,[128X[104X
    [4X[28X  195, 197, 201, 203, 204, 207, 209, 213, 215, 216, 219, 221, 225, 227, 228,[128X[104X
    [4X[28X  231, 233, 237, 239, 240, 243, 245, 249, 251, 252, 255, 257, 261, 263, 264,[128X[104X
    [4X[28X  266, 267, 269, 273, 275, 276, 279, 280, 281, 285, 287, 288, 292, 293, 299,[128X[104X
    [4X[28X  300, 304, 305, 311, 312, 316, 317, 323, 324, 328, 329, 335, 336, 340, 341,[128X[104X
    [4X[28X  342, 347, 348, 352, 353, 354, 356, 359, 360, 361, 362, 364, 365, 366, 368,[128X[104X
    [4X[28X  370, 371, 372, 374, 376, 377, 378, 380, 382, 383, 384, 388, 389, 390, 394,[128X[104X
    [4X[28X  395, 396, 400, 401, 402, 406, 407, 408, 412, 413, 414, 418, 419, 420, 424,[128X[104X
    [4X[28X  425, 426, 430, 431, 432, 436, 437, 438, 442, 444, 448, 450, 451, 454, 456,[128X[104X
    [4X[28X  460, 465, 466, 472, 477, 478, 484, 489, 490, 496, 501, 502, 508, 513, 514,[128X[104X
    [4X[28X  519, 520, 525, 526, 527, 531, 532, 533, 537, 539, 543, 545, 549, 551, 555,[128X[104X
    [4X[28X  561, 567, 573, 579, 585, 591, 597, 603, 609, 615, 621, 622, 627, 698, 704,[128X[104X
    [4X[28X  710, 716, 722 ][128X[104X
    [4X[25Xgap>[125X [27XAdjustmentOfNumericalSemigroup(s) = a;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X9.3 [33X[0;0YInvariants based on distances[133X[101X
  
  [33X[0;0YThis  section  is devoted to invariants that rely on the concept of distance
  between two factorizations.[133X
  
  [1X9.3-1 CatenaryDegree[101X
  
  [33X[1;0Y[29X[2XCatenaryDegree[102X( [3Xls[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCatenaryDegreeOfSetOfFactorizations[102X( [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X  is a set of factorizations (a list of lists of nonnegative integers with
  the  same  length).  The  output  is  the  catenary  degree  of  this set of
  factorizations.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XFactorizationsIntegerWRTList(100,[11,13,15,19]);[127X[104X
    [4X[28X[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ],[128X[104X
    [4X[28X  [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XCatenaryDegree(last);[127X[104X
    [4X[28X5[128X[104X
    [4X[25Xgap>[125X [27XCatenaryDegreeOfSetOfFactorizations(last2);[127X[104X
    [4X[28X5[128X[104X
  [4X[32X[104X
  
  [1X9.3-2 AdjacentCatenaryDegreeOfSetOfFactorizations[101X
  
  [33X[1;0Y[29X[2XAdjacentCatenaryDegreeOfSetOfFactorizations[102X( [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X is a set of factorizations. The output is the adjacent catenary degree of
  this set of factorizations, that is, the supremum of the distance between to
  sets of factorizations with adjacent lengths. More precisely, if [22Xl_1,...,l_t[122X
  are  the  lengths  of the factorizations of the elements in [3Xls[103X, and [22XZ_l_i[122X is
  the  set of factorizations in [3Xls[103X with length [22Xl_i[122X, then the adjacent catenary
  degree is the maximum of the distances [22Xmathrm d (Z_l_i,Z_l_i+1})[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XFactorizationsIntegerWRTList(100,[11,13,15,19]);[127X[104X
    [4X[28X[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ],[128X[104X
    [4X[28X  [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XAdjacentCatenaryDegreeOfSetOfFactorizations(last);[127X[104X
    [4X[28X5[128X[104X
  [4X[32X[104X
  
  [1X9.3-3 EqualCatenaryDegreeOfSetOfFactorizations[101X
  
  [33X[1;0Y[29X[2XEqualCatenaryDegreeOfSetOfFactorizations[102X( [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X      is      a     set     of     factorizations.     The     same     as
  CatenaryDegreeOfSetOfFactorizations,  but  now  the factorizations joined by
  the  chain  must  have  the same length, and the elements in the chain also.
  Equivalently,  if  [22Xl_1,...,l_t[122X  are the lengths of the factorizations of the
  elements  in  [3Xls[103X,  and  [22XZ_l_i[122X is the set of factorizations in [3Xls[103X with length
  [22Xl_i[122X,   then   the   equal   catenary   degree   is   the   maximum   of  the
  CatenaryDegreeOfSetOfFactorizations of [22Xmathrm d (Z_l_i,Z_l_i+1})[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XFactorizationsIntegerWRTList(100,[11,13,15,19]);[127X[104X
    [4X[28X[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ],[128X[104X
    [4X[28X  [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XEqualCatenaryDegreeOfSetOfFactorizations(last);[127X[104X
    [4X[28X2[128X[104X
  [4X[32X[104X
  
  [1X9.3-4 MonotoneCatenaryDegreeOfSetOfFactorizations[101X
  
  [33X[1;0Y[29X[2XMonotoneCatenaryDegreeOfSetOfFactorizations[102X( [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X      is      a     set     of     factorizations.     The     same     as
  CatenaryDegreeOfSetOfFactorizations,  but  now the factorizations are joined
  by  a  chain  with nondecreasing lengths. Equivalently, it is the maximum of
  the        AdjacentCatenaryDegreeOfSetOfFactorizations        and        the
  EqualCatenaryDegreeOfSetOfFactorizations.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XFactorizationsIntegerWRTList(100,[11,13,15,19]);[127X[104X
    [4X[28X[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ],[128X[104X
    [4X[28X  [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XMonotoneCatenaryDegreeOfSetOfFactorizations(last);[127X[104X
    [4X[28X5[128X[104X
  [4X[32X[104X
  
  [1X9.3-5 CatenaryDegree[101X
  
  [33X[1;0Y[29X[2XCatenaryDegree[102X( [3Xn[103X, [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCatenaryDegree[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCatenaryDegreeOfElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3Xn[103X is a nonnegative integer and [3XS[103X is a numerical semigroup. The output is the
  catenary degree of [3Xn[103X relative to [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XCatenaryDegree(157,NumericalSemigroup(13,18));[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27XCatenaryDegree(NumericalSemigroup(13,18),1157);[127X[104X
    [4X[28X18[128X[104X
    [4X[25Xgap>[125X [27XCatenaryDegreeOfElementInNumericalSemigroup(1157,NumericalSemigroup(13,18));[127X[104X
    [4X[28X18[128X[104X
  [4X[32X[104X
  
  [1X9.3-6 TameDegree[101X
  
  [33X[1;0Y[29X[2XTameDegree[102X( [3Xls[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XTameDegreeOfSetOfFactorizations[102X( [3Xls[103X ) [32X function[133X
  
  [33X[0;0Y[3Xls[103X  is a set of factorizations (a list of lists of nonnegative integers with
  the   same   length).  The  output  is  the  tame  degree  of  this  set  of
  factorizations.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XFactorizationsIntegerWRTList(100,[11,13,15,19]);[127X[104X
    [4X[28X[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ],[128X[104X
    [4X[28X  [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XTameDegree(last);[127X[104X
    [4X[28X4[128X[104X
    [4X[25Xgap>[125X [27XTameDegreeOfSetOfFactorizations(last2);[127X[104X
    [4X[28X4[128X[104X
  [4X[32X[104X
  
  [1X9.3-7 CatenaryDegree[101X
  
  [33X[1;0Y[29X[2XCatenaryDegree[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XCatenaryDegreeOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup. The output is the catenary degree of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);[127X[104X
    [4X[28X<Numerical semigroup with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XCatenaryDegree(s);[127X[104X
    [4X[28X8[128X[104X
    [4X[25Xgap>[125X [27XCatenaryDegreeOfNumericalSemigroup(s);[127X[104X
    [4X[28X8[128X[104X
  [4X[32X[104X
  
  [1X9.3-8 DegreesOffEqualPrimitiveElementsOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XDegreesOffEqualPrimitiveElementsOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YThe  output  is  the set of elements [22Xs[122X in [3XS[103X such that there exists a minimal
  solution  to  [22Xmsg⋅  x-msg⋅  y = 0[122X, such that [22Xx,y[122X are factorizations with the
  same  length  of  [22Xs[122X,  and  [22Xmsg[122X  is the minimal generating system of [3XS[103X. These
  elements are used to compute the equal catenary degree of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XDegreesOfEqualPrimitiveElementsOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 3, 5, 7, 10 ][128X[104X
  [4X[32X[104X
  
  [1X9.3-9 EqualCatenaryDegreeOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XEqualCatenaryDegreeOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup. The output is the equal catenary degree of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XEqualCatenaryDegreeOfNumericalSemigroup(s);[127X[104X
    [4X[28X2[128X[104X
  [4X[32X[104X
  
  [1X9.3-10 DegreesOfMonotonePrimitiveElementsOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XDegreesOfMonotonePrimitiveElementsOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YThe  output  is  the set of elements [22Xs[122X in [3XS[103X such that there exists a minimal
  solution  to  [22Xmsg⋅ x-msg⋅ y = 0[122X, such that [22Xx,y[122X are factorizations of [22Xs[122X, with
  [22X|x|≤  |y|[122X; [22Xmsg[122X stands the minimal generating system of [3XS[103X. These elements are
  used to compute the monotone catenary degree of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XDegreesOfMonotonePrimitiveElementsOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 3, 5, 7, 10, 12, 14, 15, 21, 28, 35 ][128X[104X
  [4X[32X[104X
  
  [1X9.3-11 MonotoneCatenaryDegreeOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XMonotoneCatenaryDegreeOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup. The output is the monotone catenary degree of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,23,31,44);;[127X[104X
    [4X[25Xgap>[125X [27XCatenaryDegreeOfNumericalSemigroup(s);[127X[104X
    [4X[28X9[128X[104X
    [4X[25Xgap>[125X [27XMonotoneCatenaryDegreeOfNumericalSemigroup(s);[127X[104X
    [4X[28X21[128X[104X
  [4X[32X[104X
  
  [1X9.3-12 TameDegree[101X
  
  [33X[1;0Y[29X[2XTameDegree[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XTameDegreeOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup. The output is the tame degree of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(101,113,196,272,278,286);[127X[104X
    [4X[28X<Numerical semigroup with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XTameDegree(s);[127X[104X
    [4X[28X14[128X[104X
    [4X[25Xgap>[125X [27XTameDegreeOfNumericalSemigroup(s);[127X[104X
    [4X[28X14[128X[104X
  [4X[32X[104X
  
  [1X9.3-13 TameDegree[101X
  
  [33X[1;0Y[29X[2XTameDegree[102X( [3Xn[103X, [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XTameDegree[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XTameDegreeOfElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3Xn[103X  is an element of the numerical semigroup [3XS[103X. The output is the tame degree
  of [3Xn[103X in [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);;[127X[104X
    [4X[25Xgap>[125X [27XTameDegree(100,s);[127X[104X
    [4X[28X5[128X[104X
    [4X[25Xgap>[125X [27XTameDegree(s,100);[127X[104X
    [4X[28X5[128X[104X
    [4X[25Xgap>[125X [27XTameDegreeOfElementInNumericalSemigroup(100,s);[127X[104X
    [4X[28X5[128X[104X
  [4X[32X[104X
  
  
  [1X9.4 [33X[0;0YPrimality[133X[101X
  
  [33X[0;0YThere are no primes among the irreducible elements (minimal generators) of a
  numerical  semigroup.  However, there is a way to measure how far an element
  is frome being prime: the [22Xω[122X-primality.[133X
  
  [1X9.4-1 OmegaPrimality[101X
  
  [33X[1;0Y[29X[2XOmegaPrimality[102X( [3Xn[103X, [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XOmegaPrimality[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XOmegaPrimalityOfElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3Xn[103X  is an element of the numerical semigroup [3XS[103X. The output is the [22Xω[122X-primality
  of  [3Xn[103X  in  [3XS[103X  as  explained in [BGG11]. The current implementation is due to
  Chris O'Neill based on a work in progress with Pelayo and Thomas.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);;[127X[104X
    [4X[25Xgap>[125X [27XOmegaPrimality(100,s);[127X[104X
    [4X[28X13[128X[104X
    [4X[25Xgap>[125X [27XOmegaPrimality(s,100);[127X[104X
    [4X[28X13[128X[104X
    [4X[25Xgap>[125X [27XOmegaPrimalityOfElementInNumericalSemigroup(100,s);[127X[104X
    [4X[28X13[128X[104X
  [4X[32X[104X
  
  [1X9.4-2 OmegaPrimalityOfElementListInNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XOmegaPrimalityOfElementListInNumericalSemigroup[102X( [3Xl[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup and [3Xl[103X a list of elements of [3XS[103X.[133X
  
  [33X[0;0YComputes the omega-values of all the elements in [3Xl[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);;[127X[104X
    [4X[25Xgap>[125X [27Xl:=FirstElementsOfNumericalSemigroup(100,s);;[127X[104X
    [4X[25Xgap>[125X [27XList(l,x->OmegaPrimalityOfElementInNumericalSemigroup(x,s)); time;[127X[104X
    [4X[28X[ 0, 4, 5, 5, 4, 6, 7, 6, 6, 6, 6, 7, 8, 7, 7, 7, 7, 7, 8, 7, 8, 9, 8, 8, 8,[128X[104X
    [4X[28X  8, 8, 8, 8, 9, 9, 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 10, 10, 10, 10, 10,[128X[104X
    [4X[28X  10, 10, 10, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 12, 12, 12, 12,[128X[104X
    [4X[28X  12, 12, 12, 12, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 14, 14, 14,[128X[104X
    [4X[28X  14, 14, 14, 14, 14, 15, 16, 15, 15, 15, 15, 15, 15, 15, 15 ][128X[104X
    [4X[28X218[128X[104X
    [4X[25Xgap>[125X [27XOmegaPrimalityOfElementListInNumericalSemigroup(l,s);time;[127X[104X
    [4X[28X[ 0, 4, 5, 5, 4, 6, 7, 6, 6, 6, 6, 7, 8, 7, 7, 7, 7, 7, 8, 7, 8, 9, 8, 8, 8,[128X[104X
    [4X[28X  8, 8, 8, 8, 9, 9, 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 10, 10, 10, 10, 10,[128X[104X
    [4X[28X  10, 10, 10, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 12, 12, 12, 12,[128X[104X
    [4X[28X  12, 12, 12, 12, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 14, 14, 14,[128X[104X
    [4X[28X  14, 14, 14, 14, 14, 15, 16, 15, 15, 15, 15, 15, 15, 15, 15 ][128X[104X
    [4X[28X10[128X[104X
  [4X[32X[104X
  
  [1X9.4-3 OmegaPrimality[101X
  
  [33X[1;0Y[29X[2XOmegaPrimality[102X( [3XS[103X ) [32X operation[133X
  [33X[1;0Y[29X[2XOmegaPrimalityOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a numerical semigroup. The output is the maximum of the [22Xω[122X-primalities
  of the minimal generators of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);[127X[104X
    [4X[28X<Numerical semigroup with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XOmegaPrimality(s);[127X[104X
    [4X[28X5[128X[104X
    [4X[25Xgap>[125X [27XOmegaPrimalityOfNumericalSemigroup(s);[127X[104X
    [4X[28X5[128X[104X
  [4X[32X[104X
  
  
  [1X9.5 [33X[0;0YHomogenization of Numerical Semigroups[133X[101X
  
  [33X[0;0YLet  [22XS[122X  be  a  numerical semigroup minimally generated by [22X{m_1,...,m_n}[122X. The
  homogenization   of   [22XS[122X,   [22XS^mathrmhom[122X   is   the   semigroup  generated  by
  [22X{(1,0),(1,m_1),...,  (1,m_n)}[122X.  The catenary degree of [22XS^mathrmhom[122X coincides
  with  the  homogeneous  catenary degree of [22XS[122X, and it is between the catenary
  and the monotone catenary degree of [22XS[122X. The advantage of this catenary degree
  is that is less costly to compute than the monotone catenary degree, and has
  some  nice  interpretations ([GSOSt13]). This section contains the auxiliary
  functions needed to compute the homogeneous catenary degree.[133X
  
  [1X9.5-1 BelongsToHomogenizationOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XBelongsToHomogenizationOfNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup  and  [3Xn[103X a list with two entries (a pair). The
  output is true if the [3Xn[103X belongs to the homogenization of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);;[127X[104X
    [4X[25Xgap>[125X [27XBelongsToHomogenizationOfNumericalSemigroup([10,23],s);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XBelongsToHomogenizationOfNumericalSemigroup([1,23],s);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X9.5-2 FactorizationsInHomogenizationOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XFactorizationsInHomogenizationOfNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup  and  [3Xn[103X a list with two entries (a pair). The
  output  is  the  set  of factorizations [3Xn[103X in terms of the minimal generating
  system of the homogenization of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,13);;[127X[104X
    [4X[25Xgap>[125X [27XFactorizationsInHomogenizationOfNumericalSemigroup([20,230],s);[127X[104X
    [4X[28X[ [ 0, 0, 15, 5 ], [ 0, 2, 12, 6 ], [ 0, 4, 9, 7 ],[128X[104X
    [4X[28X  [ 0, 6, 6, 8 ], [ 0, 8, 3, 9 ], [ 0, 10, 0, 10 ],[128X[104X
    [4X[28X  [ 1, 1, 7, 11 ], [ 1, 3, 4, 12 ], [ 1, 5, 1, 13 ],[128X[104X
    [4X[28X  [ 2, 0, 2, 16 ] ][128X[104X
    [4X[25Xgap>[125X [27XFactorizationsElementWRTNumericalSemigroup(230,s);[127X[104X
    [4X[28X[ [ 23, 0, 0 ], [ 12, 10, 0 ], [ 1, 20, 0 ], [ 14, 7, 1 ],[128X[104X
    [4X[28X  [ 3, 17, 1 ], [ 16, 4, 2 ], [ 5, 14, 2 ], [ 18, 1, 3 ],[128X[104X
    [4X[28X  [ 7, 11, 3 ], [ 9, 8, 4 ], [ 11, 5, 5 ], [ 0, 15, 5 ],[128X[104X
    [4X[28X  [ 13, 2, 6 ], [ 2, 12, 6 ], [ 4, 9, 7 ], [ 6, 6, 8 ],[128X[104X
    [4X[28X  [ 8, 3, 9 ], [ 10, 0, 10 ], [ 1, 7, 11 ], [ 3, 4, 12 ],[128X[104X
    [4X[28X  [ 5, 1, 13 ], [ 0, 2, 16 ] ][128X[104X
  [4X[32X[104X
  
  [1X9.5-3 HomogeneousBettiElementsOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XHomogeneousBettiElementsOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a numerical semigroup. The output is the set of Betti elements of the
  homogenization of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,17,19);;[127X[104X
    [4X[25Xgap>[125X [27XBettiElements(s);[127X[104X
    [4X[28X[ 57, 68, 70 ][128X[104X
    [4X[25Xgap>[125X [27XHomogeneousBettiElementsOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ [ 5, 57 ], [ 5, 68 ], [ 6, 95 ], [ 7, 70 ], [ 9, 153 ] ][128X[104X
  [4X[32X[104X
  
  [1X9.5-4 HomogeneousCatenaryDegreeOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XHomogeneousCatenaryDegreeOfNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup. The output is the homogeneous catenary degree of
  [3XS[103X.  Observe  that  for  a  single  element  in  the homogenization of [3XS[103X, its
  catenary degree can be computed with [10XCatenaryDegreeOfSetOfFactorizations[110X and
  [10XFactorizationsInHomogenizationOfNumericalSemigroup[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,17,19);;[127X[104X
    [4X[25Xgap>[125X [27XCatenaryDegree(s);[127X[104X
    [4X[28X7[128X[104X
    [4X[25Xgap>[125X [27XHomogeneousCatenaryDegreeOfNumericalSemigroup(s);[127X[104X
    [4X[28X9[128X[104X
  [4X[32X[104X
  
  
  [1X9.6 [33X[0;0YDivisors, posets[133X[101X
  
  [33X[0;0YGiven  a numerical semigroup [22XS[122X and two integers [22Xa,b[122X, we write [22Xa≤_S b[122X if [22Xb-a∈
  S[122X.  We  also  say that [22Xa[122X divides [22Xb[122X (with respect to [22XS[122X). The semigroup [22XS[122X with
  this binary relation is a poset.[133X
  
  [33X[0;0YThe  set  of  divisors  of [22Xn[122X in [22XS[122X will be denoted by [22XmathrmD_S(n)[122X. If we are
  given  [22Xn_1,...,n_r∈  S[122X,  the  set  of  the  divisors  of  these  elements is
  [22XmathrmD(n_1,..., n_r)= ⋃_i=1^r mathrmD(n_i)[122X.[133X
  
  [33X[0;0YFor a numerical semigroup [22XS[122X, we can define the sequence [22X{ν_i}_i≥ 1[122X, with [22Xν_i[122X
  the  number  of  divisors  of the [22Xi[122Xth element in [22XS[122X. It can be shown that the
  first [22X2g-c[122X elements of the sequence uniquely determine the semigroup (with [22Xc[122X
  the conductor of [22XS[122X and [22Xg[122X its genus), see [Bra13].[133X
  
  [33X[0;0YThere  is  another  sequence associated to divisors that also determines the
  semigroup.  Let [22XS={λ_0=0 < λ_1 dots}[122X be a numerical semigroup. We can define
  the  following  binary  operation  on  [22XN[122X:  [22Xi⊕_S  i=k[122X,  where  [22Xk[122X is such that
  [22Xλ_i+λ_j=λ_k[122X. Set [22Xτ_i=max{ j∈ N: hbox exists k∈{j,...,i} hbox with j⊕_S k=i}[122X.
  The first [22X2c-g+1[122X determine uniquely [22XS[122X (see [Bra13]).[133X
  
  [33X[0;0YTranslated to code, the definition of [22Xτ_i[122X could be as follows.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XTauNS := function(i,S)[128X[104X
    [4X[28X    local d, D, si;[128X[104X
    [4X[28X    D:=DivisorsOfElementInNumericalSemigroup(S[i+1],S);[128X[104X
    [4X[28X    si:=S[i+1];[128X[104X
    [4X[28X    d:=Maximum(Intersection(D,[0..Int(si/2)]));[128X[104X
    [4X[28X    return NumberElement_NumericalSemigroup(S,d)-1;[128X[104X
    [4X[28Xend;[128X[104X
  [4X[32X[104X
  
  [1X9.6-1 MoebiusFunctionAssociatedToNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XMoebiusFunctionAssociatedToNumericalSemigroup[102X( [3XS[103X, [3Xn[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical semigroup and [3Xn[103X is an integer. As [22X(S,≤_S)[122X is a poset, we
  can define the Möbius function associated to it as in [CRA13]. The output is
  the  value  of  the Möbius function in the integer [3Xn[103X, that is, the alternate
  sum of the number of chains from 0 to [3Xn[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XMoebiusFunctionAssociatedToNumericalSemigroup(s,10);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XMoebiusFunctionAssociatedToNumericalSemigroup(s,34);[127X[104X
    [4X[28X25[128X[104X
  [4X[32X[104X
  
  [1X9.6-2 MoebiusFunction[101X
  
  [33X[1;0Y[29X[2XMoebiusFunction[102X( [3XS[103X ) [32X operation[133X
  
  [33X[0;0Y[3XS[103X  is a numerical semigroup. As [22X(S,≤_S)[122X is a poset, we can define the Möbius
  function  associated  to it as in [CRA13]. The output is the Möbius function
  associated to [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XList([1..10],MoebiusFunction(s));[127X[104X
    [4X[28X[ 0, 0, -1, 0, -1, 0, -1, 1, 0, 2 ][128X[104X
  [4X[32X[104X
  
  [1X9.6-3 DivisorsOfElementInNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XDivisorsOfElementInNumericalSemigroup[102X( [3XS[103X, [3Xn[103X ) [32X operation[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical semigroup and [3Xn[103X is an integer. The arguments can also be
  given as [3Xn, S[103X. The output is the set of divisors of [3Xn[103X in [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,11);;[127X[104X
    [4X[25Xgap>[125X [27XDivisorsOfElementInNumericalSemigroup(s,20);[127X[104X
    [4X[28X[ 0, 5, 10, 15, 20 ][128X[104X
    [4X[25Xgap>[125X [27XDivisorsOfElementInNumericalSemigroup(20,s);[127X[104X
    [4X[28X[ 0, 5, 10, 15, 20 ][128X[104X
  [4X[32X[104X
  
  [1X9.6-4 NumericalSemigroupByNuSequence[101X
  
  [33X[1;0Y[29X[2XNumericalSemigroupByNuSequence[102X( [3Xnuseq[103X ) [32X function[133X
  
  [33X[0;0Y[3Xnuseq[103X  is  a list of integers that represents a [22Xν[122X-sequence, that is, the [22Xi[122Xth
  element  in  the  sequence is the number of divisors of the [22Xi[122Xth element in a
  certain numerical semigroup. Though the sequence is finite, it is understood
  that from the last element every entry increases exactly by one.[133X
  
  [33X[0;0YThe  output  is  the  only  numerical  semigroup  whose [22Xν[122X-sequence is [22X[3Xnusec[103X∪
  {k,k+1, ...}[122X (with [22Xk[122X the last element of [3Xnusec[103X).[133X
  
  [33X[0;0YThe implementation is inspired in Theorem 1.54 in [Bra13].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XNuSequence:=S->List([1..2*Conductor(S)-Genus(S)],[127X[104X
    [4X[28Xi->Length(DivisorsOfElementInNumericalSemigroup(S[i],S)));;[128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(5,7,11);;[127X[104X
    [4X[25Xgap>[125X [27XNuSequence(s);[127X[104X
    [4X[28X[ 1, 2, 2, 3, 2, 4, 3, 4, 4, 6, 4, 6, 5, 8, 9, 8, 9, 10, 12, 12 ][128X[104X
    [4X[25Xgap>[125X [27Xs=NumericalSemigroupByNuSequence(last);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X9.6-5 NumericalSemigroupByTauSequence[101X
  
  [33X[1;0Y[29X[2XNumericalSemigroupByTauSequence[102X( [3Xtauseq[103X ) [32X function[133X
  
  [33X[0;0Y[3Xtauseq[103X  is  a  list  of  integers  that  represents a [22Xτ[122X-sequence. Though the
  sequence  is  finite,  it  is  understood that [22Xτ_k+2i = τ_k+2i+1[122X, with [22Xk[122X the
  length of the list, and this amount increases by one as [22Xi[122X increases.[133X
  
  [33X[0;0YThe  output  is  the  only  numerical  semigroup whose [22Xτ[122X-sequence is [22X[3Xtausec[103X∪
  {l+1,l+1,l+2,l+2, ...}[122X (with [22Xl[122X the last element of [3Xtausec[103X).[133X
  
  [33X[0;0YThe implementation is inspired in Theorem 1.60 in [Bra13].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xtau:=[ 0, 0, 0, 0, 1, 1, 2, 2, 3, 0, 1, 2, 3, 3, 3, 3, 4, 4 ];[127X[104X
    [4X[28X[ 0, 0, 0, 0, 1, 1, 2, 2, 3, 0, 1, 2, 3, 3, 3, 3, 4, 4 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalGenerators(NumericalSemigroupByTauSequence(tau));[127X[104X
    [4X[28X[ 6, 7, 8, 17 ][128X[104X
  [4X[32X[104X
  
  
  [1X9.7 [33X[0;0YFeng-Rao distances and numbers[133X[101X
  
  [33X[0;0YLet  [22XS[122X  be a numerical semigroup and let [22Xn∈ S[122X. The Feng-Rao distance of [22Xn[122X is
  then defined as [22Xδ_S(n)=min{ #mathrmD(x)∣ n≤ x, x∈ S}[122X.[133X
  
  [33X[0;0YThe  [22Xr[122Xth generalized distance is [22Xδ_S^r(n)={ #mathrmD(n_1,...,n_r) ∣ n≤ n_1 <
  ⋯ < n_r, n_i∈ S}[122X.[133X
  
  [1X9.7-1 FengRaoDistance[101X
  
  [33X[1;0Y[29X[2XFengRaoDistance[102X( [3XS[103X, [3Xr[103X, [3Xm[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup,  [3Xr[103X  and  [3Xm[103X  integers. The output is the [3Xr[103X-th
  Feng-Rao distance of the element [3Xm[103X in the numerical semigroup [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := NumericalSemigroup(7,9,17);;[127X[104X
    [4X[25Xgap>[125X [27XFengRaoDistance(S,6,100);[127X[104X
    [4X[28X86[128X[104X
  [4X[32X[104X
  
  [1X9.7-2 FengRaoNumber[101X
  
  [33X[1;0Y[29X[2XFengRaoNumber[102X( [3XS[103X, [3Xr[103X ) [32X operation[133X
  
  [33X[0;0Y[3XS[103X  is  a  numerical  semigroup  and  [3Xr[103X is an integer. The output is the [3Xr[103X-th
  Feng-Rao number of the numerical semigroup [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := NumericalSemigroup(7,8,17);;[127X[104X
    [4X[25Xgap>[125X [27XFengRaoNumber(S,209);[127X[104X
    [4X[28X224[128X[104X
    [4X[25Xgap>[125X [27XFengRaoNumber(209,S);[127X[104X
    [4X[28X224[128X[104X
  [4X[32X[104X
  
  
  [1X9.8  [33X[0;0YNumerical  semigroups  with  Apéry  sets  having  special factorization[101X
  [1Xproperties[133X[101X
  
  [33X[0;0YLet [22XS[122X be a numerical semigroup with maximal ideal [22XM[122X, and let [22Xx∈ S[122X. The order
  of  [22Xx[122X,  denoted  [22Xord(x)[122X  is  the  largest  positive  integer  [22Xk[122X such that [22Xx∈
  kM∖(k+1)M[122X.   Notice   that   the   order  of  an  element  corresponds  with
  [2XMaximumDegreeOfElementWRTNumericalSemigroup[102X ([14X9.2-12[114X).[133X
  
  [33X[0;0YRecall  that  for  [22Xx,y∈  Z[122X,  we  write [22Xx≤_S y[122X if [22Xy-x∈ S[122X. Define the relation
  [22Xpreceq_S[122X on [22XS[122X as [22Xxpreceq_S y[122X if [22Xx≤_S y[122X and [22Xord(y)=ord(x)+ord(y-x)[122X.[133X
  
  [33X[0;0YA  numerical  semigroup  [22XS[122X  with  multiplicity  [22Xm[122X  is said to be pure if the
  maximal elements of [22XAp(S,m)[122X with respect to [22X≤_S[122X have all the same order. The
  semigroup  [22XS[122X  is  M-pure  if the maximal elements of [22XAp(S,m)[122X with respect to
  [22Xpreceq_S[122X have all the same order, [Bry10].[133X
  
  [33X[0;0YThe  numerical semigroup [22XS[122X is said to be homogeneous if for every element in
  [22XAp(S,m)[122X,   its   set  of  lengths  is  a  singleton  (that  is,  all  its  a
  factorizations have the same length), [JZA18].[133X
  
  [33X[0;0YA  numerical semigroup [22XS[122X is supersymmetric if it is symmetric, additive, and
  whenever  [22Xw+w'=f+m[122X for some [22Xw,w'∈ Ap(S,m)[122X (with [22Xm[122X the multiplicity and [22Xf[122X the
  Frobenius number), we have [22Xord(w+w')=ord(w)+ord(w')[122X, see [BH13]).[133X
  
  [1X9.8-1 IsPure[101X
  
  [33X[1;0Y[29X[2XIsPure[102X( [3XS[103X ) [32X property[133X
  [33X[1;0Y[29X[2XIsPureNumericalSemigroup[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YTest  for  the  purity of the numerical semigroup S [3XS[103X. This test is based on
  [Bry10].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);;[127X[104X
    [4X[25Xgap>[125X [27XIsPure(s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27XIsPureNumericalSemigroup(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X9.8-2 IsMpure[101X
  
  [33X[1;0Y[29X[2XIsMpure[102X( [3XS[103X ) [32X property[133X
  [33X[1;0Y[29X[2XIsMpureNumericalSemigroup[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YTest  for the M-Purity of the numerical semigroup S [3XS[103X. This test is based on
  [Bry10].[133X
  
  [33X[0;0YThis filter implies [2XIsPureNumericalSemigroup[102X ([14X9.8-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);;[127X[104X
    [4X[25Xgap>[125X [27XIsMpure(s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,11);;[127X[104X
    [4X[25Xgap>[125X [27XIsMpureNumericalSemigroup(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X9.8-3 IsHomogeneousNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XIsHomogeneousNumericalSemigroup[102X( [3XS[103X ) [32X property[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup.[133X
  
  [33X[0;0YDetects if [3XS[103X is homogeneous.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,12,25);;[127X[104X
    [4X[25Xgap>[125X [27XIsHomogeneousNumericalSemigroup(s);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(3,5,7);;[127X[104X
    [4X[25Xgap>[125X [27XIsHomogeneousNumericalSemigroup(s);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X9.8-4 IsSuperSymmetricNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XIsSuperSymmetricNumericalSemigroup[102X( [3XS[103X ) [32X function[133X
  
  [33X[0;0Y[3XS[103X is a numerical semigroup. Detects if [3XS[103X is supersymmetric.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xl:=IrreducibleNumericalSemigroupsWithFrobeniusNumber(31);;[127X[104X
    [4X[25Xgap>[125X [27XLength(l);[127X[104X
    [4X[28X109[128X[104X
    [4X[25Xgap>[125X [27XLength(Filtered(l,IsSuperSymmetricNumericalSemigroup));[127X[104X
    [4X[28X7[128X[104X
  [4X[32X[104X
  
