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<Section>3<Heading>4Invariants5</Heading>67891011<ManSection>12<Attr Name="Multiplicity" Arg="NS" Label="for numerical semigroup"/>13<Attr Name="MultiplicityOfNumericalSemigroup" Arg="NS"/>14<Description>15<A>NS</A> is a numerical semigroup. Returns the multiplicity of <A>NS</A>, which is the smallest positive integer belonging to <A>NS</A>.16<Example><![CDATA[17gap> S := NumericalSemigroup("modular", 7,53);18<Modular numerical semigroup satisfying 7x mod 53 <= x >19gap> MultiplicityOfNumericalSemigroup(S);20821gap> NumericalSemigroup(3,5);22<Numerical semigroup with 2 generators>23gap> Multiplicity(last);24325]]></Example>26</Description>27</ManSection>2829<ManSection>30<Attr Name="GeneratorsOfNumericalSemigroup" Arg="S"/>31<Attr Name="Generators" Arg="S" Label="for numerical semigroup"/>32<Attr Name="MinimalGeneratingSystemOfNumericalSemigroup" Arg="S"/>33<Attr Name="MinimalGeneratingSystem" Arg="S" Label="for numerical semigroup"/>34<Attr Name="MinimalGenerators" Arg="S" Label="for numerical semigroup"/> <Description>35<A>S</A>36is a numerical semigroup.37<C>GeneratorsOfNumericalSemigroup</C>38returns a set of generators of <C>S</C>, which may39not be minimal.4041<!-- <C>GeneratorsOfNumericalSemigroupNC</C>42returns the set of generators recorded in <C>S!.generators</C>, which may43not be minimal44<C>ReducedSetOfGeneratorsOfNumericalSemigroupNC</C>45Returns a set with possibly fewer generators than those recorded in <C>S!.generators</C>. It changes <C>S!.generators</C> to the set returned.46The function has 1 to 3 arguments. One of them a numerical semigroup. Then an argument is a boolean (<E>true</E> means that all the elements not belonging to the Apery set with respect to the multiplicity are removed; the default is "false") and another argument is a positive integer <M>n</M> (meaning that generators that can be written as the sum of <M>n</M> or less generators are removed; the default is "2"). The boolean or the integer may not be present. If a minimal generating set for <M>S</M> is known or no generating set is known, then the minimal generating system is returned.-->474849<C>MinimalGeneratingSystemOfNumericalSemigroup</C>50returns the minimal set of generators of <C>S</C>.51<P/>52From Version 0.980, <C>ReducedSetOfGeneratorsOfNumericalSemigroup</C> is a synonym of <C>MinimalGeneratingSystemOfNumericalSemigroup</C>; <C>GeneratorsOfNumericalSemigroupNC</C> is a synonym of <C>GeneratorsOfNumericalSemigroup</C>. The names are kept for compatibility with code produced for previous versions, but will be removed in the future.5354<Example><![CDATA[55gap> S := NumericalSemigroup("modular", 5,53);56<Modular numerical semigroup satisfying 5x mod 53 <= x >57gap> GeneratorsOfNumericalSemigroup(S);58[ 11, 12, 13, 32, 53 ]59gap> S := NumericalSemigroup(3, 5, 53);60<Numerical semigroup with 3 generators>61gap> GeneratorsOfNumericalSemigroup(S);62[ 3, 5, 53 ]63gap> MinimalGeneratingSystemOfNumericalSemigroup(S);64[ 3, 5 ]65gap> MinimalGeneratingSystem(S)=MinimalGeneratingSystemOfNumericalSemigroup(S);66true67gap> s := NumericalSemigroup(3,5,7,15);68<Numerical semigroup with 4 generators>69gap> HasGenerators(s);70true71gap> HasMinimalGenerators(s);72false73gap> MinimalGenerators(s);74[ 3, 5, 7 ]75gap> Generators(s);76[ 3, 5, 7, 15 ]77]]></Example>78<!--gap> ReducedSetOfGeneratorsOfNumericalSemigroup(NumericalSemigroup(5,7,9,10,25));79[ 5, 7, 9, 25 ]80gap> ReducedSetOfGeneratorsOfNumericalSemigroup(true,NumericalSemigroup(5,7,9,10,25,28));81[ 5, 7, 9, 28 ]82gap> ReducedSetOfGeneratorsOfNumericalSemigroup(NumericalSemigroup(5,7,9,10,25,28),3);83[ 5, 7, 9 ]-->84</Description>85</ManSection>868788<ManSection>89<Attr Name="EmbeddingDimension" Arg="NS" Label="for numerical semigroup"/>90<Attr Name="EmbeddingDimensionOfNumericalSemigroup" Arg="NS"/>91<Description>92<C>NS</C>93is a numerical semigroup. It returns the cardinality of its minimal generating system.94<Example><![CDATA[95gap> s := NumericalSemigroup(3,5,7,15);96<Numerical semigroup with 4 generators>97gap> EmbeddingDimension(s);98399gap> EmbeddingDimensionOfNumericalSemigroup(s);1003101]]></Example>102</Description>103</ManSection>104105106107<ManSection>108<Attr Name="SmallElements" Arg="NS" Label="for numerical semigroup"/>109<Attr Name="SmallElementsOfNumericalSemigroup" Arg="NS"/>110<Description>111<C>NS</C>112is a numerical semigroup. It returns the list of small elements of <C>NS</C>. Of course, the time consumed to return a result may depend on the way the semigroup is given.113<Example><![CDATA[114gap> SmallElementsOfNumericalSemigroup(NumericalSemigroup(3,5,7));115[ 0, 3, 5 ]116gap> SmallElements(NumericalSemigroup(3,5,7));117[ 0, 3, 5 ]118]]></Example>119</Description>120</ManSection>121122123<ManSection>124<Func Name="FirstElementsOfNumericalSemigroup" Arg="n, NS"></Func>125<Description>126<C>NS</C> is a numerical semigroup. It returns the list with the127first <A>n</A> elements of <C>NS</C>.128<Example><![CDATA[129gap> FirstElementsOfNumericalSemigroup(2,NumericalSemigroup(3,5,7));130[ 0, 3 ]131gap> FirstElementsOfNumericalSemigroup(10,NumericalSemigroup(3,5,7));132[ 0, 3, 5, 6, 7, 8, 9, 10, 11, 12 ]133]]></Example>134</Description>135</ManSection>136137<ManSection>138<Oper Arg="S,r" Name="RthElementOfNumericalSemigroup"/>139<Description>140<A>S</A> is a numerical semigroup and <A>r</A> is an integer. It returns the <A>r</A>-th element of <A>S</A>.141<Example><![CDATA[142gap> S := NumericalSemigroup(7,8,17);;143gap> RthElementOfNumericalSemigroup(S,53);14468145]]></Example>146</Description>147</ManSection>148149150<ManSection>151<Attr Name="AperyList" Arg="S, n" Label="for numerical semigroup with respect to element"/>152<Oper Name="AperyListOfNumericalSemigroupWRTElement" Arg="S, n"/>153<Description>154<A>S</A> is a numerical semigroup and <A>n</A> is a positive element of155<A>S</A>. Computes the Apéry list of <A>S</A> with respect to <A>n</A>. It contains for156every <M>i\in \{0,\ldots,<A>n</A>-1\}</M>, in the <M>i+1</M>th position,157the smallest element in the semigroup congruent with <M>i</M> modulo <A>n</A>.158159<Example><![CDATA[160gap> S := NumericalSemigroup("modular", 5,53);;161gap> AperyListOfNumericalSemigroupWRTElement(S,12);162[ 0, 13, 26, 39, 52, 53, 54, 43, 32, 33, 22, 11 ]163gap> AperyList(S,12);164[ 0, 13, 26, 39, 52, 53, 54, 43, 32, 33, 22, 11 ]165]]></Example>166</Description>167</ManSection>168<ManSection>169<Attr Name="AperyList" Arg="S" Label="for numerical semigroup with respect to multiplicity"/>170<Attr Name="AperyListOfNumericalSemigroup" Arg="S"/>171<Description>172<A>S</A> is a numerical semigroup. It computes the Apéry list of <A>S</A> with respect to the multiplicity of <A>S</A>.173<Example><![CDATA[174gap> S := NumericalSemigroup("modular", 5,53);;175gap> AperyListOfNumericalSemigroup(S);176[ 0, 12, 13, 25, 26, 38, 39, 51, 52, 53, 32 ]177gap> AperyList(NumericalSemigroup(5,7,11));178[ 0, 11, 7, 18, 14 ]179]]></Example>180</Description>181</ManSection>182183184<ManSection>185<Attr Name="AperyList" Arg="S, n" Label="for numerical semigroup with respect to integer"/>186<Func Name="AperyListOfNumericalSemigroupWRTInteger" Arg="S, m"/>187<Description>188<A>S</A> is a numerical semigroup and <A>m</A> is an integer.189Computes the Apéry list of <A>S</A> with respect to <A>m</A>, that is, the190set of elements <M>x</M> in <A>S</A> such that <M>x-</M><A>m</A> is not in <A>S</A>.191If <A>m</A> is an element in <A>S</A>, then the output of <C>AperyListOfNumericalSemigroupWRTInteger</C>, as sets, is the same as <C>AperyListOfNumericalSemigroupWRTElement</C>,192though without side effects,193in the sense that this information is no longer used by the package. The output of <C>AperyList</C> is the same as <C>AperyListOfNumericalSemigroupWRTElement</C>.194195<Example><![CDATA[196gap> s:=NumericalSemigroup(10,13,19,27);;197gap> AperyListOfNumericalSemigroupWRTInteger(s,11);198[ 0, 10, 13, 19, 20, 23, 26, 27, 29, 32, 33, 36, 39, 42, 45, 46, 52, 55 ]199gap> AperyList(s,11);200[ 0, 10, 13, 19, 20, 23, 26, 27, 29, 32, 33, 36, 39, 42, 45, 46, 52, 55 ]201gap> Length(last);20218203gap> AperyListOfNumericalSemigroupWRTInteger(s,10);204[ 0, 13, 19, 26, 27, 32, 38, 45, 51, 54 ]205gap> AperyListOfNumericalSemigroupWRTElement(s,10);206[ 0, 51, 32, 13, 54, 45, 26, 27, 38, 19 ]207gap> Length(last);20810209gap> AperyList(s,10);210[ 0, 51, 32, 13, 54, 45, 26, 27, 38, 19 ]211]]></Example>212</Description>213</ManSection>214215216<ManSection>217<Func Name="AperyListOfNumericalSemigroupAsGraph" Arg="ap"/>218<Description>219<A>ap</A> is the Apéry list of a numerical semigroup.220This function returns the adjacency list of the graph <M>(ap, E)</M> where the edge <M>u -> v</M> is221in <M>E</M> iff <M>v - u</M> is in <M>ap</M>.222The 0 is ignored.223224<Example><![CDATA[225gap> s:=NumericalSemigroup(3,7);;226gap> AperyListOfNumericalSemigroupWRTElement(s,10);227[ 0, 21, 12, 3, 14, 15, 6, 7, 18, 9 ]228gap> AperyListOfNumericalSemigroupAsGraph(last);229[ ,, [ 3, 6, 9, 12, 15, 18, 21 ],,, [ 6, 9, 12, 15, 18, 21 ],230[ 7, 14, 21 ],, [ 9, 12, 15, 18, 21 ],,, [ 12, 15, 18, 21 ],,231[ 14, 21 ], [ 15, 18, 21 ],,, [ 18, 21 ],,, [ 21 ] ]232]]></Example>233234</Description>235</ManSection>236237238<ManSection>239<Func Name="KunzCoordinatesOfNumericalSemigroup" Arg="S,m"/>240<Description>241<A>S</A> is a numerical semigroup, and <A>m</A> is a nonzero element of <A>S</A>. The second argument is optional, and if missing it is assumed to be the multiplicity of <A>S</A>.242243<P/>244Then the Apéry set of <A>m</A> in <A>S</A> has the form <M>[0,k_1m+1,...,k_{m-1}m+m-1]</M>, and the output is the <M>(m-1)</M>-uple <M>[k_1,k_2,...,k_{m-1}]</M>245246<Example><![CDATA[247gap> s:=NumericalSemigroup(3,5,7);248<Numerical semigroup with 3 generators>249gap> KunzCoordinatesOfNumericalSemigroup(s);250[ 2, 1 ]251gap> KunzCoordinatesOfNumericalSemigroup(s,5);252[ 1, 1, 0, 1 ]253]]></Example>254255</Description>256</ManSection>257258<ManSection>259<Func Name="KunzPolytope" Arg="m"/>260<Description>261<A>m</A> is a positive integer.262263<P/>264The Kunz coordinates of the semigroups with multiplicity <A>m</A> are solutions of a system of inequalities <M>Ax\ge b</M> (see <Cite Key="R-GS-GG-B"></Cite>). The output is the matrix <M>(A|-b)</M>.265<Example><![CDATA[266gap> KunzPolytope(3);267[ [ 1, 0, -1 ], [ 0, 1, -1 ], [ 2, -1, 0 ], [ -1, 2, 1 ] ]268]]></Example>269270</Description>271</ManSection>272273<ManSection>274<Func Name="CocycleOfNumericalSemigroupWRTElement" Arg="S,m"/>275<Description>276<A>S</A> is a numerical semigroup, and <A>m</A> is a nonzero element of <A>S</A>. The output is the matrix <M>h(i,j)=(w(i)+w(j)-w((i+j)\bmod m))/m</M>,277where <M>w(i)</M> is the smallest element in <A>S</A> congruent with <M>i</M> modulo <M>m</M> (and thus it is in the Apéry set of <M>m</M>), <Cite Key="arf-frob-gen"></Cite>.278279<P/>280281<Example><![CDATA[282gap> s:=NumericalSemigroup(3,5,7);;283gap> CocycleOfNumericalSemigroupWRTElement(s,3);284[ [ 0, 0, 0 ], [ 0, 3, 4 ], [ 0, 4, 1 ] ]285]]></Example>286</Description>287</ManSection>288289290<ManSection>291<Attr Name="FrobeniusNumber" Arg="NS" Label="for numerical semigroup"/>292<Attr Name="FrobeniusNumberOfNumericalSemigroup" Arg="NS"/>293<Description>294The largest nonnegative integer not belonging to a numerical semigroup295<M>S</M> is the <E>Frobenius number</E> of <M>S</M>. If <M>S</M> is the set of296nonnegative integers, then clearly its Frobenius number is <M>-1</M>,297otherwise its Frobenius number coincides with the maximum of the gaps (or298fundamental gaps) of <M>S</M>.299<P/>300<C>NS</C>301is a numerical semigroup. It returns the Frobenius number of <C>NS</C>.302Of303course, the time consumed to return a result may depend on the way the304semigroup is given or on the knowledge already produced on the semigroup.305<Example><![CDATA[306gap> FrobeniusNumberOfNumericalSemigroup(NumericalSemigroup(3,5,7));3074308gap> FrobeniusNumber(NumericalSemigroup(3,5,7));3094310]]></Example>311</Description>312</ManSection>313314<ManSection>315<Attr Name="Conductor" Arg="NS" Label="for numerical Semigroup"/>316<Attr Name="ConductorOfNumericalSemigroup" Arg="NS"/>317<Description>318This is just a synonym of <C> FrobeniusNumberOfNumericalSemigroup</C> (<C>NS</C>)<M>+1</M>.319<Example><![CDATA[320gap> ConductorOfNumericalSemigroup(NumericalSemigroup(3,5,7));3215322gap> Conductor(NumericalSemigroup(3,5,7));3235324]]></Example>325</Description>326</ManSection>327328<ManSection>329<Attr Name="PseudoFrobeniusOfNumericalSemigroup" Arg="S"/>330<Description>331An integer <M>z</M> is a <E>pseudo-Frobenius332number</E> of <M>S</M> if <M>z+S\setminus\{0\}\subseteq S</M>.333<P/>334<C>S</C>335is a numerical semigroup. It returns set of pseudo-Frobenius numbers of <A>S</A>.336<Example><![CDATA[337gap> S := NumericalSemigroup("modular", 5,53);338<Modular numerical semigroup satisfying 5x mod 53 <= x >339gap> PseudoFrobeniusOfNumericalSemigroup(S);340[ 21, 40, 41, 42 ]341]]></Example>342</Description>343</ManSection>344345<ManSection>346<Attr Name="TypeOfNumericalSemigroup" Arg="NS"/>347<Description>348Stands for <C>Length(PseudoFrobeniusOfNumericalSemigroup (NS))</C>.349<Example><![CDATA[350gap> S := NumericalSemigroup("modular", 5,53);351<Modular numerical semigroup satisfying 5x mod 53 <= x >352gap> Type(S);3534354gap> TypeOfNumericalSemigroup(S);3554356]]></Example>357</Description>358</ManSection>359360361<ManSection>362<Attr Name="Gaps" Arg="NS" Label="for numerical semigroup" />363<Attr Name="GapsOfNumericalSemigroup" Arg="NS"/>364<Description>365A <E>gap</E> of a numerical semigroup <M>S</M> is a nonnegative integer not belonging to366<M>S</M>.367<C>NS</C>368is a numerical semigroup. Both return the set of gaps of <C>NS</C>.369<Example><![CDATA[370gap> GapsOfNumericalSemigroup(NumericalSemigroup(3,5,7));371[ 1, 2, 4 ]372gap> Gaps(NumericalSemigroup(5,7,11));373[ 1, 2, 3, 4, 6, 8, 9, 13 ]374]]></Example>375</Description>376</ManSection>377378<ManSection>379<Func Arg="NS" Name="DesertsOfNumericalSemigroup"></Func>380<Description>381<A>NS</A> is a numerical semigroup.382The output is the list with the runs of gaps of <A>NS</A>.383<P/>384385<Example><![CDATA[386gap> s:=NumericalSemigroup(3,5,7);;387gap> DesertsOfNumericalSemigroup(s);388[ [ 1, 2 ], [ 4 ] ]389]]></Example>390</Description>391</ManSection>392393<ManSection>394<Prop Arg="NS" Name="IsOrdinaryNumericalSemigroup"></Prop>395<Prop Arg="NS" Name="IsOrdinary" Label="for numerical semigroups"></Prop>396<Description>397<A>NS</A> is a numerical semigroup.398Dectects if the semigroup is ordinary, that is, with less than two deserts.399<P/>400401<Example><![CDATA[402gap> s:=NumericalSemigroup(3,5,7);;403gap> IsOrdinary(s);404false405]]></Example>406</Description>407</ManSection>408409<ManSection>410<Prop Arg="NS" Name="IsAcuteNumericalSemigroup"></Prop>411<Prop Arg="NS" Name="IsAcute" Label="for numerical semigroups"></Prop>412<Description>413<A>NS</A> is a numerical semigroup.414Dectects if the semigroup is acute, that is, it is either ordinary or its last desert (the one with the Frobenius number) has less elements than the preceding one (<Cite Key="Br-acute"></Cite>).415<P/>416417<Example><![CDATA[418gap> s:=NumericalSemigroup(3,5,7);;419gap> IsAcute(s);420true421]]></Example>422</Description>423</ManSection>424425<ManSection>426<Attr Name="Holes" Arg="NS" Label="for numerical semigroup" />427<Attr Name="HolesOfNumericalSemigroup" Arg="S"/>428<Description>429<C>S</C>430is a numerical semigroup. Returns the set of gaps <M>x</M> of <C>S</C> such that <M>F(S)-x</M> is also a gap, where <M>F(S)</M> stands for the Frobenius number of <C>S</C>.431<Example><![CDATA[432gap> s:=NumericalSemigroup(3,5);;433gap> Holes(s);434[ ]435gap> s:=NumericalSemigroup(3,5,7);;436gap> HolesOfNumericalSemigroup(s);437[ 2 ]438]]></Example>439</Description>440</ManSection>441442<ManSection>443<Attr Name="LatticePathAssociatedToNumericalSemigroup" Arg="S,p,q"/>444<Description>445<C>S</C> is a numerical semigroup and <C>p,q</C> are two elements in <C>S</C>.446<P/>In this setting <C>S</C> is an oversemigroup of <M>\langle p,q\rangle</M>, and consequently every gap of <C>S</C> is a gap of <M>\langle p,q\rangle</M>. If <M>c</M> is the conductor of <M>\langle p,q\rangle</M>, then every gap <M>g</M> of <M>\langle p,q\rangle</M> can be written uniquely as <M>g=c-1-(ap+bp)</M> for some nonnegative integers <M>a,b</M>. We say that <M>(a,b)</M> are the coordinates associated to <M>g</M>.447448<P/> The output is a path in <M>\mathbb{N}^2</M> such that coordinates of the gaps of <M>S</M> correspond exactly with the points in <M>\mathbb{N}^2</M> that are between the path in the line <M>ax+by=c-1</M>. See <Cite Key="K-W"></Cite>.449<Example><![CDATA[450gap> s:=NumericalSemigroup(16,17,71,72);;451gap> LatticePathAssociatedToNumericalSemigroup(s,16,17);452[ [ 0, 14 ], [ 1, 13 ], [ 2, 12 ], [ 3, 11 ], [ 4, 10 ], [ 5, 9 ], [ 6, 8 ],453[ 7, 7 ], [ 8, 6 ], [ 9, 5 ], [ 10, 4 ], [ 11, 3 ], [ 12, 2 ], [ 13, 1 ],454[ 14, 0 ] ]455]]></Example>456457</Description>458</ManSection>459460<ManSection>461<Attr Name="Genus" Arg="NS" Label="for numerical semigroup"/>462<Attr Name="GenusOfNumericalSemigroup" Arg="NS"/>463<Description>464<C>NS</C>465is a numerical semigroup. It returns the number of gaps of <C>NS</C>.466<Example><![CDATA[467gap> s:=NumericalSemigroup(16,17,71,72);;468gap> GenusOfNumericalSemigroup(s);46980470gap> S := NumericalSemigroup("modular", 5,53);471<Modular numerical semigroup satisfying 5x mod 53 <= x >472gap> Genus(S);47326474]]></Example>475</Description>476</ManSection>477478479<ManSection>480<Attr Name="FundamentalGaps" Arg="S" Label="for numerical semigroup"/>481<Attr Name="FundamentalGapsOfNumericalSemigroup" Arg="S"/>482<Description>483<C>S</C>484The <E>fundamental gaps</E> of <M>S</M> are those gaps that are maximal with respect to the partial order induced by485division in <M>{\mathbb N}</M>.486is a numerical semigroup. It returns the set of fundamental gaps of <A>S</A>.487<Example><![CDATA[488gap> S := NumericalSemigroup("modular", 5,53);489<Modular numerical semigroup satisfying 5x mod 53 <= x >490gap> FundamentalGapsOfNumericalSemigroup(S);491[ 16, 17, 18, 19, 27, 28, 29, 30, 31, 40, 41, 42 ]492gap> GapsOfNumericalSemigroup(S);493[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14, 15, 16, 17, 18, 19, 20, 21, 27, 28, 29,49430, 31, 40, 41, 42 ]495gap> Gaps(NumericalSemigroup(5,7,11));496[ 1, 2, 3, 4, 6, 8, 9, 13 ]497gap> FundamentalGaps(NumericalSemigroup(5,7,11));498[ 6, 8, 9, 13 ]499]]></Example>500</Description>501</ManSection>502503504<ManSection>505<Attr Name="SpecialGaps" Arg="S" Label="for numerical semigroup"/>506<Attr Name="SpecialGapsOfNumericalSemigroup" Arg="S"/>507<Description>508The <E>special gaps</E> of a numerical semigroup <M>S</M>, are509those fundamental gaps such that if they are added to the given numerical semigroup,510then the resulting set is again a numerical semigroup.511<C>S</C>512is a numerical semigroup. It returns the special gaps of <A>S</A>.513514<Example><![CDATA[515gap> S := NumericalSemigroup("modular", 5,53);516<Modular numerical semigroup satisfying 5x mod 53 <= x >517gap> SpecialGaps(S);518[ 40, 41, 42 ]519gap> SpecialGapsOfNumericalSemigroup(S);520[ 40, 41, 42 ]521]]></Example>522</Description>523</ManSection>524525526</Section>527528529