  
  [1X9 [33X[0;0YNonunique invariants for factorizations in numerical semigroups[133X[101X
  
  
  [1X9.1 [33X[0;0YFactorizations in Numerical Semigroups[133X[101X
  
  [33X[0;0YLet  [22XS[122X  be  a  numerical  semigroup  minimally generated by [22X{m_1,...,m_n}[122X. A
  factorization   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 length of [22Xa[122X is
  [22X|a|=a_1+⋯+a_n[122X. Given two factorizations [22Xa[122X and [22Xb[122X of [22Xn[122X, the distance 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.[133X
  
  [33X[0;0YIf [22Xl_1>⋯ > l_k[122X are the lengths of all the factorizations of [22Xs ∈ S[122X, the Delta
  set associated to [22Xs[122X is [22X∆(s)={l_1-l_2,...,l_k-l_k-1}[122X.[133X
  
  [33X[0;0YThe  catenary degree 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 catenary degree of [22XS[122X is the
  supremum of the catenary degrees of the elements in [22XS[122X.[133X
  
  [33X[0;0YThe  tame  degree  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  [22Xω[122X-primality  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 [22Xω[122X-primality 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 [GHK06]. The
  algorithm  used  to compute the catenary and tame degree is an adaptation of
  the   algorithms  appearing  in  [CGSL+06]  for  numerical  semigroups  (see
  [CGSD07]).  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 [GHK06]).[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 RestrictedPartitions.[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 FactorizationsElementWRTNumericalSemigroup[101X
  
  [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 a nonnegative integer. 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[28X<Numerical semigroup with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XFactorizationsElementWRTNumericalSemigroup(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[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 [RGS09].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,11,19,23);;[127X[104X
    [4X[25Xgap>[125X [27XBettiElementsOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 30, 33, 42, 57, 69 ][128X[104X
    [4X[25Xgap>[125X [27XFactorizationsElementWRTNumericalSemigroup(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 LShapesOfNumericalSemigroup[101X
  
  [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'le[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 [AGGS10].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(4,6,9);;[127X[104X
    [4X[25Xgap>[125X [27XLShapesOfNumericalSemigroup(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[32X[104X
  
  [1X9.1-6 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.2 [33X[0;0YInvariants based on lengths[133X[101X
  
  [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 a nonnegative integer. 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 ElasticityOfFactorizationsElementWRTNumericalSemigroup[101X
  
  [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 a positive integer. 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[28X<Numerical semigroup with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XElasticityOfFactorizationsElementWRTNumericalSemigroup(1100,s);[127X[104X
    [4X[28X9/4[128X[104X
  [4X[32X[104X
  
  [1X9.2-4 ElasticityOfNumericalSemigroup[101X
  
  [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[28X<Numerical semigroup with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XElasticityOfNumericalSemigroup(s);[127X[104X
    [4X[28X286/101[128X[104X
  [4X[32X[104X
  
  [1X9.2-5 DeltaSetOfSetOfIntegers[101X
  
  [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 [27XDeltaSetOfSetOfIntegers(last);[127X[104X
    [4X[28X[ 2 ][128X[104X
  [4X[32X[104X
  
  [1X9.2-6 DeltaSetOfFactorizationsElementWRTNumericalSemigroup[101X
  
  [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 a nonnegative integer. 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[28X<Numerical semigroup with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XDeltaSetOfFactorizationsElementWRTNumericalSemigroup(1100,s);[127X[104X
    [4X[28X[ 1, 2 ][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.[133X
  
  [33X[0;0YComputes  the  bound  were  the  periodicity  starts  for  Delta sets of the
  elements in [3XS[103X; see [GGMFVT15].[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 a nonnegative 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 DeltaSetOfNumericalSemigroup[101X
  
  [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 [27XDeltaSetOfNumericalSemigroup(s);[127X[104X
    [4X[28X[ 2 ][128X[104X
    [4X[28X    [128X[104X
  [4X[32X[104X
  
  [1X9.2-12 MaximumDegreeOfElementWRTNumericalSemigroup[101X
  
  [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 [27XMaximumDegreeOfElementWRTNumericalSemigroup(1100,s);[127X[104X
    [4X[28X9[128X[104X
  [4X[32X[104X
  
  [1X9.2-13 MaximalDenumerantOfElementInNumericalSemigroup[101X
  
  [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 a positive integer. 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 [27XMaximalDenumerantOfElementInNumericalSemigroup(1100,s);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27XMaximalDenumerantOfElementInNumericalSemigroup(1311,s);[127X[104X
    [4X[28X2[128X[104X
  [4X[32X[104X
  
  [1X9.2-14 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-15 MaximalDenumerantOfNumericalSemigroup[101X
  
  [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 denumerant 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 [27XMaximalDenumerantOfNumericalSemigroup(s);[127X[104X
    [4X[28X4[128X[104X
  [4X[32X[104X
  
  [1X9.2-16 AdjustmentOfNumericalSemigroup[101X
  
  [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 [27XAdjustmentOfNumericalSemigroup(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[32X[104X
  
  [1X9.2-17 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 and [22Xord[122X
  stands for MaximumDegreeOfElementWRTNumericalSemigroup. For these semigroups
  [22Xgr_m(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-18 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, that is, it is
  symmetric, additive and whenever [22Xw+w'=f+m[122X (with [22Xm[122X the multiplicity and [22Xf[122X the
  Frobenius  number)  we  have  [22Xord(w+w')=ord(w)+ord(w')[122X, where [22Xord[122X stands for
  MaximumDegreeOfElementWRTNumericalSemigroup.[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
  
  
  [1X9.3 [33X[0;0YInvariants based on distances[133X[101X
  
  [1X9.3-1 CatenaryDegreeOfSetOfFactorizations[101X
  
  [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 [27XCatenaryDegreeOfSetOfFactorizations(last);[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 CatenaryDegreeOfElementInNumericalSemigroup[101X
  
  [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 [27XCatenaryDegreeOfElementInNumericalSemigroup(157,NumericalSemigroup(13,18));[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27XCatenaryDegreeOfElementInNumericalSemigroup(1157,NumericalSemigroup(13,18));[127X[104X
    [4X[28X18[128X[104X
  [4X[32X[104X
  
  [1X9.3-6 TameDegreeOfSetOfFactorizations[101X
  
  [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 [27XTameDegreeOfSetOfFactorizations(last);[127X[104X
    [4X[28X4[128X[104X
  [4X[32X[104X
  
  [1X9.3-7 CatenaryDegreeOfNumericalSemigroup[101X
  
  [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 [27XCatenaryDegreeOfNumericalSemigroup(s);[127X[104X
    [4X[28X8[128X[104X
  [4X[32X[104X
  
  [1X9.3-8 EqualPrimitiveElementsOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XEqualPrimitiveElementsOfNumericalSemigroup[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 [27XEqualPrimitiveElementsOfNumericalSemigroup(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 MonotonePrimitiveElementsOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XMonotonePrimitiveElementsOfNumericalSemigroup[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|le |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 [27XMonotonePrimitiveElementsOfNumericalSemigroup(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 TameDegreeOfNumericalSemigroup[101X
  
  [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 [27XTameDegreeOfNumericalSemigroup(s);[127X[104X
    [4X[28X14[128X[104X
  [4X[32X[104X
  
  [1X9.3-13 TameDegreeOfElementInNumericalSemigroup[101X
  
  [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[28X<Numerical semigroup with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XTameDegreeOfElementInNumericalSemigroup(100,s);[127X[104X
    [4X[28X5[128X[104X
  [4X[32X[104X
  
  
  [1X9.4 [33X[0;0YPrimality[133X[101X
  
  [1X9.4-1 OmegaPrimalityOfElementInNumericalSemigroup[101X
  
  [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 [BGSG11]. 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[28X<Numerical semigroup with 3 generators>[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 OmegaPrimalityOfNumericalSemigroup[101X
  
  [33X[1;0Y[29X[2XOmegaPrimalityOfNumericalSemigroup[102X( [3Xn[103X, [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 [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 ([GSOSRN13]). 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( [3Xn[103X, [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 [27XBettiElementsOfNumericalSemigroup(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 CatenaryDegreeOfSetOfFactorizations and
  FactorizationsInHomogenizationOfNumericalSemigroup.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=NumericalSemigroup(10,17,19);;[127X[104X
    [4X[25Xgap>[125X [27XCatenaryDegreeOfNumericalSemigroup(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 [22Xale_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
  
  [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,le_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 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[28X              [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)∣ nle x, x∈ S}[122X.[133X
  
  [33X[0;0YThe [22Xr[122Xth generalized distance is [22Xδ_S^r(n)={ #mathrmD(n_1,...,n_r) ∣ nle n_1 <
  ⋯ < n_r, n_i∈ S}[122X.[133X
  
  [1X9.7-1 FengRaoDistance[101X
  
  [33X[1;0Y[29X[2XFengRaoDistance[102X( [3XS[103X, [3Xr[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
  
