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
2
3 Basic operations with numerical semigroups
3
4
5
3.1 Invariants
6
7
3.1-1 Multiplicity
8
9
Multiplicity( NS )  attribute
10
MultiplicityOfNumericalSemigroup( NS )  attribute
11
12
NS is a numerical semigroup. Returns the multiplicity of NS, which is the
13
smallest positive integer belonging to NS.
14
15
 Example 
16
gap> S := NumericalSemigroup("modular", 7,53);
17
<Modular numerical semigroup satisfying 7x mod 53 <= x >
18
gap> MultiplicityOfNumericalSemigroup(S);
19
8
20
gap> NumericalSemigroup(3,5);
21
<Numerical semigroup with 2 generators>
22
gap> Multiplicity(last);
23
3
24

25
26
3.1-2 GeneratorsOfNumericalSemigroup
27
28
GeneratorsOfNumericalSemigroup( S )  attribute
29
Generators( S )  attribute
30
MinimalGeneratingSystemOfNumericalSemigroup( S )  attribute
31
MinimalGeneratingSystem( S )  attribute
32
MinimalGenerators( S )  attribute
33
34
S is a numerical semigroup. GeneratorsOfNumericalSemigroup returns a set of
35
generators of S, which may not be minimal.
36
MinimalGeneratingSystemOfNumericalSemigroup returns the minimal set of
37
generators of S.
38
39
From Version 0.980, ReducedSetOfGeneratorsOfNumericalSemigroup is a synonym
40
of MinimalGeneratingSystemOfNumericalSemigroup;
41
GeneratorsOfNumericalSemigroupNC is a synonym of
42
GeneratorsOfNumericalSemigroup. The names are kept for compatibility with
43
code produced for previous versions, but will be removed in the future.
44
45
 Example 
46
gap> S := NumericalSemigroup("modular", 5,53);
47
<Modular numerical semigroup satisfying 5x mod 53 <= x >
48
gap> GeneratorsOfNumericalSemigroup(S);
49
[ 11, 12, 13, 32, 53 ]
50
gap> S := NumericalSemigroup(3, 5, 53);
51
<Numerical semigroup with 3 generators>
52
gap> GeneratorsOfNumericalSemigroup(S);
53
[ 3, 5, 53 ]
54
gap> MinimalGeneratingSystemOfNumericalSemigroup(S);
55
[ 3, 5 ]
56
gap> MinimalGeneratingSystem(S)=MinimalGeneratingSystemOfNumericalSemigroup(S);
57
true
58
gap> s := NumericalSemigroup(3,5,7,15);
59
<Numerical semigroup with 4 generators>
60
gap> HasGenerators(s);
61
true
62
gap> HasMinimalGenerators(s);
63
false
64
gap> MinimalGenerators(s);
65
[ 3, 5, 7 ]
66
gap> Generators(s);
67
[ 3, 5, 7, 15 ]
68

69
70
3.1-3 EmbeddingDimension
71
72
EmbeddingDimension( NS )  attribute
73
EmbeddingDimensionOfNumericalSemigroup( NS )  attribute
74
75
NS is a numerical semigroup. It returns the cardinality of its minimal
76
generating system.
77
78
 Example 
79
gap> s := NumericalSemigroup(3,5,7,15);
80
<Numerical semigroup with 4 generators>
81
gap> EmbeddingDimension(s);
82
3
83
gap> EmbeddingDimensionOfNumericalSemigroup(s);
84
3
85

86
87
3.1-4 SmallElements
88
89
SmallElements( NS )  attribute
90
SmallElementsOfNumericalSemigroup( NS )  attribute
91
92
NS is a numerical semigroup. It returns the list of small elements of NS. Of
93
course, the time consumed to return a result may depend on the way the
94
semigroup is given.
95
96
 Example 
97
gap> SmallElementsOfNumericalSemigroup(NumericalSemigroup(3,5,7));
98
[ 0, 3, 5 ]
99
gap> SmallElements(NumericalSemigroup(3,5,7));
100
[ 0, 3, 5 ]
101

