Intersections, quotients, dilatations, numerical duplications and multiples by integers We provide functions to build numerical semigroups from others by means of intersections, quotients, multiples and related constructions. S and T are numerical semigroups. Computes the intersection of S and T (which is a numerical semigroup).
gap> S := NumericalSemigroup("modular", 5,53); <Modular numerical semigroup satisfying 5x mod 53 <= x > gap> T := NumericalSemigroup(2,17); <Numerical semigroup with 2 generators> gap> SmallElements(S); [ 0, 11, 12, 13, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ] gap> SmallElements(T); [ 0, 2, 4, 6, 8, 10, 12, 14, 16 ] gap> Intersection(S,T); <Numerical semigroup> gap> SmallElements(last); [ 0, 12, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ] gap> IntersectionOfNumericalSemigroups(S,T) = Intersection(S,T); true
S is a numerical semigroup and n is an integer. Computes the quotient of S by n, that is, the set \{ x\in {\mathbb N}\ |\ nx \in S\}, which is again a numerical semigroup. S / n may be used as a short for QuotientOfNumericalSemigroup(S, n).
gap> s:=NumericalSemigroup(3,29); <Numerical semigroup with 2 generators> gap> SmallElements(s); [ 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 29, 30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, 47, 48, 50, 51, 53, 54, 56 ] gap> t:=QuotientOfNumericalSemigroup(s,7); <Numerical semigroup> gap> SmallElements(t); [ 0, 3, 5, 6, 8 ] gap> u := s / 7; <Numerical semigroup> gap> SmallElements(u); [ 0, 3, 5, 6, 8 ]
S is a numerical semigroup, and a and b are positive integers. Computes a S\cup \{b,b+1,\to\}. If b is smaller than a c, with c the conductor of S, then a warning is displayed.
gap> N:=NumericalSemigroup(1);; gap> s:=MultipleOfNumericalSemigroup(N,4,20);; gap> SmallElements(s); [ 0, 4, 8, 12, 16, 20 ]
S is a numerical semigroup, and E and ideal of S, and b is a positive odd integer, so that 2S\cup (2E+b) is a numerical semigroup (this extends slightly the original definition where b was imposed to be in S, ; now the condition imposed is E+E+b\subseteq S). Computes 2S\cup (2E+b).
gap> s:=NumericalSemigroup(3,5,7); <Numerical semigroup with 3 generators> gap> e:=6+s; <Ideal of numerical semigroup> gap> ndup:=NumericalDuplication(s,e,3); <Numerical semigroup with 4 generators> gap> SmallElements(ndup); [ 0, 6, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24 ]
T is a numerical semigroup. Detects whether or not T can be expressed as NumericalDuplication(S,E,b), with E a proper ideal of S. Returns the list [S,E,b] if this is possible, and fail otherwise.

Notice that a numerical semigroup can be represented in different ways as a numerical duplication.
gap> s:=NumericalSemigroup(3,5,7);; gap> ndup:=NumericalDuplication(s,6+s,11);; gap> asdup:=AsNumericalDuplication(ndup); [ <Numerical semigroup with 3 generators>, <Ideal of numerical semigroup>, 3 ] gap> ndup = CallFuncList(NumericalDuplication,asdup); true
a and b are lists of positive integers, with k the length of a and b, and such that b[i+1]\ge a[i]b[i] (0\le i\le k-1). Computes inductively S_0=\mathbb N and S_{i+1}=a[i]S_i\cup \{a[i]b[i],a[i]b[i]+1,\to\}, and returns S_{k}.
gap> s:=InductiveNumericalSemigroup([4,2],[5,23]);; gap> SmallElements(s); [ 0, 8, 16, 24, 32, 40, 42, 44, 46 ]
S is a numerical semigroup, and a is a positive integer. If M is the maximal ideal of S, then a must be in M-2M. Computes the numerical semigroup \{0\} \cup \{a+s \mid s\in M\}, see .
gap> s:=NumericalSemigroup(3,4,5);; gap> m:=MaximalIdeal(s);; gap> SmallElements(m-2*m); [ -3 ] gap> d:=DilatationOfNumericalSemigroup(s,3); <Numerical semigroup> gap> SmallElements(d); [ 0, 6 ]