Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563629 views
1
<?xml version="1.0" encoding="UTF-8"?>
2
<Section>
3
<Heading>Some basic tests</Heading>
4
This section describes some basic tests on numerical semigroups. The first described tests refer to what the semigroup is currently known to be (not necessarily the way it was created).
5
Then are presented functions to test if a given list represents
6
the small elements, gaps or the Apéry set (see <Ref Label="zlab1" />) of a numerical semigroup; to test if an integer belongs to a numerical semigroup
7
and if a numerical semigroup is a subsemigroup of another one.
8
9
<ManSection>
10
<Attr Name="IsNumericalSemigroup" Arg="NS"/>
11
<Attr Name="IsNumericalSemigroupByGenerators" Arg="NS"/>
12
<Attr Name="IsNumericalSemigroupByMinimalGenerators" Arg="NS"/>
13
<Attr Name="IsNumericalSemigroupByInterval" Arg="NS"/>
14
<Attr Name="IsNumericalSemigroupByOpenInterval" Arg="NS"/>
15
<Attr Name="IsNumericalSemigroupBySubAdditiveFunction" Arg="NS"/>
16
<Attr Name="IsNumericalSemigroupByAperyList" Arg="NS"/>
17
<Attr Name="IsNumericalSemigroupBySmallElements" Arg="NS"/>
18
<Attr Name="IsNumericalSemigroupByGaps" Arg="NS"/>
19
<Attr Name="IsNumericalSemigroupByFundamentalGaps" Arg="NS"/>
20
<Attr Name="IsProportionallyModularNumericalSemigroup" Arg="NS"/>
21
<Attr Name="IsModularNumericalSemigroup" Arg="NS"/>
22
<Description>
23
<A>NS</A> is a numerical semigroup and these attributes are available
24
(their names should be self explanatory).
25
<Example><![CDATA[
26
gap> s:=NumericalSemigroup(3,7);
27
<Numerical semigroup with 2 generators>
28
gap> AperyListOfNumericalSemigroupWRTElement(s,30);;
29
gap> t:=NumericalSemigroupByAperyList(last);
30
<Numerical semigroup>
31
gap> IsNumericalSemigroupByGenerators(s);
32
true
33
gap> IsNumericalSemigroupByGenerators(t);
34
false
35
gap> IsNumericalSemigroupByAperyList(s);
36
false
37
gap> IsNumericalSemigroupByAperyList(t);
38
true
39
]]></Example>
40
</Description>
41
</ManSection>
42
43
44
<ManSection>
45
<Attr Name="RepresentsSmallElementsOfNumericalSemigroup" Arg="L"/>
46
<Description>
47
Tests if the list <A>L</A> (which has to be a set) may represent the ``small" elements of a numerical semigroup.
48
<Example><![CDATA[
49
gap> L:=[ 0, 3, 6, 9, 11, 12, 14, 15, 17, 18, 20 ];
50
[ 0, 3, 6, 9, 11, 12, 14, 15, 17, 18, 20 ]
51
gap> RepresentsSmallElementsOfNumericalSemigroup(L);
52
true
53
gap> L:=[ 6, 9, 11, 12, 14, 15, 17, 18, 20 ];
54
[ 6, 9, 11, 12, 14, 15, 17, 18, 20 ]
55
gap> RepresentsSmallElementsOfNumericalSemigroup(L);
56
false
57
]]></Example>
58
</Description>
59
</ManSection>
60
61
62
63
<ManSection>
64
<Attr Name="RepresentsGapsOfNumericalSemigroup" Arg="L"/>
65
<Description>
66
Tests if the list <A>L</A> may represent the gaps
67
(see <Ref Label="xx1" />) of a numerical semigroup.
68
<Example><![CDATA[
69
gap> s:=NumericalSemigroup(3,7);
70
<Numerical semigroup with 2 generators>
71
gap> L:=GapsOfNumericalSemigroup(s);
72
[ 1, 2, 4, 5, 8, 11 ]
73
gap> RepresentsGapsOfNumericalSemigroup(L);
74
true
75
gap> L:=Set(List([1..21],i->RandomList([1..50])));
76
[ 2, 6, 7, 8, 10, 12, 14, 19, 24, 28, 31, 35, 42, 50 ]
77
gap> RepresentsGapsOfNumericalSemigroup(L);
78
false
79
]]></Example>
80
</Description>
81
</ManSection>
82
83
<ManSection>
84
<Func Name="IsAperyListOfNumericalSemigroup" Arg="L"/>
85
<Description>
86
Tests whether a list <A>L</A> of integers may represent the Apéry list of a
87
numerical semigroup. It returns <K>true</K> when the periodic function
88
represented by <A>L</A> is subadditive
89
(see <Ref Func="RepresentsPeriodicSubAdditiveFunction" />)
90
and the remainder of the division of
91
<C>L[i]</C> by the length of <A>L</A> is <C>i</C> and returns <K>false</K>
92
otherwise (the criterium used is the one explained in <Cite Key="R96"></Cite>).
93
<Example><![CDATA[
94
gap> IsAperyListOfNumericalSemigroup([0,21,7,28,14]);
95
true
96
]]></Example>
97
</Description>
98
</ManSection>
99
100
<ManSection>
101
<Func Name="IsSubsemigroupOfNumericalSemigroup" Arg="S, T"/>
102
<Description>
103
<A>S</A> and <A>T</A>
104
are numerical semigroups. Tests whether <A>T</A> is contained in <A>S</A>.
105
<Example><![CDATA[
106
gap> S := NumericalSemigroup("modular", 5,53);
107
<Modular numerical semigroup satisfying 5x mod 53 <= x >
108
gap> T:=NumericalSemigroup(2,3);
109
<Numerical semigroup with 2 generators>
110
gap> IsSubsemigroupOfNumericalSemigroup(T,S);
111
true
112
gap> IsSubsemigroupOfNumericalSemigroup(S,T);
113
false
114
]]></Example>
115
</Description>
116
</ManSection>
117
<ManSection>
118
<Attr Name="IsSubset" Arg="S, T"/>
119
<Description>
120
<A>S</A> is a numerical semigroup. <A>T</A> can be a numerical semigroup, in which case the function is just a synonym of <Ref Func="IsSubsemigroupOfNumericalSemigroup" />, or a list of integers, in which case tests whether all elements of the list belong to <A>S</A>.
121
<Example><![CDATA[
122
gap> ns1 := NumericalSemigroup(5,7);;
123
gap> ns2 := NumericalSemigroup(5,7,11);;
124
gap> IsSubset(ns1,ns2);
125
false
126
gap> IsSubset(ns2,[5,15]);
127
true
128
gap> IsSubset(ns1,[5,11]);
129
false
130
gap> IsSubset(ns2,ns1);
131
true
132
]]></Example>
133
</Description>
134
</ManSection>
135
136
137
<ManSection>
138
<Oper Name="BelongsToNumericalSemigroup" Arg="n,S"/>
139
<Oper Name="\in" Arg="n,S" Label="membership test for numerical semigroup"/>
140
<Description>
141
<A>n</A> is an integer and <A>S</A> is a numerical semigroup. Tests whether
142
<A>n</A> belongs to <A>S</A>. <C>\in(n,S)</C> calls the infix variant <C>n in S</C>, and both can be seen as a short for <C>BelongsToNumericalSemigroup(n,S)</C>.
143
<Example><![CDATA[
144
gap> S := NumericalSemigroup("modular", 5,53);
145
<Modular numerical semigroup satisfying 5x mod 53 <= x >
146
gap> BelongsToNumericalSemigroup(15,S);
147
false
148
gap> 15 in S;
149
false
150
gap> SmallElementsOfNumericalSemigroup(S);
151
[ 0, 11, 12, 13, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ]
152
gap> BelongsToNumericalSemigroup(13,S);
153
true
154
gap> 13 in S;
155
true
156
]]></Example>
157
</Description>
158
</ManSection>
159
</Section>
160
161