% generated by GAPDoc2LaTeX from XML source (Frank Luebeck)
\documentclass[a4paper,11pt]{report}
\usepackage{a4wide}
\sloppy
\pagestyle{myheadings}
\usepackage{amssymb}
\usepackage[latin1]{inputenc}
\usepackage{makeidx}
\usepackage{graphicx}
\makeindex
\usepackage{color}
\definecolor{DarkOlive}{rgb}{0.1047,0.2412,0.0064}
\definecolor{FireBrick}{rgb}{0.5812,0.0074,0.0083}
\definecolor{RoyalBlue}{rgb}{0.0236,0.0894,0.6179}
\definecolor{RoyalGreen}{rgb}{0.0236,0.6179,0.0894}
\definecolor{RoyalRed}{rgb}{0.6179,0.0236,0.0894}
\definecolor{LightBlue}{rgb}{0.8544,0.9511,1.0000}
\definecolor{Black}{rgb}{0.0,0.0,0.0}
\definecolor{FuncColor}{rgb}{1.0,0.0,0.0}
%% strange name because of pdflatex bug:
\definecolor{Chapter }{rgb}{0.0,0.0,1.0}

\usepackage{fancyvrb}

\usepackage{pslatex}

\usepackage[pdftex=true,
        a4paper=true,bookmarks=false,pdftitle={Written with GAPDoc},
        pdfcreator={LaTeX with hyperref package / GAPDoc},
        colorlinks=true,backref=page,breaklinks=true,linkcolor=RoyalBlue,
        citecolor=RoyalGreen,filecolor=RoyalRed,
        urlcolor=RoyalRed,pagecolor=RoyalBlue]{hyperref}