102
103
3.1-5 FirstElementsOfNumericalSemigroup
104
105
FirstElementsOfNumericalSemigroup( n, NS )  function
106
107
NS is a numerical semigroup. It returns the list with the first n elements
108
of NS.
109
110
 Example 
111
gap> FirstElementsOfNumericalSemigroup(2,NumericalSemigroup(3,5,7));
112
[ 0, 3 ]
113
gap> FirstElementsOfNumericalSemigroup(10,NumericalSemigroup(3,5,7));
114
[ 0, 3, 5, 6, 7, 8, 9, 10, 11, 12 ]
115

116
117
3.1-6 RthElementOfNumericalSemigroup
118
119
RthElementOfNumericalSemigroup( S, r )  operation
120
121
S is a numerical semigroup and r is an integer. It returns the r-th element
122
of S.
123
124
 Example 
125
gap> S := NumericalSemigroup(7,8,17);;
126
gap> RthElementOfNumericalSemigroup(S,53);
127
68
128

129
130
3.1-7 AperyList
131
132
AperyList( S, n )  attribute
133
AperyListOfNumericalSemigroupWRTElement( S, n )  operation
134
135
S is a numerical semigroup and n is a positive element of S. Computes the
136
Apéry list of S with respect to n. It contains for every i∈ {0,...,n-1}, in
137
the i+1th position, the smallest element in the semigroup congruent with i
138
modulo n.
139
140
 Example 
141
gap> S := NumericalSemigroup("modular", 5,53);;
142
gap> AperyListOfNumericalSemigroupWRTElement(S,12);
143
[ 0, 13, 26, 39, 52, 53, 54, 43, 32, 33, 22, 11 ]
144
gap> AperyList(S,12);
145
[ 0, 13, 26, 39, 52, 53, 54, 43, 32, 33, 22, 11 ]
146

147
148
3.1-8 AperyList
149
150
AperyList( S )  attribute
151
AperyListOfNumericalSemigroup( S )  attribute
152
153
S is a numerical semigroup. It computes the Apéry list of S with respect to
154
the multiplicity of S.
155
156
 Example 
157
gap> S := NumericalSemigroup("modular", 5,53);;
158
gap> AperyListOfNumericalSemigroup(S);
159
[ 0, 12, 13, 25, 26, 38, 39, 51, 52, 53, 32 ]
160
gap> AperyList(NumericalSemigroup(5,7,11));
161
[ 0, 11, 7, 18, 14 ]
162

163
164
3.1-9 AperyList
165
166
AperyList( S, n )  attribute
167
AperyListOfNumericalSemigroupWRTInteger( S, m )  function
168
169
S is a numerical semigroup and m is an integer. Computes the Apéry list of S
170
with respect to m, that is, the set of elements x in S such that x-m is not
171
in S. If m is an element in S, then the output of
172
AperyListOfNumericalSemigroupWRTInteger, as sets, is the same as
173
AperyListOfNumericalSemigroupWRTElement, though without side effects, in the
174
sense that this information is no longer used by the package. The output of
175
AperyList is the same as AperyListOfNumericalSemigroupWRTElement.
176
177
 Example 
178
gap>  s:=NumericalSemigroup(10,13,19,27);;
179
gap> AperyListOfNumericalSemigroupWRTInteger(s,11);
180
[ 0, 10, 13, 19, 20, 23, 26, 27, 29, 32, 33, 36, 39, 42, 45, 46, 52, 55 ]
181
gap> AperyList(s,11);
182
[ 0, 10, 13, 19, 20, 23, 26, 27, 29, 32, 33, 36, 39, 42, 45, 46, 52, 55 ]
183
gap> Length(last);
184
18
185
gap> AperyListOfNumericalSemigroupWRTInteger(s,10);
186
[ 0, 13, 19, 26, 27, 32, 38, 45, 51, 54 ]
187
gap> AperyListOfNumericalSemigroupWRTElement(s,10);
188
[ 0, 51, 32, 13, 54, 45, 26, 27, 38, 19 ]
189
gap> Length(last);
190
10
191
gap> AperyList(s,10);
192
[ 0, 51, 32, 13, 54, 45, 26, 27, 38, 19 ]
193

