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
<Chapter Label="routines">
4
<Heading>
5
Usage of <Package>IntPic</Package> in connection with the <Package>numericalsgps</Package> package
6
</Heading>
7
This chapter describes functions to be used in connection with the <Package>numericalsgps</Package> package.
8
We found it particularly usefull to gain intuition that led to the obtention of the results stated in <Cite Key="DGSRP15"></Cite>.
9
10
<Section>
11
<Heading>Tikz code for drawing numerical semigroups</Heading>
12
<ManSection>
13
<Heading>Tikz code for drawing numerical semigroups</Heading>
14
<Func Name="TikzCodeForNumericalSemigroup" Arg="arg"/>
15
<Description>
16
The arguments (at most 4) are: <Enum>
17
<Item>a numerical semigroup</Item>
18
<Item>(optional) a list whose elements are either<List>
19
<Item>lists of integers <Emph>or</Emph> </Item>
20
<Item>one of the strings "pseudo_frobenius", "small_elements", "min_generators", "frobenius_number", "conductor", "special_gaps", "fundamental_gaps" (the default: used when no list is present) <Emph>or</Emph> </Item>
21
</List>
22
</Item>
23
<Item>a record whose fields are<List>
24
<Item>func -- a function name</Item>
25
<Item>(optional) argument -- an argument (that may be a function name also)</Item>
26
</List>
27
</Item>
28
<Item>(optional) a positive integer -- if it is bigger than the conductor or biggest minimal generator, it indicates the number of cells - 1 to be drawn and these are drawn in a single line; otherwise, it indicates the maximum number of cells per line.</Item>
29
</Enum>
30
</Description>
31
</ManSection>
32
<Example><![CDATA[
33
gap> ns1 := NumericalSemigroup(3,5);;
34
gap> TikzCodeForNumericalSemigroup(ns1,[[3,4],"pseudo_frobenius"],20);
35
"%tikz\n\\begin{tikzpicture}[every node/.style={draw,scale=1pt,\nminimum width\
36
=20pt,inner sep=3pt,\nline width=0pt,draw=black}]\n\\matrix[row sep=2pt,column\
37
sep=2pt]\n{\\node[]{0};&\n\\node[]{1};&\n\\node[]{2};&\n\\node[fill=red]{3};&\
38
\n\\node[fill=red]{4};&\n\\node[]{5};&\n\\node[]{6};&\n\\node[fill=green]{7};&\
39
\n\\node[]{8};&\n\\node[]{9};&\n\\node[]{10};&\n\\node[]{11};&\n\\node[]{12};&\
40
\n\\node[]{13};&\n\\node[]{14};&\n\\node[]{15};&\n\\node[]{16};&\n\\node[]{17}\
41
;&\n\\node[]{18};&\n\\node[]{19};&\n\\node[]{20};\\\\\n};\n\\end{tikzpicture}\
42
\n"
43
]]></Example>
44
<Example><![CDATA[
45
gap> IP_Splash(TikzCodeForNumericalSemigroup(NumericalSemigroup(7,13,19,23),
46
> [[3,4],"small_elements","fundamental_gaps"],20),rec(viewer := "evince"));
47
]]></Example>
48
<Alt Only="LaTeX">
49
\begin{center}
50
\includegraphics[width=0.99\textwidth]{../images/ip_splash_tikz_NS.pdf}
51
\end{center}
52
</Alt>
53
<Alt Only="HTML">
54
&#60;br&#62;&#60;center&#62;&#60;img src=&#34;../images/ip_splash_tikz_NS.jpg&#34;&#62;&#60;/center&#62;&#60;br&#62;
55
</Alt>
56
</Section>
57
<!-- ###################################################### -->
58
<Section>
59
<Heading>Drawing sets of numerical semigroups</Heading>
60
<ManSection>
61
<Heading>Set of numerical semigroups</Heading>
62
<Func Name="SetOfNumericalSemigroups" Arg="arg"/>
63
<Description>
64
This function is used to produce lists of numerical semigroups with a fixed genus or Frobenius number. They are filtered and ordered according to some criteria.<P/>
65
The argument is a record of options: <Enum>
66
<Item>set -- a record whose possible fields are genus or frobenius</Item>
67
<Item>(optional) filter -- a record whose possible fields are genus, type and/or multiplicity and/or frobenius and/or embedding_dimension</Item>
68
<Item>(optional) order -- ("genus", "type", "multiplicity", "frobenius", "embedding_dimension")</Item>
69
</Enum>
70
</Description>
71
</ManSection>
72
<Example><![CDATA[
73
gap> SetOfNumericalSemigroups(rec(set:=rec(genus:=6),filter:=rec(type:= 2),
74
> order:="multiplicity"));
75
[ <Numerical semigroup with 3 generators>,
76
<Numerical semigroup with 3 generators>,
77
<Numerical semigroup with 4 generators>,
78
<Numerical semigroup with 5 generators>,
79
<Numerical semigroup with 5 generators>,
80
<Numerical semigroup with 6 generators> ]
81
gap> SetOfNumericalSemigroups(rec(set:=rec(genus:=6),filter:=rec(type:= 2),
82
> order:="frobenius"));
83
[ <Numerical semigroup with 3 generators>,
84
<Numerical semigroup with 5 generators>,
85
<Numerical semigroup with 5 generators>,
86
<Numerical semigroup with 3 generators>,
87
<Numerical semigroup with 4 generators>,
88
<Numerical semigroup with 6 generators> ]
89
gap> List(last,MinimalGeneratingSystem);
90
[ [ 3, 10, 11 ], [ 5, 6, 7 ], [ 5, 6, 8 ], [ 3, 8, 13 ], [ 4, 7, 9 ],
91
[ 6, 7, 8, 9, 11 ] ]
92
]]></Example>
93
<!-- ###################################################### -->
94
<ManSection>
95
<Heading>Draw a set of numerical semigroups</Heading>
96
<Func Name="DrawSetOfNumericalSemigroups" Arg="arg"/>
97
<Description>
98
Produces a single image from the images of a set of numerical semigroups.<P/>
99
The arguments (at most 3) are: <Enum>
100
<Item>a list of numerical semigroups (given as a list or each given as argument)</Item>
101
<Item>(optional) an integer that (when present) determines the length of each line</Item>
102
<Item>(optional) a record whose fields are<List>
103
<Item>(optional) splash -- which (when present) consists of a record of options for the Viz Splash function</Item>
104
<Item>(optional) highlights: a list to be passed to the function that produces the tikz code for each individual semigroup (whose aim is to say which elements are to be highlighted)</Item>
105
</List>
106
</Item>
107
</Enum>
108
</Description>
109
</ManSection>
110
<Example><![CDATA[
111
gap> ns1 := NumericalSemigroup(3,5);;
112
gap> ns2 := NumericalSemigroup(5,7,11);;
113
gap> DrawSetOfNumericalSemigroups(ns1,rec(splash:=
114
> rec(viewer := "evince"),highlights :=
115
> ["pseudo_frobenius","small_elements","min_generators"]));
116
gap> DrawSetOfNumericalSemigroups(ns1,ns2,rec(splash:=
117
> rec(viewer := "evince"),highlights :=
118
> ["pseudo_frobenius","small_elements","min_generators"]));
119
gap> DrawSetOfNumericalSemigroups([ns1,ns2],rec(splash:=
120
> rec(viewer := "evince"),highlights :=
121
> ["small_elements","min_generators"]));
122
]]></Example>
123
<Alt Only="LaTeX">
124
\begin{center}
125
\includegraphics[width=0.99\textwidth]{../images/set_3_5.pdf}
126
\end{center}
127
</Alt>
128
<Alt Only="HTML">
129
&#60;br&#62;&#60;center&#62;&#60;img src=&#34;../images/set_3_5.jpg&#34;&#62;&#60;/center&#62;&#60;br&#62;
130
</Alt>
131
<Alt Only="LaTeX">
132
\begin{center}
133
\includegraphics[width=0.99\textwidth]{../images/set_3_5_and_5_7_11.pdf}
134
\end{center}
135
</Alt>
136
<Alt Only="HTML">
137
&#60;br&#62;&#60;center&#62;&#60;img src=&#34;../images/set_3_5_and_5_7_11.jpg&#34;&#62;&#60;/center&#62;&#60;br&#62;
138
</Alt>
139
<Alt Only="LaTeX">
140
\begin{center}
141
\includegraphics[width=0.99\textwidth]{../images/set_3_5_and_5_7_11_v2.pdf}
142
\end{center}
143
</Alt>
144
<Alt Only="HTML">
145
&#60;br&#62;&#60;center&#62;&#60;img src=&#34;../images/set_3_5_and_5_7_11_v2.jpg&#34;&#62;&#60;/center&#62;&#60;br&#62;
146
</Alt>
147
<Example><![CDATA[
148
gap> frob := 15;;
149
gap> tipo := 2;;
150
gap> set := SetOfNumericalSemigroups(rec(set := rec(frobenius := frob),
151
> filter := rec(type:= tipo),order := "embedding_dimension"));;
152
gap> DrawSetOfNumericalSemigroups(set,rec(splash:= rec(viewer := "evince"),
153
> highlights := ["small_elements","min_generators",
154
> rec(func:= "ForcedIntegersForPseudoFrobenius",
155
> argument := "PseudoFrobeniusOfNumericalSemigroup")]));
156
]]></Example>
157
<Alt Only="LaTeX">
158
\begin{center}
159
\includegraphics[width=0.99\textwidth]{../images/draw_set_pseudo.pdf}
160
\end{center}
161
</Alt>
162
<Alt Only="HTML">
163
&#60;br&#62;&#60;center&#62;&#60;img src=&#34;../images/draw_set_pseudo.jpg&#34;&#62;&#60;/center&#62;&#60;br&#62;
164
</Alt>
165
The following example helps in the understanding of the colors present in the first line of previous figure.
166
<Example><![CDATA[
167
gap> ns := NumericalSemigroup(4,9,19);;
168
gap> SmallElements(ns);
169
[ 0, 4, 8, 9, 12, 13, 16 ]
170
gap> MinimalGeneratingSystem(ns);
171
[ 4, 9, 19 ]
172
gap> ForcedIntegersForPseudoFrobenius(PseudoFrobeniusOfNumericalSemigroup(ns));
173
[ [ 1, 2, 3, 5, 6, 7, 14, 15 ], [ 0, 8, 9, 12, 13, 16 ] ]
174
]]></Example>
175
</Section>
176
</Chapter>
177
178