% write page numbers to a .pnr log file for online help
\newwrite\pagenrlog
\immediate\openout\pagenrlog =\jobname.pnr
\immediate\write\pagenrlog{PAGENRS := [}
\newcommand{\logpage}[1]{\protect\write\pagenrlog{#1, \thepage,}}
%% were never documented, give conflicts with some additional packages


\newcommand{\GAP}{\textsf{GAP}}

\begin{document}

\logpage{[ 0, 0, 0 ]}
\begin{titlepage}
\begin{center}{\Huge \textbf{Numerical Semigroups\mbox{}}}\\[1cm]
\hypersetup{pdftitle=Numerical Semigroups}
\markright{\scriptsize \mbox{}\hfill Numerical Semigroups \hfill\mbox{}}
{( Version 0.96 ) \mbox{}}\\[1cm]
\mbox{}\\[2cm]
{\large \textbf{ Manuel Delgado   \mbox{}}}\\
{\large \textbf{ Pedro A. Garc{\a'\i}a-S{\a'a}nchez   \mbox{}}}\\
{\large \textbf{ Jos{\a'e} Jo{\~a}o Morais  \mbox{}}}\\
\hypersetup{pdfauthor= Manuel Delgado   ;  Pedro A. Garc{\a'\i}a-S{\a'a}nchez   ;  Jos{\a'e} Jo{\~a}o Morais  }
\end{center}\vfill

\mbox{}\\
{\mbox{}\\
\small \noindent \textbf{ Manuel Delgado   } --- Email: \href{mailto://mdelgado@fc.up.pt} {\texttt{mdelgado@fc.up.pt}}\\
 --- Homepage: \href{http://www.fc.up.pt/cmup/mdelgado} {\texttt{http://www.fc.up.pt/cmup/mdelgado}}}\\
{\mbox{}\\
\small \noindent \textbf{ Pedro A. Garc{\a'\i}a-S{\a'a}nchez   } --- Email: \href{mailto://pedro@ugr.es} {\texttt{pedro@ugr.es}}\\
 --- Homepage: \href{http://www.ugr.es/~pedro} {\texttt{http://www.ugr.es/\texttt{\symbol{126}}pedro}}}\\
{\mbox{}\\
\small \noindent \textbf{ Jos{\a'e} Jo{\~a}o Morais  } --- Email: \href{mailto://josejoao@fc.up.pt} {\texttt{josejoao@fc.up.pt}}}\\
\end{titlepage}

\newpage\setcounter{page}{2}
{\small 
\section*{Copyright}
\logpage{[ 0, 0, 1 ]}
 {\copyright} 2005 by Manuel Delgado, Pedro A. Garc{\a'\i}a-S{\a'a}nchez and
Jos{\a'e} Jo{\~a}o Morais

 We adopt the copyright regulations of \textsf{GAP} as detailed in the copyright notice in the \textsf{GAP} manual. \mbox{}}\\[1cm]
{\small 
\section*{Acknowledgements}
\logpage{[ 0, 0, 2 ]}
 The first author's work was (partially) supported by the \emph{Centro de Matem{\a'a}tica da Universidade do Porto} (CMUP), financed by FCT (Portugal) through the programmes POCTI (Programa
Operacional "Ci{\^e}ncia, Tecnologia, Inova{\c c}{\~a}o") and POSI (Programa
Operacional Sociedade da Informa{\c c}{\~a}o), with national and European
Community structural funds and a sabbatical grant of FCT. 

 The second author was supported by the project MTM2004-01446 and FEDER founds. 

 The third author acknowledges financial support of FCT and the POCTI program
through a scholarship given by \emph{Centro de Matem{\a'a}tica da Universidade do Porto}. 

 The authors whish to thank J. I. Garc{\a'\i}a-Garc{\a'\i}a for many helpfull
discussions and for helping in the programming of preliminary versions of some
functions. \mbox{}}\\[1cm]
{\small 
\section*{Colophon}
\logpage{[ 0, 0, 3 ]}
 This work started when the first author visited the University of Granada in
part of a sabbatical year. Bug reports, suggestions and comments are, of
course, welcome. Please use our email addresses to this effect. \mbox{}}\\[1cm]
\newpage

\def\contentsname{Contents\logpage{[ 0, 0, 4 ]}}

\tableofcontents
\newpage

 
\chapter{\textcolor{Chapter }{ Introduction }}\label{Intro}
\logpage{[ 1, 0, 0 ]}
\hyperdef{L}{X7DFB63A97E67C0A1}{}
{
  A \emph{numerical semigroup} is a subset of the set $ {\mathbb N} $ of nonnegative integers that is closed under addition, contains $0$ and whose complement in $ {\mathbb N} $ is finite. The smallest positive integer belonging to a numerical semigroup is
its \emph{multiplicity}. 

 Let $S$ be a numerical semigroup and $A$ be a subset of $S$. We say that $A$ is a \emph{system of generators} of $S$ if $S=\{ k_1 a_1+\cdots+ k_n a_n\ |\ n,k_1,\ldots,k_n\in{\mathbb N},
a_1,\ldots,a_n\in A\}$. The set $A$ is a \emph{minimal system of generators} of $S$ if no proper subset of $A$ is a system of generators of $S$. 

 Every numerical semigroup has a unique minimal system of generators. This is a
data that can be used in order to uniquely define a numerical semigroup.
Observe that since the complement of a numerical semigroup in the set of
nonnegative integers is finite, this implies that the greatest common divisor
of the elements of a numerical semigroup is 1, and the same condition must be
fulfilled by its minimal system of generators (or by any of its systems of
generators). 

 Given a numerical semigroup $S$ and a nonzero element $s$ in it, one can consider for every integer $i$ ranging from $0$ to $s-1$, the smallest element in $S$ congruent with $i$ modulo $s$, say $w(i)$ (this element exists since the complement of $S$ in ${\mathbb N}$ is finite). Clearly $w(0)=0$. The set ${\rm Ap}(S,s)=\{ w(0),w(1),\ldots, w(s-1)\}$ is called the \label{zl1}\emph{Ap{\a'e}ry set} of $S$ with respect to $s$. Note that a nonnegative integer $x$ congruent with $i$ modulo $s$ belongs to $S$ if and only if $w(i)\leq x$. Thus the pair $(s,{\rm Ap}(S,s))$ fully determines the numerical semigroup $S$ (and can be used to easily solve the membership problem to $S$). This set is in fact one of the most powerfull tools known for numerical
semigroups, and it is used almost everywhere in the computation of components
and invariants associated to a numerical semigroup. Usually the element $s$ is taken to be the multiplicity, since in this way the resulting Ap{\a'e}ry
set is the smallest possible. 

 A \label{xx1}\emph{gap} of a numerical semigroup $S$ is a nonnegative integer not belonging to $S$. The set of gaps of $S$ is usually denoted by ${\rm H}(S)$, and clearly determines uniquely $S$. Note that if $x$ is a gap of $S$, then so are all the nonnegative integers dividing it. Thus in order to
describe $S$ we do not need to know all its gaps, but only those that are maximal with
respect to the partial order induced by division in ${\mathbb N}$. These gaps are called \label{lab1}\emph{fundamental gaps}. 

 The largest nonnegative integer not belonging to a numerical semigroup $S$ is the \emph{Frobenius number} of $S$. If $S$ is the set of nonnegative integers, then clearly its Frobenius number is $-1$, otherwise its Frobenius number coincides with the maximum of the gaps (or
fundamental gaps) of $S$. In this package we refer to the elements in the semigroup that are less than
or equal to the Frobenius number plus 1 as \label{zlab1}\emph{small elements} of the semigroup. Observe that from the definition, if $S$ is a numerical semigroup with Frobenius number $f$, then $f+{\mathbb N}\setminus\{0\}\subseteq S$. An integer $z$ is a \label{lab2}\emph{pseudo-Frobenius number} of $S$ if $z+S\setminus\{0\}\subseteq S$. Thus the Frobenius number of $S$ is one of its pseudo-Frobenius numbers. The \emph{type} of a numerical semigroup is the cardinality of the set of its pseudo-Frobenius
numbers. 

 The number of numerical semigroups having a given Frobenius number is finite.
The elements in this set of numerical semigroups that are maximal with respect
to set inclusion are precisely those numerical semigroups that cannot be
expressed as intersection of two other numerical semigroups containing them
properly, and thus they are known as \emph{irreducible} numerical semigroups. Clearly, every numerical semigroup is the intersection
of (finitely many) irreducible numerical semigroups. 

 A numerical semigroup $S$ with Frobenius number $f$ is \emph{symmetric} if for every integer $x$, either $x\in S$ or $f-x\in S$. The set of irreducible numerical semigroups with odd Frobenius number
coincides with the set of symmetric numerical semigroups. The numerical
semigroup $S$ is \emph{pseudo-symmetric} if $f$ is even and for every integer $x$ not equal to $f/2$ either $x\in S$ or $f-x\in S$. The set of irreducible numerical semigroups with even Frobenius number is
precisely the set of pseudo-symmetric numerical semigroups. These two classes
of numerical semigroups have been widely studied in the literature due to
their nice applications in Algebraic Geometry. This is probably one of the
main reasons that made people turn their attention on numerical semigroups
again in the last decades. Symmetric numerical semigroups can be also
characterized as those with type one, and pseudo-symmetric numerical
semigroups are those numerical semigroups with type two and such that its
pseudo-Frobenius numbers are its Frobenius number and its Frobenius number
divided by two. 

 Another class of numerical semigroups that catched the attention of
researchers working on Algebraic Geometry and Commutative Ring Theory is the
class of numerical semigroups with maximal embedding dimension. The \emph{embedding dimension} of a numerical semigroup is the cardinality of its minimal system of
generators. It can be shown that the embedding dimension is at most the
multiplicity of the numerical semigroup. Thus \emph{maximal embedding dimension} numerical semigroups are those numerical semigroups for which their embedding
dimension and multiplicity coincide. These numerical semigroups have nice
maximal properties, not only (of course) related to their embedding dimension,
but also by means of their presentations. Among maximal embedding dimension
there are two classes of numerical semigroups that have been studied due to
the connections with the equivalence of algebroid branches. A numerical
semigroup $S$ is Arf if for every $x\geq y\geq z\in S$, then $x+y-z\in S$; and it is \emph{saturated} if the following condition holds: if $s,s_1,\ldots,s_r\in S$ are such that $s_i\leq s$ for all $i\in \{1,\ldots,r\}$ and $z_1,\ldots,z_r\in {\mathbb Z}$ are such that $z_1s_1+\cdots+z_rs_r\geq 0$, then $s+z_1s_1+\cdots +z_rs_r\in S$. 

 If we look carefully inside the set of fundamental gaps of a numerical
semigroup, we see that there are some fulfilling the condition that if they
are added to the given numerical semigroup, then the resulting set is again a
numerical semigroup. These elements are called \label{lab3}\emph{special gaps} of the numerical semigroup. A numerical semigroup other than the set of
nonnegative integers is irreducible if and only if it has only a special gap. 

 The inverse operation to the one described in the above paragraph is that of
removing an element of a numerical semigroup. If we want the resulting set to
be a numerical semigroup, then the only thing we can remove is a minimal
generator. 

 Let $a,b,c,d$ be positive integers such that $a/b < c/d$, and let $I=[a/b,c/d]$. Then the set ${\rm S}(I)={\mathbb N}\cap \bigcup_{n\geq 0} n I$ is a numerical semigroup. This class of numerical semigroups coincides with
that of sets of solutions to equations of the form $ A x \ mod\ B \leq C x$ with $ A,B,C$ positive integers. A numerical semigroup in this class is said to be \label{llab1}\emph{proportionally modular}. 

 A sequence of positive rational numbers $ a_1/b_1 < \cdots < a_n/b_n$ with $a_i,b_i$ positive integers is a \emph{B{\a'e}zout sequence} if $ a_{i+1}b_i - a_i b_{i+1}=1$ for all $i\in \{1,\ldots,n-1\}$. If $ a/b=a_1/b_1 < \cdots < a_n/b_n =c/d$, then ${\rm S}([a/b,c/d])=\langle a_1,\ldots,a_n\rangle$. B{\a'e}zout sequences are not only interesting for this fact, they have
shown to be a major tool in the study of proportionally modular numerical
semigroups. 

 If $S$ is a numerical semigroup and $k$ is a positive integer, then the set $S/k=\{ x\in {\mathbb N} \ |\ kx\in S\}$ is a numerical semigroup, known as the \emph{quotient} $S$ by $k$. 

 Let $m$ be a positive integer. A \label{llab2}\emph{subadditive} function with period $m$ is a map $f:{\mathbb N}\to {\mathbb N}$ such that $ f(0)=0$, $f(x+y)\leq f(x)+f(y)$ and $f(x+m)=f(x)$. If $f$ is a subadditive function with period $m$, then the set ${\rm M}_f=\{ x\in {\mathbb N}\ |\ f(x)\leq x\}$ is a numerical semigroup. Moreover, every numerical semigroup is of this form.
Thus a numerical semigroup can be given by a subadditive function with a given
period. If $S$ is a numerical semigroup and $s\in S, s\not=0$, and ${\rm Ap}(S,s)=\{ w(0),w(1),\ldots, w(s-1)\}$, then $f(x)=w(x \ mod\ s)$ is a subadditive function with period $s$ such that ${\rm M}_f=S$. 

 Let $S$ be a numerical semigroup generated by $\{n_1,\ldots,n_k\}$. Then we can define the following morphism (called sometimes the
factorization morphism) by $\varphi: {\mathbb N}^k \to S,\ \varphi(a_1,\ldots,a_k)=a_1n_1+\cdots+a_kn_k$. If $\sigma$ is the kernel congruence of $\varphi$ (that is, $a\sigma b$ if $\varphi(a)=\varphi(b)$), then $S$ is isomorphic to ${\mathbb N}^k/\sigma$. A \emph{presentation} for $S$ is a system of generators (as a congruence) of $\sigma$. If $\{n_1,\ldots,n_p\}$ is a minimal system of generators, then a \emph{minimal presentation} is a presentation such that none of its proper subsets is a presentation.
Minimal presentations of numerical semigroups coincide with presentations with
minimal cardinality, though in general these two concepts are not the same for
an arbitrary commutative semigroup. 

 A set $I$ of integers is an \emph{ideal relative to a numerical semigroup} $S$ provided that $I+S\subseteq I$ and that there exists $d\in S$ such that $d+I\subseteq S$. If $I\subseteq S$, we simply say that $I$ is an \emph{ideal} of $S$. If $I$ and $J$ are relative ideals of $S$, then so is $I-J=\{z\in {\mathbb Z}\ |\ z+J\subseteq I\}$, and it is tightly related to the operation ":" of ideals in a commutative
ring. 

 In this package we have implemented the functions needed to deal with the
elements exposed in this introduction. 

 Many of the algorithms, and the necessary background to understand them, can
be found in the monograph \cite{RGbook}. Some examples in this book have been illustrated with the help of this
package. So the reader can also find there more examples on the usage of the
functions implemented here. }

 
\chapter{\textcolor{Chapter }{ Numerical Semigroups }}\logpage{[ 2, 0, 0 ]}
\hyperdef{L}{X8324E5D97DC2A801}{}
{
  This chapter describes how to create numerical semigroups in \textsf{GAP} and perform some basic tests. 
\section{\textcolor{Chapter }{ Generating Numerical Semigroups }}\logpage{[ 2, 1, 0 ]}
\hyperdef{L}{X7E89D7EB7FCC2197}{}
{
  Recalling some definitions from Chapter \ref{Intro}. 

 A numerical semigroup is a subset of the set $ {\mathbb N} $ of nonnegative integers that is closed under addition, contains $0$ and whose complement in $ {\mathbb N} $ is finite. 

 We refer to the elements in a numerical semigroup that are less than or equal
to the Frobenius number plus 1 as \emph{small elements} of the semigroup. 

 A \emph{gap} of a numerical semigroup $S$ is a nonnegative integer not belonging to $S$. The \emph{fundamental gaps} of $S$ are those gaps that are maximal with respect to the partial order induced by
division in ${\mathbb N}$. 

 Given a numerical semigroup $S$ and a nonzero element $s$ in it, one can consider for every integer $i$ ranging from $0$ to $s-1$, the smallest element in $S$ congruent with $i$ modulo $s$, say $w(i)$ (this element exists since the complement of $S$ in ${\mathbb N}$ is finite). Clearly $w(0)=0$. The set ${\rm Ap}(S,s)=\{ w(0),w(1),\ldots, w(s-1)\}$ is called the \emph{Ap{\a'e}ry set} of $S$ with respect to $s$. 

 Let $a,b,c,d$ be positive integers such that $a/b < c/d$, and let $I=[a/b,c/d]$. Then the set ${\rm S}(I)={\mathbb N}\cap \bigcup_{n\geq 0} n I$ is a numerical semigroup. This class of numerical semigroups coincides with
that of sets of solutions to equations of the form $ A x \ mod\ B \leq C x$ with $ A,B,C$ positive integers. A numerical semigroup in this class is said to be \emph{proportionally modular}. If $C = 1$, then it is said to be \emph{modular}. 

 There are several different ways to specify a numerical semigroup $S$, namely, by its generators; by its gaps, its fundamental or special gaps by
its Ap{\a'e}ry set, just to name some. In this section we describe functions
that may be used to specify, in one of these ways, a numerical semigroup in \textsf{GAP}. 

 To create a numerical semigroup in \textsf{GAP} the function \texttt{NumericalSemigroup} is used. 

\subsection{\textcolor{Chapter }{NumericalSemigroup}}
\logpage{[ 2, 1, 1 ]}\nobreak
\hyperdef{L}{X86DEEBFE854B60A6}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroup({\slshape Type, List})\index{NumericalSemigroup@\texttt{NumericalSemigroup}}
\label{NumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \texttt{Type} 

 May be \texttt{"generators"}, \texttt{"minimalgenerators"}, \texttt{"modular"}, \texttt{"propmodular"}, \texttt{"elements"}, \texttt{"gaps"}, \texttt{"fundamentalgaps"}, \texttt{"subadditive"} or \texttt{"apery"} according to whether the semigroup is to be given by means of a condition of
the form $ ax \ mod\ m$ {\textless}$= x$, a system of generators, a condition of the form $ ax \ mod\ m$ {\textless}$= cx$, a set of all elements up to the Frobenius number $+1$, the set of gaps, the set of fundamental gaps, a periodic subaditive function
or the Ap{\a'e}ry set. 

 When no string is given as first argument it is assumed that the numerical
semigroup will be given by means of a set of generators. 

 \texttt{List} 

 When the semigroup is given through a set of generators, this set may be given
as a list or through its individual elements. 

 The set of all elements up to the Frobenius number $+1$, the set of gaps, the set of fundamental gaps or the Ap{\a'e}ry set are given
through lists. 

 A periodic subadditive function with period $m$ is given through the list of images of the elements, from $1$ to $m$. The image of $m$ has to be $0$. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s1 := NumericalSemigroup("generators",3,5,7);
  <Numerical semigroup with 3 generators>
  gap> s2 := NumericalSemigroup("generators",[3,5,7]);
  <Numerical semigroup with 3 generators>
  gap> s1=s2;
  true
  gap> s := NumericalSemigroup("minimalgenerators",3,7);
  <Numerical semigroup with 2 generators>
  gap> s := NumericalSemigroup("modular",3,5);
  <Modular numerical semigroup satisfying 3x mod 5 <= x >
  gap> s1 := NumericalSemigroup("generators",2,5);
  <Numerical semigroup with 2 generators>
  gap> s = s1;
  true
  
  ....................................
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ModularNumericalSemigroup}}
\logpage{[ 2, 1, 2 ]}\nobreak
\hyperdef{L}{X87206D597873EAFF}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ModularNumericalSemigroup({\slshape a, b})\index{ModularNumericalSemigroup@\texttt{ModularNumericalSemigroup}}
\label{ModularNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Given two positive integers \mbox{\texttt{\slshape a}} and \mbox{\texttt{\slshape b}}, this function returns a modular numerical semigroup satisfying $ax \ mod\ b <= x$. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> ModularNumericalSemigroup(3,7);
  <Modular numerical semigroup satisfying 3x mod 7 <= x >
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ProportionallyModularNumericalSemigroup}}
\logpage{[ 2, 1, 3 ]}\nobreak
\hyperdef{L}{X879171CD7AC80BB5}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ProportionallyModularNumericalSemigroup({\slshape a, b, c})\index{ProportionallyModularNumericalSemigroup@\texttt{ProportionallyModularNumericalSemigroup}}
\label{ProportionallyModularNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Given three positive integers \mbox{\texttt{\slshape a}}, \mbox{\texttt{\slshape b}} and \mbox{\texttt{\slshape c}}, this function returns a proportionally modular numerical semigroup
satisfying $ax\ mod\ b <= cx$. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> ProportionallyModularNumericalSemigroup(3,7,12);
  <Proportionally modular numerical semigroup satisfying 3x mod 7 <= 12x >
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{NumericalSemigroupByGenerators}}
\logpage{[ 2, 1, 4 ]}\nobreak
\hyperdef{L}{X79B38AB3816BF3C5}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupByGenerators({\slshape List})\index{NumericalSemigroupByGenerators@\texttt{NumericalSemigroupByGenerators}}
\label{NumericalSemigroupByGenerators}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupByMinimalGenerators({\slshape List})\index{NumericalSemigroupByMinimalGenerators@\texttt{NumericalSemigroupByMinimalGenerators}}
\label{NumericalSemigroupByMinimalGenerators}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupByMinimalGeneratorsNC({\slshape List})\index{NumericalSemigroupByMinimalGeneratorsNC@\texttt{NumericalSemigroupByMinimalGeneratorsNC}}
\label{NumericalSemigroupByMinimalGeneratorsNC}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupByInterval({\slshape List})\index{NumericalSemigroupByInterval@\texttt{NumericalSemigroupByInterval}}
\label{NumericalSemigroupByInterval}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupByOpenInterval({\slshape List})\index{NumericalSemigroupByOpenInterval@\texttt{NumericalSemigroupByOpenInterval}}
\label{NumericalSemigroupByOpenInterval}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupBySubAdditiveFunction({\slshape List})\index{NumericalSemigroupBySubAdditiveFunction@\texttt{NumericalSemigroupBySubAdditiveFunction}}
\label{NumericalSemigroupBySubAdditiveFunction}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupByAperyList({\slshape List})\index{NumericalSemigroupByAperyList@\texttt{NumericalSemigroupByAperyList}}
\label{NumericalSemigroupByAperyList}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupBySmallElements({\slshape List})\index{NumericalSemigroupBySmallElements@\texttt{NumericalSemigroupBySmallElements}}
\label{NumericalSemigroupBySmallElements}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupByGaps({\slshape List})\index{NumericalSemigroupByGaps@\texttt{NumericalSemigroupByGaps}}
\label{NumericalSemigroupByGaps}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupByFundamentalGaps({\slshape List})\index{NumericalSemigroupByFundamentalGaps@\texttt{NumericalSemigroupByFundamentalGaps}}
\label{NumericalSemigroupByFundamentalGaps}
}\hfill{\scriptsize (function)}}\\


The function \texttt{NumericalSemigroup} (\ref{NumericalSemigroup}) is a front-end for these functions. The argument of each of these functions is
a list representing an entity of the type to which the function's name refers. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(3,11);
  <Numerical semigroup with 2 generators>
  gap> GapsOfNumericalSemigroup(s);
  [ 1, 2, 4, 5, 7, 8, 10, 13, 16, 19 ]
  gap> t:=NumericalSemigroupByGaps(last);
  <Numerical semigroup>
  gap> s=t;
  true
  
  gap> AperyListOfNumericalSemigroupWRTElement(s,20);;
  gap> t:=NumericalSemigroupByAperyList(last);
  <Numerical semigroup>
  gap> s=t;
  true
  ...
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{Some basic tests}}\logpage{[ 2, 2, 0 ]}
\hyperdef{L}{X7EF4254C81ED6665}{}
{
  This section describes some basic tests on numerical semigroups.The first
described tests refer to the way the semigroup was created. Then are presented
functions to test if a given list represents the small elements, gaps or the
Ap{\a'e}ry set (see \ref{zlab1}) of a numerical semigroup; to test if an integer belongs to a numerical
semigroup and if a numerical semigroup is a subsemigroup of another one. 

\subsection{\textcolor{Chapter }{IsNumericalSemigroup}}
\logpage{[ 2, 2, 1 ]}\nobreak
\hyperdef{L}{X7B1B6B8C82BD7084}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroup({\slshape NS})\index{IsNumericalSemigroup@\texttt{IsNumericalSemigroup}}
\label{IsNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroupByGenerators({\slshape NS})\index{IsNumericalSemigroupByGenerators@\texttt{IsNumericalSemigroupByGenerators}}
\label{IsNumericalSemigroupByGenerators}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroupByMinimalGenerators({\slshape NS})\index{IsNumericalSemigroupByMinimalGenerators@\texttt{IsNumericalSemigroupByMinimalGenerators}}
\label{IsNumericalSemigroupByMinimalGenerators}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroupByInterval({\slshape NS})\index{IsNumericalSemigroupByInterval@\texttt{IsNumericalSemigroupByInterval}}
\label{IsNumericalSemigroupByInterval}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroupByOpenInterval({\slshape NS})\index{IsNumericalSemigroupByOpenInterval@\texttt{IsNumericalSemigroupByOpenInterval}}
\label{IsNumericalSemigroupByOpenInterval}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroupBySubAdditiveFunction({\slshape NS})\index{IsNumericalSemigroupBySubAdditiveFunction@\texttt{IsNumerical}\-\texttt{Semigroup}\-\texttt{By}\-\texttt{Sub}\-\texttt{Additive}\-\texttt{Function}}
\label{IsNumericalSemigroupBySubAdditiveFunction}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroupByAperyList({\slshape NS})\index{IsNumericalSemigroupByAperyList@\texttt{IsNumericalSemigroupByAperyList}}
\label{IsNumericalSemigroupByAperyList}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroupBySmallElements({\slshape NS})\index{IsNumericalSemigroupBySmallElements@\texttt{IsNumericalSemigroupBySmallElements}}
\label{IsNumericalSemigroupBySmallElements}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroupByGaps({\slshape NS})\index{IsNumericalSemigroupByGaps@\texttt{IsNumericalSemigroupByGaps}}
\label{IsNumericalSemigroupByGaps}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsNumericalSemigroupByFundamentalGaps({\slshape NS})\index{IsNumericalSemigroupByFundamentalGaps@\texttt{IsNumericalSemigroupByFundamentalGaps}}
\label{IsNumericalSemigroupByFundamentalGaps}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsProportionallyModularNumericalSemigroup({\slshape NS})\index{IsProportionallyModularNumericalSemigroup@\texttt{IsProportionally}\-\texttt{Modular}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{IsProportionallyModularNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsModularNumericalSemigroup({\slshape NS})\index{IsModularNumericalSemigroup@\texttt{IsModularNumericalSemigroup}}
\label{IsModularNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 \mbox{\texttt{\slshape NS}} is a numerical semigroup and these attributes are available (their names
should be self explanatory). 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(3,7);
  <Numerical semigroup with 2 generators>
  gap> AperyListOfNumericalSemigroupWRTElement(s,30);;
  gap> t:=NumericalSemigroupByAperyList(last);
  <Numerical semigroup>
  gap> IsNumericalSemigroupByGenerators(s);
  true
  gap> IsNumericalSemigroupByGenerators(t);
  false
  gap> IsNumericalSemigroupByAperyList(s);
  false
  gap> IsNumericalSemigroupByAperyList(t);
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{RepresentsSmallElementsOfNumericalSemigroup}}
\logpage{[ 2, 2, 2 ]}\nobreak
\hyperdef{L}{X87B02A9F7AF90CB9}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RepresentsSmallElementsOfNumericalSemigroup({\slshape L})\index{RepresentsSmallElementsOfNumericalSemigroup@\texttt{Represents}\-\texttt{Small}\-\texttt{Elements}\-\texttt{Of}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{RepresentsSmallElementsOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 Tests if the list \mbox{\texttt{\slshape L}} (which has to be a set) may represent the ``small" \# elements of a numerical
semigroup. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> L:=[ 0, 3, 6, 9, 11, 12, 14, 15, 17, 18, 20 ];
  [ 0, 3, 6, 9, 11, 12, 14, 15, 17, 18, 20 ]
  gap> RepresentsSmallElementsOfNumericalSemigroup(L);
  true
  gap> L:=[ 6, 9, 11, 12, 14, 15, 17, 18, 20 ];
  [ 6, 9, 11, 12, 14, 15, 17, 18, 20 ]
  gap> RepresentsSmallElementsOfNumericalSemigroup(L);
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{RepresentsGapsOfNumericalSemigroup}}
\logpage{[ 2, 2, 3 ]}\nobreak
\hyperdef{L}{X78906CCD7BEE0E58}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RepresentsGapsOfNumericalSemigroup({\slshape L})\index{RepresentsGapsOfNumericalSemigroup@\texttt{RepresentsGapsOfNumericalSemigroup}}
\label{RepresentsGapsOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 Tests if the list \mbox{\texttt{\slshape L}} may represent the gaps (see \ref{xx1}) of a numerical semigroup. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(3,7);
  <Numerical semigroup with 2 generators>
  gap> L:=GapsOfNumericalSemigroup(s);
  [ 1, 2, 4, 5, 8, 11 ]
  gap> RepresentsGapsOfNumericalSemigroup(L);
  true
  gap> L:=Set(List([1..21],i->RandomList([1..50])));
  [ 2, 6, 7, 8, 10, 12, 14, 19, 24, 28, 31, 35, 42, 50 ]
  gap> RepresentsGapsOfNumericalSemigroup(L);
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsAperyListOfNumericalSemigroup}}
\logpage{[ 2, 2, 4 ]}\nobreak
\hyperdef{L}{X84A611557B5ACF42}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsAperyListOfNumericalSemigroup({\slshape L})\index{IsAperyListOfNumericalSemigroup@\texttt{IsAperyListOfNumericalSemigroup}}
\label{IsAperyListOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Tests whether a list \mbox{\texttt{\slshape L}} of integers may represent the Ap{\a'e}ry list of a numerical semigroup. It
returns \texttt{true} when the periodic function represented by \mbox{\texttt{\slshape L}} is subadditive (see \texttt{RepresentsPeriodicSubAdditiveFunction} (\ref{RepresentsPeriodicSubAdditiveFunction})) and the remainder of the division of \texttt{L[i]} by the length of \mbox{\texttt{\slshape L}} is \texttt{i} and returns \texttt{false} otherwise (the crieterium used is the one explained in \cite{R96}). 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> IsAperyListOfNumericalSemigroup([0,21,7,28,14]);
  true
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsSubsemigroupOfNumericalSemigroup}}
\logpage{[ 2, 2, 5 ]}\nobreak
\hyperdef{L}{X86D5B3517AF376D4}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsSubsemigroupOfNumericalSemigroup({\slshape S, T})\index{IsSubsemigroupOfNumericalSemigroup@\texttt{IsSubsemigroupOfNumericalSemigroup}}
\label{IsSubsemigroupOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} and \mbox{\texttt{\slshape T}} are numerical semigroups. Tests whether \mbox{\texttt{\slshape T}} is contained in \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S := NumericalSemigroup("modular", 5,53);
  <Modular numerical semigroup satisfying 5x mod 53 <= x >
  gap> T := NumericalSemigroup(2,3);
  <Numerical semigroup with 2 generators>
  gap> IsSubsemigroupOfNumericalSemigroup(T,S);
  true
  gap> IsSubsemigroupOfNumericalSemigroup(S,T);
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{BelongsToNumericalSemigroup}}
\logpage{[ 2, 2, 6 ]}\nobreak
\hyperdef{L}{X864C2D8E80DD6D16}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{BelongsToNumericalSemigroup({\slshape n, S})\index{BelongsToNumericalSemigroup@\texttt{BelongsToNumericalSemigroup}}
\label{BelongsToNumericalSemigroup}
}\hfill{\scriptsize (operation)}}\\


 \mbox{\texttt{\slshape n}} is an integer and \mbox{\texttt{\slshape S}} is a numerical semigroup. Tests whether \mbox{\texttt{\slshape n}} belongs to \mbox{\texttt{\slshape S}}. \texttt{n in S} is the short for \texttt{BelongsToNumericalSemigroup(n,S)}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S := NumericalSemigroup("modular", 5,53);
  <Modular numerical semigroup satisfying 5x mod 53 <= x >
  gap> BelongsToNumericalSemigroup(15,S);
  false
  gap> 15 in S;
  false
  gap> SmallElementsOfNumericalSemigroup(S);
  [ 0, 11, 12, 13, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ]
  gap> BelongsToNumericalSemigroup(13,S);
  true
  gap> 13 in S;
  true
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{ Basic operations with numerical semigroups }}\logpage{[ 3, 0, 0 ]}
\hyperdef{L}{X7A9D13C778697F6C}{}
{
  
\section{\textcolor{Chapter }{ The definitions }}\logpage{[ 3, 1, 0 ]}
\hyperdef{L}{X7F15FEA980D637AF}{}
{
  

\subsection{\textcolor{Chapter }{MultiplicityOfNumericalSemigroup}}
\logpage{[ 3, 1, 1 ]}\nobreak
\hyperdef{L}{X842721EF8145C3D3}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MultiplicityOfNumericalSemigroup({\slshape NS})\index{MultiplicityOfNumericalSemigroup@\texttt{MultiplicityOfNumericalSemigroup}}
\label{MultiplicityOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 \mbox{\texttt{\slshape NS}} is a numerical semigroup. Returns the multiplicity of \mbox{\texttt{\slshape NS}}, which is the smallest positive integer belonging to \mbox{\texttt{\slshape NS}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S := NumericalSemigroup("modular", 7,53);
  <Modular numerical semigroup satisfying 7x mod 53 <= x >
  gap> MultiplicityOfNumericalSemigroup(S);
  8
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{GeneratorsOfNumericalSemigroup}}
\logpage{[ 3, 1, 2 ]}\nobreak
\hyperdef{L}{X7A3177E779C49D13}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{GeneratorsOfNumericalSemigroup({\slshape S})\index{GeneratorsOfNumericalSemigroup@\texttt{GeneratorsOfNumericalSemigroup}}
\label{GeneratorsOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{GeneratorsOfNumericalSemigroupNC({\slshape S})\index{GeneratorsOfNumericalSemigroupNC@\texttt{GeneratorsOfNumericalSemigroupNC}}
\label{GeneratorsOfNumericalSemigroupNC}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MinimalGeneratingSystemOfNumericalSemigroup({\slshape S})\index{MinimalGeneratingSystemOfNumericalSemigroup@\texttt{Minimal}\-\texttt{Generating}\-\texttt{System}\-\texttt{Of}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{MinimalGeneratingSystemOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. \texttt{GeneratorsOfNumericalSemigroup} returns a set of generators of \texttt{S}, which may not be minimal. \texttt{GeneratorsOfNumericalSemigroupNC} returns the set of generators recorded in \texttt{S!.generators}, which may not be minimal. \texttt{MinimalGeneratingSystemOfNumericalSemigroup} returns the minimal set of generators of \texttt{S}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S := NumericalSemigroup("modular", 5,53);
  <Modular numerical semigroup satisfying 5x mod 53 <= x >
  gap> GeneratorsOfNumericalSemigroup(S);
  [ 11, 12, 13, 32, 53 ]
  gap> S := NumericalSemigroup(3, 5, 53);
  <Numerical semigroup with 3 generators>
  gap> GeneratorsOfNumericalSemigroup(S);
  [ 3, 5, 53 ]
  gap> MinimalGeneratingSystemOfNumericalSemigroup(S);
  [ 3, 5 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{SmallElementsOfNumericalSemigroup}}
\logpage{[ 3, 1, 3 ]}\nobreak
\hyperdef{L}{X79D6E4727B612B54}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SmallElementsOfNumericalSemigroup({\slshape NS})\index{SmallElementsOfNumericalSemigroup@\texttt{SmallElementsOfNumericalSemigroup}}
\label{SmallElementsOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 \texttt{NS} is a numerical semigroup. It returns the list of small elements of \texttt{NS}. Of course, the time consumed to return a result may depend on the way the
semigroup is given. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> SmallElementsOfNumericalSemigroup(NumericalSemigroup(3,5,7));
  [ 0, 3, 5 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{FirstElementsOfNumericalSemigroup}}
\logpage{[ 3, 1, 4 ]}\nobreak
\hyperdef{L}{X7F0EDFA77F929120}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{FirstElementsOfNumericalSemigroup({\slshape n, NS})\index{FirstElementsOfNumericalSemigroup@\texttt{FirstElementsOfNumericalSemigroup}}
\label{FirstElementsOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \texttt{NS} is a numerical semigroup. It returns the list with the first \mbox{\texttt{\slshape n}} elements of \texttt{NS}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> FirstElementsOfNumericalSemigroup(2,NumericalSemigroup(3,5,7));
  [ 0, 3 ]
  gap> FirstElementsOfNumericalSemigroup(10,NumericalSemigroup(3,5,7));
  [ 0, 3, 5, 6, 7, 8, 9, 10, 11, 12 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{AperyListOfNumericalSemigroupWRTElement}}
\logpage{[ 3, 1, 5 ]}\nobreak
\hyperdef{L}{X86C699F2800F9ED0}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AperyListOfNumericalSemigroupWRTElement({\slshape S, m})\index{AperyListOfNumericalSemigroupWRTElement@\texttt{AperyListOfNumericalSemigroupWRTElement}}
\label{AperyListOfNumericalSemigroupWRTElement}
}\hfill{\scriptsize (operation)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape m}} is a positive element of \mbox{\texttt{\slshape S}}. Computes the Ap{\a'e}ry list of \mbox{\texttt{\slshape S}} wrt \mbox{\texttt{\slshape m}}. It contains for every $i\in \{0,\ldots,\mbox{\texttt{\slshape m}}-1\}$, in the $i+1$th position, the smallest element in the semigroup congruent with $i$ modulo \mbox{\texttt{\slshape m}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S := NumericalSemigroup("modular", 5,53);
  <Modular numerical semigroup satisfying 5x mod 53 <= x >
  gap> AperyListOfNumericalSemigroupWRTElement(S,12);
  [ 0, 13, 26, 39, 52, 53, 54, 43, 32, 33, 22, 11 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{DrawAperyListOfNumericalSemigroup}}
\logpage{[ 3, 1, 6 ]}\nobreak
\hyperdef{L}{X85C89A6B81A07061}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DrawAperyListOfNumericalSemigroup({\slshape ap})\index{DrawAperyListOfNumericalSemigroup@\texttt{DrawAperyListOfNumericalSemigroup}}
\label{DrawAperyListOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape ap}} is the Ap{\a'e}ry list of a numerical semigroup. This function draws the graph $(ap, E)$ where the edge $u -> v$ is in $E$ iff $v - u$ is in $ap$. To use this function, \texttt{Graphviz} (\href{http://www.graphviz.org} {\texttt{http://www.graphviz.org}}) should be installed and also \texttt{Evince} (\href{http://www.gnome.org/projects/evince/} {\texttt{http://www.gnome.org/projects/evince/}}) or \texttt{ggv} (\href{http://directory.fsf.org/ggv.html} {\texttt{http://directory.fsf.org/ggv.html}}). }

 

\subsection{\textcolor{Chapter }{AperyListOfNumericalSemigroupAsGraph}}
\logpage{[ 3, 1, 7 ]}\nobreak
\hyperdef{L}{X8022CC477E9BF678}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AperyListOfNumericalSemigroupAsGraph({\slshape ap})\index{AperyListOfNumericalSemigroupAsGraph@\texttt{AperyListOfNumericalSemigroupAsGraph}}
\label{AperyListOfNumericalSemigroupAsGraph}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape ap}} is the Ap{\a'e}ry list of a numerical semigroup. This function returns the
adjacency list of the graph $(ap, E)$ where the edge $u -> v$ is in $E$ iff $v - u$ is in $ap$. The 0 is ignored. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(3,7);
  <Numerical semigroup with 2 generators>
  gap> AperyListOfNumericalSemigroupWRTElement(s,10);
  [ 0, 21, 12, 3, 14, 15, 6, 7, 18, 9 ]
  gap> AperyListOfNumericalSemigroupAsGraph(last);
  [ ,, [ 3, 6, 9, 12, 15, 18, 21 ],,, [ 6, 9, 12, 15, 18, 21 ],
  [ 7, 14, 21 ],, [ 9, 12, 15, 18, 21 ],,, [ 12, 15, 18, 21 ],,
  [ 14, 21 ], [ 15, 18, 21 ],,, [ 18, 21 ],,, [ 21 ] ]
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{Frobenius Number}}\logpage{[ 3, 2, 0 ]}
\hyperdef{L}{X7F97E0127A1D2835}{}
{
  The largest nonnegative integer not belonging to a numerical semigroup $S$ is the \emph{Frobenius number} of $S$. If $S$ is the set of nonnegative integers, then clearly its Frobenius number is $-1$, otherwise its Frobenius number coincides with the maximum of the gaps (or
fundamental gaps) of $S$. An integer $z$ is a \emph{pseudo-Frobenius number} of $S$ if $z+S\setminus\{0\}\subseteq S$. 

\subsection{\textcolor{Chapter }{FrobeniusNumberOfNumericalSemigroup}}
\logpage{[ 3, 2, 1 ]}\nobreak
\hyperdef{L}{X7828CD2B83E380FA}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{FrobeniusNumberOfNumericalSemigroup({\slshape NS})\index{FrobeniusNumberOfNumericalSemigroup@\texttt{FrobeniusNumberOfNumericalSemigroup}}
\label{FrobeniusNumberOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 \texttt{NS} is a numerical semigroup. It returns the Frobenius number of \texttt{NS}. Of course, the time consumed to return a result may depend on the way the
semigroup is given or on the knowledge already produced on the semigroup. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> FrobeniusNumberOfNumericalSemigroup(NumericalSemigroup(3,5,7));
  4
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{FrobeniusNumber}}
\logpage{[ 3, 2, 2 ]}\nobreak
\hyperdef{L}{X7B7DFAB2834B2B36}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{FrobeniusNumber({\slshape NS})\index{FrobeniusNumber@\texttt{FrobeniusNumber}}
\label{FrobeniusNumber}
}\hfill{\scriptsize (attribute)}}\\


 This is just a synonym of \texttt{FrobeniusNumberOfNumericalSemigroup} (\ref{FrobeniusNumberOfNumericalSemigroup}). }

 

\subsection{\textcolor{Chapter }{PseudoFrobeniusOfNumericalSemigroup}}
\logpage{[ 3, 2, 3 ]}\nobreak
\hyperdef{L}{X829A9C517A83FFD5}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{PseudoFrobeniusOfNumericalSemigroup({\slshape S})\index{PseudoFrobeniusOfNumericalSemigroup@\texttt{PseudoFrobeniusOfNumericalSemigroup}}
\label{PseudoFrobeniusOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 \texttt{S} is a numerical semigroup. It returns set of pseudo-Frobenius numbers of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S := NumericalSemigroup("modular", 5,53);
  <Modular numerical semigroup satisfying 5x mod 53 <= x >
  gap> PseudoFrobeniusOfNumericalSemigroup(S);
  [ 21, 40, 41, 42 ]
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{Gaps}}\logpage{[ 3, 3, 0 ]}
\hyperdef{L}{X787FE6F180C6291F}{}
{
  A \emph{gap} of a numerical semigroup $S$ is a nonnegative integer not belonging to $S$. The \emph{fundamental gaps} of $S$ are those gaps that are maximal with respect to the partial order induced by
division in ${\mathbb N}$. The \emph{special gaps} of a numerical semigroup $S$, are those fundamental gaps such that if they are added to the given
numerical semigroup, then the resulting set is again a numerical semigroup. 

\subsection{\textcolor{Chapter }{GapsOfNumericalSemigroup}}
\logpage{[ 3, 3, 1 ]}\nobreak
\hyperdef{L}{X7B1BEC5786C66244}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{GapsOfNumericalSemigroup({\slshape NS})\index{GapsOfNumericalSemigroup@\texttt{GapsOfNumericalSemigroup}}
\label{GapsOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 \texttt{NS} is a numerical semigroup. It returns the set of gaps of \texttt{NS}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> GapsOfNumericalSemigroup(NumericalSemigroup(3,5,7));
  [ 1, 2, 4 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{FundamentalGapsOfNumericalSemigroup}}
\logpage{[ 3, 3, 2 ]}\nobreak
\hyperdef{L}{X81EC33E978C73FEA}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{FundamentalGapsOfNumericalSemigroup({\slshape S})\index{FundamentalGapsOfNumericalSemigroup@\texttt{FundamentalGapsOfNumericalSemigroup}}
\label{FundamentalGapsOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 \texttt{S} is a numerical semigroup. It returns the set of fundamental gaps of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S := NumericalSemigroup("modular", 5,53);
  <Modular numerical semigroup satisfying 5x mod 53 <= x >
  gap> FundamentalGapsOfNumericalSemigroup(S);
  [ 16, 17, 18, 19, 27, 28, 29, 30, 31, 40, 41, 42 ]
  gap> GapsOfNumericalSemigroup(S);
  [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29,
    30, 31, 40, 41, 42 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{SpecialGapsOfNumericalSemigroup}}
\logpage{[ 3, 3, 3 ]}\nobreak
\hyperdef{L}{X7E373952877AC30A}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SpecialGapsOfNumericalSemigroup({\slshape S})\index{SpecialGapsOfNumericalSemigroup@\texttt{SpecialGapsOfNumericalSemigroup}}
\label{SpecialGapsOfNumericalSemigroup}
}\hfill{\scriptsize (attribute)}}\\


 \texttt{S} is a numerical semigroup. It returns the special gaps of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S := NumericalSemigroup("modular", 5,53);
  <Modular numerical semigroup satisfying 5x mod 53 <= x >
  gap> SpecialGapsOfNumericalSemigroup(S);
  [ 40, 41, 42 ]
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{ Presentations of Numerical Semigroups }}\logpage{[ 4, 0, 0 ]}
\hyperdef{L}{X7969F7F27AAF0BF1}{}
{
  In this chapter we explain how to compute a minimal presentation of a
numerical semigroup. There are three functions involved in this process. 
\section{\textcolor{Chapter }{Presentations of Numerical Semigroups}}\logpage{[ 4, 1, 0 ]}
\hyperdef{L}{X7969F7F27AAF0BF1}{}
{
  

\subsection{\textcolor{Chapter }{FortenTruncatedNCForNumericalSemigroups}}
\logpage{[ 4, 1, 1 ]}\nobreak
\hyperdef{L}{X8028208F84950722}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{FortenTruncatedNCForNumericalSemigroups({\slshape L})\index{FortenTruncatedNCForNumericalSemigroups@\texttt{FortenTruncatedNCForNumericalSemigroups}}
\label{FortenTruncatedNCForNumericalSemigroups}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape L}} contains the list of coefficients of a single linear equation. This function
gives a minimal generator of the affine semigroup of nonnegative solutions of
this equation with the first coordinate equal to one (see \cite{MR1283022}). Returns \texttt{fail} if no solution exists. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> FortenTruncatedNCForNumericalSemigroups([ -57, 3 ]);
  [ 1, 19 ]
  gap> FortenTruncatedNCForNumericalSemigroups([ -57, 33 ]);
  fail
  gap> FortenTruncatedNCForNumericalSemigroups([ -57, 19 ]);
  [ 1, 3 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MinimalPresentationOfNumericalSemigroup}}
\logpage{[ 4, 1, 2 ]}\nobreak
\hyperdef{L}{X7D8199858781EB41}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MinimalPresentationOfNumericalSemigroup({\slshape S})\index{MinimalPresentationOfNumericalSemigroup@\texttt{MinimalPresentationOfNumericalSemigroup}}
\label{MinimalPresentationOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. The output is a list of lists with two elements.
Each list of two elements represents a relation between the minimal generators
of the numerical semigroup. If $ \{ \{x_1,y_1\},\ldots,\{x_k,y_k\}\} $ is the output and $ \{m_1,\ldots,m_n\} $ is the minimal system of generators of the numerical semigroup, then $ \{x_i,y_i\}=\{\{a_{i_1},\ldots,a_{i_n}\},\{b_{i_1},\ldots,b_{i_n}\}\}$ and $ a_{i_1}m_1+\cdots+a_{i_n}m_n= b_{i_1}m_1+ \cdots +b_{i_n}m_n.$ 

 Any other relation among the minimal generators of the semigroup can be
deduced from the ones given in the output. 

 The algorithm implemented is described in \cite{Ros96} (see also \cite{RGS99}). 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(3,5,7);
  <Numerical semigroup with 3 generators>
  gap> MinimalPresentationOfNumericalSemigroup(s);
  [ [ [ 1, 0, 1 ], [ 0, 2, 0 ] ], [ [ 4, 0, 0 ], [ 0, 1, 1 ] ],
    [ [ 3, 1, 0 ], [ 0, 0, 2 ] ] ]
  
                          
\end{Verbatim}
 The first element in the list means that $ 1\times 3+1\times 7=2\times 5 $, and so on. }

 

\subsection{\textcolor{Chapter }{GraphAssociatedToElementInNumericalSemigroup}}
\logpage{[ 4, 1, 3 ]}\nobreak
\hyperdef{L}{X81CC5A6C870377E1}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{GraphAssociatedToElementInNumericalSemigroup({\slshape n, S})\index{GraphAssociatedToElementInNumericalSemigroup@\texttt{Graph}\-\texttt{Associated}\-\texttt{To}\-\texttt{Element}\-\texttt{In}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{GraphAssociatedToElementInNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape n}} is an element in \mbox{\texttt{\slshape S}}. 

 The output is a pair. If $ \{m_1,\ldots,m_n\} $ is the set of minimal generators of \mbox{\texttt{\slshape S}}, then the first component is the set of vertices of the graph associated to \mbox{\texttt{\slshape n}} in \mbox{\texttt{\slshape S}}, that is, the set $\{ m_i \ |\ n-m_i\in S\} $, and the second component is the set of edges of this graph, that is, $ \{ \{m_i,m_j\} \ |\ n-(m_i+m_j)\in S\}.$ 

 This function is used to compute a minimal presentation of the numerical
semigroup \mbox{\texttt{\slshape S}}, as explained in \cite{Ros96}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(3,5,7);
  <Numerical semigroup with 3 generators>
  gap> GraphAssociatedToElementInNumericalSemigroup(10,s);
  [ [ 3, 5, 7 ], [ [ 3, 7 ] ] ]
  
                          
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{ Constructing numerical semigroups from others }}\logpage{[ 5, 0, 0 ]}
\hyperdef{L}{X8148F05A830EE2D5}{}
{
  
\section{\textcolor{Chapter }{ Adding and removing elements of a numerical semigroup }}\logpage{[ 5, 1, 0 ]}
\hyperdef{L}{X782F3AB97ACF84B8}{}
{
  In this section we show how to construct new numerical semigroups from a given
numerical semigroup. Two dual operations are presented. The first one removes
a minimal generator from a numerical semigroup. The second adds a special gap
to a semigroup (see \cite{RGGJ03}). 

\subsection{\textcolor{Chapter }{RemoveMinimalGeneratorFromNumericalSemigroup}}
\logpage{[ 5, 1, 1 ]}\nobreak
\hyperdef{L}{X7C94611F7DD9E742}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RemoveMinimalGeneratorFromNumericalSemigroup({\slshape n, S})\index{RemoveMinimalGeneratorFromNumericalSemigroup@\texttt{Remove}\-\texttt{Minimal}\-\texttt{Generator}\-\texttt{From}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{RemoveMinimalGeneratorFromNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape n}} is one if its minimal generators. 

 The output is the numerical semigroup $ \mbox{\texttt{\slshape S}} \setminus\{\mbox{\texttt{\slshape n}}\} $ (see \cite{RGGJ03}; $S\setminus\{n\}$ is a numerical semigroup if and only if $n$ is a minimal generator of $S$). 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(3,5,7);
  <Numerical semigroup with 3 generators>
  gap> RemoveMinimalGeneratorFromNumericalSemigroup(7,s);
  <Numerical semigroup with 3 generators>
  gap> MinimalGeneratingSystemOfNumericalSemigroup(last);
  [ 3, 5 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{AddSpecialGapOfNumericalSemigroup}}
\logpage{[ 5, 1, 2 ]}\nobreak
\hyperdef{L}{X865EA8377D632F53}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AddSpecialGapOfNumericalSemigroup({\slshape g, S})\index{AddSpecialGapOfNumericalSemigroup@\texttt{AddSpecialGapOfNumericalSemigroup}}
\label{AddSpecialGapOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape g}} is a special gap of \mbox{\texttt{\slshape S}} 

 The output is the numerical semigroup $ \mbox{\texttt{\slshape S}} \cup\{\mbox{\texttt{\slshape g}}\} $ (see \cite{RGGJ03}, where it is explained why this set is a numerical semigroup). 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(3,5,7);
  <Numerical semigroup with 3 generators>
  gap> s2:=RemoveMinimalGeneratorFromNumericalSemigroup(5,s);
  <Numerical semigroup with 3 generators>
  gap> s3:=AddSpecialGapOfNumericalSemigroup(5,s2);
  <Numerical semigroup>
  gap> SmallElementsOfNumericalSemigroup(s) =
  > SmallElementsOfNumericalSemigroup(s3);
  true                
  gap> s=s3;
  true
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IntersectionOfNumericalSemigroups}}
\logpage{[ 5, 1, 3 ]}\nobreak
\hyperdef{L}{X874494928728023E}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IntersectionOfNumericalSemigroups({\slshape S, T})\index{IntersectionOfNumericalSemigroups@\texttt{IntersectionOfNumericalSemigroups}}
\label{IntersectionOfNumericalSemigroups}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} and \mbox{\texttt{\slshape T}} are numerical semigroups. Computes the intersection of \mbox{\texttt{\slshape S}} and \mbox{\texttt{\slshape T}} (which is a numerical semigroup). 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  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> SmallElementsOfNumericalSemigroup(S);
  [ 0, 11, 12, 13, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ]
  gap> SmallElementsOfNumericalSemigroup(T);
  [ 0, 2, 4, 6, 8, 10, 12, 14, 16 ]
  gap> IntersectionOfNumericalSemigroups(S,T);
  <Numerical semigroup>
  gap> SmallElementsOfNumericalSemigroup(last);
  [ 0, 12, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{QuotientOfNumericalSemigroup}}
\logpage{[ 5, 1, 4 ]}\nobreak
\hyperdef{L}{X83CCE63C82F34C25}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{QuotientOfNumericalSemigroup({\slshape S, n})\index{QuotientOfNumericalSemigroup@\texttt{QuotientOfNumericalSemigroup}}
\label{QuotientOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape n}} is an integer. Computes the quotient of \mbox{\texttt{\slshape S}} by \mbox{\texttt{\slshape n}}, that is, the set $\{ x\in {\mathbb N}\ |\ nx \in S\}$, which is again a numerical semigroup. \texttt{S / n} may be used as a short for \texttt{QuotientOfNumericalSemigroup(S, n)}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(3,29);
  <Numerical semigroup with 2 generators>
  gap> SmallElementsOfNumericalSemigroup(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> SmallElementsOfNumericalSemigroup(t);
  [ 0, 3, 5, 6, 8 ]
  gap> u := s / 7;
  <Numerical semigroup>
  gap> SmallElementsOfNumericalSemigroup(u);
  [ 0, 3, 5, 6, 8 ]
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{ Constructing the set of all numerical semigroups containing a given numerical
semigroup }}\logpage{[ 5, 2, 0 ]}
\hyperdef{L}{X867D9A9A87CEB869}{}
{
  In order to construct the set of numerical semigroups containing a fixed
numerical semigroup $S$, one first constructs its unitary extensions, that is to say, the sets $S\cup\{g\}$ that are numerical semigroups with $g$ a positive integer. This is achieved by constructing the special gaps of the
semigroup, and then adding each of them to the numerical semigroup. Then we
repeat the process for each of this new numerical semigroups until we reach $ {\mathbb N} $. 

 These procedures are described in \cite{RGGJ03}. 

\subsection{\textcolor{Chapter }{OverSemigroupsNumericalSemigroup}}
\logpage{[ 5, 2, 1 ]}\nobreak
\hyperdef{L}{X7EEA97AB85FE078C}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{OverSemigroupsNumericalSemigroup({\slshape s})\index{OverSemigroupsNumericalSemigroup@\texttt{OverSemigroupsNumericalSemigroup}}
\label{OverSemigroupsNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape s}} is a numerical semigroup. The output is the set of numerical semigroups
containing it. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> OverSemigroupsNumericalSemigroup(NumericalSemigroup(3,5,7));
  [ <Numerical semigroup with 1 generators>, <Numerical semigroup>,
    <Numerical semigroup>, <Numerical semigroup with 3 generators> ]
  gap> List(last,s->MinimalGeneratingSystemOfNumericalSemigroup(s));
  [ [ 1 ], [ 3, 4, 5 ], [ 2, 3 ], [ 3, 5, 7 ] ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{NumericalSemigroupsWithFrobeniusNumber}}
\logpage{[ 5, 2, 2 ]}\nobreak
\hyperdef{L}{X87369D567AA6DBA0}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupsWithFrobeniusNumber({\slshape f})\index{NumericalSemigroupsWithFrobeniusNumber@\texttt{NumericalSemigroupsWithFrobeniusNumber}}
\label{NumericalSemigroupsWithFrobeniusNumber}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape f}} is an non zero integer greater than or equal to -1. The output is the set of
numerical semigroups with Frobenius number \mbox{\texttt{\slshape f}}. The algorithm implemented is given in \cite{RGGJ04}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> Length(NumericalSemigroupsWithFrobeniusNumber(20));
  900
  
                          
\end{Verbatim}
 }

  Given a numerical semigroup of genus g, removing minimal generators, one
obtains numerical semigroups of genus g+1. In order to avoid repetitions, we
only remove minimal generators greater than the frobenius number of the
numerical semigroup (this is accomplished with the local function sons). 

 These procedures are described in \cite{RGGB03} and \cite{B-A08}. 

\subsection{\textcolor{Chapter }{NumericalSemigroupsWithGenus}}
\logpage{[ 5, 2, 3 ]}\nobreak
\hyperdef{L}{X86970F6A868DEA95}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{NumericalSemigroupsWithGenus({\slshape g})\index{NumericalSemigroupsWithGenus@\texttt{NumericalSemigroupsWithGenus}}
\label{NumericalSemigroupsWithGenus}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape g}} is a nonnegative integer. The output is the set of numerical semigroups with
genus\mbox{\texttt{\slshape g}} . 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> NumericalSemigroupsWithGenus(5);
  [ <Numerical semigroup with 6 generators>, 
    <Numerical semigroup with 5 generators>, 
    <Numerical semigroup with 5 generators>, 
    <Numerical semigroup with 5 generators>, 
    <Numerical semigroup with 5 generators>, 
    <Numerical semigroup with 4 generators>, 
    <Numerical semigroup with 4 generators>, 
    <Numerical semigroup with 4 generators>, 
    <Numerical semigroup with 4 generators>, 
    <Numerical semigroup with 3 generators>, 
    <Numerical semigroup with 3 generators>, 
    <Numerical semigroup with 2 generators> ]
  gap> List(last,s->MinimalGeneratingSystemOfNumericalSemigroup(s));
  [ [ 6, 7, 8, 9, 10, 11 ], [ 5, 7, 8, 9, 11 ], [ 5, 6, 8, 9 ], [ 5, 6, 7, 9 ], 
    [ 5, 6, 7, 8 ], [ 4, 6, 7 ], [ 4, 7, 9, 10 ], [ 4, 6, 9, 11 ], 
    [ 4, 5, 11 ], [ 3, 8, 10 ], [ 3, 7, 11 ], [ 2, 11 ] ]
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{ Irreducible numerical semigroups }}\logpage{[ 6, 0, 0 ]}
\hyperdef{L}{X83C597EC7FAA1C0F}{}
{
  
\section{\textcolor{Chapter }{ Irreducible numerical semigroups }}\logpage{[ 6, 1, 0 ]}
\hyperdef{L}{X83C597EC7FAA1C0F}{}
{
  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 \cite{RB03}). Hence, according to \cite{FGH87} (respectively \cite{BDF97}), symmetric (respectively pseudo-symmetric) numerical semigroups are those
irreducible numerical semigroups with odd (respectively even) Frobenius
number. 

 In \cite{RGGJ03} 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 \cite{RGS04}), 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_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 \cite{RGGJ03}. 

\subsection{\textcolor{Chapter }{IsIrreducibleNumericalSemigroup}}
\logpage{[ 6, 1, 1 ]}\nobreak
\hyperdef{L}{X87D62468791EDE8A}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsIrreducibleNumericalSemigroup({\slshape s})\index{IsIrreducibleNumericalSemigroup@\texttt{IsIrreducibleNumericalSemigroup}}
\label{IsIrreducibleNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape s}} is a numerical semigroup. The output is true if \mbox{\texttt{\slshape s}} is irreducible, false otherwise. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> IsIrreducibleNumericalSemigroup(NumericalSemigroup(4,6,9));
  true
  gap> IsIrreducibleNumericalSemigroup(NumericalSemigroup(4,6,7,9));
  false
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsSymmetricNumericalSemigroup}}
\logpage{[ 6, 1, 2 ]}\nobreak
\hyperdef{L}{X7BCDAFE3791A3C48}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsSymmetricNumericalSemigroup({\slshape s})\index{IsSymmetricNumericalSemigroup@\texttt{IsSymmetricNumericalSemigroup}}
\label{IsSymmetricNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape s}} is a numerical semigroup. The output is true if \mbox{\texttt{\slshape s}} is symmetric, false otherwise. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> IsSymmetricNumericalSemigroup(NumericalSemigroup(10,23));      
  true            
  gap> IsSymmetricNumericalSemigroup(NumericalSemigroup(10,11,23));
  false
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsPseudoSymmetricNumericalSemigroup}}
\logpage{[ 6, 1, 3 ]}\nobreak
\hyperdef{L}{X84125DC485D48A88}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsPseudoSymmetricNumericalSemigroup({\slshape s})\index{IsPseudoSymmetricNumericalSemigroup@\texttt{IsPseudoSymmetricNumericalSemigroup}}
\label{IsPseudoSymmetricNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape s}} is a numerical semigroup. The output is true if \mbox{\texttt{\slshape s}} is pseudo-symmetric, false otherwise. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> IsPseudoSymmetricNumericalSemigroup(NumericalSemigroup(6,7,8,9,11));
  true
  gap> IsPseudoSymmetricNumericalSemigroup(NumericalSemigroup(4,6,9));
  false
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{AnIrreducibleNumericalSemigroupWithFrobeniusNumber}}
\logpage{[ 6, 1, 4 ]}\nobreak
\hyperdef{L}{X7C8AB03F7E0B71F0}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AnIrreducibleNumericalSemigroupWithFrobeniusNumber({\slshape f})\index{AnIrreducibleNumericalSemigroupWithFrobeniusNumber@\texttt{AnIrreducible}\-\texttt{Numerical}\-\texttt{Semigroup}\-\texttt{With}\-\texttt{Frobenius}\-\texttt{Number}}
\label{AnIrreducibleNumericalSemigroupWithFrobeniusNumber}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape f}} is an integer greater than or equal to -1. The output is an irreducible
numerical semigroup with frobenius number \mbox{\texttt{\slshape  f}}. From the way the procedure is implemented, the resulting semigroup has at
most four generators (see \cite{RGS04}). 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> FrobeniusNumber(AnIrreducibleNumericalSemigroupWithFrobeniusNumber(28));
  28
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IrreducibleNumericalSemigroupsWithFrobeniusNumber}}
\logpage{[ 6, 1, 5 ]}\nobreak
\hyperdef{L}{X78345A267ADEFBAB}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IrreducibleNumericalSemigroupsWithFrobeniusNumber({\slshape f})\index{IrreducibleNumericalSemigroupsWithFrobeniusNumber@\texttt{Irreducible}\-\texttt{Numerical}\-\texttt{Semigroups}\-\texttt{With}\-\texttt{Frobenius}\-\texttt{Number}}
\label{IrreducibleNumericalSemigroupsWithFrobeniusNumber}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape f}} is an integer greater than or equal to -1. The output is the set of all
irreducible numerical semigroups with frobenius number \mbox{\texttt{\slshape f}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> Length(IrreducibleNumericalSemigroupsWithFrobeniusNumber(39));
  227
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{DecomposeIntoIrreducibles}}
\logpage{[ 6, 1, 6 ]}\nobreak
\hyperdef{L}{X8227EF2B7F67E2FB}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DecomposeIntoIrreducibles({\slshape s})\index{DecomposeIntoIrreducibles@\texttt{DecomposeIntoIrreducibles}}
\label{DecomposeIntoIrreducibles}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape s}} is a numerical semigroup. The output is a set of irreducible numerical
semigroups containing it. These elements appear in a minimal decomposition of \mbox{\texttt{\slshape s}} as intersection into irreducibles. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> DecomposeIntoIrreducibles(NumericalSemigroup(5,6,8));
  [ <Numerical semigroup>, <Numerical semigroup> ]
  
                          
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{ Ideals of numerical semigroups }}\logpage{[ 7, 0, 0 ]}
\hyperdef{L}{X83C2F0CF825B3869}{}
{
  
\section{\textcolor{Chapter }{ Ideals of numerical semigroups }}\logpage{[ 7, 1, 0 ]}
\hyperdef{L}{X83C2F0CF825B3869}{}
{
  Let $S$ be a numerical semigroup. A set $I$ of integers is an \emph{ideal relative} to a numerical semigroup $S$ provided that $I+S\subseteq I$ and that there exists $d\in S$ such that $d+I\subseteq S$. 

 If $\{i_1,\ldots,i_k\}$ is a subset of ${\mathbb Z}$, then the set $I=\{i_1,\ldots,i_k\}+S=\bigcup_{n=1}^k i_n+S$ is an ideal relative to $S$, and $\{i_1,\ldots, i_k\}$ is a system of generators of $I$. A system of generators $M$ is minimal if no proper subset of $M$ generates the same ideal. Usually, ideals are specified by means of its
generators and the ambient numerical semigroup to which they are ideals (for
more information see for instance \cite{BDF97}). 

\subsection{\textcolor{Chapter }{IdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 1 ]}\nobreak
\hyperdef{L}{X78E5F44E81485C17}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IdealOfNumericalSemigroup({\slshape l, S})\index{IdealOfNumericalSemigroup@\texttt{IdealOfNumericalSemigroup}}
\label{IdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape l}} a list of integers. 

 The output is the ideal of \mbox{\texttt{\slshape S}} generated by \mbox{\texttt{\slshape l}} 

 There are several shortcuts for this function, as shown in the example. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> IdealOfNumericalSemigroup([3,5],NumericalSemigroup(9,11));
  <Ideal of numerical semigroup>
  gap> [3,5]+NumericalSemigroup(9,11);
  <Ideal of numerical semigroup>
  gap> last=last2;
  true
  gap> 3+NumericalSemigroup(5,9);
  <Ideal of numerical semigroup>
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 2 ]}\nobreak
\hyperdef{L}{X85BD6FAD7EA3B5DD}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsIdealOfNumericalSemigroup({\slshape Obj})\index{IsIdealOfNumericalSemigroup@\texttt{IsIdealOfNumericalSemigroup}}
\label{IsIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Tests if the object \mbox{\texttt{\slshape Obj}} is an ideal of a numerical semigroup. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[1..7]+NumericalSemigroup(7,19);
  <Ideal of numerical semigroup>
  gap> IsIdealOfNumericalSemigroup(I);
  true
  gap> IsIdealOfNumericalSemigroup(2);
  false
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MinimalGeneratingSystemOfIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 3 ]}\nobreak
\hyperdef{L}{X7CF1EA687B137C3D}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MinimalGeneratingSystemOfIdealOfNumericalSemigroup({\slshape I})\index{MinimalGeneratingSystemOfIdealOfNumericalSemigroup@\texttt{Minimal}\-\texttt{Generating}\-\texttt{System}\-\texttt{Of}\-\texttt{Ideal}\-\texttt{Of}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{MinimalGeneratingSystemOfIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I}} is an ideal of a numerical semigroup. 

 The output is the minimal system of generators of \mbox{\texttt{\slshape I}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[3,5,9]+NumericalSemigroup(2,11);
  <Ideal of numerical semigroup>
  gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(I);
  [ 3 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{GeneratorsOfIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 4 ]}\nobreak
\hyperdef{L}{X86A9200283D1B32B}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{GeneratorsOfIdealOfNumericalSemigroup({\slshape I})\index{GeneratorsOfIdealOfNumericalSemigroup@\texttt{GeneratorsOfIdealOfNumericalSemigroup}}
\label{GeneratorsOfIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\
\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{GeneratorsOfIdealOfNumericalSemigroupNC({\slshape I})\index{GeneratorsOfIdealOfNumericalSemigroupNC@\texttt{GeneratorsOfIdealOfNumericalSemigroupNC}}
\label{GeneratorsOfIdealOfNumericalSemigroupNC}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I}} is an ideal of a numerical semigroup. 

 The output of \texttt{GeneratorsOfIdealOfNumericalSemigroup} is a system of generators of the ideal. If the minimal system of generators is
known, then it is used as output. \texttt{GeneratorsOfIdealOfNumericalSemigroupNC} always returns the set of generators stored in \mbox{\texttt{\slshape I!.generators}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[3,5,9]+NumericalSemigroup(2,11);
  <Ideal of numerical semigroup>
  gap> GeneratorsOfIdealOfNumericalSemigroup(I);
  [ 3, 5, 9 ]
  gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(I);
  [ 3 ]
  gap> GeneratorsOfIdealOfNumericalSemigroup(I);
  [ 3 ]
  gap> GeneratorsOfIdealOfNumericalSemigroupNC(I);
  [ 3, 5, 9 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{AmbientNumericalSemigroupOfIdeal}}
\logpage{[ 7, 1, 5 ]}\nobreak
\hyperdef{L}{X81E445518529C175}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{AmbientNumericalSemigroupOfIdeal({\slshape I})\index{AmbientNumericalSemigroupOfIdeal@\texttt{AmbientNumericalSemigroupOfIdeal}}
\label{AmbientNumericalSemigroupOfIdeal}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I}} is an ideal of a numerical semigroup, say $S$. 

 The output is $S$. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[3,5,9]+NumericalSemigroup(2,11);
  <Ideal of numerical semigroup>
  gap> AmbientNumericalSemigroupOfIdeal(I);
  <Numerical semigroup with 2 generators>
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{SmallElementsOfIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 6 ]}\nobreak
\hyperdef{L}{X7BDEBFCB7A1DAFC7}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SmallElementsOfIdealOfNumericalSemigroup({\slshape I})\index{SmallElementsOfIdealOfNumericalSemigroup@\texttt{SmallElementsOfIdealOfNumericalSemigroup}}
\label{SmallElementsOfIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I}} is an ideal of a numerical semigroup. 

 The output is a list with the elements in \mbox{\texttt{\slshape I}} that are less than or equal to the greatest integer not belonging to the ideal
plus one. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[3,5,9]+NumericalSemigroup(2,11);
  <Ideal of numerical semigroup>
  gap> SmallElementsOfIdealOfNumericalSemigroup(I);
  [ 3, 5, 7, 9, 11, 13 ]
  gap> J:=[2,11]+NumericalSemigroup(2,11);
  <Ideal of numerical semigroup>
  gap> SmallElementsOfIdealOfNumericalSemigroup(J);
  [ 2, 4, 6, 8, 10 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{BelongsToIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 7 ]}\nobreak
\hyperdef{L}{X87508E7A7CFB0B20}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{BelongsToIdealOfNumericalSemigroup({\slshape n, I})\index{BelongsToIdealOfNumericalSemigroup@\texttt{BelongsToIdealOfNumericalSemigroup}}
\label{BelongsToIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I}} is an ideal of a numerical semigroup, \mbox{\texttt{\slshape n}} is an integer. 

 The output is true if \mbox{\texttt{\slshape n}} belongs to \mbox{\texttt{\slshape I}}. 

 \mbox{\texttt{\slshape  n in I}} can be used for short. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> J:=[2,11]+NumericalSemigroup(2,11);
  <Ideal of numerical semigroup>
  gap> BelongsToIdealOfNumericalSemigroup(9,J);
  false
  gap> 9 in J;
  false
  gap> BelongsToIdealOfNumericalSemigroup(10,J);
  true
  gap> 10 in J;
  true
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{SumIdealsOfNumericalSemigroup}}
\logpage{[ 7, 1, 8 ]}\nobreak
\hyperdef{L}{X7B39610D7AD5A654}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SumIdealsOfNumericalSemigroup({\slshape I, J})\index{SumIdealsOfNumericalSemigroup@\texttt{SumIdealsOfNumericalSemigroup}}
\label{SumIdealsOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I, J}} are ideals of a numerical semigroup. 

 The output is the sum of both ideals $\{ i+j \ |\ i\in \mbox{\texttt{\slshape I}}, j\in \mbox{\texttt{\slshape J}}\}$. 

 \mbox{\texttt{\slshape I + J}} is a synonym of this function. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[3,5,9]+NumericalSemigroup(2,11);
  <Ideal of numerical semigroup>
  gap> J:=[2,11]+NumericalSemigroup(2,11);
  <Ideal of numerical semigroup>
  gap> I+J;
  <Ideal of numerical semigroup>
  gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(last);
  [ 5, 14 ]
  gap> SumIdealsOfNumericalSemigroup(I,J);
  <Ideal of numerical semigroup>
  gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(last);
  [ 5, 14 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MultipleOfIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 9 ]}\nobreak
\hyperdef{L}{X857FE5C57EE98F5E}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MultipleOfIdealOfNumericalSemigroup({\slshape n, I})\index{MultipleOfIdealOfNumericalSemigroup@\texttt{MultipleOfIdealOfNumericalSemigroup}}
\label{MultipleOfIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I}} is an ideal of a numerical semigroup, \mbox{\texttt{\slshape n}} is a non negative integer. 

 The output is the ideal $\mbox{\texttt{\slshape I}}+\cdots+\mbox{\texttt{\slshape I}}$ (\mbox{\texttt{\slshape n}} times). 

 \mbox{\texttt{\slshape  n * I}} can be used for short. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[0,1]+NumericalSemigroup(3,5,7);
  <Ideal of numerical semigroup>
  gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(2*I);
  [ 0, 1, 2 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{SubtractIdealsOfNumericalSemigroup}}
\logpage{[ 7, 1, 10 ]}\nobreak
\hyperdef{L}{X78743CE2845B5860}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{SubtractIdealsOfNumericalSemigroup({\slshape I, J})\index{SubtractIdealsOfNumericalSemigroup@\texttt{SubtractIdealsOfNumericalSemigroup}}
\label{SubtractIdealsOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I, J}} are ideals of a numerical semigroup. 

 The output is the ideal $\{ z\in {\mathbb Z}\ |\ z+\mbox{\texttt{\slshape J}}\subseteq \mbox{\texttt{\slshape I}}\}$. 

 \mbox{\texttt{\slshape I - J}} is a synonym of this function. The following example appears in \cite{HS04}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S:=NumericalSemigroup(14, 15, 20, 21, 25);
  <Numerical semigroup with 5 generators>
  gap> I:=[0,1]+S;
  <Ideal of numerical semigroup>
  gap> II:=(0+S)-I;
  <Ideal of numerical semigroup>
  gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(I);
  [ 0, 1 ]
  gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(II);
  [ 14, 20 ]
  gap> MinimalGeneratingSystemOfIdealOfNumericalSemigroup(I+II);
  [ 14, 15, 20, 21 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{DifferenceOfIdealsOfNumericalSemigroup}}
\logpage{[ 7, 1, 11 ]}\nobreak
\hyperdef{L}{X7C2DAB737ECE7D34}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DifferenceOfIdealsOfNumericalSemigroup({\slshape I, J})\index{DifferenceOfIdealsOfNumericalSemigroup@\texttt{DifferenceOfIdealsOfNumericalSemigroup}}
\label{DifferenceOfIdealsOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I, J}} are ideals of a numerical semigroup. \mbox{\texttt{\slshape J}} must be contained in \mbox{\texttt{\slshape I}}. 

 The output is the set $\mbox{\texttt{\slshape I}}\setminus \mbox{\texttt{\slshape J}}$. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> S:=NumericalSemigroup(14, 15, 20, 21, 25);
  <Numerical semigroup with 5 generators>
  gap> I:=[0,1]+S;
  <Ideal of numerical semigroup>
  gap> 2*I-2*I;
  <Ideal of numerical semigroup>
  gap> I-I;
  <Ideal of numerical semigroup>
  gap> DifferenceOfIdealsOfNumericalSemigroup(last2,last);
  [ 26, 27, 37, 38 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{TranslationOfIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 12 ]}\nobreak
\hyperdef{L}{X803921F97BEDCA88}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{TranslationOfIdealOfNumericalSemigroup({\slshape k, I})\index{TranslationOfIdealOfNumericalSemigroup@\texttt{TranslationOfIdealOfNumericalSemigroup}}
\label{TranslationOfIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Given an ideal \mbox{\texttt{\slshape I}} of a numerical semigroup S and an integer \mbox{\texttt{\slshape k}} returns an ideal of the numerical semigroup S generated by $\{i_1+k,\ldots,i_n+k\}$ where $\{i_1,\ldots,i_n\}$ is the system of generators of \mbox{\texttt{\slshape I}}. 

 As a synonym to \texttt{TranslationOfIdealOfNumericalSemigroup(k, I)} the expression \texttt{k + I} may be used. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(13,23);
  <Numerical semigroup with 2 generators>
  gap> l:=List([1..6], _ -> Random([8..34]));
  [ 22, 29, 34, 25, 10, 12 ]
  gap> I:=IdealOfNumericalSemigroup(l, s);
  <Ideal of numerical semigroup>
  gap> It:=TranslationOfIdealOfNumericalSemigroup(7,I);
  <Ideal of numerical semigroup>
  gap> It2:=7+I;
  <Ideal of numerical semigroup>
  gap> It2=It;
  true
  
  										
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{HilbertFunctionOfIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 13 ]}\nobreak
\hyperdef{L}{X82156F18807B00BF}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{HilbertFunctionOfIdealOfNumericalSemigroup({\slshape n, I})\index{HilbertFunctionOfIdealOfNumericalSemigroup@\texttt{Hilbert}\-\texttt{Function}\-\texttt{Of}\-\texttt{Ideal}\-\texttt{Of}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{HilbertFunctionOfIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I}} is an ideal of a numerical semigroup, \mbox{\texttt{\slshape n}} is a non negative integer. \mbox{\texttt{\slshape I}} must be contained in its ambient semigroup. 

 The output is the cardinality of the set $\mbox{\texttt{\slshape n}}\mbox{\texttt{\slshape I}}\setminus (\mbox{\texttt{\slshape n}}+1)\mbox{\texttt{\slshape I}}$. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[6,9,11]+NumericalSemigroup(6,9,11);;
  gap> List([1..7],n->HilbertFunctionOfIdealOfNumericalSemigroup(n,I));
  [ 3, 5, 6, 6, 6, 6, 6 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{BlowUpIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 14 ]}\nobreak
\hyperdef{L}{X7C00A86F83024003}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{BlowUpIdealOfNumericalSemigroup({\slshape I})\index{BlowUpIdealOfNumericalSemigroup@\texttt{BlowUpIdealOfNumericalSemigroup}}
\label{BlowUpIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I}} is an ideal of a numerical semigroup. 

 The output is the ideal $\bigcup_{n\geq 0} n\mbox{\texttt{\slshape I}}-n\mbox{\texttt{\slshape I}}$. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[0,2]+NumericalSemigroup(6,9,11);;
  gap> BlowUpIdealOfNumericalSemigroup(I);;
  gap> SmallElementsOfIdealOfNumericalSemigroup(last);
  [ 0, 2, 4, 6, 8 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ReductionNumberIdealNumericalSemigroup}}
\logpage{[ 7, 1, 15 ]}\nobreak
\hyperdef{L}{X82C2BF5E840C815D}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ReductionNumberIdealNumericalSemigroup({\slshape I})\index{ReductionNumberIdealNumericalSemigroup@\texttt{ReductionNumberIdealNumericalSemigroup}}
\label{ReductionNumberIdealNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape I}} is an ideal of a numerical semigroup. 

 The output is the least integer such that $n \mbox{\texttt{\slshape I}} + i=(n+1)\mbox{\texttt{\slshape I}}$, where $i=min(\mbox{\texttt{\slshape I}})$. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> I:=[0,2]+NumericalSemigroup(6,9,11);;
  gap> ReductionNumberIdealNumericalSemigroup(I);
  2
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MaximalIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 16 ]}\nobreak
\hyperdef{L}{X829EACA378BE3665}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MaximalIdealOfNumericalSemigroup({\slshape S})\index{MaximalIdealOfNumericalSemigroup@\texttt{MaximalIdealOfNumericalSemigroup}}
\label{MaximalIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Returns the maximal ideal of the numerical semigroup \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> MaximalIdealOfNumericalSemigroup(NumericalSemigroup(3,7));
  <Ideal of numerical semigroup>
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{BlowUpOfNumericalSemigroup}}
\logpage{[ 7, 1, 17 ]}\nobreak
\hyperdef{L}{X84B5121C7EEECB30}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{BlowUpOfNumericalSemigroup({\slshape S})\index{BlowUpOfNumericalSemigroup@\texttt{BlowUpOfNumericalSemigroup}}
\label{BlowUpOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 If \mbox{\texttt{\slshape M}} is the maximal ideal of the numerical semigroup, then the output is the
numerical semigroup $\bigcup_{n\geq 0} n\mbox{\texttt{\slshape M}}-n\mbox{\texttt{\slshape M}}$. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);
  <Numerical semigroup with 10 generators>
  gap> BlowUpOfNumericalSemigroup(s);
  <Numerical semigroup with 10 generators>
  gap> SmallElementsOfNumericalSemigroup(last);
  [ 0, 5, 10, 12, 15, 17, 20, 22, 24, 25, 27, 29, 30, 32, 34, 35, 36, 37, 39,
    40, 41, 42, 44 ]
  gap> m:=MaximalIdealOfNumericalSemigroup(s);
  <Ideal of numerical semigroup>
  gap> BlowUpIdealOfNumericalSemigroup(m);
  <Ideal of numerical semigroup>
  gap> SmallElementsOfIdealOfNumericalSemigroup(last);
  [ 0, 5, 10, 12, 15, 17, 20, 22, 24, 25, 27, 29, 30, 32, 34, 35, 36, 37, 39,
    40, 41, 42, 44 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MicroInvariantsOfNumericalSemigroup}}
\logpage{[ 7, 1, 18 ]}\nobreak
\hyperdef{L}{X7B29CDA7783FC0D2}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MicroInvariantsOfNumericalSemigroup({\slshape S})\index{MicroInvariantsOfNumericalSemigroup@\texttt{MicroInvariantsOfNumericalSemigroup}}
\label{MicroInvariantsOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Returns the microinvariants of the numerical semigroup \mbox{\texttt{\slshape S}} defined in \cite{E01}. For their computation we have used the formula given in \cite{BF06}. The Ap\texttt{\symbol{92}}'ery set of \mbox{\texttt{\slshape S}} and its blow up are involved in this computation. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);
  <Numerical semigroup with 10 generators>
  gap> bu:=BlowUpOfNumericalSemigroup(s);
  <Numerical semigroup with 10 generators>
  gap> ap:=AperyListOfNumericalSemigroupWRTElement(s,30);;
  gap> apbu:=AperyListOfNumericalSemigroupWRTElement(bu,30);;
  gap> (ap-apbu)/30;
  [ 0, 4, 4, 3, 2, 1, 3, 4, 4, 3, 2, 3, 1, 4, 4, 3, 3, 1, 4, 4, 4, 3, 2, 4, 2,
    5, 4, 3, 3, 2 ]
  gap> MicroInvariantsOfNumericalSemigroup(s)=last;
  true
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsGradedAssociatedRingNumericalSemigroupCM}}
\logpage{[ 7, 1, 19 ]}\nobreak
\hyperdef{L}{X7876199778D6B320}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsGradedAssociatedRingNumericalSemigroupCM({\slshape S})\index{IsGradedAssociatedRingNumericalSemigroupCM@\texttt{IsGraded}\-\texttt{Associated}\-\texttt{Ring}\-\texttt{Numerical}\-\texttt{SemigroupCM}}
\label{IsGradedAssociatedRingNumericalSemigroupCM}
}\hfill{\scriptsize (function)}}\\


 Returns true if the graded ring associated to $K[[\mbox{\texttt{\slshape S}}]]$ is Cohen-Macaulay, and false otherwise. This test is the implementation of the
algorithm given in \cite{BF06}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);
  <Numerical semigroup with 10 generators>
  gap> IsGradedAssociatedRingNumericalSemigroupCM(s);
  false
  gap> MicroInvariantsOfNumericalSemigroup(s);
  [ 0, 4, 4, 3, 2, 1, 3, 4, 4, 3, 2, 3, 1, 4, 4, 3, 3, 1, 4, 4, 4, 3, 2, 4, 2,
    5, 4, 3, 3, 2 ]
  gap> List(AperyListOfNumericalSemigroupWRTElement(s,30),
  > w->MaximumDegreeOfElementWRTNumericalSemigroup (w,s));
  [ 0, 1, 4, 1, 2, 1, 3, 1, 4, 3, 2, 3, 1, 1, 4, 3, 3, 1, 4, 1, 4, 3, 2, 4, 2,
  5, 4, 3, 1, 2 ]
  gap> last=last2;
  false
  gap> s:=NumericalSemigroup(4,6,11);
  <Numerical semigroup with 3 generators>
  gap> IsGradedAssociatedRingNumericalSemigroupCM(s);
  true
  gap> MicroInvariantsOfNumericalSemigroup(s);
  [ 0, 2, 1, 1 ]
  gap> List(AperyListOfNumericalSemigroupWRTElement(s,4),
  > w->MaximumDegreeOfElementWRTNumericalSemigroup(w,s));
  [ 0, 2, 1, 1 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{CanonicalIdealOfNumericalSemigroup}}
\logpage{[ 7, 1, 20 ]}\nobreak
\hyperdef{L}{X835890A078F5D6DC}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{CanonicalIdealOfNumericalSemigroup({\slshape S})\index{CanonicalIdealOfNumericalSemigroup@\texttt{CanonicalIdealOfNumericalSemigroup}}
\label{CanonicalIdealOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Computes a canonical ideal of \mbox{\texttt{\slshape S}} (\cite{BF06}): $\{ x \in \mathbb{Z} | g-x \not \in S\} $. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(4,6,11);
  <Numerical semigroup with 3 generators>
  gap> m:=MaximalIdealOfNumericalSemigroup(s);
  <Ideal of numerical semigroup>
  gap> c:=CanonicalIdealOfNumericalSemigroup(s);
  <Ideal of numerical semigroup>
  gap> (m-c)-c=m;
  true
  gap> id:=3+s;
  <Ideal of numerical semigroup>
  gap> (id-c)-c=id;
  true
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IntersectionIdealsOfNumericalSemigroup}}
\logpage{[ 7, 1, 21 ]}\nobreak
\hyperdef{L}{X85CC100F78608D5E}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IntersectionIdealsOfNumericalSemigroup({\slshape I, J})\index{IntersectionIdealsOfNumericalSemigroup@\texttt{IntersectionIdealsOfNumericalSemigroup}}
\label{IntersectionIdealsOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Given two ideals \mbox{\texttt{\slshape I}} and \mbox{\texttt{\slshape J}} of a numerical semigroup \mbox{\texttt{\slshape S}} returns the ideal of the numerical semigroup \mbox{\texttt{\slshape S}} which is the intersection of the ideals \mbox{\texttt{\slshape I}} and \mbox{\texttt{\slshape J}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> i:=IdealOfNumericalSemigroup([75,89],s);
  <Ideal of numerical semigroup>
  gap> j:=IdealOfNumericalSemigroup([115,289],s);
  <Ideal of numerical semigroup>
  gap> IntersectionIdealsOfNumericalSemigroup(i,j);
  <Ideal of numerical semigroup>
  
                          
\end{Verbatim}
 }

  

\subsection{\textcolor{Chapter }{IsMonomialNumericalSemigroup}}
\logpage{[ 7, 1, 22 ]}\nobreak
\hyperdef{L}{X7A04B8887F493733}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsMonomialNumericalSemigroup({\slshape S})\index{IsMonomialNumericalSemigroup@\texttt{IsMonomialNumericalSemigroup}}
\label{IsMonomialNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. 

 Tests whether \mbox{\texttt{\slshape S}} a monomial numerical semigroup. 

 Let $R$ a Noetherian ring such that $K \subseteq R \subseteq K[[t]]$, $K$ is a field of characteristic zero, the algebraic closure of $R$ is $K[[t]]$, and the conductor $(R : K[[t]])$ is not zero. If $v : K((t))\to {\mathbb Z}$ is the natural valuation for $K((t))$, then $v(R)$ is a numerical semigroup. 

 Let $S$ be a numerical semigroup minimally generated by $\{n_1,\ldots,n_e\}$. The semigroup ring associated to $S$ is $K[[S]]=K[[t^{n_1},\ldots,t^{n_e}]]$. A ring is called a semigroup ring if it is of the form $K[[S]]$, for some numerical semigroup $S$. We say that $S$ is a monomial numerical semigroup if for any $R$ as above with $v(R)=S$, $R$ is a semigroup ring. See \cite{VMic02} for details. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> IsMonomialNumericalSemigroup(NumericalSemigroup(4,6,7));
  true
  gap> IsMonomialNumericalSemigroup(NumericalSemigroup(4,6,11));
  false
  
                          
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{ Numerical semigroups with maximal embedding dimension }}\logpage{[ 8, 0, 0 ]}
\hyperdef{L}{X7D2E70FC82D979D3}{}
{
  
\section{\textcolor{Chapter }{ Numerical semigroups with maximal embedding dimension }}\logpage{[ 8, 1, 0 ]}
\hyperdef{L}{X7D2E70FC82D979D3}{}
{
  If $S$ is a numerical semigroup and $m$ is its multiplicity (the least positive integer belonging to it), then the
embedding dimension $e$ of $S$ (the cardinality of the minimal system of generators of $S$) is less than or equal to $m$. We say that $S$ has maximal embedding dimension (MED for short) when $e=m$. The intersection of two numerical semigroups with the same multiplicity and
maximal embedding dimension is again of maximal embedding dimension. Thus we
define the MED closure of a non-empty subset of positive integers $M=\{m < m_1 < \cdots < m_n <\cdots\}$ with $\gcd(M)=1$ as the intersection of all MED numerical semigroups with multiplicity $m$. 

 Given a MED numerical semigroup $S$, we say that $M=\{m_1 < \cdots< m_k\}$ is a MED system of generators if the MED closure of $M$ is $S$. Moreover, $M$ is a minimal MED generating system for $S$ provided that every proper subset of $M$ is not a MED system of generators of $S$. Minimal MED generating systems are unique, and in general are smaller that
the classical minimal generating systems (see \cite{RGGB03}). 

\subsection{\textcolor{Chapter }{IsMEDNumericalSemigroup}}
\logpage{[ 8, 1, 1 ]}\nobreak
\hyperdef{L}{X867615F8846824EB}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsMEDNumericalSemigroup({\slshape S})\index{IsMEDNumericalSemigroup@\texttt{IsMEDNumericalSemigroup}}
\label{IsMEDNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. 

 Returns true if \mbox{\texttt{\slshape S}} is a MED numerical semigroup and false otherwise. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> IsMEDNumericalSemigroup(NumericalSemigroup(3,5,7)); 
  true 
  gap> IsMEDNumericalSemigroup(NumericalSemigroup(3,5)); 
  false
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MEDNumericalSemigroupClosure}}
\logpage{[ 8, 1, 2 ]}\nobreak
\hyperdef{L}{X86C8358D8530106F}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MEDNumericalSemigroupClosure({\slshape S})\index{MEDNumericalSemigroupClosure@\texttt{MEDNumericalSemigroupClosure}}
\label{MEDNumericalSemigroupClosure}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. 

 Returns the MED closure of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> MEDNumericalSemigroupClosure(NumericalSemigroup(3,5)); 
  <Numerical semigroup> 
  gap> MinimalGeneratingSystemOfNumericalSemigroup(last); 
  [ 3, 5, 7 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MinimalMEDGeneratingSystemOfMEDNumericalSemigroup}}
\logpage{[ 8, 1, 3 ]}\nobreak
\hyperdef{L}{X848FD3FA7DB2DD4C}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MinimalMEDGeneratingSystemOfMEDNumericalSemigroup({\slshape S})\index{MinimalMEDGeneratingSystemOfMEDNumericalSemigroup@\texttt{Minimal}\-\texttt{M}\-\texttt{E}\-\texttt{D}\-\texttt{Generating}\-\texttt{System}\-\texttt{Of}\-\texttt{M}\-\texttt{E}\-\texttt{D}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{MinimalMEDGeneratingSystemOfMEDNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a MED numerical semigroup. 

 Returns the minimal MED generating system of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> MinimalMEDGeneratingSystemOfMEDNumericalSemigroup( 
  > NumericalSemigroup(3,5,7)); 
  [ 3, 5 ]
  
                          
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{ Numerical semigroups with the Arf property and Arf closures }}\logpage{[ 8, 2, 0 ]}
\hyperdef{L}{X82E40EFD83A4A186}{}
{
  Numerical semigroups with the Arf property are a special kind of numerical
semigroups with maximal embedding dimension. A numerical semigroup $S$ is Arf if for every $x,y,z$ in $S$ with $x\geq y\geq z$, one has that $x+y-z\in S$. 

 The intersection of two Arf numerical semigroups is again Arf, and thus we can
consider the Arf closure of a set of nonnegative integers with greatest common
divisor equal to one. Analogously as with MED numerical semigroups, we define
Arf systems of generators and minimal Arf generating system for an Arf
numerical semigroup. These are also unique(see \cite{RGGB04}). 

\subsection{\textcolor{Chapter }{IsArfNumericalSemigroup}}
\logpage{[ 8, 2, 1 ]}\nobreak
\hyperdef{L}{X8255C5907F8968B9}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsArfNumericalSemigroup({\slshape S})\index{IsArfNumericalSemigroup@\texttt{IsArfNumericalSemigroup}}
\label{IsArfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. 

 Returns true if \mbox{\texttt{\slshape S}} is an Arf numerical semigroup and false otherwise. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap>  IsArfNumericalSemigroup(NumericalSemigroup(3,5,7)); 
  true 
  gap>  IsArfNumericalSemigroup(NumericalSemigroup(3,7,11)); 
  false 
  gap> IsMEDNumericalSemigroup(NumericalSemigroup(3,7,11)); 
  true
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ArfNumericalSemigroupClosure}}
\logpage{[ 8, 2, 2 ]}\nobreak
\hyperdef{L}{X7FE10E2F85CB01A2}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ArfNumericalSemigroupClosure({\slshape S})\index{ArfNumericalSemigroupClosure@\texttt{ArfNumericalSemigroupClosure}}
\label{ArfNumericalSemigroupClosure}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. 

 Returns the Arf closure of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> ArfNumericalSemigroupClosure(NumericalSemigroup(3,7,11)); 
  <Numerical semigroup> 
  gap> MinimalGeneratingSystemOfNumericalSemigroup(last); 
  [ 3, 7, 8 ]
  
                          
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MinimalArfGeneratingSystemOfArfNumericalSemigroup}}
\logpage{[ 8, 2, 3 ]}\nobreak
\hyperdef{L}{X7C0D2F7986165DDE}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MinimalArfGeneratingSystemOfArfNumericalSemigroup({\slshape S})\index{MinimalArfGeneratingSystemOfArfNumericalSemigroup@\texttt{Minimal}\-\texttt{Arf}\-\texttt{Generating}\-\texttt{System}\-\texttt{Of}\-\texttt{Arf}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{MinimalArfGeneratingSystemOfArfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is an Arf numerical semigroup. 

 Returns the minimal MED generating system of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> MinimalArfGeneratingSystemOfArfNumericalSemigroup( 
  > NumericalSemigroup(3,7,8)); 
  [ 3, 7 ]
  
                          
\end{Verbatim}
 }

 }

 }

 