194
195
3.1-10 AperyListOfNumericalSemigroupAsGraph
196
197
AperyListOfNumericalSemigroupAsGraph( ap )  function
198
199
ap is the Apéry list of a numerical semigroup. This function returns the
200
adjacency list of the graph (ap, E) where the edge u -> v is in E iff v - u
201
is in ap. The 0 is ignored.
202
203
 Example 
204
gap> s:=NumericalSemigroup(3,7);;
205
gap> AperyListOfNumericalSemigroupWRTElement(s,10);
206
[ 0, 21, 12, 3, 14, 15, 6, 7, 18, 9 ]
207
gap> AperyListOfNumericalSemigroupAsGraph(last);
208
[ ,, [ 3, 6, 9, 12, 15, 18, 21 ],,, [ 6, 9, 12, 15, 18, 21 ],
209
[ 7, 14, 21 ],, [ 9, 12, 15, 18, 21 ],,, [ 12, 15, 18, 21 ],,
210
[ 14, 21 ], [ 15, 18, 21 ],,, [ 18, 21 ],,, [ 21 ] ]
211

212
213
3.1-11 KunzCoordinatesOfNumericalSemigroup
214
215
KunzCoordinatesOfNumericalSemigroup( S, m )  function
216
217
S is a numerical semigroup, and m is a nonzero element of S. The second
218
argument is optional, and if missing it is assumed to be the multiplicity of
219
S.
220
221
Then the Apéry set of m in S has the form [0,k_1m+1,...,k_m-1m+m-1], and the
222
output is the (m-1)-uple [k_1,k_2,...,k_m-1]
223
224
 Example 
225
gap> s:=NumericalSemigroup(3,5,7);
226
<Numerical semigroup with 3 generators>
227
gap> KunzCoordinatesOfNumericalSemigroup(s);
228
[ 2, 1 ]
229
gap> KunzCoordinatesOfNumericalSemigroup(s,5);
230
[ 1, 1, 0, 1 ]
231

232
233
3.1-12 KunzPolytope
234
235
KunzPolytope( m )  function
236
237
m is a positive integer.
238
239
The Kunz coordinates of the semigroups with multiplicity m are solutions of
240
a system of inequalities Axge b (see [CAGGB02]). The output is the matrix
241
(A|-b).
242
243
 Example 
244
gap> KunzPolytope(3);
245
[ [ 1, 0, -1 ], [ 0, 1, -1 ], [ 2, -1, 0 ], [ -1, 2, 1 ] ]
246

247
248
3.1-13 CocycleOfNumericalSemigroupWRTElement
249
250
CocycleOfNumericalSemigroupWRTElement( S, m )  function
251
252
S is a numerical semigroup, and m is a nonzero element of S. The output is
253
the matrix h(i,j)=(w(i)+w(j)-w((i+j)mod m))/m, where w(i) is the smallest
254
element in S congruent with i modulo m (and thus it is in the Apéry set of
255
m), [GSHKR17].
256
257
 Example 
258
gap> s:=NumericalSemigroup(3,5,7);;
259
gap> CocycleOfNumericalSemigroupWRTElement(s,3);
260
[ [ 0, 0, 0 ], [ 0, 3, 4 ], [ 0, 4, 1 ] ]
261

262
263
3.1-14 FrobeniusNumber
264
265
FrobeniusNumber( NS )  attribute
266
FrobeniusNumberOfNumericalSemigroup( NS )  attribute
267
268
The largest nonnegative integer not belonging to a numerical semigroup S is
269
the Frobenius number of S. If S is the set of nonnegative integers, then
270
clearly its Frobenius number is -1, otherwise its Frobenius number coincides
271
with the maximum of the gaps (or fundamental gaps) of S.
272
273
NS is a numerical semigroup. It returns the Frobenius number of NS. Of
274
course, the time consumed to return a result may depend on the way the
275
semigroup is given or on the knowledge already produced on the semigroup.
276
277
 Example 
