  
  [1m[4m[31m3. Basic operations with numerical semigroups[0m
  
  
  [1m[4m[31m3.1 The definitions[0m
  
  [1m[4m[31m3.1-1 MultiplicityOfNumericalSemigroup[0m
  
  [1m[34m> MultiplicityOfNumericalSemigroup( [0m[22m[34mNS[0m[1m[34m ) __________________________[0mattribute
  
  [22m[34mNS[0m  is  a  numerical semigroup. Returns the multiplicity of [22m[34mNS[0m, which is the
  smallest positive integer belonging to [22m[34mNS[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> S := NumericalSemigroup("modular", 7,53);[0m
    [22m[35m<Modular numerical semigroup satisfying 7x mod 53 <= x >[0m
    [22m[35mgap> MultiplicityOfNumericalSemigroup(S);[0m
    [22m[35m8[0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m3.1-2 GeneratorsOfNumericalSemigroup[0m
  
  [1m[34m> GeneratorsOfNumericalSemigroup( [0m[22m[34mS[0m[1m[34m ) ______________________________[0mfunction
  [1m[34m> GeneratorsOfNumericalSemigroupNC( [0m[22m[34mS[0m[1m[34m ) ____________________________[0mfunction
  [1m[34m> MinimalGeneratingSystemOfNumericalSemigroup( [0m[22m[34mS[0m[1m[34m ) ________________[0mattribute
  
  [22m[34mS[0m  is a numerical semigroup. [22m[32mGeneratorsOfNumericalSemigroup[0m returns a set of
  generators  of [22m[32mS[0m, which may not be minimal. [22m[32mGeneratorsOfNumericalSemigroupNC[0m
  returns  the  set  of generators recorded in [22m[32mS!.generators[0m, which may not be
  minimal. [22m[32mMinimalGeneratingSystemOfNumericalSemigroup[0m returns the minimal set
  of generators of [22m[32mS[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> S := NumericalSemigroup("modular", 5,53);[0m
    [22m[35m<Modular numerical semigroup satisfying 5x mod 53 <= x >[0m
    [22m[35mgap> GeneratorsOfNumericalSemigroup(S);[0m
    [22m[35m[ 11, 12, 13, 32, 53 ][0m
    [22m[35mgap> S := NumericalSemigroup(3, 5, 53);[0m
    [22m[35m<Numerical semigroup with 3 generators>[0m
    [22m[35mgap> GeneratorsOfNumericalSemigroup(S);[0m
    [22m[35m[ 3, 5, 53 ][0m
    [22m[35mgap> MinimalGeneratingSystemOfNumericalSemigroup(S);[0m
    [22m[35m[ 3, 5 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m3.1-3 SmallElementsOfNumericalSemigroup[0m
  
  [1m[34m> SmallElementsOfNumericalSemigroup( [0m[22m[34mNS[0m[1m[34m ) _________________________[0mattribute
  
  [22m[32mNS[0m is a numerical semigroup. It returns the list of small elements of [22m[32mNS[0m. Of
  course,  the  time  consumed  to  return  a result may depend on the way the
  semigroup is given.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> SmallElementsOfNumericalSemigroup(NumericalSemigroup(3,5,7));[0m
    [22m[35m[ 0, 3, 5 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m3.1-4 FirstElementsOfNumericalSemigroup[0m
  
  [1m[34m> FirstElementsOfNumericalSemigroup( [0m[22m[34mn, NS[0m[1m[34m ) _______________________[0mfunction
  
  [22m[32mNS[0m  is  a numerical semigroup. It returns the list with the first [22m[34mn[0m elements
  of [22m[32mNS[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> FirstElementsOfNumericalSemigroup(2,NumericalSemigroup(3,5,7));[0m
    [22m[35m[ 0, 3 ][0m
    [22m[35mgap> FirstElementsOfNumericalSemigroup(10,NumericalSemigroup(3,5,7));[0m
    [22m[35m[ 0, 3, 5, 6, 7, 8, 9, 10, 11, 12 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m3.1-5 AperyListOfNumericalSemigroupWRTElement[0m
  
  [1m[34m> AperyListOfNumericalSemigroupWRTElement( [0m[22m[34mS, m[0m[1m[34m ) _________________[0moperation
  
  [22m[34mS[0m  is  a  numerical semigroup and [22m[34mm[0m is a positive element of [22m[34mS[0m. Computes the
  Apry  list  of  [22m[34mS[0m  wrt [22m[34mm[0m. It contains for every iin 0,...,[22m[34mm[0m-1, in the i+1th
  position, the smallest element in the semigroup congruent with i modulo [22m[34mm[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> S := NumericalSemigroup("modular", 5,53);[0m
    [22m[35m<Modular numerical semigroup satisfying 5x mod 53 <= x >[0m
    [22m[35mgap> AperyListOfNumericalSemigroupWRTElement(S,12);[0m
    [22m[35m[ 0, 13, 26, 39, 52, 53, 54, 43, 32, 33, 22, 11 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m3.1-6 DrawAperyListOfNumericalSemigroup[0m
  
  [1m[34m> DrawAperyListOfNumericalSemigroup( [0m[22m[34map[0m[1m[34m ) __________________________[0mfunction
  
  [22m[34map[0m is the Apry 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,  [22m[32mGraphviz[0m  ([34mhttp://www.graphviz.org[0m)  should be installed and also
  [22m[32mEvince[0m         ([34mhttp://www.gnome.org/projects/evince/[0m)         or        [22m[32mggv[0m
  ([34mhttp://directory.fsf.org/ggv.html[0m).
  
  [1m[4m[31m3.1-7 AperyListOfNumericalSemigroupAsGraph[0m
  
  [1m[34m> AperyListOfNumericalSemigroupAsGraph( [0m[22m[34map[0m[1m[34m ) _______________________[0mfunction
  
  [22m[34map[0m  is  the  Apry  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.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> s:=NumericalSemigroup(3,7);[0m
    [22m[35m<Numerical semigroup with 2 generators>[0m
    [22m[35mgap> AperyListOfNumericalSemigroupWRTElement(s,10);[0m
    [22m[35m[ 0, 21, 12, 3, 14, 15, 6, 7, 18, 9 ][0m
    [22m[35mgap> AperyListOfNumericalSemigroupAsGraph(last);[0m
    [22m[35m[ ,, [ 3, 6, 9, 12, 15, 18, 21 ],,, [ 6, 9, 12, 15, 18, 21 ],[0m
    [22m[35m[ 7, 14, 21 ],, [ 9, 12, 15, 18, 21 ],,, [ 12, 15, 18, 21 ],,[0m
    [22m[35m[ 14, 21 ], [ 15, 18, 21 ],,, [ 18, 21 ],,, [ 21 ] ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  
  [1m[4m[31m3.2 Frobenius Number[0m
  
  The  largest nonnegative integer not belonging to a numerical semigroup S is
  the  [22m[36mFrobenius  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
  [22m[36mpseudo-Frobenius number[0m of S if z+S\0subseteq S.
  
  [1m[4m[31m3.2-1 FrobeniusNumberOfNumericalSemigroup[0m
  
  [1m[34m> FrobeniusNumberOfNumericalSemigroup( [0m[22m[34mNS[0m[1m[34m ) _______________________[0mattribute
  
  [22m[32mNS[0m  is  a  numerical  semigroup.  It  returns the Frobenius number of [22m[32mNS[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.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> FrobeniusNumberOfNumericalSemigroup(NumericalSemigroup(3,5,7));[0m
    [22m[35m4[0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m3.2-2 FrobeniusNumber[0m
  
  [1m[34m> FrobeniusNumber( [0m[22m[34mNS[0m[1m[34m ) ___________________________________________[0mattribute
  
  This is just a synonym of [1m[34mFrobeniusNumberOfNumericalSemigroup[0m ([1m3.2-1[0m).
  
  [1m[4m[31m3.2-3 PseudoFrobeniusOfNumericalSemigroup[0m
  
  [1m[34m> PseudoFrobeniusOfNumericalSemigroup( [0m[22m[34mS[0m[1m[34m ) ________________________[0mattribute
  
  [22m[32mS[0m is a numerical semigroup. It returns set of pseudo-Frobenius numbers of [22m[34mS[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> S := NumericalSemigroup("modular", 5,53);[0m
    [22m[35m<Modular numerical semigroup satisfying 5x mod 53 <= x >[0m
    [22m[35mgap> PseudoFrobeniusOfNumericalSemigroup(S);[0m
    [22m[35m[ 21, 40, 41, 42 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  
  [1m[4m[31m3.3 Gaps[0m
  
  A  [22m[36mgap[0m  of a numerical semigroup S is a nonnegative integer not belonging to
  S. The [22m[36mfundamental gaps[0m of S are those gaps that are maximal with respect to
  the  partial order induced by division in N. The [22m[36mspecial 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.
  
  [1m[4m[31m3.3-1 GapsOfNumericalSemigroup[0m
  
  [1m[34m> GapsOfNumericalSemigroup( [0m[22m[34mNS[0m[1m[34m ) __________________________________[0mattribute
  
  [22m[32mNS[0m is a numerical semigroup. It returns the set of gaps of [22m[32mNS[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> GapsOfNumericalSemigroup(NumericalSemigroup(3,5,7));[0m
    [22m[35m[ 1, 2, 4 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m3.3-2 FundamentalGapsOfNumericalSemigroup[0m
  
  [1m[34m> FundamentalGapsOfNumericalSemigroup( [0m[22m[34mS[0m[1m[34m ) ________________________[0mattribute
  
  [22m[32mS[0m is a numerical semigroup. It returns the set of fundamental gaps of [22m[34mS[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> S := NumericalSemigroup("modular", 5,53);[0m
    [22m[35m<Modular numerical semigroup satisfying 5x mod 53 <= x >[0m
    [22m[35mgap> FundamentalGapsOfNumericalSemigroup(S);[0m
    [22m[35m[ 16, 17, 18, 19, 27, 28, 29, 30, 31, 40, 41, 42 ][0m
    [22m[35mgap> GapsOfNumericalSemigroup(S);[0m
    [22m[35m[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29,[0m
    [22m[35m  30, 31, 40, 41, 42 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m3.3-3 SpecialGapsOfNumericalSemigroup[0m
  
  [1m[34m> SpecialGapsOfNumericalSemigroup( [0m[22m[34mS[0m[1m[34m ) ____________________________[0mattribute
  
  [22m[32mS[0m is a numerical semigroup. It returns the special gaps of [22m[34mS[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> S := NumericalSemigroup("modular", 5,53);[0m
    [22m[35m<Modular numerical semigroup satisfying 5x mod 53 <= x >[0m
    [22m[35mgap> SpecialGapsOfNumericalSemigroup(S);[0m
    [22m[35m[ 40, 41, 42 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