\chapter{\textcolor{Chapter }{ Catenary and Tame degrees of numerical semigroups }}\logpage{[ 9, 0, 0 ]}
\hyperdef{L}{X7C76B03A84BA7574}{}
{
  
\section{\textcolor{Chapter }{ Factorizations in Numerical Semigroups }}\logpage{[ 9, 1, 0 ]}
\hyperdef{L}{X7FDB54217B15148F}{}
{
  Let $ S $ be a numerical semigroup minimally generated by $ \{m_1,\ldots,m_n\} $. A factorization of an element $s\in S$ is an n-tuple $ a=(a_1,\ldots,a_n) $ of nonnegative integers such that $ n=a_1 n_1+\cdots+a_n m_n$. The lenght of $a$ is $|a|=a_1+\cdots+a_n$. Given two factorizations $a$ and $b$ of $n$, the distance between $a$ and $b$ is $d(a,b)=\max \{ |a-\gcd(a,b)|,|b-\gcd(a,b)|\}$, where $\gcd((a_1,\ldots,a_n),(b_1,\ldots,b_n))=(\min(a_1,b_1),\ldots,\min(a_n,b_n))$. 

 If $l_1>\cdots > l_k$ are the lenghts of all the factorizations of $s \in S$, the Delta set associated to $s$ is $\Delta(s)=\{l_1-l_2,\ldots,l_k-l_{k-1}\}$. 

 The catenary degree of an element in $S$ is the least positive integer $c$ such that for any two of its factorizations $a$ and $b$, there exists a chain of factorizations starting in $a$ and ending in $b$ and so that the distance between two consecutive links is at most $c$. The catenary degree of $S$ is the supremum of the catenary degrees of the elements in $S$. 

 The tame degree of $S$ is the least positive integer $t$ for any factorization $a$ of an element $s$ in $S$, and any $i$ such that $s-m_i\in S$, there exists another factorization $b$ of $s$ so that the distance to $a$ is at most $t$ and $b_i\not = 0$. 

 The basic properties of these constants can be found in \cite{GHKb}. The algorithm used to compute the catenary and tame degree is an adaptation
of the algorithms appearing in \cite{CGLPR} for numerical semigroup (see \cite{CGL}). The computation of the elascitiy of a numerical semigroup reduces to $m/n$ with $m$ the multiplicity of the semigroup and $n$ its largest minimal generator (see \cite{CHM06} or \cite{GHKb}). 

\subsection{\textcolor{Chapter }{FactorizationsElementWRTNumericalSemigroup}}
\logpage{[ 9, 1, 1 ]}\nobreak
\hyperdef{L}{X78C6D3BF7C7C2760}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{FactorizationsElementWRTNumericalSemigroup({\slshape n, S})\index{FactorizationsElementWRTNumericalSemigroup@\texttt{Factorizations}\-\texttt{Element}\-\texttt{W}\-\texttt{R}\-\texttt{T}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{FactorizationsElementWRTNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape n}} a nonnegative integer. The output is the set of factorizations of \mbox{\texttt{\slshape n}} in terms of the minimal generating set of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(101,113,196,272,278,286);
  <Numerical semigroup with 6 generators>
  gap> FactorizationsElementWRTNumericalSemigroup(1100,s);
  [ [ 0, 0, 0, 2, 2, 0 ], [ 0, 2, 3, 0, 0, 1 ], [ 0, 8, 1, 0, 0, 0 ],
    [ 5, 1, 1, 0, 0, 1 ] ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{LengthsOfFactorizationsElementWRTNumericalSemigroup}}
\logpage{[ 9, 1, 2 ]}\nobreak
\hyperdef{L}{X7FDE4F94870951B1}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{LengthsOfFactorizationsElementWRTNumericalSemigroup({\slshape n, S})\index{LengthsOfFactorizationsElementWRTNumericalSemigroup@\texttt{Lengths}\-\texttt{Of}\-\texttt{Factorizations}\-\texttt{Element}\-\texttt{W}\-\texttt{R}\-\texttt{T}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{LengthsOfFactorizationsElementWRTNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape n}} a nonnegative integer. The output is the set of lengths of the factorizations
of \mbox{\texttt{\slshape n}} in terms of the minimal generating set of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(101,113,196,272,278,286);
  <Numerical semigroup with 6 generators>
  gap> LengthsOfFactorizationsElementWRTNumericalSemigroup(1100,s);
  [ 4, 6, 8, 9 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ElasticityOfFactorizationsElementWRTNumericalSemigroup}}
\logpage{[ 9, 1, 3 ]}\nobreak
\hyperdef{L}{X85C2987C7827D18D}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ElasticityOfFactorizationsElementWRTNumericalSemigroup({\slshape n, S})\index{ElasticityOfFactorizationsElementWRTNumericalSemigroup@\texttt{Elasticity}\-\texttt{Of}\-\texttt{Factorizations}\-\texttt{Element}\-\texttt{W}\-\texttt{R}\-\texttt{T}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{ElasticityOfFactorizationsElementWRTNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape n}} a positive integer. The output is the maximum length divided by the minimum
length of the factorizations of \mbox{\texttt{\slshape n}} in terms of the minimal generating set of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(101,113,196,272,278,286);
  <Numerical semigroup with 6 generators>
  gap> ElasticityOfFactorizationsElementWRTNumericalSemigroup(1100,s);
  9/4
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{ElasticityOfNumericalSemigroup}}
\logpage{[ 9, 1, 4 ]}\nobreak
\hyperdef{L}{X7FE2D6F77BE96716}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{ElasticityOfNumericalSemigroup({\slshape S})\index{ElasticityOfNumericalSemigroup@\texttt{ElasticityOfNumericalSemigroup}}
\label{ElasticityOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. The output is the elasticity of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(101,113,196,272,278,286);
  <Numerical semigroup with 6 generators>
  gap> ElasticityOfNumericalSemigroup(s);
  286/101
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{DeltaSetOfFactorizationsElementWRTNumericalSemigroup}}
\logpage{[ 9, 1, 5 ]}\nobreak
\hyperdef{L}{X8384DBFE7D82A634}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{DeltaSetOfFactorizationsElementWRTNumericalSemigroup({\slshape n, S})\index{DeltaSetOfFactorizationsElementWRTNumericalSemigroup@\texttt{Delta}\-\texttt{Set}\-\texttt{Of}\-\texttt{Factorizations}\-\texttt{Element}\-\texttt{W}\-\texttt{R}\-\texttt{T}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{DeltaSetOfFactorizationsElementWRTNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape n}} a nonnegative integer. The output is the Delta set of the factorizations of \mbox{\texttt{\slshape n}} in terms of the minimal generating set of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(101,113,196,272,278,286);
  <Numerical semigroup with 6 generators>
  gap> DeltaSetOfFactorizationsElementWRTNumericalSemigroup(1100,s);
  [ 1, 2 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{MaximumDegreeOfElementWRTNumericalSemigroup}}
\logpage{[ 9, 1, 6 ]}\nobreak
\hyperdef{L}{X7E3ED34D78F3A8CA}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{MaximumDegreeOfElementWRTNumericalSemigroup({\slshape n, S})\index{MaximumDegreeOfElementWRTNumericalSemigroup@\texttt{Maximum}\-\texttt{Degree}\-\texttt{Of}\-\texttt{Element}\-\texttt{W}\-\texttt{R}\-\texttt{T}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{MaximumDegreeOfElementWRTNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup and \mbox{\texttt{\slshape n}} a nonnegative integer. The output is the maximum length of the factorizations
of \mbox{\texttt{\slshape n}} in terms of the minimal generating set of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(101,113,196,272,278,286);
  <Numerical semigroup with 6 generators>
  gap> MaximumDegreeOfElementWRTNumericalSemigroup(1100,s);
  9
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{CatenaryDegreeOfNumericalSemigroup}}
\logpage{[ 9, 1, 7 ]}\nobreak
\hyperdef{L}{X7FAF204E85D9C21B}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{CatenaryDegreeOfNumericalSemigroup({\slshape S})\index{CatenaryDegreeOfNumericalSemigroup@\texttt{CatenaryDegreeOfNumericalSemigroup}}
\label{CatenaryDegreeOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. The output is the catenary degree of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(101,113,196,272,278,286);
  <Numerical semigroup with 6 generators>
  gap> CatenaryDegreeOfNumericalSemigroup(s);
  8
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{CatenaryDegreeOfElementNS}}
\logpage{[ 9, 1, 8 ]}\nobreak
\hyperdef{L}{X787334508257C510}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{CatenaryDegreeOfElementNS({\slshape n, S})\index{CatenaryDegreeOfElementNS@\texttt{CatenaryDegreeOfElementNS}}
\label{CatenaryDegreeOfElementNS}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape n}} is a nonnegative integer and \mbox{\texttt{\slshape S}} is a numerical semigroup. The output is the catenary degree of \mbox{\texttt{\slshape n}} relative to \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> CatenaryDegreeOfElementNS(157,NumericalSemigroup(13,18));
  0
  gap> CatenaryDegreeOfElementNS(1157,NumericalSemigroup(13,18));
  18
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{TameDegreeOfNumericalSemigroup}}
\logpage{[ 9, 1, 9 ]}\nobreak
\hyperdef{L}{X860BDF5B85975B73}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{TameDegreeOfNumericalSemigroup({\slshape S})\index{TameDegreeOfNumericalSemigroup@\texttt{TameDegreeOfNumericalSemigroup}}
\label{TameDegreeOfNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape S}} is a numerical semigroup. The output is the tame degree of \mbox{\texttt{\slshape S}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=NumericalSemigroup(101,113,196,272,278,286);
  <Numerical semigroup with 6 generators>
  gap> TameDegreeOfNumericalSemigroup(s);
  14
\end{Verbatim}
 }

 }

 }

 

\appendix


\chapter{\textcolor{Chapter }{Generalities}}\logpage{[ "A", 0, 0 ]}
\hyperdef{L}{X7AF8D94A7E56C049}{}
{
 Here we describe some functions which are not specific for numerical
semigroups but are used to do computations with them. As they may have
interest by themselves, we decribe them here. 
\section{\textcolor{Chapter }{B{\a'e}zout sequences}}\logpage{[ "A", 1, 0 ]}
\hyperdef{L}{X7A5D608487A8C98F}{}
{
 A sequence of positive rational numbers $ a_1/b_1 < \cdots < a_n/b_n$ with $a_i,b_i$ positive integers is a \emph{B{\a'e}zout sequence} if $ a_{i+1}b_i - a_i b_{i+1}=1$ for all $i\in \{1,\ldots,n-1\}$. 

 The following function uses an algorithm presented in \cite{Ros05}. 

\subsection{\textcolor{Chapter }{BezoutSequence}}
\logpage{[ "A", 1, 1 ]}\nobreak
\hyperdef{L}{X86859C84858ECAF1}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{BezoutSequence({\slshape arg})\index{BezoutSequence@\texttt{BezoutSequence}}
\label{BezoutSequence}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape arg}} consits of two rational numbers or a list of two rational numbers. The output
is a B{\a'e}zout sequence with ends the two rational numbers given. (Warning:
rational numbers are silently transformed into irreducible fractions.) 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> BezoutSequence(4/5,53/27);
  [ 4/5, 1, 3/2, 5/3, 7/4, 9/5, 11/6, 13/7, 15/8, 17/9, 19/10, 21/11, 23/12,
    25/13, 27/14, 29/15, 31/16, 33/17, 35/18, 37/19, 39/20, 41/21, 43/22,
    45/23, 47/24, 49/25, 51/26, 53/27 ]
  
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{IsBezoutSequence}}
\logpage{[ "A", 1, 2 ]}\nobreak
\hyperdef{L}{X86C990AC7F40E8D0}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{IsBezoutSequence({\slshape L})\index{IsBezoutSequence@\texttt{IsBezoutSequence}}
\label{IsBezoutSequence}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape L}} is a list of rational numbers. \texttt{IsBezoutSequence} returns \texttt{true} or \texttt{false} according to whether \mbox{\texttt{\slshape L}} is a B{\a'e}zout sequence or not. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> IsBezoutSequence([ 4/5, 1, 3/2, 5/3, 7/4, 9/5, 11/6]);
  true
  gap> IsBezoutSequence([ 4/5, 1, 3/2, 5/3, 7/4, 9/5, 11/3]);
  Take the 6 and the 7 elements of the sequence
  false
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{CeilingOfRational}}
\logpage{[ "A", 1, 3 ]}\nobreak
\hyperdef{L}{X7C9DCBAF825CF7B2}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{CeilingOfRational({\slshape r})\index{CeilingOfRational@\texttt{CeilingOfRational}}
\label{CeilingOfRational}
}\hfill{\scriptsize (function)}}\\


 Returns the smallest integer greater than or equal to the rational \mbox{\texttt{\slshape r}}. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> CeilingOfRational(3/5);
  1
\end{Verbatim}
 }

 }

 
\section{\textcolor{Chapter }{Periodic subadditive functions}}\logpage{[ "A", 2, 0 ]}
\hyperdef{L}{X7D3D347987953F44}{}
{
 A periodic function $f$ of period $m$ from the set $ {\mathbb N} $ of natural numbers into itself may be specified through a list of $m$ natural numbers. The function $f$ is said to be \emph{subadditive} if $f(i+j)\leq f(i)+f(j)$ and $f(0)=0$. 

\subsection{\textcolor{Chapter }{RepresentsPeriodicSubAdditiveFunction}}
\logpage{[ "A", 2, 1 ]}\nobreak
\hyperdef{L}{X8466A4DC82F07579}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RepresentsPeriodicSubAdditiveFunction({\slshape L})\index{RepresentsPeriodicSubAdditiveFunction@\texttt{RepresentsPeriodicSubAdditiveFunction}}
\label{RepresentsPeriodicSubAdditiveFunction}
}\hfill{\scriptsize (function)}}\\


 \mbox{\texttt{\slshape L}} is a list of integers. \texttt{RepresentsPeriodicSubAdditiveFunction} returns \texttt{true} or \texttt{false} according to whether \mbox{\texttt{\slshape L}} represents a periodic subAdditive function $f$ periodic of period $m$ or not. To avoid defining $f(0)$ (which we assume to be 0) we define $f(m)=0$ and so the last element of the list must be 0. This technical need is due to
the fact that positions in a list must be positive (not a 0). 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> RepresentsPeriodicSubAdditiveFunction([1,2,3,4,0]);
  true
\end{Verbatim}
 }

 }

 }