278
gap> FrobeniusNumberOfNumericalSemigroup(NumericalSemigroup(3,5,7));
279
4
280
gap> FrobeniusNumber(NumericalSemigroup(3,5,7));
281
4
282

283
284
3.1-15 Conductor
285
286
Conductor( NS )  attribute
287
ConductorOfNumericalSemigroup( NS )  attribute
288
289
This is just a synonym of  FrobeniusNumberOfNumericalSemigroup (NS)+1.
290
291
 Example 
292
gap> ConductorOfNumericalSemigroup(NumericalSemigroup(3,5,7));
293
5
294
gap> Conductor(NumericalSemigroup(3,5,7));
295
5
296

297
298
3.1-16 PseudoFrobeniusOfNumericalSemigroup
299
300
PseudoFrobeniusOfNumericalSemigroup( S )  attribute
301
302
An integer z is a pseudo-Frobenius number of S if z+S∖{0}⊆ S.
303
304
S is a numerical semigroup. It returns set of pseudo-Frobenius numbers of S.
305
306
 Example 
307
gap> S := NumericalSemigroup("modular", 5,53);
308
<Modular numerical semigroup satisfying 5x mod 53 <= x >
309
gap> PseudoFrobeniusOfNumericalSemigroup(S);
310
[ 21, 40, 41, 42 ]
311

312
313
3.1-17 TypeOfNumericalSemigroup
314
315
TypeOfNumericalSemigroup( NS )  attribute
316
317
Stands for Length(PseudoFrobeniusOfNumericalSemigroup (NS)).
318
319
 Example 
320
gap> S := NumericalSemigroup("modular", 5,53);
321
<Modular numerical semigroup satisfying 5x mod 53 <= x >
322
gap> Type(S);
323
4
324
gap> TypeOfNumericalSemigroup(S);
325
4
326

327
328
3.1-18 Gaps
329
330
Gaps( NS )  attribute
331
GapsOfNumericalSemigroup( NS )  attribute
332
333
A gap of a numerical semigroup S is a nonnegative integer not belonging to
334
S. NS is a numerical semigroup. Both return the set of gaps of NS.
335
336
 Example 
337
gap> GapsOfNumericalSemigroup(NumericalSemigroup(3,5,7));
338
[ 1, 2, 4 ]
339
gap> Gaps(NumericalSemigroup(5,7,11));
340
[ 1, 2, 3, 4, 6, 8, 9, 13 ]
341

342
343
3.1-19 DesertsOfNumericalSemigroup
344
345
DesertsOfNumericalSemigroup( NS )  function
346
347
NS is a numerical semigroup. The output is the list with the runs of gaps of
348
NS.
349
350
 Example 
351
gap> s:=NumericalSemigroup(3,5,7);;
352
gap> DesertsOfNumericalSemigroup(s);
353
[ [ 1, 2 ], [ 4 ] ]
354

355
356
3.1-20 IsOrdinaryNumericalSemigroup
357
358
IsOrdinaryNumericalSemigroup( NS )  property
359
IsOrdinary( NS )  property
360
361
NS is a numerical semigroup. Dectects if the semigroup is ordinary, that is,
362
with less than two deserts.
363
364
 Example 
365
gap> s:=NumericalSemigroup(3,5,7);;
366
gap> IsOrdinary(s);
367
false
368

369
370
3.1-21 IsAcuteNumericalSemigroup
371
372
IsAcuteNumericalSemigroup( NS )  property
373
IsAcute( NS )  property
374
375
NS is a numerical semigroup. Dectects if the semigroup is acute, that is, it
376
is either ordinary or its last desert (the one with the Frobenius number)
377
has less elements than the preceding one ([BA04]).
378
379
 Example 
380
gap> s:=NumericalSemigroup(3,5,7);;
381
gap> IsAcute(s);
382
true
383

384
385
3.1-22 Holes
386
387
Holes( NS )  attribute
388
HolesOfNumericalSemigroup( S )  attribute
389
390
S is a numerical semigroup. Returns the set of gaps x of S such that F(S)-x
391
is also a gap, where F(S) stands for the Frobenius number of S.
392
393
 Example 
