  
  [1m[4m[31m5. Constructing numerical semigroups from others[0m
  
  
  [1m[4m[31m5.1 Adding and removing elements of a numerical semigroup[0m
  
  In  this  section  we  show how to construct new numerical semigroups from a
  given  numerical semigroup. Two dual operations are presented. The first one
  removes  a  minimal  generator from a numerical semigroup. The second adds a
  special gap to a semigroup (see [JJ03]).
  
  [1m[4m[31m5.1-1 RemoveMinimalGeneratorFromNumericalSemigroup[0m
  
  [1m[34m> RemoveMinimalGeneratorFromNumericalSemigroup( [0m[22m[34mn, S[0m[1m[34m ) _____________[0mfunction
  
  [22m[34mS[0m is a numerical semigroup and [22m[34mn[0m is one if its minimal generators.
  
  The  output  is the numerical semigroup [22m[34mS[0m \[22m[34mn[0m (see [JJ03]; S\n is a numerical
  semigroup if and only if n is a minimal generator of S).
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> s:=NumericalSemigroup(3,5,7);[0m
    [22m[35m<Numerical semigroup with 3 generators>[0m
    [22m[35mgap> RemoveMinimalGeneratorFromNumericalSemigroup(7,s);[0m
    [22m[35m<Numerical semigroup with 3 generators>[0m
    [22m[35mgap> MinimalGeneratingSystemOfNumericalSemigroup(last);[0m
    [22m[35m[ 3, 5 ][0m
    [22m[35m[0m
    [22m[35m                        [0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m5.1-2 AddSpecialGapOfNumericalSemigroup[0m
  
  [1m[34m> AddSpecialGapOfNumericalSemigroup( [0m[22m[34mg, S[0m[1m[34m ) ________________________[0mfunction
  
  [22m[34mS[0m is a numerical semigroup and [22m[34mg[0m is a special gap of [22m[34mS[0m
  
  The  output  is  the  numerical  semigroup  [22m[34mS[0m  cup[22m[34mg[0m (see [JJ03], where it is
  explained why this set is a numerical semigroup).
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> s:=NumericalSemigroup(3,5,7);[0m
    [22m[35m<Numerical semigroup with 3 generators>[0m
    [22m[35mgap> s2:=RemoveMinimalGeneratorFromNumericalSemigroup(5,s);[0m
    [22m[35m<Numerical semigroup with 3 generators>[0m
    [22m[35mgap> s3:=AddSpecialGapOfNumericalSemigroup(5,s2);[0m
    [22m[35m<Numerical semigroup>[0m
    [22m[35mgap> SmallElementsOfNumericalSemigroup(s) =[0m
    [22m[35m> SmallElementsOfNumericalSemigroup(s3);[0m
    [22m[35mtrue                [0m
    [22m[35mgap> s=s3;[0m
    [22m[35mtrue[0m
    [22m[35m[0m
    [22m[35m                        [0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m5.1-3 IntersectionOfNumericalSemigroups[0m
  
  [1m[34m> IntersectionOfNumericalSemigroups( [0m[22m[34mS, T[0m[1m[34m ) ________________________[0mfunction
  
  [22m[34mS[0m  and  [22m[34mT[0m  are  numerical  semigroups.  Computes the intersection of [22m[34mS[0m and [22m[34mT[0m
  (which is a numerical semigroup).
  
  [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> T := NumericalSemigroup(2,17);[0m
    [22m[35m<Numerical semigroup with 2 generators>[0m
    [22m[35mgap> SmallElementsOfNumericalSemigroup(S);[0m
    [22m[35m[ 0, 11, 12, 13, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ][0m
    [22m[35mgap> SmallElementsOfNumericalSemigroup(T);[0m
    [22m[35m[ 0, 2, 4, 6, 8, 10, 12, 14, 16 ][0m
    [22m[35mgap> IntersectionOfNumericalSemigroups(S,T);[0m
    [22m[35m<Numerical semigroup>[0m
    [22m[35mgap> SmallElementsOfNumericalSemigroup(last);[0m
    [22m[35m[ 0, 12, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m5.1-4 QuotientOfNumericalSemigroup[0m
  
  [1m[34m> QuotientOfNumericalSemigroup( [0m[22m[34mS, n[0m[1m[34m ) _____________________________[0mfunction
  
  [22m[34mS[0m  is  a numerical semigroup and [22m[34mn[0m is an integer. Computes the quotient of [22m[34mS[0m
  by  [22m[34mn[0m,  that  is,  the  set  xin  N  |  nx  in S, which is again a numerical
  semigroup.  [22m[32mS / n[0m may be used as a short for [22m[32mQuotientOfNumericalSemigroup(S,
  n)[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> s:=NumericalSemigroup(3,29);[0m
    [22m[35m<Numerical semigroup with 2 generators>[0m
    [22m[35mgap> SmallElementsOfNumericalSemigroup(s);[0m
    [22m[35m[ 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 29, 30, 32, 33, 35, 36, 38, [0m
    [22m[35m  39, 41, 42, 44, 45, 47, 48, 50, 51, 53, 54, 56 ][0m
    [22m[35mgap> t:=QuotientOfNumericalSemigroup(s,7);[0m
    [22m[35m<Numerical semigroup>[0m
    [22m[35mgap> SmallElementsOfNumericalSemigroup(t);[0m
    [22m[35m[ 0, 3, 5, 6, 8 ][0m
    [22m[35mgap> u := s / 7;[0m
    [22m[35m<Numerical semigroup>[0m
    [22m[35mgap> SmallElementsOfNumericalSemigroup(u);[0m
    [22m[35m[ 0, 3, 5, 6, 8 ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  
  [1m[4m[31m5.2  Constructing  the  set  of  all numerical semigroups containing a given[0m
  [1m[4m[31mnumerical semigroup[0m
  
  In  order  to  construct  the set of numerical semigroups containing a fixed
  numerical  semigroup S, one first constructs its unitary extensions, that is
  to  say,  the  sets  Scupg  that  are numerical semigroups with g a positive
  integer. This is achieved by constructing the special gaps of the semigroup,
  and  then adding each of them to the numerical semigroup. Then we repeat the
  process for each of this new numerical semigroups until we reach N.
  
  These procedures are described in [JJ03].
  
  [1m[4m[31m5.2-1 OverSemigroupsNumericalSemigroup[0m
  
  [1m[34m> OverSemigroupsNumericalSemigroup( [0m[22m[34ms[0m[1m[34m ) ____________________________[0mfunction
  
  [22m[34ms[0m  is  a  numerical semigroup. The output is the set of numerical semigroups
  containing it.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> OverSemigroupsNumericalSemigroup(NumericalSemigroup(3,5,7));[0m
    [22m[35m[ <Numerical semigroup with 1 generators>, <Numerical semigroup>,[0m
    [22m[35m  <Numerical semigroup>, <Numerical semigroup with 3 generators> ][0m
    [22m[35m]][0m
    [22m[35m[0m
    [22m[35mgap> List(last,s->MinimalGeneratingSystemOfNumericalSemigroup(s));[0m
    [22m[35m[ [ 1 ], [ 3, 4, 5 ], [ 2, 3 ], [ 3, 5, 7 ] ][0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m5.2-2 NumericalSemigroupsWithFrobeniusNumber[0m
  
  [1m[34m> NumericalSemigroupsWithFrobeniusNumber( [0m[22m[34mf[0m[1m[34m ) ______________________[0mfunction
  
  [22m[34mf[0m  is an non zero integer greater than or equal to -1. The output is the set
  of  numerical  semigroups with Frobenius number [22m[34mf[0m. The algorithm implemented
  is given in [JM04].
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> Length(NumericalSemigroupsWithFrobeniusNumber(20));[0m
    [22m[35m900[0m
    [22m[35m[0m
    [22m[35m                        [0m
  [22m[35m------------------------------------------------------------------[0m
  