\chapter{\textcolor{Chapter }{Random functions}}\logpage{[ "B", 0, 0 ]}
\hyperdef{L}{X86746B487B54A2D6}{}
{
 Here we describe some functions which allow to create several "random"
objects. 
\section{\textcolor{Chapter }{Random functions}}\logpage{[ "B", 1, 0 ]}
\hyperdef{L}{X86746B487B54A2D6}{}
{
 

\subsection{\textcolor{Chapter }{RandomNumericalSemigroup}}
\logpage{[ "B", 1, 1 ]}\nobreak
\hyperdef{L}{X7CC477867B00AD13}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RandomNumericalSemigroup({\slshape n, m})\index{RandomNumericalSemigroup@\texttt{RandomNumericalSemigroup}}
\label{RandomNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Returns a ``random" numerical semigroup with no more than \mbox{\texttt{\slshape n}} generators in [1..\mbox{\texttt{\slshape m}}]. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> RandomNumericalSemigroup(3,9);
  <Numerical semigroup with 3 generators>
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{RandomListForNS}}
\logpage{[ "B", 1, 2 ]}\nobreak
\hyperdef{L}{X79E73F8787741190}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RandomListForNS({\slshape n, m})\index{RandomListForNS@\texttt{RandomListForNS}}
\label{RandomListForNS}
}\hfill{\scriptsize (function)}}\\


 Returns a set of length not greater than \mbox{\texttt{\slshape n}} of random integers in \mbox{\texttt{\slshape [1..m]}} whose GCD is 1. It is used to create "random" numerical semigroups. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> RandomListForNS(13,79);
  [ 22, 26, 29, 31, 34, 46, 53, 61, 62, 73, 76 ]
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{RandomModularNumericalSemigroup}}
\logpage{[ "B", 1, 3 ]}\nobreak
\hyperdef{L}{X82E22E9B843DF70F}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RandomModularNumericalSemigroup({\slshape k})\index{RandomModularNumericalSemigroup@\texttt{RandomModularNumericalSemigroup}}
\label{RandomModularNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Returns a ``random" modular numerical semigroup. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> RandomModularNumericalSemigroup(9);
  <Modular numerical semigroup satisfying 5x mod 6 <= x >
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{RandomProportionallyModularNumericalSemigroup}}
\logpage{[ "B", 1, 4 ]}\nobreak
\hyperdef{L}{X8598F10A7CD4A135}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RandomProportionallyModularNumericalSemigroup({\slshape k})\index{RandomProportionallyModularNumericalSemigroup@\texttt{Random}\-\texttt{Proportionally}\-\texttt{Modular}\-\texttt{Numerical}\-\texttt{Semigroup}}
\label{RandomProportionallyModularNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 Returns a ``random" proportionally modular numerical semigroup (see \ref{llab1}). 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> RandomProportionallyModularNumericalSemigroup(9);
  <Proportionally modular numerical semigroup satisfying 2x mod 3 <= 2x >
\end{Verbatim}
 }

 

