  
  [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 lenght 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 lenghts 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 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  elment [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  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 [CGLPR06] for numerical semigroup (see [CGD07]).
  The  computation  of  the  elascitiy 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-1 FactorizationsIntegerWRTList[101X
  
  [29X[2XFactorizationsIntegerWRTList[102X( [3Xn[103X, [3Xls[103X ) [32X function
  
  [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
  
  [29X[2XFactorizationsElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function
  
  [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 LengthsOfFactorizationsIntegerWRTList[101X
  
  [29X[2XLengthsOfFactorizationsIntegerWRTList[102X( [3Xn[103X, [3Xls[103X ) [32X function
  
  [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.1-4 RClassesOfSetOfFactorizations[101X
  
  [29X[2XRClassesOfSetOfFactorizations[102X( [3Xls[103X ) [32X function
  
  [33X[0;0Y[3Xls[103X  is a set of factorizations (a list of lists of nonnegative integers with
  the  same lenght). 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 [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 LengthsOfFactorizationsElementWRTNumericalSemigroup[101X
  
  [29X[2XLengthsOfFactorizationsElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function
  
  [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.1-6 ElasticityOfFactorizationsElementWRTNumericalSemigroup[101X
  
  [29X[2XElasticityOfFactorizationsElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function
  
  [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.1-7 ElasticityOfNumericalSemigroup[101X
  
  [29X[2XElasticityOfNumericalSemigroup[102X( [3XS[103X ) [32X function
  
  [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.1-8 DeltaSetOfSetOfIntegers[101X
  
  [29X[2XDeltaSetOfSetOfIntegers[102X( [3Xls[103X ) [32X function
  
  [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.1-9 DeltaSetOfFactorizationsElementWRTNumericalSemigroup[101X
  
  [29X[2XDeltaSetOfFactorizationsElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function
  
  [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.1-10 MaximumDegreeOfElementWRTNumericalSemigroup[101X
  
  [29X[2XMaximumDegreeOfElementWRTNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function
  
  [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.1-11 CatenaryDegreeOfSetOfFactorizations[101X
  
  [29X[2XCatenaryDegreeOfSetOfFactorizations[102X( [3Xls[103X ) [32X function
  
  [33X[0;0Y[3Xls[103X  is a set of factorizations (a list of lists of nonnegative integers with
  the  same  lenght).  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.1-12 CatenaryDegreeOfNumericalSemigroup[101X
  
  [29X[2XCatenaryDegreeOfNumericalSemigroup[102X( [3XS[103X ) [32X function
  
  [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.1-13 CatenaryDegreeOfElementInNumericalSemigroup[101X
  
  [29X[2XCatenaryDegreeOfElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function
  
  [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.1-14 TameDegreeOfSetOfFactorizations[101X
  
  [29X[2XTameDegreeOfSetOfFactorizations[102X( [3Xls[103X ) [32X function
  
  [33X[0;0Y[3Xls[103X  is a set of factorizations (a list of lists of nonnegative integers with
  the   same   lenght).  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 ], [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ],[128X[104X
    [4X[28X  [ 1, 1, 0, 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XTameDegreeOfSetOfFactorizations(last);[127X[104X
    [4X[28X4[128X[104X
  [4X[32X[104X
  
  [1X9.1-15 TameDegreeOfNumericalSemigroup[101X
  
  [29X[2XTameDegreeOfNumericalSemigroup[102X( [3XS[103X ) [32X function
  
  [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.1-16 TameDegreeOfElementInNumericalSemigroup[101X
  
  [29X[2XTameDegreeOfElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function
  
  [33X[0;0Y[3Xn[103X  is  an elment 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.1-17 OmegaPrimalityOfElementInNumericalSemigroup[101X
  
  [29X[2XOmegaPrimalityOfElementInNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function
  
  [33X[0;0Y[3Xn[103X  is  an elment of the numerical semigroup [3XS[103X. The output is the [22Xω[122X-primality
  of [3Xn[103X in [3XS[103X as explained in [BGG10].[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.1-18 OmegaPrimalityOfNumericalSemigroup[101X
  
  [29X[2XOmegaPrimalityOfNumericalSemigroup[102X( [3Xn[103X, [3XS[103X ) [32X function
  
  [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
  
