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