394
gap> s:=NumericalSemigroup(3,5);;
395
gap> Holes(s);
396
[ ]
397
gap> s:=NumericalSemigroup(3,5,7);;
398
gap> HolesOfNumericalSemigroup(s);
399
[ 2 ]
400

401
402
3.1-23 LatticePathAssociatedToNumericalSemigroup
403
404
LatticePathAssociatedToNumericalSemigroup( S, p, q )  attribute
405
406
S is a numerical semigroup and p,q are two elements in S.
407
408
In this setting S is an oversemigroup of ⟨ p,q⟩, and consequently every gap
409
of S is a gap of ⟨ p,q⟩. If c is the conductor of ⟨ p,q⟩, then every gap g
410
of ⟨ p,q⟩ can be written uniquely as g=c-1-(ap+bp) for some nonnegative
411
integers a,b. We say that (a,b) are the coordinates associated to g.
412
413
The output is a path in N^2 such that coordinates of the gaps of S
414
correspond exactly with the points in N^2 that are between the path in the
415
line ax+by=c-1. See [KW14].
416
417
 Example 
418
gap> s:=NumericalSemigroup(16,17,71,72);;
419
gap> LatticePathAssociatedToNumericalSemigroup(s,16,17);
420
[ [ 0, 14 ], [ 1, 13 ], [ 2, 12 ], [ 3, 11 ], [ 4, 10 ], [ 5, 9 ], [ 6, 8 ],
421
 [ 7, 7 ], [ 8, 6 ], [ 9, 5 ], [ 10, 4 ], [ 11, 3 ], [ 12, 2 ], [ 13, 1 ],
422
 [ 14, 0 ] ]
423

424
425
3.1-24 Genus
426
427
Genus( NS )  attribute
428
GenusOfNumericalSemigroup( NS )  attribute
429
430
NS is a numerical semigroup. It returns the number of gaps of NS.
431
432
 Example 
433
gap> s:=NumericalSemigroup(16,17,71,72);;
434
gap> GenusOfNumericalSemigroup(s);
435
80
436
gap> S := NumericalSemigroup("modular", 5,53);
437
<Modular numerical semigroup satisfying 5x mod 53 <= x >
438
gap> Genus(S);
439
26
440

441
442
3.1-25 FundamentalGaps
443
444
FundamentalGaps( S )  attribute
445
FundamentalGapsOfNumericalSemigroup( S )  attribute
446
447
S The fundamental gaps of S are those gaps that are maximal with respect to
448
the partial order induced by division in N. is a numerical semigroup. It
449
returns the set of fundamental gaps of S.
450
451
 Example 
452
gap> S := NumericalSemigroup("modular", 5,53);
453
<Modular numerical semigroup satisfying 5x mod 53 <= x >
454
gap> FundamentalGapsOfNumericalSemigroup(S);
455
[ 16, 17, 18, 19, 27, 28, 29, 30, 31, 40, 41, 42 ]
456
gap> GapsOfNumericalSemigroup(S);
457
[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29,
458
 30, 31, 40, 41, 42 ]
459
gap> Gaps(NumericalSemigroup(5,7,11));
460
[ 1, 2, 3, 4, 6, 8, 9, 13 ]
461
gap> FundamentalGaps(NumericalSemigroup(5,7,11));
462
[ 6, 8, 9, 13 ]
463

464
465
3.1-26 SpecialGaps
466
467
SpecialGaps( S )  attribute
468
SpecialGapsOfNumericalSemigroup( S )  attribute
469
470
The special gaps of a numerical semigroup S, are those fundamental gaps such
471
that if they are added to the given numerical semigroup, then the resulting
472
set is again a numerical semigroup. S is a numerical semigroup. It returns
473
the special gaps of S.
474
475
 Example 
