`NumericalSgps`

`GAP`

packageWe load `NumericalSgps`

with `LoadPackage("numericalsgps");`

. When pressing the "run" button, be patient, binder may take some time to start.

gap> LoadPackage("num");

We start by defining a numerical semigroup. There are many ways to do this depending on the information we have about it. If we know a system of generators, then we can do the following. We will store the semigroup in a variable called `s`.

gap> s:=NumericalSemigroup(3,5,7);

Indeed, \(\{3,5,7\}\) is a minimal generating set for `s`.

gap> MinimalGenerators(s);

Membership can be detected with `in`:

gap> 1 in s; gap> 100 in s;

The set of sporadic elements (elements up to the conductor, or small elements) of the semigroup are

gap> SmallElements(s); gap> Conductor(s); gap> FrobeniusNumber(s);

This is also showing us the sets of gaps of `s`

gap> Gaps(s); gap> Genus(s);

Recall that from the Apéry sets, one can retreive all this information.

gap> AperyList(s);

If only the semigroup is given as argument, then the Apéry set is computed with respect to the multiplicity. Note that the output is a list, in the $i$th position we find the smallest element in `s` congruent with $i$ modulo the multiplicity (or the given element we specify as second argument).

gap> AperyList(s,10);

It is well know that if the second argument is in the semigroup, then the output will have length precisely this argument. It not, the we get some extra elements.

gap> AperyList(s,6);

The set of pseudo-Frobenius numbers can be computed as follows.

gap> PseudoFrobeniusOfNumericalSemigroup(s); gap> Type(s);

Let us for instance check that Wilf's conjecture holds for all numerical semigroups with conductor equal to 20 (and thus Frobenius number 19).

gap> ForAll(NumericalSemigroupsWithFrobeniusNumber(19), > s->20<=EmbeddingDimension(s)*(Length(SmallElements(s))-1)); true

We are substracting one to the number of small elements since we consider the conductor as small element.

The special gaps (those that can be use to extend the semigroup to another numerical semigroup) are

gap> SpecialGaps(s); [ 4 ] gap> t:=AddSpecialGapOfNumericalSemigroup(4,s);And the set of all oversemigroups:gap> SmallElements(t); [ 0, 3 ]

gap> OverSemigroupsNumericalSemigroup(s); gap> List(last,MinimalGenerators);

The set of fundamental gaps, is computed as follows. We can use fundamental gaps to define semigroups.

gap> FundamentalGaps(s); gap> NumericalSemigroupByFundamentalGaps([4])=s;

As we can do with small elements and gaps.

gap> NumericalSemigroupByGaps(Gaps(s))=s; true gap> NumericalSemigroupBySmallElements(SmallElements(s))=s; true

Our semigroup example `s` is not symmetric, but it is pseudo-symmetric.

gap> IsIrreducible(s); true gap> IsSymmetric(s); false

Symmetric numerical semigroups have type one, whole pseudo-symmetric have type equal to two.

gap> List(IrreducibleNumericalSemigroupsWithFrobeniusNumber(19), > MinimalGenerators);

Every numerical semigroup can be expressed (though not uniquely) as the intersection of irreducible numerical semigroups.

gap> t:=NumericalSemigroup(10,11,12,13); gap> List(DecomposeIntoIrreducibles(t),MinimalGenerators);

We can actually find all oversemigroups of `t` that are irreducible.

gap> o:=OverSemigroupsNumericalSemigroup(t);; gap> oi:=Filtered(o,IsIrreducible);; gap> Length(oi); 35 gap> t=Intersection(oi); true

There are some special families of symmetric numerical semigroups, as complete intersections, free, telescopic, ...

gap> s:=NumericalSemigroup(4,6,9); gap> IsFree(s); true gap> lf:=FreeNumericalSemigroupsWithFrobeniusNumber(19);; gap> List(lf,MinimalGenerators);

We can construct almost symmetric numerical semigruops from irreducible numerical semigroups by removing some of its elements.

gap> AlmostSymmetricNumericalSemigroupsFromIrreducible(s); gap> List(last,MinimalGenerators);

Actually, one can compute with this idea the set of all almost symmetric numerical semigroups with given Frobenius number.

gap> t:=First(AlmostSymmetricNumericalSemigroupsWithFrobeniusNumber(19), > s->not(IsIrreducible(s))); gap> MinimalGenerators(t); gap> Genus(t)=(FrobeniusNumber(t)+Type(t))/2;

An ideal of a numerical semigroup can be defined by means of a generating system.

gap> s:=NumericalSemigroup(6,9,20); gap> i:=[2,3]+s; gap> MinimalGenerators(i);

The above ideal is not included in its ambient semigroup, and so it is not integral.

gap> IsIntegral(i); gap> AmbientNumericalSemigroupOfIdeal(i);

We can check membership with `in`.

gap> 8 in s; false gap> 8 in i; true