\subsection{\textcolor{Chapter }{RandomListRepresentingSubAdditiveFunction}}
\logpage{[ "B", 1, 5 ]}\nobreak
\hyperdef{L}{X8665F6B08036AFFB}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{RandomListRepresentingSubAdditiveFunction({\slshape m, a})\index{RandomListRepresentingSubAdditiveFunction@\texttt{Random}\-\texttt{List}\-\texttt{Representing}\-\texttt{Sub}\-\texttt{Additive}\-\texttt{Function}}
\label{RandomListRepresentingSubAdditiveFunction}
}\hfill{\scriptsize (function)}}\\


 Produces a ``random" list representing a subadditive function (see \ref{llab2}) which is periodic with period \mbox{\texttt{\slshape m}} (or less). When possible, the images are in \mbox{\texttt{\slshape [a..20*a]}}. (Otherwise, the list of possible images is enlarged.) 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> RandomListRepresentingSubAdditiveFunction(7,9);
  [ 173, 114, 67, 0 ]
  gap> RepresentsPeriodicSubAdditiveFunction(last);
  true
\end{Verbatim}
 }

 }

 }


\chapter{\textcolor{Chapter }{A graphical interface}}\logpage{[ "C", 0, 0 ]}
\hyperdef{L}{X7E34378C7C333327}{}
{
 Here we describe a Tcl/Tk interface to specify numerical semigroups. 
\section{\textcolor{Chapter }{Graphical interface}}\logpage{[ "C", 1, 0 ]}
\hyperdef{L}{X86EF7EAB809D2418}{}
{
 

\subsection{\textcolor{Chapter }{XNumericalSemigroup}}
\logpage{[ "C", 1, 1 ]}\nobreak
\hyperdef{L}{X82616EED7F480035}{}
{\noindent\textcolor{FuncColor}{$\Diamond$\ \texttt{XNumericalSemigroup({\slshape [s]})\index{XNumericalSemigroup@\texttt{XNumericalSemigroup}}
\label{XNumericalSemigroup}
}\hfill{\scriptsize (function)}}\\


 This function pops up a Tcl/Tk window which allows the specification of
numerical semigroups. The optional argument \mbox{\texttt{\slshape s}} is a numerical semigroup whose definition becomes displayed in the graphical
interface. 

 The interface is very simple, it allows to specify a numerical semigroup by
its generators or a (proportionally) modular numerical semigroup by its
(proportionally) modular condition. The \textsf{GAP} variable by which the semigroup will be known must also be specified. 

 The interface also allows to apply some functions to the semigroup, namely \texttt{AperyListOfNumericalSemigroupWRTElement} (\ref{AperyListOfNumericalSemigroupWRTElement}), \texttt{DrawAperyListOfNumericalSemigroup} (\ref{DrawAperyListOfNumericalSemigroup}), \texttt{SmallElementsOfNumericalSemigroup} (\ref{SmallElementsOfNumericalSemigroup}), \texttt{GapsOfNumericalSemigroup} (\ref{GapsOfNumericalSemigroup}), \texttt{FrobeniusNumberOfNumericalSemigroup} (\ref{FrobeniusNumberOfNumericalSemigroup}) and \texttt{MinimalPresentationOfNumericalSemigroup} (\ref{MinimalPresentationOfNumericalSemigroup}). Finally, it is also possible to add functions to this list and remove them. 
\begin{Verbatim}[fontsize=\small,frame=single,label=Example]
  gap> s:=RandomNumericalSemigroup(3,9);
  <Numerical semigroup with 3 generators>
  gap> XNumericalSemigroup(s);
\end{Verbatim}
 This would pop up the following window: 

  \begin{figure}[htbp] \begin{center} \leavevmode \includegraphics{xnumsgp}
\end{center} \label{fig:xnumsgp} \end{figure}   

 }

 }

 }

\def\bibname{References\logpage{[ "Bib", 0, 0 ]}
\hyperdef{L}{X7A6F98FD85F02BFE}{}
}

\bibliographystyle{alpha}
\bibliography{NumericalSgpsMan}

\def\indexname{Index\logpage{[ "Ind", 0, 0 ]}
\hyperdef{L}{X83A0356F839C696F}{}
}


\printindex

\newpage
\immediate\write\pagenrlog{["End"], \arabic{page}];}
\immediate\closeout\pagenrlog
\end{document}
