CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

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

Views: 418346
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<Section>
4
<Heading>
5
Defining affine semigroups
6
</Heading>
7
8
An 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>).
9
10
Up 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.
11
12
The 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).
13
14
If <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].
15
<P/>
16
17
As 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.
18
In this section we describe functions that may be used
19
to specify, in one of these ways, an affine semigroup in &GAP;.
20
21
22
<ManSection>
23
<Func Name="AffineSemigroupByGenerators" Arg="List"/>
24
<Func Name="AffineSemigroup" Arg="String, List" Label="by generators"/>
25
<Description>
26
<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>.
27
<P/>
28
<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.
29
<Example><![CDATA[
30
gap> s1 := AffineSemigroupByGenerators([1,3],[7,2],[1,5]);
31
<Affine semigroup in 2 dimensional space, with 3 generators>
32
gap> s2 := AffineSemigroupByGenerators([[1,3],[7,2],[1,5]]);;
33
gap> s3 := AffineSemigroup("generators",[[1,3],[7,2],[1,5]]);;
34
gap> s4 := AffineSemigroup([1,3],[7,2],[1,5]);;
35
gap> s5 := AffineSemigroup([[1,3],[7,2],[1,5]]);;
36
gap> Length(Set([s1,s2,s3,s4,s5]));
37
1
38
]]></Example>
39
</Description>
40
</ManSection>
41
42
<ManSection>
43
<Func Name="AffineSemigroupByEquations" Arg="List"/>
44
<Func Name="AffineSemigroup" Arg="String, List" Label="by equations"/>
45
<Description>
46
<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>).
47
<P/>
48
The output is the full semigroup of nonnegative integer solutions to the system of homogeneous equations
49
<Br/>
50
<M>a_{11}x_1+\cdots+a_{1n}x_n\equiv 0\bmod d_1, </M><Br/>
51
<M>\cdots </M><Br/>
52
<M>a_{k1}x_1+\cdots+a_{kn}x_n\equiv 0\bmod d_k, </M><Br/>
53
<M>a_{k+1\, 1}x_1+\cdots +a_{k+1\, n}=0, </M><Br/>
54
<M>\cdots </M><Br/>
55
<M>a_{m1}x_1+\cdots+a_{mn}x_n=0. </M><Br/>
56
<!-- <Math>
57
\begin{matrix}
58
\quad \\
59
a_{11}x_1+\cdots+a_{1n}x_n\equiv 0\bmod d_1,\\
60
\cdots \\
61
a_{k1}x_1+\cdots+a_{kn}x_n\equiv 0\bmod d_k,\\
62
a_{k+1\, 1}x_1+\cdots +a_{k+1\, n}=0,\\
63
\cdots\\
64
a_{m1}x_1+\cdots+a_{mn}x_n=0.
65
\end{matrix}
66
</Math> -->
67
<P/>
68
If <M>d</M> is empty, then there will be no equations in congruences.
69
<P/>
70
As 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].
71
<P/>
72
In the second form, <C>String</C> must be <C>"equations"</C>.
73
<Example><![CDATA[
74
gap> s1 := AffineSemigroupByEquations([[[-2,1]],[3]]);
75
<Affine semigroup>
76
gap> s2 := AffineSemigroup("equations",[[[1,1]],[3]]);
77
<Affine semigroup>
78
gap> s1=s2;
79
true
80
]]></Example>
81
</Description>
82
</ManSection>
83
<ManSection>
84
<Func Name="AffineSemigroupByInequalities" Arg="List"/>
85
<Func Name="AffineSemigroup" Arg="String, List" Label="by inequalities"/>
86
<Description>
87
<C>List</C> is a list of lists (a matrix) of integers that represents a set of inequalities.
88
<P/>
89
Returns the (normal) affine semigroup of nonegative integer solutions of the system of inequalities <M>List\times X\ge 0</M>.
90
<P/>
91
In the second form, <C>String</C> must be <C>"inequalities"</C>.
92
<Example><![CDATA[
93
gap> a1:=AffineSemigroupByInequalities([[2,-1],[-1,3]]);
94
<Affine semigroup>
95
gap> a2:=AffineSemigroup("inequalities",[[2,-1],[-1,3]]);
96
<Affine semigroup>
97
gap> a1=a2;
98
true
99
]]></Example>
100
</Description>
101
</ManSection>
102
103
<ManSection>
104
<Func Name="Generators" Arg="S" Label="for affine semigroup"/>
105
<Func Name="GeneratorsOfAffineSemigroup" Arg="S"/>
106
<Description>
107
<A>S</A> is an affine semigroup, the output is a system of generators.
108
<P/>
109
<Example><![CDATA[
110
gap> a:=AffineSemigroup([[1,0],[0,1],[1,1]]);
111
<Affine semigroup in 2 dimensional space, with 3 generators>
112
gap> Generators(a);
113
[ [ 0, 1 ], [ 1, 0 ], [ 1, 1 ] ]
114
]]></Example>
115
116
</Description>
117
</ManSection>
118
119
<ManSection>
120
<Func Name="MinimalGenerators" Arg="S" Label="for affine semigroup"/>
121
<Func Name="MinimalGeneratingSystem" Arg="S" Label="for affine semigroup"/>
122
<Description>
123
<A>S</A> is an affine semigroup, the output is its system of minimal generators.
124
<P/>
125
<Example><![CDATA[
126
gap> a:=AffineSemigroup([[1,0],[0,1],[1,1]]);
127
<Affine semigroup in 2 dimensional space, with 3 generators>
128
gap> MinimalGenerators(a);
129
[ [ 0, 1 ], [ 1, 0 ] ]
130
]]></Example>
131
132
</Description>
133
</ManSection>
134
135
136
137
<ManSection>
138
<Func Name="AsAffineSemigroup" Arg="S"/>
139
<Description>
140
<A>S</A> is a numerical semigroup, the output is <A>S</A> regarded as an affine semigroup.
141
<P/>
142
<Example><![CDATA[
143
gap> s:=NumericalSemigroup(1310,1411,1546,1601);
144
<Numerical semigroup with 4 generators>
145
gap> MinimalPresentationOfNumericalSemigroup(s);;time;
146
2960
147
gap> a:=AsAffineSemigroup(s);
148
<Affine semigroup in 1 dimensional space, with 4 generators>
149
gap> GeneratorsOfAffineSemigroup(a);
150
[ [ 1310 ], [ 1411 ], [ 1546 ], [ 1601 ] ]
151
gap> MinimalPresentationOfAffineSemigroup(a);;time;
152
237972
153
]]></Example>
154
155
If we use the package <C>SingularInterface</C>, the speed up is considerable.
156
157
<Example><![CDATA[
158
gap> NumSgpsUseSingularInterface();
159
...
160
gap> MinimalPresentationOfAffineSemigroup(a);;time;
161
32
162
]]></Example>
163
164
165
</Description>
166
</ManSection>
167
168
169
<ManSection>
170
<Attr Name="IsAffineSemigroup" Arg="AS"/>
171
<Attr Name="IsAffineSemigroupByGenerators" Arg="AS"/>
172
<Attr Name="IsAffineSemigroupByEquations" Arg="AS"/>
173
<Attr Name="IsAffineSemigroupByInequalities" Arg="AS"/>
174
<Description>
175
<A>AS</A> is an affine semigroup and these attributes are available
176
(their names should be self explanatory). They reflect what is currently known about the semigroup.
177
<Example><![CDATA[
178
gap> a1:=AffineSemigroup([[3,0],[2,1],[1,2],[0,3]]);
179
<Affine semigroup in 2 dimensional space, with 4 generators>
180
gap> IsAffineSemigroupByEquations(a1);
181
false
182
gap> IsAffineSemigroupByGenerators(a1);
183
true
184
]]></Example>
185
</Description>
186
</ManSection>
187
188
189
190
191
<ManSection>
192
<Func Arg="v, a" Name="BelongsToAffineSemigroup"></Func>
193
<Oper Name="\in" Arg="v, a" Label="membership test in affine semigroup"/>
194
<Description>
195
<A>v</A> is a list of nonnegative integers and <A>a</A> an affine semigroup.
196
Returns true if the vector is in the semigroup, and false otherwise.
197
198
<P/>
199
If 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.
200
<P/>
201
<A> v in a</A> can be used for short.
202
<Example><![CDATA[
203
gap> a:=AffineSemigroup([[2,0],[0,2],[1,1]]);;
204
gap> BelongsToAffineSemigroup([5,5],a);
205
true
206
gap> BelongsToAffineSemigroup([1,2],a);
207
false
208
gap> [5,5] in a;
209
true
210
gap> [1,2] in a;
211
false
212
]]></Example>
213
</Description>
214
</ManSection>
215
216
<ManSection>
217
<Prop Arg="S" Name="IsFull"></Prop>
218
<Prop Arg="S" Name="IsFullAffineSemigroup"></Prop>
219
<Description>
220
<A>s</A> is an affine semigroup.<P/>
221
222
Returns 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>.
223
<P/>
224
If the semigroup is full, then its equations are stored in the semigroup for further use.
225
226
<Example><![CDATA[
227
gap> a:=AffineSemigroup("equations",[[[1,1,1],[0,0,2]],[2,2]]);;
228
gap> IsFullAffineSemigroup(a);
229
true
230
]]></Example>
231
</Description>
232
</ManSection>
233
234
<ManSection>
235
236
<Oper Arg="ls, m" Name="HilbertBasisOfSystemOfHomogeneousEquations"></Oper>
237
<Description>
238
<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>.
239
The 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/>
240
If 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>).
241
242
<Example><![CDATA[
243
gap> HilbertBasisOfSystemOfHomogeneousEquations([[1,0,1],[0,1,-1]],[2]);
244
[ [ 0, 2, 2 ], [ 1, 1, 1 ], [ 2, 0, 0 ] ]
245
]]></Example>
246
</Description>
247
</ManSection>
248
249
If <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>.
250
251
<ManSection>
252
<Oper Arg="ls" Name="HilbertBasisOfSystemOfHomogeneousInequalities"></Oper>
253
<Description>
254
<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>.
255
The output is a minimal generating system (Hilbert basis) of the set of nonnegative integer solutions to <M>Ax\ge 0</M>.
256
<P/>
257
If 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>).
258
259
<Example><![CDATA[
260
gap> HilbertBasisOfSystemOfHomogeneousInequalities([[2,-3],[0,1]]);
261
[ [ 1, 0 ], [ 2, 1 ], [ 3, 2 ] ]
262
]]></Example>
263
</Description>
264
</ManSection>
265
266
267
<ManSection>
268
<Func Arg="M" Name="EquationsOfGroupGeneratedBy"></Func>
269
<Description>
270
<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>.
271
272
<Example><![CDATA[
273
gap> EquationsOfGroupGeneratedBy([[1,2,0],[2,-2,2]]);
274
[ [ [ 0, 0, -1 ], [ -2, 1, 3 ] ], [ 2 ] ]
275
]]></Example>
276
</Description>
277
</ManSection>
278
279
<ManSection>
280
<Func Arg="A, m" Name="BasisOfGroupGivenByEquations"></Func>
281
<Description>
282
<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>.
283
284
<Example><![CDATA[
285
gap> BasisOfGroupGivenByEquations([[0,0,1],[2,-1,-3]],[2]);
286
[ [ -1, -2, 0 ], [ -2, 2, -2 ] ]
287
]]></Example>
288
</Description>
289
</ManSection>
290
291
</Section>
292
293
294
<Section>
295
<Heading>
296
Gluings of affine semigroups
297
</Heading>
298
299
Let <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>.
300
<P/> The algorithm used is explained in <Cite Key="MR1678508"></Cite>.
301
302
<ManSection>
303
<Func Arg="a1, a2" Name="GluingOfAffineSemigroups"></Func>
304
<Description>
305
<A>a1, a2</A> are affine semigroups. Determines if they can be glued, and if so, returns the gluing. Otherwise it returns fail.
306
307
<Example><![CDATA[
308
gap> a1:=AffineSemigroup([[2,0],[0,2]]);
309
<Affine semigroup in 2 dimensional space, with 2 generators>
310
gap> a2:=AffineSemigroup([[1,1]]);
311
<Affine semigroup in 2 dimensional space, with 1 generators>
312
gap> GluingOfAffineSemigroups(a1,a2);
313
<Affine semigroup in 2 dimensional space, with 3 generators>
314
gap> Generators(last);
315
[ [ 0, 2 ], [ 1, 1 ], [ 2, 0 ] ]
316
]]></Example>
317
</Description>
318
</ManSection>
319
320
321
</Section>
322
323
<Section>
324
<Heading>
325
Presentations of affine semigroups
326
</Heading>
327
328
A 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.
329
330
<ManSection>
331
<Oper Arg="M" Name="GeneratorsOfKernelCongruence"></Oper>
332
<Description>
333
<A>M</A> is matrix with nonnegative integer coefficients.
334
The output is a system of generators of the congruence <M>\{(x,y)\mid xM=yM\}</M>.
335
<P/>
336
The 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.
337
</Description>
338
</ManSection>
339
340
<ManSection>
341
<Oper Arg="M, Ord" Name="CanonicalBasisOfKernelCongruence"></Oper>
342
<Description>
343
<A>M</A> is matrix with nonnegative integer coefficients, <A>Ord</A> a term ordering.
344
The 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>.
345
<P/>
346
Accepted term orderings are lexicographic (<C>MonomialLexOrdering()</C>), graded lexicographic (<A>MonomialGrlexOrdering()</A>) and reversed graded lexicographic (<A>MonomialGrevlexOrdering()</A>).
347
<Example><![CDATA[
348
gap> M:=[[3],[5],[7]];;
349
gap> CanonicalBasisOfKernelCongruence(M,MonomialLexOrdering());
350
[ [ [ 0, 7, 0 ], [ 0, 0, 5 ] ], [ [ 1, 0, 1 ], [ 0, 2, 0 ] ],
351
[ [ 1, 5, 0 ], [ 0, 0, 4 ] ], [ [ 2, 3, 0 ], [ 0, 0, 3 ] ],
352
[ [ 3, 1, 0 ], [ 0, 0, 2 ] ], [ [ 4, 0, 0 ], [ 0, 1, 1 ] ] ]
353
gap> CanonicalBasisOfKernelCongruence(M,MonomialGrlexOrdering());
354
[ [ [ 0, 7, 0 ], [ 0, 0, 5 ] ], [ [ 1, 0, 1 ], [ 0, 2, 0 ] ],
355
[ [ 1, 5, 0 ], [ 0, 0, 4 ] ], [ [ 2, 3, 0 ], [ 0, 0, 3 ] ],
356
[ [ 3, 1, 0 ], [ 0, 0, 2 ] ], [ [ 4, 0, 0 ], [ 0, 1, 1 ] ] ]
357
gap> CanonicalBasisOfKernelCongruence(M,MonomialGrevlexOrdering());
358
[ [ [ 0, 2, 0 ], [ 1, 0, 1 ] ], [ [ 3, 1, 0 ], [ 0, 0, 2 ] ],
359
[ [ 4, 0, 0 ], [ 0, 1, 1 ] ] ]
360
]]></Example>
361
362
</Description>
363
</ManSection>
364
365
<ManSection>
366
<Oper Arg="M" Name="GraverBasis"></Oper>
367
<Description>
368
<A>M</A> is matrix with integer coefficients.
369
The output is a Graver basis for <A>M</A>.
370
<Example><![CDATA[
371
gap> gr:=GraverBasis([[3,5,7]]);
372
[ [ -7, 0, 3 ], [ -5, 3, 0 ], [ -4, 1, 1 ], [ -3, -1, 2 ], [ -2, -3, 3 ],
373
[ -1, -5, 4 ], [ -1, 2, -1 ], [ 0, -7, 5 ], [ 0, 7, -5 ], [ 1, -2, 1 ],
374
[ 1, 5, -4 ], [ 2, 3, -3 ], [ 3, 1, -2 ], [ 4, -1, -1 ], [ 5, -3, 0 ],
375
[ 7, 0, -3 ] ]
376
]]></Example>
377
378
</Description>
379
</ManSection>
380
381
382
<ManSection>
383
<Oper Arg="a" Name="MinimalPresentationOfAffineSemigroup"></Oper>
384
<Oper Arg="a" Name="MinimalPresentation" Label="for affine semigroup"></Oper>
385
<Description>
386
<A>a</A> is an affine semigroup.
387
The output is a minimal presentation for <A>a</A>.
388
<P/>
389
There 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>.
390
391
<Example><![CDATA[
392
gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;
393
gap> MinimalPresentationOfAffineSemigroup(a);
394
[ [ [ 1, 0, 1 ], [ 0, 2, 0 ] ] ]
395
gap> GeneratorsOfAffineSemigroup(a);
396
[ [ 0, 2 ], [ 1, 1 ], [ 2, 0 ] ]
397
]]></Example>
398
</Description>
399
</ManSection>
400
401
<ManSection>
402
<Oper Arg="a" Name="BettiElementsOfAffineSemigroup"></Oper>
403
<Oper Arg="a" Name="BettiElements" Label="of affine semigroup"></Oper>
404
<Description>
405
<A>a</A> is an affine semigroup.
406
The output is the set of Betti elements of <A>a</A> (defined as for numerical semigroups).
407
<P/> This function relies on the computation of a minimal presentation.
408
<Example><![CDATA[
409
gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;
410
gap> BettiElementsOfAffineSemigroup(a);
411
[ [ 2, 2 ] ]
412
]]></Example>
413
</Description>
414
</ManSection>
415
416
<ManSection>
417
<Func Arg="v, a" Name="ShadedSetOfElementInAffineSemigroup"></Func>
418
<Description>
419
<A>a</A> is an affine semigroup and <A>v</A> is an element in <A>a</A>.
420
421
This is a translation to affine semigroups of <C>ShadedSetOfElementInNumericalSemigroup</C> (<Ref Chap="shadedset"/>).
422
423
</Description>
424
</ManSection>
425
426
427
<ManSection>
428
<Prop Arg="a" Name="IsGeneric" Label="for affine semigroups"></Prop>
429
<Prop Arg="a" Name="IsGenericAffineSemigroup"></Prop>
430
<Description>
431
<A>a</A> is an affine semigroup.
432
<P/>
433
The same as <C>IsGenericNumericalSemigroup</C> (<Ref Chap="Generic"/>) but for affine semigroups.
434
</Description>
435
</ManSection>
436
437
<ManSection>
438
<Prop Arg="a" Name="IsUniquelyPresentedAffineSemigroup"></Prop>
439
<Description>
440
<A>a</A> is an affine semigroup.
441
<P/>
442
The same as <C>IsUniquelyPresentedNumericalSemigroup</C> (<Ref Chap="UniqPre"/>) but for affine semigroups.
443
</Description>
444
</ManSection>
445
446
447
<ManSection>
448
<Oper Arg="a" Name="PrimitiveElementsOfAffineSemigroup"></Oper>
449
<Description>
450
<A>a</A> is an affine semigroup.
451
The output is the set of primitive elements of <A>a</A> (defined as for numerical semigroups).
452
<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.
453
<Example><![CDATA[
454
gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;
455
gap> PrimitiveElementsOfAffineSemigroup(a);
456
[ [ 0, 2 ], [ 1, 1 ], [ 2, 0 ], [ 2, 2 ] ]
457
]]></Example>
458
</Description>
459
</ManSection>
460
461
</Section>
462
463
464
<Section>
465
<Heading>
466
Factorizations in affine semigroups
467
</Heading>
468
469
The invariants presented here are defined as for numerical semigroups.
470
471
<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.
472
473
474
<ManSection>
475
<Oper Arg="v, ls" Name="FactorizationsVectorWRTList"></Oper>
476
<Description>
477
<A>v</A> is a list of nonnegative integers and <A>ls</A> is a list of lists of nonnegative integers.
478
The output is set of factorizations of <A>v</A> in terms of the elements of <A>ls</A>.
479
<P/>
480
If 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>.
481
482
<Example><![CDATA[
483
gap> FactorizationsVectorWRTList([5,5],[[2,0],[0,2],[1,1]]);
484
[ [ 2, 2, 1 ], [ 1, 1, 3 ], [ 0, 0, 5 ] ]
485
]]></Example>
486
</Description>
487
</ManSection>
488
489
490
<ManSection>
491
<Oper Arg="a" Name="ElasticityOfAffineSemigroup"></Oper>
492
<Description>
493
<A>a</A> is an affine semigroup.
494
The output is the elasticity of <A>a</A> (defined as for numerical semigroups).
495
<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>.
496
497
<Example><![CDATA[
498
gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;
499
gap> ElasticityOfAffineSemigroup(a);
500
1
501
]]></Example>
502
</Description>
503
</ManSection>
504
505
<ManSection>
506
<Func Arg="a" Name="DeltaSetOfAffineSemigroup"></Func>
507
<Description>
508
<A>a</A> is an affine semigroup.
509
The 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>.
510
<Example><![CDATA[
511
gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;
512
gap> DeltaSetOfAffineSemigroup(a);
513
[ ]
514
gap> s:=NumericalSemigroup(10,13,15,47);;
515
gap> a:=AsAffineSemigroup(s);;
516
gap> DeltaSetOfAffineSemigroup(a);
517
[ 1, 2, 3, 5 ]
518
]]></Example>
519
</Description>
520
</ManSection>
521
522
523
<ManSection>
524
<Func Arg="a" Name="CatenaryDegreeOfAffineSemigroup"></Func>
525
<Description>
526
<A>a</A> is an affine semigroup.
527
The output is the catenary degree of <A>a</A> (defined as for numerical semigroups).
528
<Example><![CDATA[
529
gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;
530
gap> CatenaryDegreeOfAffineSemigroup(a);
531
2
532
]]></Example>
533
</Description>
534
</ManSection>
535
536
<ManSection>
537
<Func Arg="a" Name="EqualCatenaryDegreeOfAffineSemigroup"></Func>
538
<Description>
539
<A>a</A> is an affine semigroup.
540
The output is the equal catenary degree of <A>a</A> (defined as for numerical semigroups).
541
<P/>This function relies on the results presented in <Cite Key="GSOSN"></Cite>.
542
</Description>
543
</ManSection>
544
545
<ManSection>
546
<Func Arg="a" Name="HomogeneousCatenaryDegreeOfAffineSemigroup"></Func>
547
<Description>
548
<A>a</A> is an affine semigroup.
549
The output is the homogeneous catenary degree of <A>a</A> (defined as for numerical semigroups).
550
<P/>This function is based on <Cite Key="GSOSN"></Cite>.
551
</Description>
552
</ManSection>
553
554
555
<ManSection>
556
<Func Arg="a" Name="MonotoneCatenaryDegreeOfAffineSemigroup"></Func>
557
<Description>
558
<A>a</A> is an affine semigroup.
559
The output is the monotone catenary degree of <A>a</A> (defined as for numerical semigroups), computed as explained in <Cite Key="PH"></Cite>.
560
<Example><![CDATA[
561
gap> a:=AffineSemigroup("inequalities",[[2,-1],[-1,3]]);
562
<Affine semigroup>
563
gap> GeneratorsOfAffineSemigroup(a);
564
[ [ 1, 1 ], [ 1, 2 ], [ 2, 1 ], [ 3, 1 ] ]
565
gap> CatenaryDegreeOfAffineSemigroup(a);
566
3
567
gap> EqualCatenaryDegreeOfAffineSemigroup(a);
568
2
569
gap> HomogeneousCatenaryDegreeOfAffineSemigroup(a);
570
3
571
gap> MonotoneCatenaryDegreeOfAffineSemigroup(a);
572
3
573
]]></Example>
574
</Description>
575
</ManSection>
576
577
578
579
<ManSection>
580
<Oper Arg="a" Name="TameDegreeOfAffineSemigroup"></Oper>
581
<Description>
582
<A>a</A> is an affine semigroup.
583
The 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.
584
585
<Example><![CDATA[
586
gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;
587
gap> TameDegreeOfAffineSemigroup(a);
588
2
589
]]></Example>
590
</Description>
591
</ManSection>
592
593
594
<ManSection>
595
<Oper Arg="v,a" Name="OmegaPrimalityOfElementInAffineSemigroup"></Oper>
596
<Description>
597
<A>v</A> is a list of nonnegative integers and <A>a</A> is an affine semigroup.
598
The output is the omega primality of <A>a</A> (defined as for numerical semigroups). Returns 0 if the element is not in the semigroup.
599
<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).
600
601
<Example><![CDATA[
602
gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;
603
gap> OmegaPrimalityOfElementInAffineSemigroup([5,5],a);
604
6
605
]]></Example>
606
</Description>
607
</ManSection>
608
609
610
<ManSection>
611
<Func Arg="a" Name="OmegaPrimalityOfAffineSemigroup"></Func>
612
<Description>
613
<A>a</A> is an affine semigroup.
614
The output is the omega primality of <A>a</A> (defined as for numerical semigroups).
615
616
<Example><![CDATA[
617
gap> a:=AffineSemigroup([2,0],[0,2],[1,1]);;
618
gap> OmegaPrimalityOfAffineSemigroup(a);
619
2
620
]]></Example>
621
</Description>
622
</ManSection>
623
624
625
626
</Section>
627
628