This chapter describes functions to be used in connection with the numericalsgps package. We found it particularly useful to gain intuition that led to the obtention of the results stated in [DGR16].
‣ TikzCodeForNumericalSemigroup ( arg ) | ( function ) |
The arguments (at most 4) are:
a numerical semigroup
(optional) a list whose elements are either
lists of integers or
one of the strings "pseudo_frobenius", "min_generators", "frobenius_number", "conductor", "special_gaps", "fundamental_gaps", "small_elements" (the default: used when no list is present) or
the string "ns_table" (the drawing obtained is a table whose top row corresponds to the threshold interval; as a side effect, if it is turned to "true", negative integers are not printed); alternatively, the option can be given in the usual way: rec(ns_table := true)
a record whose fields are
func -- a function name
(optional) argument -- an argument (that may be a function name also)
(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.
gap> ns := NumericalSemigroup(5,7);; gap> tkz := TikzCodeForNumericalSemigroup(ns,["ns_table"],rec(negatives:=false)); #I In order to highlight some element, please use a list with one or more of the options given as strings: pseudo_frobenius, min_generators, frobenius_number, conductor, special_gaps, fundamental_gaps, small_elements "%tikz\n\\begin{tikzpicture}[every node/.style={draw,scale=1pt,\nminimum width\ =20pt,inner sep=3pt,\nline width=0pt,draw=black}]\n\\matrix[row sep=2pt,column\ sep=2pt]\n{\\node[]{24};&\n\\node[]{25};&\n\\node[]{26};&\n\\node[]{27};&\n\\\ node[]{28};\\\\\n\\node[]{19};&\n\\node[]{20};&\n\\node[]{21};&\n\\node[]{22};\ &\n\\node[]{23};\\\\\n\\node[]{14};&\n\\node[]{15};&\n\\node[]{16};&\n\\node[]\ {17};&\n\\node[]{18};\\\\\n\\node[]{9};&\n\\node[]{10};&\n\\node[]{11};&\n\\no\ de[]{12};&\n\\node[]{13};\\\\\n\\node[]{4};&\n\\node[]{5};&\n\\node[]{6};&\n\\\ node[]{7};&\n\\node[]{8};\\\\\n&\n\\node[]{0};&\n\\node[]{1};&\n\\node[]{2};&\ \n\\node[]{3};\\\\\n};\n\\end{tikzpicture}\n"
gap> tkz := TikzCodeForNumericalSemigroup(ns,["small_elements"], > rec(ns_table := true,negatives:=false));;
gap> ns1 := NumericalSemigroup(3,5);; gap> TikzCodeForNumericalSemigroup(ns1,[[3,4],"pseudo_frobenius"],20); "%tikz\n\\begin{tikzpicture}[every node/.style={draw,scale=1pt,\nminimum width\ =20pt,inner sep=3pt,\nline width=0pt,draw=black}]\n\\matrix[row sep=2pt,column\ sep=2pt]\n{\\node[]{0};&\n\\node[]{1};&\n\\node[]{2};&\n\\node[fill=red]{3};&\ \n\\node[fill=red]{4};&\n\\node[]{5};&\n\\node[]{6};&\n\\node[fill=green]{7};&\ \n\\node[]{8};&\n\\node[]{9};&\n\\node[]{10};&\n\\node[]{11};&\n\\node[]{12};&\ \n\\node[]{13};&\n\\node[]{14};&\n\\node[]{15};&\n\\node[]{16};&\n\\node[]{17}\ ;&\n\\node[]{18};&\n\\node[]{19};&\n\\node[]{20};\\\\\n};\n\\end{tikzpicture}\ \n"
gap> IP_Splash(TikzCodeForNumericalSemigroup(NumericalSemigroup(7,13,19,23), > [[3,4],"small_elements","fundamental_gaps"],20),rec(viewer := "evince"));
gap> ns := NumericalSemigroup(7,11,38,41);; gap> highlights := ["conductor", "min_generators", "small_elements"];; gap> options := rec(ns_table:=true,colors:=["blue", "red!70", "-red", "black!40"]);; gap> tkz := TikzCodeForNumericalSemigroup(ns,highlights,options);; gap> IP_Splash(tkz); gap> tkz := TikzCodeForNumericalSemigroup(ns,highlights,rec(ns_table:=true));; gap> IP_Splash(tkz);
‣ DrawNumericalSemigroup ( ns ) | ( function ) |
This function abbreviates the production of tikz code to display the numerical semigroup ns
using some predefined options and elements to highlight (based on the ones of the above example). It also displays the image produced. Note that the production and displaying of the image depends on the function IP_Splash (which can be slow and depends on an appropriate configuration of the system). The output is the tikz code produced.
gap> m := 31;; gap> small_gens := [m,m+1,m+2,m+3];; gap> other_gens := List([1..Int(m/7)], k -> 7*k+m);; gap> ns := NumericalSemigroup(Union(small_gens,other_gens));; gap> DrawNumericalSemigroup(ns);;
‣ SetOfNumericalSemigroups ( arg ) | ( function ) |
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.
The argument is a record of options:
set -- a record whose possible fields are genus or frobenius
(optional) filter -- a record whose possible fields are genus, type and/or multiplicity and/or frobenius and/or embedding_dimension
(optional) order -- ("genus", "type", "multiplicity", "frobenius", "embedding_dimension")
gap> ls := SetOfNumericalSemigroups(rec(set:=rec(genus:=6),filter:=rec(type:= 2), order:="multiplicity"));; gap> List(ls,MinimalGenerators); [ [ 3, 8, 13 ], [ 3, 10, 11 ], [ 4, 7, 9 ], [ 5, 6, 7 ], [ 5, 6, 8 ], [ 6, 7, 8, 9, 11 ] ] gap> ls := SetOfNumericalSemigroups(rec(set:=rec(genus:=6),filter:=rec(type:= 2), order:="frobenius"));; gap> List(ls,MinimalGenerators); [ [ 3, 10, 11 ], [ 5, 6, 7 ], [ 5, 6, 8 ], [ 3, 8, 13 ], [ 4, 7, 9 ], [ 6, 7, 8, 9, 11 ] ]
‣ DrawSetOfNumericalSemigroups ( arg ) | ( function ) |
Produces a single image from the images of a set of numerical semigroups.
The arguments (at most 3) are:
a list of numerical semigroups (given as a list or each given as argument)
(optional) an integer that (when present) determines the length of each line
(optional) a record whose fields are
(optional) splash -- which (when present) consists of a record of options for the Viz Splash function
(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)
gap> ns1 := NumericalSemigroup(3,5);; gap> ns2 := NumericalSemigroup(5,7,11);; gap> DrawSetOfNumericalSemigroups(ns1,rec(splash:= > rec(viewer := "evince"),highlights := > ["pseudo_frobenius","small_elements","min_generators"])); gap> DrawSetOfNumericalSemigroups(ns1,ns2,rec(splash:= > rec(viewer := "evince"),highlights := > ["pseudo_frobenius","small_elements","min_generators"])); gap> DrawSetOfNumericalSemigroups([ns1,ns2],rec(splash:= > rec(viewer := "evince"),highlights := > ["small_elements","min_generators"]));
gap> frob := 15;; gap> tipo := 2;; gap> set := SetOfNumericalSemigroups(rec(set := rec(frobenius := frob), > filter := rec(type:= tipo),order := "embedding_dimension"));; gap> DrawSetOfNumericalSemigroups(set,rec(splash:= rec(viewer := "evince"), > highlights := ["small_elements","min_generators", > rec(func:= "ForcedIntegersForPseudoFrobenius", > argument := "PseudoFrobeniusOfNumericalSemigroup")]));
gap> ns := NumericalSemigroup(4,9,19);; gap> SmallElements(ns); [ 0, 4, 8, 9, 12, 13, 16 ] gap> MinimalGeneratingSystem(ns); [ 4, 9, 19 ] gap> ForcedIntegersForPseudoFrobenius(PseudoFrobeniusOfNumericalSemigroup(ns)); [ [ 1, 2, 3, 5, 6, 7, 14, 15 ], [ 0, 8, 9, 12, 13, 16 ] ]
generated by GAPDoc2HTML