  
  [1X3 Basic operations with numerical semigroups[0X
  
  
  [1X3.1 The definitions[0X
  
  [1X3.1-1 MultiplicityOfNumericalSemigroup[0m
  
  [2X> MultiplicityOfNumericalSemigroup( [0X[3XNS[0X[2X ) __________________________[0Xattribute
  
  [3XNS[0m  is  a  numerical semigroup. Returns the multiplicity of [3XNS[0m, which is the
  smallest positive integer belonging to [3XNS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> S := NumericalSemigroup("modular", 7,53);[0X
    [4X<Modular numerical semigroup satisfying 7x mod 53 <= x >[0X
    [4Xgap> MultiplicityOfNumericalSemigroup(S);[0X
    [4X8[0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.1-2 GeneratorsOfNumericalSemigroup[0m
  
  [2X> GeneratorsOfNumericalSemigroup( [0X[3XS[0X[2X ) ______________________________[0Xfunction
  [2X> GeneratorsOfNumericalSemigroupNC( [0X[3XS[0X[2X ) ____________________________[0Xfunction
  [2X> MinimalGeneratingSystemOfNumericalSemigroup( [0X[3XS[0X[2X ) ________________[0Xattribute
  
  [3XS[0m  is a numerical semigroup. [10XGeneratorsOfNumericalSemigroup[0m returns a set of
  generators  of [10XS[0m, which may not be minimal. [10XGeneratorsOfNumericalSemigroupNC[0m
  returns  the  set  of generators recorded in [10XS!.generators[0m, which may not be
  minimal. [10XMinimalGeneratingSystemOfNumericalSemigroup[0m returns the minimal set
  of generators of [10XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> S := NumericalSemigroup("modular", 5,53);[0X
    [4X<Modular numerical semigroup satisfying 5x mod 53 <= x >[0X
    [4Xgap> GeneratorsOfNumericalSemigroup(S);[0X
    [4X[ 11, 12, 13, 32, 53 ][0X
    [4Xgap> S := NumericalSemigroup(3, 5, 53);[0X
    [4X<Numerical semigroup with 3 generators>[0X
    [4Xgap> GeneratorsOfNumericalSemigroup(S);[0X
    [4X[ 3, 5, 53 ][0X
    [4Xgap> MinimalGeneratingSystemOfNumericalSemigroup(S);[0X
    [4X[ 3, 5 ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.1-3 SmallElementsOfNumericalSemigroup[0m
  
  [2X> SmallElementsOfNumericalSemigroup( [0X[3XNS[0X[2X ) _________________________[0Xattribute
  
  [10XNS[0m is a numerical semigroup. It returns the list of small elements of [10XNS[0m. Of
  course,  the  time  consumed  to  return  a result may depend on the way the
  semigroup is given.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> SmallElementsOfNumericalSemigroup(NumericalSemigroup(3,5,7));[0X
    [4X[ 0, 3, 5 ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.1-4 FirstElementsOfNumericalSemigroup[0m
  
  [2X> FirstElementsOfNumericalSemigroup( [0X[3Xn, NS[0X[2X ) _______________________[0Xfunction
  
  [10XNS[0m  is  a numerical semigroup. It returns the list with the first [3Xn[0m elements
  of [10XNS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> FirstElementsOfNumericalSemigroup(2,NumericalSemigroup(3,5,7));[0X
    [4X[ 0, 3 ][0X
    [4Xgap> FirstElementsOfNumericalSemigroup(10,NumericalSemigroup(3,5,7));[0X
    [4X[ 0, 3, 5, 6, 7, 8, 9, 10, 11, 12 ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.1-5 AperyListOfNumericalSemigroupWRTElement[0m
  
  [2X> AperyListOfNumericalSemigroupWRTElement( [0X[3XS, m[0X[2X ) _________________[0Xoperation
  
  [3XS[0m  is  a  numerical semigroup and [3Xm[0m is a positive element of [3XS[0m. Computes the
  Apéry  list  of [3XS[0m wrt [3Xm[0m. It contains for every iin {0,...,[3Xm[0m-1}, in the i+1th
  position, the smallest element in the semigroup congruent with i modulo [3Xm[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> S := NumericalSemigroup("modular", 5,53);[0X
    [4X<Modular numerical semigroup satisfying 5x mod 53 <= x >[0X
    [4Xgap> AperyListOfNumericalSemigroupWRTElement(S,12);[0X
    [4X[ 0, 13, 26, 39, 52, 53, 54, 43, 32, 33, 22, 11 ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.1-6 DrawAperyListOfNumericalSemigroup[0m
  
  [2X> DrawAperyListOfNumericalSemigroup( [0X[3Xap[0X[2X ) __________________________[0Xfunction
  
  [3Xap[0m is the Apéry list of a numerical semigroup. This function draws the graph
  (ap,  E)  where  the  edge  u  ->  v is in E iff v - u is in ap. To use this
  function,  [10XGraphviz[0m  ([7Xhttp://www.graphviz.org[0m)  should be installed and also
  [10XEvince[0m         ([7Xhttp://www.gnome.org/projects/evince/[0m)         or        [10Xggv[0m
  ([7Xhttp://directory.fsf.org/ggv.html[0m).
  
  [1X3.1-7 AperyListOfNumericalSemigroupAsGraph[0m
  
  [2X> AperyListOfNumericalSemigroupAsGraph( [0X[3Xap[0X[2X ) _______________________[0Xfunction
  
  [3Xap[0m  is  the  Apéry  list of a numerical semigroup. This function returns the
  adjacency  list of the graph (ap, E) where the edge u -> v is in E iff v - u
  is in ap. The 0 is ignored.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> s:=NumericalSemigroup(3,7);[0X
    [4X<Numerical semigroup with 2 generators>[0X
    [4Xgap> AperyListOfNumericalSemigroupWRTElement(s,10);[0X
    [4X[ 0, 21, 12, 3, 14, 15, 6, 7, 18, 9 ][0X
    [4Xgap> AperyListOfNumericalSemigroupAsGraph(last);[0X
    [4X[ ,, [ 3, 6, 9, 12, 15, 18, 21 ],,, [ 6, 9, 12, 15, 18, 21 ],[0X
    [4X[ 7, 14, 21 ],, [ 9, 12, 15, 18, 21 ],,, [ 12, 15, 18, 21 ],,[0X
    [4X[ 14, 21 ], [ 15, 18, 21 ],,, [ 18, 21 ],,, [ 21 ] ][0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X3.2 Frobenius Number[0X
  
  The  largest nonnegative integer not belonging to a numerical semigroup S is
  the  [13XFrobenius  number[0m  of  S. If S is the set of nonnegative integers, then
  clearly its Frobenius number is -1, otherwise its Frobenius number coincides
  with  the  maximum of the gaps (or fundamental gaps) of S. An integer z is a
  [13Xpseudo-Frobenius number[0m of S if z+S\{0}subseteq S.
  
  [1X3.2-1 FrobeniusNumberOfNumericalSemigroup[0m
  
  [2X> FrobeniusNumberOfNumericalSemigroup( [0X[3XNS[0X[2X ) _______________________[0Xattribute
  
  [10XNS[0m  is  a  numerical  semigroup.  It  returns the Frobenius number of [10XNS[0m. Of
  course,  the  time  consumed  to  return  a result may depend on the way the
  semigroup is given or on the knowledge already produced on the semigroup.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> FrobeniusNumberOfNumericalSemigroup(NumericalSemigroup(3,5,7));[0X
    [4X4[0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.2-2 FrobeniusNumber[0m
  
  [2X> FrobeniusNumber( [0X[3XNS[0X[2X ) ___________________________________________[0Xattribute
  
  This is just a synonym of [2XFrobeniusNumberOfNumericalSemigroup[0m ([14X3.2-1[0m).
  
  [1X3.2-3 PseudoFrobeniusOfNumericalSemigroup[0m
  
  [2X> PseudoFrobeniusOfNumericalSemigroup( [0X[3XS[0X[2X ) ________________________[0Xattribute
  
  [10XS[0m is a numerical semigroup. It returns set of pseudo-Frobenius numbers of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> S := NumericalSemigroup("modular", 5,53);[0X
    [4X<Modular numerical semigroup satisfying 5x mod 53 <= x >[0X
    [4Xgap> PseudoFrobeniusOfNumericalSemigroup(S);[0X
    [4X[ 21, 40, 41, 42 ][0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X3.3 Gaps[0X
  
  A  [13Xgap[0m  of a numerical semigroup S is a nonnegative integer not belonging to
  S. The [13Xfundamental gaps[0m of S are those gaps that are maximal with respect to
  the  partial order induced by division in N. The [13Xspecial gaps[0m of a numerical
  semigroup  S,  are those fundamental gaps such that if they are added to the
  given  numerical  semigroup,  then  the  resulting  set is again a numerical
  semigroup.
  
  [1X3.3-1 GapsOfNumericalSemigroup[0m
  
  [2X> GapsOfNumericalSemigroup( [0X[3XNS[0X[2X ) __________________________________[0Xattribute
  
  [10XNS[0m is a numerical semigroup. It returns the set of gaps of [10XNS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> GapsOfNumericalSemigroup(NumericalSemigroup(3,5,7));[0X
    [4X[ 1, 2, 4 ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.3-2 FundamentalGapsOfNumericalSemigroup[0m
  
  [2X> FundamentalGapsOfNumericalSemigroup( [0X[3XS[0X[2X ) ________________________[0Xattribute
  
  [10XS[0m is a numerical semigroup. It returns the set of fundamental gaps of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> S := NumericalSemigroup("modular", 5,53);[0X
    [4X<Modular numerical semigroup satisfying 5x mod 53 <= x >[0X
    [4Xgap> FundamentalGapsOfNumericalSemigroup(S);[0X
    [4X[ 16, 17, 18, 19, 27, 28, 29, 30, 31, 40, 41, 42 ][0X
    [4Xgap> GapsOfNumericalSemigroup(S);[0X
    [4X[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29,[0X
    [4X  30, 31, 40, 41, 42 ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X3.3-3 SpecialGapsOfNumericalSemigroup[0m
  
  [2X> SpecialGapsOfNumericalSemigroup( [0X[3XS[0X[2X ) ____________________________[0Xattribute
  
  [10XS[0m is a numerical semigroup. It returns the special gaps of [3XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xgap> S := NumericalSemigroup("modular", 5,53);[0X
    [4X<Modular numerical semigroup satisfying 5x mod 53 <= x >[0X
    [4Xgap> SpecialGapsOfNumericalSemigroup(S);[0X
    [4X[ 40, 41, 42 ][0X
  [4X------------------------------------------------------------------[0X
  
