Intersections, and quotients 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, T are numerical semigroups. The output is the set S\setminus T.
gap> ns1 := NumericalSemigroup(5,7);; gap> ns2 := NumericalSemigroup(7,11,12);; gap> Difference(ns1,ns2); [ 5, 10, 15, 17, 20, 27 ] gap> Difference(ns2,ns1); [ 11, 18, 23 ] gap> DifferenceOfNumericalSemigroups(ns2,ns1); [ 11, 18, 23 ]
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 ]
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 ]