476
gap> S := NumericalSemigroup("modular", 5,53);
477
<Modular numerical semigroup satisfying 5x mod 53 <= x >
478
gap> SpecialGaps(S);
479
[ 40, 41, 42 ]
480
gap> SpecialGapsOfNumericalSemigroup(S);
481
[ 40, 41, 42 ]
482

483
484
485
3.2 Wilf's conjecture
486
487
Let S be a numerical semigroup, with conductor c and embedding dimension e.
488
Denote by l the cardinality of the set of elements in S smaller than c. Wilf
489
in [Wil78] asked whether or not l/cge 1/e for all numerical semigroups. In
490
this section we give some functions to experiment with this conjecture, as
491
defined in [Eli15].
492
493
3.2-1 WilfNumber
494
495
WilfNumber( S )  attribute
496
WilfNumberOfNumericalSemigroup( S )  attribute
497
498
S is a numerical semigroup. Let c, e and l be the conductor, embedding
499
dimension and number of elements smaller than c in S. Returns e l-c, which
500
was conjetured by Wilf to be nonnegative.
501
502
 Example 
503
gap> l:=NumericalSemigroupsWithGenus(10);;
504
gap> Filtered(l, s->WilfNumberOfNumericalSemigroup(s)<0); 
505
[ ]
506
gap> Maximum(Set(l, s->WilfNumberOfNumericalSemigroup(s)));
507
70
508
gap> s := NumericalSemigroup(13,25,37);;
509
gap> WilfNumber(s); 
510
96
511

512
513
3.2-2 EliahouNumber
514
515
EliahouNumber( S )  attribute
516
TruncatedWilfNumberOfNumericalSemigroup( S )  attribute
517
518
S is a numerical semigroup. Let c, m, s and l be the conductor,
519
multiplicity, number of generators smaller than c, and number of elements
520
smaller than c in S, respectively. Let q and r be the quotient and negative
521
remainder of the division of c by m, that is, c=qm-r. Returns s l-qd_q+r,
522
where d_q corresponds with the number of integers in [c,c+m[ that are not
523
minimal generators of S.
524
525
 Example 
526
gap> s:=NumericalSemigroup(5,7,9);;
527
gap> TruncatedWilfNumberOfNumericalSemigroup(s);
528
4
529
gap> s:=NumericalSemigroupWithGivenElementsAndFrobenius([14,22,23],55);;
530
gap> EliahouNumber(s);
531
-1
532

533
534
3.2-3 ProfileOfNumericalSemigroup
535
536
ProfileOfNumericalSemigroup( S )  attribute
537
538
S is a numerical semigroup. Let c and m be the conductor and multiplicity of
539
S, respectively. Let q and r be the quotient and nonpositive remainder of
540
the division of c by m, that is, c=qm-r. Returns a list of lists of
541
integers, each list is the cardinality of S ∩ [jm-r, (j+1)m-r[ with j in
542
[1..q-1].
543
544
 Example 
545
gap> s:=NumericalSemigroup(5,7,9);;
546
gap> ProfileOfNumericalSemigroup(s);
547
[ 2, 1 ]
548
gap> s:=NumericalSemigroupWithGivenElementsAndFrobenius([14,22,23],55);;
549
gap> ProfileOfNumericalSemigroup(s);
550
[ 3, 0, 0 ]
551

552
553
3.2-4 EliahouSlicesOfNumericalSemigroup
554
555
EliahouSlicesOfNumericalSemigroup( S )  attribute
556
557
S is a numerical semigroup. Let c and m be the conductor and multiplicity of
558
S, respectively. Let q and r be the quotient and negative remainder of the
559
division of c by m, that is, c=qm-r. Returns a list of lists of integers,
560
each list is the set S ∩ [jm-r, (j+1)m-r[ with j in [1..q]. So this is a
561
partition of the set of small elements of S (without 0).
562
563
 Example 
564
gap> s:=NumericalSemigroup(5,7,9);; 
565
gap> EliahouSlicesOfNumericalSemigroup(s);
566
[ [ 5, 7 ], [ 9, 10, 12 ] ]
567
gap> SmallElements(s);
568
[ 0, 5, 7, 9, 10, 12, 14 ]
569

570
571
572