Irreducible numerical semigroups 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 ). Hence, according to (respectively ), symmetric (respectively pseudo-symmetric) numerical semigroups are those irreducible numerical semigroups with odd (respectively even) Frobenius number.

In it is shown that a nontrivial 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. In old versions of the package, we first constructed an irreducible numerical semigroup with the given Frobenius number (as explained in ), and then we constructed the rest from it. That is why we separated both functions. The present version uses a faster procedure presented in .

Every numerical semigroup can be expressed as an intersection of irreducible numerical semigroups. If S can be expressed as S=S_1\cap \cdots\cap 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 .

s is a numerical semigroup. The output is true if s is irreducible, false otherwise.
gap> IsIrreducibleNumericalSemigroup(NumericalSemigroup(4,6,9)); true gap> IsIrreducibleNumericalSemigroup(NumericalSemigroup(4,6,7,9)); false
s is a numerical semigroup. The output is true if s is symmetric, false otherwise.
gap> IsSymmetricNumericalSemigroup(NumericalSemigroup(10,23)); true gap> IsSymmetricNumericalSemigroup(NumericalSemigroup(10,11,23)); false
s is a numerical semigroup. The output is true if s is pseudo-symmetric, false otherwise.
gap> IsPseudoSymmetricNumericalSemigroup(NumericalSemigroup(6,7,8,9,11)); true gap> IsPseudoSymmetricNumericalSemigroup(NumericalSemigroup(4,6,9)); false
f is an integer greater than or equal to -1. The output is an irreducible numerical semigroup with frobenius number f. From the way the procedure is implemented, the resulting semigroup has at most four generators (see ).
gap> FrobeniusNumber(AnIrreducibleNumericalSemigroupWithFrobeniusNumber(28)); 28
f is an integer greater than or equal to -1. The output is the set of all irreducible numerical semigroups with frobenius number f.
gap> Length(IrreducibleNumericalSemigroupsWithFrobeniusNumber(39)); 227
s is a numerical semigroup. The output is a set of irreducible numerical semigroups containing it. These elements appear in a minimal decomposition of s as intersection into irreducibles.
gap> DecomposeIntoIrreducibles(NumericalSemigroup(5,6,8)); [ <Numerical semigroup>, <Numerical semigroup> ]