Ideals also have conductors, since they are unions of translations of numerical semigroups.

gap> Conductor(i); gap> SmallElements(i);

The basic operations include intersection, sum, addition, translations and difference.

gap> j:=10+s; gap> i+j; gap> MinimalGenerators(i+j); gap> MinimalGenerators(10+i); gap> Difference(i,j); gap> MinimalGenerators(Intersection(i,j));

The colon operation of ideals of rings translates in ideals of numerical semigroups to \(I-J=\{z\in \mathbb{Z} \mid z+J\subseteq I\}\).

gap> MinimalGenerators(i-j);

There are a couple of special ideals, one is the maximal ideal and the other the canonical (unique up to translations).

gap> m:=MaximalIdealOfNumericalSemigroup(s); gap> c:=CanonicalIdealOfNumericalSemigroup(s); gap> c-(c-i)=i; gap> MinimalGenerators(m); gap> MinimalGenerators(c); gap> IsCanonicalIdeal(10+c);

The blow up of an ideal $I$ of a numerical semigroup \(S\) is defined as \(\bigcup_{n\in \mathbb{N}}(nI-nI)\).

gap> MinimalGenerators(BlowUpIdealOfNumericalSemigroup(i)); gap> List([1..10], n->HilbertFunctionOfIdealOfNumericalSemigroup(n,i));

If the ideal is the maximal ideal, then it coincides with the Lipman semigroup of \(S\).

gap> MinimalGenerators(BlowUpOfNumericalSemigroup(s)); gap> LipmanSemigroup(s); gap> MinimalGenerators(last);

One can keep computing Lipman semigroups until we reach \(\mathbb{N}\), and the multiplicities of these semigroups conform the multiplicity sequence of \(S\)

gap> MultiplicitySequenceOfNumericalSemigroup(s);

gap> s:=NumericalSemigroup(6,9,20); gap> FactorizationsElementWRTNumericalSemigroup(36,s);

And the set of \(\mathcal{R}\)-classes as

gap> RClassesOfSetOfFactorizations(last);

The set of Betti elements is

gap> BettiElementsOfNumericalSemigroup(s);

And a minimal presentation is obtained with

gap> MinimalPresentationOfNumericalSemigroup(s);Recall that we can produce this also by using elimination.

gap> x:=Indeterminate(Rationals,"x");; gap> y:=Indeterminate(Rationals,"y");; gap> z:=Indeterminate(Rationals,"z");; gap> t:=Indeterminate(Rationals,"t");; gap> R:=PolynomialRing(Rationals,[x,y,z,t]); gap> i:=Ideal(R,[x-t^6,y-t^9,z-t^20]); gap> GroebnerBasis(i,EliminationOrdering([t]));The graph $G_n$ can be calculated in the following way.

gap> GraphAssociatedToElementInNumericalSemigroup(60,s);In this example, it has three vertices and a single edge. We can also calculate the shaded set of an element.

gap> ShadedSetOfElementInNumericalSemigroup(60,s);The Hilbert series (or generating function of $S$) is computed via the polynomial associated to $S$.

gap> HilbertSeriesOfNumericalSemigroup(s,x); gap> NumericalSemigroupPolynomial(s,x);Actually, this polynomial has all its roots in the unit circle.

gap> IsKroneckerPolynomial(last);

gap> LengthsOfFactorizationsElementWRTNumericalSemigroup(100,s);

gap> ElasticityOfFactorizationsElementWRTNumericalSemigroup(100,s); gap> ElasticityOfNumericalSemigroup(s);

gap> DeltaSetOfFactorizationsElementWRTNumericalSemigroup(100,s);Or even of the whole semigroups

gap> DeltaSetOfNumericalSemigroup(s);Recall that the maximum is reached in the Betti elements of the semigroup.

gap> List(B,b->DeltaSetOfFactorizationsElementWRTNumericalSemigroup(b,s));

gap> List(B, b->CatenaryDegreeOfElementInNumericalSemigroup(b,s)); gap> CatenaryDegreeOfNumericalSemigroup(s);

gap> OmegaPrimalityOfElementInNumericalSemigroup(100,s); gap> OmegaPrimalityOfNumericalSemigroup(s);Because for the atoms we obtain

gap> A:=MinimalGenerators(s); gap> List(A, a->OmegaPrimalityOfElementInNumericalSemigroup(a,s));

gap> TameDegreeOfElementInNumericalSemigroup(100,s); gap> TameDegreeOfNumericalSemigroup(s); gap> l:=Intersection(s,[1..100]); gap> List(l,x->TameDegreeOfElementInNumericalSemigroup(x,s));

gap> l:=List([1..20], _->RandomNumericalSemigroup(5,500));; gap> ll:=Filtered(l, s->EmbeddingDimension(s)=4);; gap> Filtered(ll, s->Length(MinimalPresentationOfNumericalSemigroup(s))=7); gap> MinimalGenerators(last[1]);