Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 418346<?xml version="1.0" encoding="UTF-8"?>12<Section>3<Heading>4Defining affine semigroups5</Heading>67An affine semigroup <M>S</M> is a finitely generated cancellative monoid that is reduced (no units other than 0) and is torsion-free (<M> a s= b s</M> implies <M>a=b</M>, with <M>a,b\in \mathbb N</M> and <M>s\in S</M>).89Up to isomorphisms any affine semigroup can be viewed as a finitely generated submonoid of <M>\mathbb N^k</M> for some positive integer <M>k</M>. Thus affine semigroups are a natural generalization of numerical semigroups.1011The most common way to give an affine semigroup is by any of its systems of generators. As for numerical semigroups, any affine semigroup admits a unique minimal system of generators. A system of generators can be represented as a list of lists of nonnegative integers; all lists in the list having the same length (a matrix actually).1213If <M>G</M> is a subgroup of <M>\mathbb Z^k</M>, then <M>S=G\cap \mathbb N^k</M> is an affine semigroup (these semigroups are called full affine semigroups). As <M>G</M> can be represented by its defining equations (homogeneous and some of them possibly in congruences), we can represent <M>S</M> by the defining equations of <M>G</M>; indeed <M>S</M> is just the set of nonnegative solutions of this system of equations. We can represent the equations as a list of lists of integers, all with the same length. Every list is a row of the matrix of coefficients of the system of equations. For the equations in congruences, if we arrange them so that they are the first ones in the list, we provide the corresponding moduli in a list. So for instance, the equations <M>x+y\equiv 0\bmod 2,\ x-2y=0</M> will be represented as [[1,1],[1,-2]] and the moduli [2].14<P/>1516As happens with numerical semigroups, there are different ways to specify an affine semigroup <M>S</M>, namely, by means of a system of generators, a system of homogeneous linear Diophantine equations or a system of homogeneous linear Diophantine inequalities, just to mention some.17In this section we describe functions that may be used18to specify, in one of these ways, an affine semigroup in &GAP;.192021<ManSection>22<Func Name="AffineSemigroupByGenerators" Arg="List"/>23<Func Name="AffineSemigroup" Arg="String, List" Label="by generators"/>24<Description>25<C>List</C> is a list of n-tuples of nonnegative integers, if the semigroup to be created is n-dimensional. The n-tuples may be given as a list or by a sequence of individual elements. The output is the affine semigroup spanned by <C>List</C>.26<P/>27<C>String</C> does not need to be present. When it is present, it must be <C>"generators"</C> and <C>List</C> must be a list, not a sequence of individual elements.28<Example><![CDATA[29gap> s1 := AffineSemigroupByGenerators([1,3],[7,2],[1,5]);30<Affine semigroup in 2 dimensional space, with 3 generators>31gap> s2 := AffineSemigroupByGenerators([[1,3],[7,2],[1,5]]);;32gap> s3 := AffineSemigroup("generators",[[1,3],[7,2],[1,5]]);;33gap> s4 := AffineSemigroup([1,3],[7,2],[1,5]);;34gap> s5 := AffineSemigroup([[1,3],[7,2],[1,5]]);;35gap> Length(Set([s1,s2,s3,s4,s5]));36137]]></Example>38</Description>39</ManSection>4041<ManSection>42<Func Name="AffineSemigroupByEquations" Arg="List"/>43<Func Name="AffineSemigroup" Arg="String, List" Label="by equations"/>44<Description>45<C>List</C> is a list with two components. The first represents a matrix with integer coefficients, say <M>A=(a_{ij})</M>, and so it is a list of lists of integers all with the same length. The second component is a list of positive integers, say <M>d=(d_i)</M>, which may be empty. The list <M>d</M> must be of length less than or equal to the length of <M>A</M> (number of rows of <M>A</M>).46<P/>47The output is the full semigroup of nonnegative integer solutions to the system of homogeneous equations48<Br/>49<M>a_{11}x_1+\cdots+a_{1n}x_n\equiv 0\bmod d_1, </M><Br/>50<M>\cdots </M><Br/>51<M>a_{k1}x_1+\cdots+a_{kn}x_n\equiv 0\bmod d_k, </M><Br/>52<M>a_{k+1\, 1}x_1+\cdots +a_{k+1\, n}=0, </M><Br/>53<M>\cdots </M><Br/>54<M>a_{m1}x_1+\cdots+a_{mn}x_n=0. </M><Br/>55<!-- <Math>56\begin{matrix}57\quad \\58a_{11}x_1+\cdots+a_{1n}x_n\equiv 0\bmod d_1,\\59\cdots \\60a_{k1}x_1+\cdots+a_{kn}x_n\equiv 0\bmod d_k,\\61a_{k+1\, 1}x_1+\cdots +a_{k+1\, n}=0,\\62\cdots\\63a_{m1}x_1+\cdots+a_{mn}x_n=0.64\end{matrix}65</Math> -->66<P/>67If <M>d</M> is empty, then there will be no equations in congruences.68<P/>69As pointed at the beginning of the section, the equations <M>x+y\equiv 0\bmod 2,\ x-2y=0</M> will be represented as <M>A</M> equal to [[1,1],[1,-2]] and the moduli <M>d</M> equal to [2].70<P/>71In the second form, <C>String</C> must be <C>"equations"</C>.72<Example><![CDATA[73gap> s1 := AffineSemigroupByEquations([[[-2,1]],[3]]);74<Affine semigroup>75gap> s2 := AffineSemigroup("equations",[[[1,1]],[3]]);76<Affine semigroup>77gap> s1=s2;78true79]]></Example>80</Description>81</ManSection>82<ManSection>83<Func Name="AffineSemigroupByInequalities" Arg="List"/>84<Func Name="AffineSemigroup" Arg="String, List" Label="by inequalities"/>85<Description>86<C>List</C> is a list of lists (a matrix) of integers that represents a set of inequalities.87<P/>88Returns the (normal) affine semigroup of nonegative integer solutions of the system of inequalities <M>List\times X\ge 0</M>.89<P/>90In the second form, <C>String</C> must be <C>"inequalities"</C>.91<Example><![CDATA[92gap> a1:=AffineSemigroupByInequalities([[2,-1],[-1,3]]);93<Affine semigroup>94gap> a2:=AffineSemigroup("inequalities",[[2,-1],[-1,3]]);95<Affine semigroup>96gap> a1=a2;97true98]]></Example>99</Description>100</ManSection>101102<ManSection>103<Func Name="Generators" Arg="S" Label="for affine semigroup"/>104<Func Name="GeneratorsOfAffineSemigroup" Arg="S"/>105<Description>106<A>S</A> is an affine semigroup, the output is a system of generators.107<P/>108<Example><![CDATA[109gap> a:=AffineSemigroup([[1,0],[0,1],[1,1]]);110<Affine semigroup in 2 dimensional space, with 3 generators>111gap> Generators(a);112[ [ 0, 1 ], [ 1, 0 ], [ 1, 1 ] ]113]]></Example>114115</Description>116</ManSection>117118<ManSection>119<Func Name="MinimalGenerators" Arg="S" Label="for affine semigroup"/>120<Func Name="MinimalGeneratingSystem" Arg="S" Label="for affine semigroup"/>121<Description>122<A>S</A> is an affine semigroup, the output is its system of minimal generators.123<P/>124<Example><![CDATA[125gap> a:=AffineSemigroup([[1,0],[0,1],[1,1]]);126<Affine semigroup in 2 dimensional space, with 3 generators>127gap> MinimalGenerators(a);128[ [ 0, 1 ], [ 1, 0 ] ]129]]></Example>130131</Description>132</ManSection>133134135136<ManSection>137<Func Name="AsAffineSemigroup" Arg="S"/>138<Description>139<A>S</A> is a numerical semigroup, the output is <A>S</A> regarded as an affine semigroup.140<P/>141<Example><![CDATA[142gap> s:=NumericalSemigroup(1310,1411,1546,1601);143<Numerical semigroup with 4 generators>144gap> MinimalPresentationOfNumericalSemigroup(s);;time;1452960146gap> a:=AsAffineSemigroup(s);147<Affine semigroup in 1 dimensional space, with 4 generators>148gap> GeneratorsOfAffineSemigroup(a);149[ [ 1310 ], [ 1411 ], [ 1546 ], [ 1601 ] ]150gap> MinimalPresentationOfAffineSemigroup(a);;time;151237972152]]></Example>153154If we use the package <C>SingularInterface</C>, the speed up is considerable.155156<Example><![CDATA[157gap> NumSgpsUseSingularInterface();158...159gap> MinimalPresentationOfAffineSemigroup(a);;time;16032161]]></Example>162163164</Description>165</ManSection>166167168<ManSection>169<Attr Name="IsAffineSemigroup" Arg="AS"/>170<Attr Name="IsAffineSemigroupByGenerators" Arg="AS"/>171<Attr Name="IsAffineSemigroupByEquations" Arg="AS"/>172<Attr Name="IsAffineSemigroupByInequalities" Arg="AS"/>173<Description>174<A>AS</A> is an affine semigroup and these attributes are available175(their names should be self explanatory). They reflect what is currently known about the semigroup.176<Example><![CDATA[177gap> a1:=AffineSemigroup([[3,0],[2,1],[1,2],[0,3]]);178<Affine semigroup in 2 dimensional space, with 4 generators>179gap> IsAffineSemigroupByEquations(a1);180false181gap> IsAffineSemigroupByGenerators(a1);182true183]]></Example>184</Description>185</ManSection>186187188189190<ManSection>191<Func Arg="v, a" Name="BelongsToAffineSemigroup"></Func>192<Oper Name="\in" Arg="v, a" Label="membership test in affine semigroup"/>193<Description>194<A>v</A> is a list of nonnegative integers and <A>a</A> an affine semigroup.195Returns true if the vector is in the semigroup, and false otherwise.196197<P/>198If the semigroup is full and its equations are known (either because the semigroup was defined by equations, or because the user has called <C>IsFullAffineSemgiroup(a)</C> and the output was true), then membership is performed by evaluating <A>v</A> in the equations. The same holds for normal semigroups and its defining inequalities.199<P/>200<A> v in a</A> can be used for short.201<Example><![CDATA[202gap> a:=AffineSemigroup([[2,0],[0,2],[1,1]]);;203gap> BelongsToAffineSemigroup([5,5],a);204true205gap> BelongsToAffineSemigroup([1,2],a);206false207gap> [5,5] in a;208true209gap> [1,2] in a;210false211]]></Example>212</Description>213</ManSection>214215<ManSection>216<Prop Arg="S" Name="IsFull"></Prop>217<Prop Arg="S" Name="IsFullAffineSemigroup"></Prop>218<Description>219<A>s</A> is an affine semigroup.<P/>220221Returns true if the semigroup is full, false otherwise. The semigroup is full if whenever <M>a,b\in S</M> and <M>b-a\in \mathbb N^k</M>, then <M>a-b\in S</M>, where <M>k</M> is the dimension of <M>S</M>.222<P/>223If the semigroup is full, then its equations are stored in the semigroup for further use.224225<Example><![CDATA[226gap> a:=AffineSemigroup("equations",[[[1,1,1],[0,0,2]],[2,2]]);;227gap> IsFullAffineSemigroup(a);228true229]]></Example>230</Description>231</ManSection>232233<ManSection>234235<Oper Arg="ls, m" Name="HilbertBasisOfSystemOfHomogeneousEquations"></Oper>236<Description>237<A>ls</A> is a list of lists of integers and <A>m</A> a list of integers. The elements of <A>ls</A> represent the rows of a matrix <M>A</M>.238The output is a minimal generating system (Hilbert basis) of the set of nonnegative integer solutions of the system <M>Ax=0</M> where the <M>k</M> first equations are in the congruences modulo <A>m[i]</A>, with <M>k</M> the length of <A>m</A>. <P/>239If the package <C>NormalizInterface</C> has not been loaded, then Contejean-Devie algorithm is used <Cite Key="MR1283022"></Cite> instead (if this is the case, congruences are treated as in <Cite Key="R-GS"></Cite>).240241<Example><![CDATA[242gap> HilbertBasisOfSystemOfHomogeneousEquations([[1,0,1],[0,1,-1]],[2]);243[ [ 0, 2, 2 ], [ 1, 1, 1 ], [ 2, 0, 0 ] ]244]]></Example>245</Description>246</ManSection>247248If <M>C</M> is a pointed cone (a cone in <M>\mathbb Q^k</M> not containing lines and <M>0\in C</M>), then <M>S=C\cap \mathbb N^k</M> is an affine semigroup (known as normal affine semigroup). So another way to give an affine semigroup is by a set of homogeneous inequalities, and we can represent these inequalities by its coefficients. If we put them in a matrix <M>S</M> can be defined as the set of nonnegative integer solutions to <M>Ax \ge 0</M>.249250<ManSection>251<Oper Arg="ls" Name="HilbertBasisOfSystemOfHomogeneousInequalities"></Oper>252<Description>253<A>ls</A> is a list of lists of integers. The elements of <A>ls</A> represent the rows of a matrix <M>A</M>.254The output is a minimal generating system (Hilbert basis) of the set of nonnegative integer solutions to <M>Ax\ge 0</M>.255<P/>256If the package <C>NormalizInterface</C> has not been loaded, then Contejean-Devie algorithm is used <Cite Key="MR1283022"></Cite> instead (the use of slack variables is described in <Cite Key="R-GS-GG-B"></Cite>).257258<Example><![CDATA[259gap> HilbertBasisOfSystemOfHomogeneousInequalities([[2,-3],[0,1]]);260[ [ 1, 0 ], [ 2, 1 ], [ 3, 2 ] ]261]]></Example>262</Description>263</ManSection>264265266<ManSection>267<Func Arg="M" Name="EquationsOfGroupGeneratedBy"></Func>268<Description>269<A>M</A> is a matrix of integers. The output is a pair <M>[A,m]</M> that represents the set of defining equations of the group spanned by the rows of <A>M</A>: <M>Ax=0\in \mathbb Z_{n_1}\times \cdots \times \mathbb Z_{n_t}\times \mathbb Z^k</M>, with <M>m=[n_1,\ldots,n_t]</M>.270271<Example><![CDATA[272gap> EquationsOfGroupGeneratedBy([[1,2,0],[2,-2,2]]);273[ [ [ 0, 0, -1 ], [ -2, 1, 3 ] ], [ 2 ] ]274]]></Example>275</Description>276</ManSection>277278<ManSection>279<Func Arg="A, m" Name="BasisOfGroupGivenByEquations"></Func>280<Description>281<A>A</A> is a matrix of integers and <A>m</A> is a list of positive integers. The output is a basis for the group with defining equations <M>Ax=0\in \mathbb Z_{n_1}\times \cdots \times \mathbb Z_{n_t}\times \mathbb Z^k</M>, with <M>m=[n_1,\ldots,n_t]</M>.282283<Example><![CDATA[284gap> BasisOfGroupGivenByEquations([[0,0,1],[2,-1,-3]],[2]);285[ [ -1, -2, 0 ], [ -2, 2, -2 ] ]286]]></Example>287</Description>288</ManSection>289290</Section>291292293<Section>294<Heading>295Gluings of affine semigroups296</Heading>297298Let <M>S_1</M> and <M>S_2</M> be two affine semigroups with the same dimension generated by <M>A_1</M> and <M>A_2</M>, respectively. We say that the affine semigroup <M>S</M> generated by the union of <M>A_1</M> and <M>A_2</M> is a gluing of <M>S_1</M> and <M>S_2</M> if <M>G(S_1)\cap G(S_2)=d\mathbb Z</M> (<M>G(\cdot)</M> stands for group spanned by) for some <M>d\in S_1\cap S_2</M>.299<P/> The algorithm used is explained in <Cite Key="MR1678508"></Cite>.300301<ManSection>302<Func Arg="a1, a2" Name="GluingOfAffineSemigroups"></Func>303<Description>304<A>a1, a2</A> are affine semigroups. Determines if they can be glued, and if so, returns the gluing. Otherwise it returns fail.305306<Example><![CDATA[307gap> a1:=AffineSemigroup([[2,0],[0,2]]);308<Affine semigroup in 2 dimensional space, with 2 generators>309gap> a2:=AffineSemigroup([[1,1]]);310<Affine semigroup in 2 dimensional space, with 1 generators>311gap> GluingOfAffineSemigroups(a1,a2);312<Affine semigroup in 2 dimensional space, with 3 generators>313gap> Generators(last);314[ [ 0, 2 ], [ 1, 1 ], [ 2, 0 ] ]315]]></Example>316</Description>317</ManSection>318319320</Section>321322<Section>323<Heading>324Presentations of affine semigroups325</Heading>326327A minimal presentation of an affine semigroup is defined analogously as for numerical semigroups. The user might take into account that generators are stored in a set, and thus might be arranged in a different way to the initial input.328329<ManSection>330<Oper Arg="M" Name="GeneratorsOfKernelCongruence"></Oper>331<Description>332<A>M</A> is matrix with nonnegative integer coefficients.333The output is a system of generators of the congruence <M>\{(x,y)\mid xM=yM\}</M>.334<P/>335The main difference with <C>MinimalPresentationOfAffineSemigroup</C> is that the matrix <A>M</A> can have repeated columns and these are not treated as a set.336</Description>337</ManSection>338339<ManSection>340<Oper Arg="M, Ord" Name="CanonicalBasisOfKernelCongruence"></Oper>341<Description>342<A>M</A> is matrix with nonnegative integer coefficients, <A>Ord</A> a term ordering.343The output is a canonical bases of the congruence <M>\{(x,y)\mid xM=yM\}</M> (see <Cite Key="RGS99"></Cite>). This corresponds with the exponents of the Gröbner basis of the kernel ideal of the morphism <M>x_i\mapsto Y^{m_i}</M>, with <M>m_i</M> the <M>i</M>th row of <M>M</M>.344<P/>345Accepted term orderings are lexicographic (<C>MonomialLexOrdering()</C>), graded lexicographic (<A>MonomialGrlexOrdering()</A>) and reversed graded lexicographic (<A>MonomialGrevlexOrdering()</A>).346<Example><![CDATA[347gap> M:=[[3],[5],[7]];;348gap> CanonicalBasisOfKernelCongruence(M,MonomialLexOrdering());349[ [ [ 0, 7, 0 ], [ 0, 0, 5 ] ], [ [ 1, 0, 1 ], [ 0, 2, 0 ] ],350[ [ 1, 5, 0 ], [ 0, 0, 4 ] ], [ [ 2, 3, 0 ], [ 0, 0, 3 ] ],351[ [ 3, 1, 0 ], [ 0, 0, 2 ] ], [ [ 4, 0, 0 ], [ 0, 1, 1 ] ] ]352gap> CanonicalBasisOfKernelCongruence(M,MonomialGrlexOrdering());353[ [ [ 0, 7, 0 ], [ 0, 0, 5 ] ], [ [ 1, 0, 1 ], [ 0, 2, 0 ] ],354[ [ 1, 5, 0 ], [ 0, 0, 4 ] ], [ [ 2, 3, 0 ], [ 0, 0, 3 ] ],355[ [ 3, 1, 0 ], [ 0, 0, 2 ] ], [ [ 4, 0, 0 ], [ 0, 1, 1 ] ] ]356gap> CanonicalBasisOfKernelCongruence(M,MonomialGrevlexOrdering());357[ [ [ 0, 2, 0 ], [ 1, 0, 1 ] ], [ [ 3, 1, 0 ], [ 0, 0, 2 ] ],358[ [ 4, 0, 0 ], [ 0, 1, 1 ] ] ]359]]></Example>360361</Description>362</ManSection>363364<ManSection>365<Oper Arg="M" Name="GraverBasis"></Oper>366<Description>367<A>M</A> is matrix with integer coefficients.368The output is a Graver basis for <A>M</A>.369<Example><![CDATA[370gap> gr:=GraverBasis([[3,5,7]]);371[ [ -7, 0, 3 ], [ -5, 3, 0 ], [ -4, 1, 1 ], [ -3, -1, 2 ], [ -2, -3, 3 ],372[ -1, -5, 4 ], [ -1, 2, -1 ], [ 0, -7, 5 ], [ 0, 7, -5 ], [ 1, -2, 1 ],373[ 1, 5, -4 ], [ 2, 3, -3 ], [ 3, 1, -2 ], [ 4, -1, -1 ], [ 5, -3, 0 ],374[ 7, 0, -3 ] ]375]]></Example>376377</Description>378</ManSection>379380381<ManSection>382<Oper Arg="a" Name="MinimalPresentationOfAffineSemigroup"></Oper>383<Oper Arg="a" Name="MinimalPresentation" Label="for affine semigroup"></Oper>384<Description>385<A>a</A> is an affine semigroup.386The output is a minimal presentation for <A>a</A>.387<P/>388There are four methods implemented for this function, depending on the packages loaded. All of them use elimination, and Herzog's correspondence, computing the kernel of a ring homomorphism (<Cite Key="MR0269762"></Cite>). The fastest procedure is achieved when <C>SingularInterface</C> is loaded, followed by <C>Singular</C>. The procedure that does not use external packages uses internal GAP Gröbner basis computations and thus it is slower. Also in this case, from the Gröbner basis, a minimal set of generating binomials must be refined, and for this Rclasses are used (if <C>NormalizInterface</C> is loaded, then the factorizations are faster). The <C>4ti2</C> implementation uses <C>4ti2</C> internal Gröbner bases and factorizations are done via <C>zsolve</C>.389390<Example><![CDATA[391gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;392gap> MinimalPresentationOfAffineSemigroup(a);393[ [ [ 1, 0, 1 ], [ 0, 2, 0 ] ] ]394gap> GeneratorsOfAffineSemigroup(a);395[ [ 0, 2 ], [ 1, 1 ], [ 2, 0 ] ]396]]></Example>397</Description>398</ManSection>399400<ManSection>401<Oper Arg="a" Name="BettiElementsOfAffineSemigroup"></Oper>402<Oper Arg="a" Name="BettiElements" Label="of affine semigroup"></Oper>403<Description>404<A>a</A> is an affine semigroup.405The output is the set of Betti elements of <A>a</A> (defined as for numerical semigroups).406<P/> This function relies on the computation of a minimal presentation.407<Example><![CDATA[408gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;409gap> BettiElementsOfAffineSemigroup(a);410[ [ 2, 2 ] ]411]]></Example>412</Description>413</ManSection>414415<ManSection>416<Func Arg="v, a" Name="ShadedSetOfElementInAffineSemigroup"></Func>417<Description>418<A>a</A> is an affine semigroup and <A>v</A> is an element in <A>a</A>.419420This is a translation to affine semigroups of <C>ShadedSetOfElementInNumericalSemigroup</C> (<Ref Chap="shadedset"/>).421422</Description>423</ManSection>424425426<ManSection>427<Prop Arg="a" Name="IsGeneric" Label="for affine semigroups"></Prop>428<Prop Arg="a" Name="IsGenericAffineSemigroup"></Prop>429<Description>430<A>a</A> is an affine semigroup.431<P/>432The same as <C>IsGenericNumericalSemigroup</C> (<Ref Chap="Generic"/>) but for affine semigroups.433</Description>434</ManSection>435436<ManSection>437<Prop Arg="a" Name="IsUniquelyPresentedAffineSemigroup"></Prop>438<Description>439<A>a</A> is an affine semigroup.440<P/>441The same as <C>IsUniquelyPresentedNumericalSemigroup</C> (<Ref Chap="UniqPre"/>) but for affine semigroups.442</Description>443</ManSection>444445446<ManSection>447<Oper Arg="a" Name="PrimitiveElementsOfAffineSemigroup"></Oper>448<Description>449<A>a</A> is an affine semigroup.450The output is the set of primitive elements of <A>a</A> (defined as for numerical semigroups).451<P/>This function has three implementations (methods), one using Graver basis via the Lawrence lifting of <A>a</A> and the other (much faster) using <C>NormalizInterface</C>. Also a <C>4ti2</C> version using its Graver basis computation is provided.452<Example><![CDATA[453gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;454gap> PrimitiveElementsOfAffineSemigroup(a);455[ [ 0, 2 ], [ 1, 1 ], [ 2, 0 ], [ 2, 2 ] ]456]]></Example>457</Description>458</ManSection>459460</Section>461462463<Section>464<Heading>465Factorizations in affine semigroups466</Heading>467468The invariants presented here are defined as for numerical semigroups.469470<P/>As with presentations, the user should take into account that generators are stored in a set, and thus might be arranged in a different way to the initial input.471472473<ManSection>474<Oper Arg="v, ls" Name="FactorizationsVectorWRTList"></Oper>475<Description>476<A>v</A> is a list of nonnegative integers and <A>ls</A> is a list of lists of nonnegative integers.477The output is set of factorizations of <A>v</A> in terms of the elements of <A>ls</A>.478<P/>479If no extra package is loaded, then factorizations are computed recursively; and thus slowly. If <C>NormalizInterface</C> is loaded, then a system of equations is solved with Normaliz, and the performance is much better. If <C>4ti2Interface</C> is loaded instead, then factorizations are calculated using <C>zsolve</C> command of <C>4ti2</C>.480481<Example><![CDATA[482gap> FactorizationsVectorWRTList([5,5],[[2,0],[0,2],[1,1]]);483[ [ 2, 2, 1 ], [ 1, 1, 3 ], [ 0, 0, 5 ] ]484]]></Example>485</Description>486</ManSection>487488489<ManSection>490<Oper Arg="a" Name="ElasticityOfAffineSemigroup"></Oper>491<Description>492<A>a</A> is an affine semigroup.493The output is the elasticity of <A>a</A> (defined as for numerical semigroups).494<P/> The procedure used is based on <Cite Key="PH"></Cite>, where it is shown that the elasticity can be computed by using circuits. The set of circuits is calculated using <Cite Key="MR1394747"></Cite>.495496<Example><![CDATA[497gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;498gap> ElasticityOfAffineSemigroup(a);4991500]]></Example>501</Description>502</ManSection>503504<ManSection>505<Func Arg="a" Name="DeltaSetOfAffineSemigroup"></Func>506<Description>507<A>a</A> is an affine semigroup.508The output is the Delta set of <A>a</A> (defined as for numerical semigroups). The the procedure used is explained in <Cite Key="GSONW"></Cite>.509<Example><![CDATA[510gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;511gap> DeltaSetOfAffineSemigroup(a);512[ ]513gap> s:=NumericalSemigroup(10,13,15,47);;514gap> a:=AsAffineSemigroup(s);;515gap> DeltaSetOfAffineSemigroup(a);516[ 1, 2, 3, 5 ]517]]></Example>518</Description>519</ManSection>520521522<ManSection>523<Func Arg="a" Name="CatenaryDegreeOfAffineSemigroup"></Func>524<Description>525<A>a</A> is an affine semigroup.526The output is the catenary degree of <A>a</A> (defined as for numerical semigroups).527<Example><![CDATA[528gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;529gap> CatenaryDegreeOfAffineSemigroup(a);5302531]]></Example>532</Description>533</ManSection>534535<ManSection>536<Func Arg="a" Name="EqualCatenaryDegreeOfAffineSemigroup"></Func>537<Description>538<A>a</A> is an affine semigroup.539The output is the equal catenary degree of <A>a</A> (defined as for numerical semigroups).540<P/>This function relies on the results presented in <Cite Key="GSOSN"></Cite>.541</Description>542</ManSection>543544<ManSection>545<Func Arg="a" Name="HomogeneousCatenaryDegreeOfAffineSemigroup"></Func>546<Description>547<A>a</A> is an affine semigroup.548The output is the homogeneous catenary degree of <A>a</A> (defined as for numerical semigroups).549<P/>This function is based on <Cite Key="GSOSN"></Cite>.550</Description>551</ManSection>552553554<ManSection>555<Func Arg="a" Name="MonotoneCatenaryDegreeOfAffineSemigroup"></Func>556<Description>557<A>a</A> is an affine semigroup.558The output is the monotone catenary degree of <A>a</A> (defined as for numerical semigroups), computed as explained in <Cite Key="PH"></Cite>.559<Example><![CDATA[560gap> a:=AffineSemigroup("inequalities",[[2,-1],[-1,3]]);561<Affine semigroup>562gap> GeneratorsOfAffineSemigroup(a);563[ [ 1, 1 ], [ 1, 2 ], [ 2, 1 ], [ 3, 1 ] ]564gap> CatenaryDegreeOfAffineSemigroup(a);5653566gap> EqualCatenaryDegreeOfAffineSemigroup(a);5672568gap> HomogeneousCatenaryDegreeOfAffineSemigroup(a);5693570gap> MonotoneCatenaryDegreeOfAffineSemigroup(a);5713572]]></Example>573</Description>574</ManSection>575576577578<ManSection>579<Oper Arg="a" Name="TameDegreeOfAffineSemigroup"></Oper>580<Description>581<A>a</A> is an affine semigroup.582The output is the tame degree of <A>a</A> (defined as for numerical semigroups). If <A>a</A> is given by equations (or its equations are known), then the procedure explained in <Cite Key="GSONW"></Cite> is used.583584<Example><![CDATA[585gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;586gap> TameDegreeOfAffineSemigroup(a);5872588]]></Example>589</Description>590</ManSection>591592593<ManSection>594<Oper Arg="v,a" Name="OmegaPrimalityOfElementInAffineSemigroup"></Oper>595<Description>596<A>v</A> is a list of nonnegative integers and <A>a</A> is an affine semigroup.597The output is the omega primality of <A>a</A> (defined as for numerical semigroups). Returns 0 if the element is not in the semigroup.598<P/> The implementation of this procedure is performed as explained in <Cite Key="B-GS-G"></Cite> (also, if the semigroup has defining equations, then it takes advantage of this fact as explained in this reference).599600<Example><![CDATA[601gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;602gap> OmegaPrimalityOfElementInAffineSemigroup([5,5],a);6036604]]></Example>605</Description>606</ManSection>607608609<ManSection>610<Func Arg="a" Name="OmegaPrimalityOfAffineSemigroup"></Func>611<Description>612<A>a</A> is an affine semigroup.613The output is the omega primality of <A>a</A> (defined as for numerical semigroups).614615<Example><![CDATA[616gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;617gap> OmegaPrimalityOfAffineSemigroup(a);6182619]]></Example>620</Description>621</ManSection>622623624625</Section>626627628