  
  [1m[4m[31m6. Irreducible numerical semigroups[0m
  
  
  [1m[4m[31m6.1 Irreducible numerical semigroups[0m
  
  An  irreducible  numerical semigroup is a semigroup that cannot be expressed
  as the intersection of numerical semigroups properly containing it.
  
  It  is not difficult to prove that a semigroup is irreducible if and only if
  it  is  maximal  (with respect to set inclusion) in the set of all numerical
  semigroup having its same Frobenius number (see [RB03]). Hence, according to
  [RH87]  (respectively  [VF97]),  symmetric  (respectively  pseudo-symmetric)
  numerical  semigroups  are  those  irreducible numerical semigroups with odd
  (respectively even) Frobenius number.
  
  In  [JJ03] it is shown that a numerical semigroup is irreducible if and only
  if it has only one special gap. We use this characterization.
  
  In this section we show how to construct the set of all numerical semigroups
  with  a  given Frobenius number. First we construct an irreducible numerical
  semigroup  with the given Frobenius number (as explained in [R04]), and then
  we construct the rest from it. That is why we have separated both functions.
  
  Every numerical semigroup can be expressed as an intersection of irreducible
  numerical  semigroups.  If S can be expressed as S=S_1cap cdotscap S_n, with
  S_i  irreducible numerical semigroups, and no factor can be removed, then we
  say  that  this  decomposition  is  minimal.  Minimal  decompositions can be
  computed by using Algorithm 26 in [JJ03].
  
  [1m[4m[31m6.1-1 IsIrreducibleNumericalSemigroup[0m
  
  [1m[34m> IsIrreducibleNumericalSemigroup( [0m[22m[34ms[0m[1m[34m ) _____________________________[0mfunction
  
  [22m[34ms[0m  is  a  numerical semigroup. The output is true if [22m[34ms[0m is irreducible, false
  otherwise.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> IsIrreducibleNumericalSemigroup(NumericalSemigroup(4,6,9));[0m
    [22m[35mtrue[0m
    [22m[35mgap> IsIrreducibleNumericalSemigroup(NumericalSemigroup(4,6,7,9));[0m
    [22m[35mfalse[0m
    [22m[35m[0m
    [22m[35m                        [0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m6.1-2 IsSymmetricNumericalSemigroup[0m
  
  [1m[34m> IsSymmetricNumericalSemigroup( [0m[22m[34ms[0m[1m[34m ) _______________________________[0mfunction
  
  [22m[34ms[0m  is  a  numerical  semigroup.  The output is true if [22m[34ms[0m is symmetric, false
  otherwise.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> IsSymmetricNumericalSemigroup(NumericalSemigroup(10,23));      [0m
    [22m[35mtrue            [0m
    [22m[35mgap> IsSymmetricNumericalSemigroup(NumericalSemigroup(10,11,23));[0m
    [22m[35mfalse[0m
    [22m[35m[0m
    [22m[35m                        [0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m6.1-3 IsPseudoSymmetricNumericalSemigroup[0m
  
  [1m[34m> IsPseudoSymmetricNumericalSemigroup( [0m[22m[34ms[0m[1m[34m ) _________________________[0mfunction
  
  [22m[34ms[0m  is  a  numerical  semigroup. The output is true if [22m[34ms[0m is pseudo-symmetric,
  false otherwise.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> IsPseudoSymmetricNumericalSemigroup(NumericalSemigroup(6,7,8,9,11));[0m
    [22m[35mtrue[0m
    [22m[35mgap> IsPseudoSymmetricNumericalSemigroup(NumericalSemigroup(4,6,9));[0m
    [22m[35mfalse[0m
    [22m[35m[0m
    [22m[35m                        [0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m6.1-4 AnIrreducibleNumericalSemigroupWithFrobeniusNumber[0m
  
  [1m[34m> AnIrreducibleNumericalSemigroupWithFrobeniusNumber( [0m[22m[34mf[0m[1m[34m ) __________[0mfunction
  
  [22m[34mf[0m  is  an  integer greater than or equal to -1. The output is an irreducible
  numerical  semigroup with frobenius number [22m[34m f[0m. From the way the procedure is
  implemented,  the  resulting  semigroup  has  at  most  four generators (see
  [R04]).
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> FrobeniusNumber(AnIrreducibleNumericalSemigroupWithFrobeniusNumber(28));[0m
    [22m[35m28[0m
    [22m[35m[0m
    [22m[35m                        [0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m6.1-5 IrreducibleNumericalSemigroupsWithFrobeniusNumber[0m
  
  [1m[34m> IrreducibleNumericalSemigroupsWithFrobeniusNumber( [0m[22m[34mf[0m[1m[34m ) ___________[0mfunction
  
  [22m[34mf[0m  is  an  integer greater than or equal to -1. The output is the set of all
  irreducible numerical semigroups with frobenius number [22m[34mf[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> Length(IrreducibleNumericalSemigroupsWithFrobeniusNumber(39));[0m
    [22m[35m227[0m
    [22m[35m[0m
    [22m[35m                        [0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31m6.1-6 DecomposeIntoIrreducibles[0m
  
  [1m[34m> DecomposeIntoIrreducibles( [0m[22m[34ms[0m[1m[34m ) ___________________________________[0mfunction
  
  [22m[34ms[0m  is  a  numerical  semigroup. The output is a set of irreducible numerical
  semigroups  containing  it. These elements appear in a minimal decomposition
  of [22m[34ms[0m as intersection into irreducibles.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> DecomposeIntoIrreducibles(NumericalSemigroup(5,6,8));[0m
    [22m[35m[ <Numerical semigroup>, <Numerical semigroup> ][0m
    [22m[35m[0m
    [22m[35m                        [0m
  [22m[35m------------------------------------------------------------------[0m
  
