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"?>1<Section>2<Heading>3Factorizations in Numerical Semigroups4</Heading>5Let <M> S </M> be a numerical semigroup minimally generated by6<M> \{m_1,\ldots,m_n\} </M>. A factorization of an element <M>s\in S</M>7is an n-tuple <M> a=(a_1,\ldots,a_n) </M> of nonnegative integers such that8<M> n=a_1 n_1+\cdots+a_n m_n</M>. The length of <M>a</M> is <M>|a|=a_1+\cdots+a_n</M>.9Given two factorizations <M>a</M> and <M>b</M> of <M>n</M>, the distance10between <M>a</M> and <M>b</M> is <M>d(a,b)=\max \{ |a-\gcd(a,b)|,|b-\gcd(a,b)|\}</M>,11where <M>\gcd((a_1,\ldots,a_n),(b_1,\ldots,b_n))=(\min(a_1,b_1),\ldots,\min(a_n,b_n))</M>.1213<P/>14If <M>l_1>\cdots > l_k</M> are the lengths of all the factorizations of15<M>s \in S</M>, the Delta set associated to <M>s</M> is16<M>\Delta(s)=\{l_1-l_2,\ldots,l_k-l_{k-1}\}</M>.1718<P/>19The catenary degree of an element in <M>S</M> is the least positive integer <M>c</M> such that for any two20of its factorizations <M>a</M> and <M>b</M>, there exists a chain of21factorizations starting in <M>a</M> and ending in <M>b</M> and so that the distance between22two consecutive links is at most <M>c</M>. The catenary degree of <M>S</M> is the supremum of the23catenary degrees of the elements in <M>S</M>.2425<P/>26The tame degree of <M>S</M> is the least positive integer <M>t</M> such that for any27factorization <M>a</M> of an element <M>s</M> in <M>S</M>, and any <M>i</M> such that28<M>s-m_i\in S</M>, there exists another factorization <M>b</M> of <M>s</M> so that29the distance to <M>a</M> is at most <M>t</M> and <M>b_i\not = 0</M>.3031<P/>32The <M>\omega</M>-primality of an element <M>s</M> in <M>S</M> is the least positive integer <M>k</M> such that if33<M>(\sum_{i\in I} s_i)-s\in S, s_i\in S</M>, then there exists <M>\Omega\subseteq I</M> with cardinality <M>k</M> such that34<M>(\sum_{i\in \Omega} s_i)-s\in S</M>. The <M>\omega</M>-primality of <M>S</M> is the maximum of the <M>\omega</M>-primality of its minimal35generators.3637<P/>38The basic properties of these constants can be found in <Cite Key="GHKb"></Cite>.39The algorithm used to compute the catenary and tame degree40is an adaptation of the algorithms appearing41in <Cite Key="CGLPR"></Cite> for numerical semigroups (see <Cite Key="CGL"></Cite>).42The computation of the elasticity of a numerical semigroup reduces to <M>m/n</M> with <M>m</M> the43multiplicity of the semigroup and <M>n</M> its largest minimal generator (see <Cite Key="CHM06"></Cite>44or <Cite Key="GHKb"></Cite>).4546<ManSection>4748<Func Arg="n, ls" Name="FactorizationsIntegerWRTList"></Func>49<Description>50<A>ls</A> is a list of integers and <A>n</A> an integer.51The output is the set of factorizations of <A>n</A> in terms of the elements in the list <A>ls</A>. This function uses RestrictedPartitions.5253<Example><![CDATA[54gap> FactorizationsIntegerWRTList(100,[11,13,15,19]);55[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ],56[ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ]57]]></Example>58</Description>59</ManSection>606162<ManSection>6364<Func Arg="n, S" Name="FactorizationsElementWRTNumericalSemigroup"></Func>65<Description>66<A>S</A> is a numerical semigroup and <A>n</A> a nonnegative integer.67The output is the set of factorizations of <A>n</A> in terms of the minimal68generating set of <A>S</A>.6970<Example><![CDATA[71gap> s:=NumericalSemigroup(101,113,196,272,278,286);72<Numerical semigroup with 6 generators>73gap> FactorizationsElementWRTNumericalSemigroup(1100,s);74[ [ 0, 8, 1, 0, 0, 0 ], [ 0, 0, 0, 2, 2, 0 ], [ 5, 1, 1, 0, 0, 1 ],75[ 0, 2, 3, 0, 0, 1 ] ]76]]></Example>77</Description>78</ManSection>7980<ManSection>81<Func Arg="l,S" Name="FactorizationsElementListWRTNumericalSemigroup"></Func>82<Description>8384<A>S</A> is a numerical semigroup and <A>l</A> a list of elements of <A>S</A>.85<P/>8687Computes the factorizations of all the elements in <A>l</A>.8889<Example><![CDATA[90gap> s:=NumericalSemigroup(10,11,13);91<Numerical semigroup with 3 generators>92gap> FactorizationsElementListWRTNumericalSemigroup([100,101,103],s);93[ [ [ 0, 2, 6 ], [ 1, 7, 1 ], [ 3, 4, 2 ], [ 5, 1, 3 ], [ 10, 0, 0 ] ],94[ [ 0, 8, 1 ], [ 1, 0, 7 ], [ 2, 5, 2 ], [ 4, 2, 3 ], [ 9, 1, 0 ] ],95[ [ 0, 7, 2 ], [ 2, 4, 3 ], [ 4, 1, 4 ], [ 7, 3, 0 ], [ 9, 0, 1 ] ] ]96]]></Example>97</Description>98</ManSection>99100101<ManSection>102103<Func Arg="ls" Name="RClassesOfSetOfFactorizations"></Func>104<Description>105<A>ls</A> is a set of factorizations (a list of lists of nonnegative integers with the same length).106The output is the set of <M>\mathcal R</M>-classes of this set of factorizations as defined in Chapter 7 of <Cite Key="RGbook"></Cite>.107108<Example><![CDATA[109gap> s:=NumericalSemigroup(10,11,19,23);;110gap> BettiElementsOfNumericalSemigroup(s);111[ 30, 33, 42, 57, 69 ]112gap> FactorizationsElementWRTNumericalSemigroup(69,s);113[ [ 5, 0, 1, 0 ], [ 2, 1, 2, 0 ], [ 0, 0, 0, 3 ] ]114gap> RClassesOfSetOfFactorizations(last);115[ [ [ 2, 1, 2, 0 ], [ 5, 0, 1, 0 ] ], [ [ 0, 0, 0, 3 ] ] ]116]]></Example>117</Description>118</ManSection>119120<ManSection>121122<Func Arg="S" Name="LShapesOfNumericalSemigroup"></Func>123<Description>124<A>S</A> is a numerical semigroup.125126The output is the number of LShapes associated to <A>S</A>. These are ways of arranging the set of factorizations of the elements in the Apéry set of the largest generator, so that if one factorization <M>x</M> is chosen for <M>w</M> and <M>w-w'\in S</M>, then only the factorization of <M>x'</M> of <M>w'</M> with <M>x'\le </M> can be in the LShape (and if there is no such a factorization, then we have no LShape with <M>x</M> in it), see <Cite Key="AG-GS"></Cite>.127128<Example><![CDATA[129gap> s:=NumericalSemigroup(4,6,9);;130gap> LShapesOfNumericalSemigroup(s);131[ [ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ], [ 2, 0 ], [ 1, 1 ], [ 0, 2 ], [ 2, 1 ],132[ 1, 2 ], [ 2, 2 ] ],133[ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ], [ 2, 0 ], [ 1, 1 ], [ 3, 0 ], [ 2, 1 ],134[ 4, 0 ], [ 5, 0 ] ] ]135]]></Example>136</Description>137</ManSection>138139140<ManSection>141142<Func Arg="n, S" Name="DenumerantOfElementInNumericalSemigroup"></Func>143<Description>144<A>S</A> is a numerical semigroup and <A>n</A> a positive integer.145The output is the number of factorizations of <A>n</A> in terms of the minimal146generating set of <A>S</A>.147148<Example><![CDATA[149gap> s:=NumericalSemigroup(101,113,195,272,278,286);;150gap> DenumerantOfElementInNumericalSemigroup(1311,s);1516152]]></Example>153</Description>154</ManSection>155156157158</Section>159160<Section>161<Heading>162Invariants based on lengths163</Heading>164165<ManSection>166167<Func Arg="n, ls" Name="LengthsOfFactorizationsIntegerWRTList"></Func>168<Description>169<A>ls</A> is a list of integers and <A>n</A> an integer.170The output is the set of lengths of the factorizations of <A>n</A> in terms of the elements in <A>ls</A>.171172<Example><![CDATA[173gap> LengthsOfFactorizationsIntegerWRTList(100,[11,13,15,19]);174[ 6, 8 ]175]]></Example>176</Description>177</ManSection>178179180<ManSection>181182<Func Arg="n, S" Name="LengthsOfFactorizationsElementWRTNumericalSemigroup"></Func>183<Description>184<A>S</A> is a numerical semigroup and <A>n</A> a nonnegative integer.185The output is the set of lengths of the factorizations of <A>n</A> in terms of the minimal186generating set of <A>S</A>.187188<Example><![CDATA[189gap> s:=NumericalSemigroup(101,113,196,272,278,286);190<Numerical semigroup with 6 generators>191gap> LengthsOfFactorizationsElementWRTNumericalSemigroup(1100,s);192[ 4, 6, 8, 9 ]193]]></Example>194</Description>195</ManSection>196197198<ManSection>199200<Func Arg="n, S" Name="ElasticityOfFactorizationsElementWRTNumericalSemigroup"></Func>201<Description>202<A>S</A> is a numerical semigroup and <A>n</A> a positive integer.203The output is the maximum length divided by the minimum length204of the factorizations of <A>n</A> in terms of the minimal205generating set of <A>S</A>.206207<Example><![CDATA[208gap> s:=NumericalSemigroup(101,113,196,272,278,286);209<Numerical semigroup with 6 generators>210gap> ElasticityOfFactorizationsElementWRTNumericalSemigroup(1100,s);2119/4212]]></Example>213</Description>214</ManSection>215216217<ManSection>218219<Func Arg="S" Name="ElasticityOfNumericalSemigroup"></Func>220<Description>221<A>S</A> is a numerical semigroup.222The output is the elasticity of <A>S</A>.223224<Example><![CDATA[225gap> s:=NumericalSemigroup(101,113,196,272,278,286);226<Numerical semigroup with 6 generators>227gap> ElasticityOfNumericalSemigroup(s);228286/101229]]></Example>230</Description>231</ManSection>232233234<ManSection>235236<Func Arg="ls" Name="DeltaSetOfSetOfIntegers"></Func>237<Description>238<A>ls</A> is list of integers.239The output is the Delta set of the elements in <A>ls</A>, that is, the set of differences of consecutive elements in the list.240241<Example><![CDATA[242gap> LengthsOfFactorizationsIntegerWRTList(100,[11,13,15,19]);243[ 6, 8 ]244gap> DeltaSetOfSetOfIntegers(last);245[ 2 ]246]]></Example>247</Description>248</ManSection>249250251<ManSection>252253<Func Arg="n, S" Name="DeltaSetOfFactorizationsElementWRTNumericalSemigroup"></Func>254<Description>255<A>S</A> is a numerical semigroup and <A>n</A> a nonnegative integer.256The output is the Delta set of the factorizations of <A>n</A> in terms of the minimal257generating set of <A>S</A>.258259<Example><![CDATA[260gap> s:=NumericalSemigroup(101,113,196,272,278,286);261<Numerical semigroup with 6 generators>262gap> DeltaSetOfFactorizationsElementWRTNumericalSemigroup(1100,s);263[ 1, 2 ]264]]></Example>265</Description>266</ManSection>267268<ManSection>269<Func Arg="S" Name="DeltaSetPeriodicityBoundForNumericalSemigroup"></Func>270<Description>271272<A>S</A> is a numerical semigroup.273<P/>274275Computes the bound were the periodicity starts for Delta sets of the elements in <A>S</A>; see <Cite Key="GG-MF-VT"></Cite>.276277<Example><![CDATA[278gap> s:=NumericalSemigroup(5,7,11);;279gap> DeltaSetPeriodicityBoundForNumericalSemigroup(s);28060281]]></Example>282</Description>283</ManSection>284285<ManSection>286<Func Arg="S" Name="DeltaSetPeriodicityStartForNumericalSemigroup"></Func>287<Description>288289<A>S</A> is a numerical semigroup.290<P/>291292Computes the element were the periodicity starts for Delta sets of the elements in <A>S</A>.293294<Example><![CDATA[295gap> s:=NumericalSemigroup(5,7,11);;296gap> DeltaSetPeriodicityStartForNumericalSemigroup(s);29721298]]></Example>299</Description>300</ManSection>301302303<ManSection>304<Func Arg="n, S" Name="DeltaSetListUpToElementWRTNumericalSemigroup"></Func>305<Description>306307<A>S</A> is a numerical semigroup, <A>n</A> a nonnegative integer.308<P/>309310Computes the Delta sets of the integers up to (and including) <A>n</A>, if an integer is not in <A>S</A>, the corresponding Delta set is empty.311312<Example><![CDATA[313gap> s:=NumericalSemigroup(5,7,11);;314gap> DeltaSetListUpToElementWRTNumericalSemigroup(31,s);315[ [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ],316[ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ 2 ], [ ], [ ], [ 2 ], [ ],317[ 2 ], [ ], [ 2 ], [ 2 ], [ ] ]318]]></Example>319</Description>320</ManSection>321322<ManSection>323<Func Arg="n, S" Name="DeltaSetUnionUpToElementWRTNumericalSemigroup"></Func>324<Description>325326<A>S</A> is a numerical semigroup, <A>n</A> a nonnegative integer.327<P/>328329330Computes the union of the delta sets of the elements of <A>S</A> up to and including <A>n</A>, using a ring buffer to conserve memory.331332<Example><![CDATA[333gap> s:=NumericalSemigroup(5,7,11);;334gap> DeltaSetUnionUpToElementWRTNumericalSemigroup(60,s);335[ 2 ]336]]></Example>337</Description>338</ManSection>339340<ManSection>341<Func Arg="S" Name="DeltaSetOfNumericalSemigroup"></Func>342<Description>343344<A>S</A> is a numerical semigroup.345<P/>346347Computes the Delta set of <A>S</A>.348349<Example><![CDATA[350gap> s:=NumericalSemigroup(5,7,11);;351gap> DeltaSetOfNumericalSemigroup(s);352[ 2 ]353]]></Example>354</Description>355</ManSection>356357358<ManSection>359360<Func Arg="n, S" Name="MaximumDegreeOfElementWRTNumericalSemigroup"></Func>361<Description>362<A>S</A> is a numerical semigroup and <A>n</A> a nonnegative integer.363The output is the maximum length of the factorizations of <A>n</A> in terms of the minimal364generating set of <A>S</A>.365366<Example><![CDATA[367gap> s:=NumericalSemigroup(101,113,196,272,278,286);368<Numerical semigroup with 6 generators>369gap> MaximumDegreeOfElementWRTNumericalSemigroup(1100,s);3709371]]></Example>372</Description>373</ManSection>374375376377<ManSection>378<Func Arg="n, S" Name="MaximalDenumerantOfElementInNumericalSemigroup"></Func>379<Description>380<A>S</A> is a numerical semigroup and <A>n</A> a positive integer.381The output is the number of factorizations of <A>n</A> in terms of the minimal382generating set of <A>S</A> with maximal length.383384<Example><![CDATA[385gap> s:=NumericalSemigroup(101,113,196,272,278,286);;386gap> MaximalDenumerantOfElementInNumericalSemigroup(1100,s);3871388gap> MaximalDenumerantOfElementInNumericalSemigroup(1311,s);3892390]]></Example>391</Description>392</ManSection>393394<ManSection>395396<Func Arg="ls" Name="MaximalDenumerantOfSetOfFactorizations"></Func>397<Description>398<A>ls</A> is list of factorizations (a list of lists of nonnegative integers with the same length).399The output is number of elements in <A>ls</A> with maximal length.400401<Example><![CDATA[402gap> FactorizationsIntegerWRTList(100,[11,13,15,19]);403[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ],404[ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ]405gap> MaximalDenumerantOfSetOfFactorizations(last);4066407]]></Example>408</Description>409</ManSection>410411412<ManSection>413<Func Arg="S" Name="MaximalDenumerantOfNumericalSemigroup"></Func>414<Description>415<A>S</A> is a numerical semigroup.416The output is the maximal denumerant of <A>S</A>, that is, the maximum of the maximal denumerant of the elements in <A>S</A> (see <Cite Key="BH"></Cite>).417418<Example><![CDATA[419gap> s:=NumericalSemigroup(101,113,196,272,278,286);;420gap> MaximalDenumerantOfNumericalSemigroup(s);4214422]]></Example>423</Description>424</ManSection>425426427<ManSection>428<Func Arg="S" Name="AdjustmentOfNumericalSemigroup"></Func>429<Description>430<A>S</A> is a numerical semigroup.431The output is the adjustment of <A>S</A> as defined in <Cite Key="BH"></Cite>.432433<Example><![CDATA[434gap> s:=NumericalSemigroup(101,113,196,272,278,286);;435gap> AdjustmentOfNumericalSemigroup(s);436[ 0, 12, 24, 36, 48, 60, 72, 84, 95, 96, 107, 108, 119, 120, 131, 132, 143,437144, 155, 156, 167, 168, 171, 177, 179, 180, 183, 185, 189, 190, 191, 192,438195, 197, 201, 203, 204, 207, 209, 213, 215, 216, 219, 221, 225, 227, 228,439231, 233, 237, 239, 240, 243, 245, 249, 251, 252, 255, 257, 261, 263, 264,440266, 267, 269, 273, 275, 276, 279, 280, 281, 285, 287, 288, 292, 293, 299,441300, 304, 305, 311, 312, 316, 317, 323, 324, 328, 329, 335, 336, 340, 341,442342, 347, 348, 352, 353, 354, 356, 359, 360, 361, 362, 364, 365, 366, 368,443370, 371, 372, 374, 376, 377, 378, 380, 382, 383, 384, 388, 389, 390, 394,444395, 396, 400, 401, 402, 406, 407, 408, 412, 413, 414, 418, 419, 420, 424,445425, 426, 430, 431, 432, 436, 437, 438, 442, 444, 448, 450, 451, 454, 456,446460, 465, 466, 472, 477, 478, 484, 489, 490, 496, 501, 502, 508, 513, 514,447519, 520, 525, 526, 527, 531, 532, 533, 537, 539, 543, 545, 549, 551, 555,448561, 567, 573, 579, 585, 591, 597, 603, 609, 615, 621, 622, 627, 698, 704,449710, 716, 722 ]450]]></Example>451</Description>452</ManSection>453454<ManSection>455<Func Arg="S" Name="IsAdditiveNumericalSemigroup"></Func>456<Description>457<A>S</A> is a numerical semigroup. Detects if <A>S</A> is additive, that is, <M>ord(m+x)=ord(x)+1</M> for all <M>x</M> in <A>S</A>, where <M>m</M> is the multiplicity of <A>S</A> and <M>ord</M> stands for MaximumDegreeOfElementWRTNumericalSemigroup. For these semigroups <M>gr_m(K[[S]])</M> is Cohen-Macaulay(see <Cite Key="BH"></Cite>).458459<Example><![CDATA[460gap> l:=IrreducibleNumericalSemigroupsWithFrobeniusNumber(31);;461gap> Length(l);462109463gap> Length(Filtered(l,IsAdditiveNumericalSemigroup));46420465]]></Example>466</Description>467</ManSection>468469<ManSection>470<Func Arg="S" Name="IsSuperSymmetricNumericalSemigroup"></Func>471<Description>472<A>S</A> is a numerical semigroup. Detects if <A>S</A> is supersymmetric, that is, it is symmetric, additive and whenever <M>w+w'=f+m</M> (with <M>m</M> the multiplicity and <M>f</M> the Frobenius number) we have <M>ord(w+w')=ord(w)+ord(w')</M>, where <M>ord</M> stands for MaximumDegreeOfElementWRTNumericalSemigroup.473474<Example><![CDATA[475gap> l:=IrreducibleNumericalSemigroupsWithFrobeniusNumber(31);;476gap> Length(l);477109478gap> Length(Filtered(l,IsSuperSymmetricNumericalSemigroup));4797480]]></Example>481</Description>482</ManSection>483484485</Section>486487<Section>488<Heading>489Invariants based on distances490</Heading>491492<ManSection>493494<Func Arg="ls" Name="CatenaryDegreeOfSetOfFactorizations"></Func>495<Description>496<A>ls</A> is a set of factorizations (a list of lists of nonnegative integers with the same length).497The output is the catenary degree of this set of factorizations.498499<Example><![CDATA[500gap> FactorizationsIntegerWRTList(100,[11,13,15,19]);501[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ],502[ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ]503gap> CatenaryDegreeOfSetOfFactorizations(last);5045505]]></Example>506</Description>507</ManSection>508509<ManSection>510<Func Arg="ls" Name="AdjacentCatenaryDegreeOfSetOfFactorizations"></Func>511<Description>512<A>ls</A> is a set of factorizations.513The output is the adjacent catenary degree of this set of factorizations, that is, the supremum of the distance between to sets of factorizations with adjacent lengths. More precisely, if <M>l_1,\ldots,l_t</M> are the lengths of the factorizations of the elements in <A>ls</A>, and <M>Z_{l_i}</M> is the set of factorizations in <A>ls</A> with length <M>l_i</M>, then the adjacent catenary degree is the maximum of the distances <M>\mathrm d (Z_{l_i},Z_{l_{i+1}})</M>.514515<Example><![CDATA[516gap> FactorizationsIntegerWRTList(100,[11,13,15,19]);517[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ],518[ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ]519gap> AdjacentCatenaryDegreeOfSetOfFactorizations(last);5205521]]></Example>522</Description>523</ManSection>524525<ManSection>526<Func Arg="ls" Name="EqualCatenaryDegreeOfSetOfFactorizations"></Func>527<Description>528<A>ls</A> is a set of factorizations. The same as CatenaryDegreeOfSetOfFactorizations, but now the factorizations joined by the chain must have the same length, and the elements in the chain also. Equivalently, if <M>l_1,\ldots,l_t</M> are the lengths of the factorizations of the elements in <A>ls</A>, and <M>Z_{l_i}</M> is the set of factorizations in <A>ls</A> with length <M>l_i</M>, then the equal catenary degree is the maximum of the CatenaryDegreeOfSetOfFactorizations of <M>\mathrm d (Z_{l_i},Z_{l_{i+1}})</M>.529530<Example><![CDATA[531gap> FactorizationsIntegerWRTList(100,[11,13,15,19]);532[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ],533[ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ]534gap> EqualCatenaryDegreeOfSetOfFactorizations(last);5352536]]></Example>537</Description>538</ManSection>539540<ManSection>541<Func Arg="ls" Name="MonotoneCatenaryDegreeOfSetOfFactorizations"></Func>542<Description>543<A>ls</A> is a set of factorizations. The same as CatenaryDegreeOfSetOfFactorizations, but now the factorizations are joined by a chain with nondecreasing lengths. Equivalently, it is the maximum of the AdjacentCatenaryDegreeOfSetOfFactorizations and the EqualCatenaryDegreeOfSetOfFactorizations.544545<Example><![CDATA[546gap> FactorizationsIntegerWRTList(100,[11,13,15,19]);547[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ],548[ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ]549gap> MonotoneCatenaryDegreeOfSetOfFactorizations(last);5505551]]></Example>552</Description>553</ManSection>554555<ManSection>556<Func Arg="n, S" Name="CatenaryDegreeOfElementInNumericalSemigroup"></Func>557<Description>558<A>n</A> is a nonnegative integer and <A>S</A> is a numerical semigroup.559The output is the catenary degree of <A>n</A> relative to <A>S</A>.560561<Example><![CDATA[562gap> CatenaryDegreeOfElementInNumericalSemigroup(157,NumericalSemigroup(13,18));5630564gap> CatenaryDegreeOfElementInNumericalSemigroup(1157,NumericalSemigroup(13,18));56518566]]></Example>567</Description>568</ManSection>569570<ManSection>571<Func Arg="ls" Name="TameDegreeOfSetOfFactorizations"></Func>572<Description>573<A>ls</A> is a set of factorizations (a list of lists of nonnegative integers with the same length).574The output is the tame degree of this set of factorizations.575576<Example><![CDATA[577gap> FactorizationsIntegerWRTList(100,[11,13,15,19]);578[ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ],579[ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ]580gap> TameDegreeOfSetOfFactorizations(last);5814582]]></Example>583</Description>584</ManSection>585586<ManSection>587<Func Arg="S" Name="CatenaryDegreeOfNumericalSemigroup"></Func>588<Description>589<A>S</A> is a numerical semigroup.590The output is the catenary degree of <A>S</A>.591592<Example><![CDATA[593gap> s:=NumericalSemigroup(101,113,196,272,278,286);594<Numerical semigroup with 6 generators>595gap> CatenaryDegreeOfNumericalSemigroup(s);5968597]]></Example>598</Description>599</ManSection>600601<ManSection>602<Func Arg="S" Name="EqualPrimitiveElementsOfNumericalSemigroup"></Func>603<Description>604<A>S</A> is a numerical semigroup.605<P/>606The output is the set of elements <M>s</M> in <A>S</A> such that there exists a minimal solution to <M>msg\cdot x-msg\cdot y = 0</M>, such that <M>x,y</M> are factorizations with the same length of <M>s</M>, and <M>msg</M> is the minimal generating system of <A>S</A>. These elements are used to compute the equal catenary degree of <A>S</A>.607608<Example><![CDATA[609gap> s:=NumericalSemigroup(3,5,7);;610gap> EqualPrimitiveElementsOfNumericalSemigroup(s);611[ 3, 5, 7, 10 ]612]]></Example>613614615</Description>616</ManSection>617618619<ManSection>620621<Func Arg="S" Name="EqualCatenaryDegreeOfNumericalSemigroup"></Func>622<Description>623<A>S</A> is a numerical semigroup.624The output is the equal catenary degree of <A>S</A>.625626<Example><![CDATA[627gap> s:=NumericalSemigroup(3,5,7);;628gap> EqualCatenaryDegreeOfNumericalSemigroup(s);6292630]]></Example>631</Description>632</ManSection>633634<ManSection>635<Func Arg="S" Name="MonotonePrimitiveElementsOfNumericalSemigroup"></Func>636<Description>637<A>S</A> is a numerical semigroup.638<P/>639The output is the set of elements <M>s</M> in <A>S</A> such that there exists a minimal solution to <M>msg\cdot x-msg\cdot y = 0</M>, such that <M>x,y</M> are factorizations of <M>s</M>, with <M>|x|\le |y|</M>; <M>msg</M> stands the minimal generating system of <A>S</A>. These elements are used to compute the monotone catenary degree of <A>S</A>.640641<Example><![CDATA[642gap> s:=NumericalSemigroup(3,5,7);;643gap> MonotonePrimitiveElementsOfNumericalSemigroup(s);644[ 3, 5, 7, 10, 12, 14, 15, 21, 28, 35 ]645]]></Example>646647648</Description>649</ManSection>650651652<ManSection>653654<Func Arg="S" Name="MonotoneCatenaryDegreeOfNumericalSemigroup"></Func>655<Description>656<A>S</A> is a numerical semigroup.657The output is the monotone catenary degree of <A>S</A>.658659<Example><![CDATA[660gap> s:=NumericalSemigroup(10,23,31,44);;661gap> CatenaryDegreeOfNumericalSemigroup(s);6629663gap> MonotoneCatenaryDegreeOfNumericalSemigroup(s);66421665]]></Example>666</Description>667</ManSection>668669670671672<ManSection>673<Func Arg="S" Name="TameDegreeOfNumericalSemigroup"></Func>674<Description>675<A>S</A> is a numerical semigroup.676The output is the tame degree of <A>S</A>.677678<Example><![CDATA[679gap> s:=NumericalSemigroup(101,113,196,272,278,286);680<Numerical semigroup with 6 generators>681gap> TameDegreeOfNumericalSemigroup(s);68214683]]></Example>684</Description>685</ManSection>686687<ManSection>688<Func Arg="n, S" Name="TameDegreeOfElementInNumericalSemigroup"></Func>689<Description>690<A>n</A> is an element of the numerical semigroup <A>S</A>.691692The output is the tame degree of <A>n</A> in <A>S</A>.693694<Example><![CDATA[695gap> s:=NumericalSemigroup(10,11,13);696<Numerical semigroup with 3 generators>697gap> TameDegreeOfElementInNumericalSemigroup(100,s);6985699]]></Example>700</Description>701</ManSection>702703</Section>704705<Section>706<Heading>707Primality708</Heading>709710<ManSection>711<Func Arg="n, S" Name="OmegaPrimalityOfElementInNumericalSemigroup"></Func>712<Description>713<A>n</A> is an element of the numerical semigroup <A>S</A>.714715The output is the <M>\omega</M>-primality of <A>n</A> in <A>S</A> as explained in <Cite Key="B-GS-G"></Cite>. The current implementation is due to Chris O'Neill based on a work in progress with Pelayo and Thomas.716717<Example><![CDATA[718gap> s:=NumericalSemigroup(10,11,13);719<Numerical semigroup with 3 generators>720gap> OmegaPrimalityOfElementInNumericalSemigroup(100,s);72113722]]></Example>723</Description>724</ManSection>725726<ManSection>727<Func Arg="l,S" Name="OmegaPrimalityOfElementListInNumericalSemigroup"></Func>728<Description>729730<A>S</A> is a numerical semigroup and <A>l</A> a list of elements of <A>S</A>.731<P/>732733Computes the omega-values of all the elements in <A>l</A>.734735<Example><![CDATA[736gap> s:=NumericalSemigroup(10,11,13);;737gap> l:=FirstElementsOfNumericalSemigroup(100,s);;738gap> List(l,x->OmegaPrimalityOfElementInNumericalSemigroup(x,s)); time;739[ 0, 4, 5, 5, 4, 6, 7, 6, 6, 6, 6, 7, 8, 7, 7, 7, 7, 7, 8, 7, 8, 9, 8, 8, 8,7408, 8, 8, 8, 9, 9, 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 10, 10, 10, 10, 10,74110, 10, 10, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 12, 12, 12, 12,74212, 12, 12, 12, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 14, 14, 14,74314, 14, 14, 14, 14, 15, 16, 15, 15, 15, 15, 15, 15, 15, 15 ]744218745gap> OmegaPrimalityOfElementListInNumericalSemigroup(l,s);time;746[ 0, 4, 5, 5, 4, 6, 7, 6, 6, 6, 6, 7, 8, 7, 7, 7, 7, 7, 8, 7, 8, 9, 8, 8, 8,7478, 8, 8, 8, 9, 9, 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 10, 10, 10, 10, 10,74810, 10, 10, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 12, 12, 12, 12,74912, 12, 12, 12, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 14, 14, 14,75014, 14, 14, 14, 14, 15, 16, 15, 15, 15, 15, 15, 15, 15, 15 ]75110752]]></Example>753</Description>754</ManSection>755756757<ManSection>758<Func Arg="n, S" Name="OmegaPrimalityOfNumericalSemigroup"></Func>759<Description>760<A>S</A> is a numerical semigroup.761762The output is the maximum of the <M>\omega</M>-primalities of the minimal generators of <A>S</A>.763764<Example><![CDATA[765gap> s:=NumericalSemigroup(10,11,13);766<Numerical semigroup with 3 generators>767gap> OmegaPrimalityOfNumericalSemigroup(s);7685769]]></Example>770</Description>771</ManSection>772773</Section>774775<Section>776<Heading>777Homogenization of Numerical Semigroups778</Heading>779780Let <M> S </M> be a numerical semigroup minimally generated by781<M> \{m_1,\ldots,m_n\} </M>. The homogenization of <M>S</M>, <M>S^\mathrm{hom}</M> is the semigroup generated by <M>\{(1,0),(1,m_1),\ldots, (1,m_n)\}</M>. The catenary degree of <M>S^\mathrm{hom}</M> coincides with the homogeneous catenary degree of <M>S</M>, and it is between the catenary and the monotone catenary degree of <M>S</M>. The advantage of this catenary degree is that is less costly to compute than the monotone catenary degree, and has some nice interpretations (<Cite Key="GSOSN"></Cite>). This section contains the auxiliary functions needed to compute the homogeneous catenary degree.782783<ManSection>784<Func Arg="n, S" Name="BelongsToHomogenizationOfNumericalSemigroup"></Func>785<Description>786<A>S</A> is a numerical semigroup and <A>n</A> a list with two entries (a pair).787788The output is true if the <A>n</A> belongs to the homogenization of <A>S</A>.789790<Example><![CDATA[791gap> s:=NumericalSemigroup(10,11,13);;792gap> BelongsToHomogenizationOfNumericalSemigroup([10,23],s);793true794gap> BelongsToHomogenizationOfNumericalSemigroup([1,23],s);795false796]]></Example>797</Description>798</ManSection>799800801<ManSection>802<Func Arg="n, S" Name="FactorizationsInHomogenizationOfNumericalSemigroup"></Func>803<Description>804<A>S</A> is a numerical semigroup and <A>n</A> a list with two entries (a pair).805806The output is the set of factorizations <A>n</A> in terms of the minimal generating system of the homogenization of <A>S</A>.807808<Example><![CDATA[809gap> s:=NumericalSemigroup(10,11,13);;810gap> FactorizationsInHomogenizationOfNumericalSemigroup([20,230],s);811[ [ 0, 0, 15, 5 ], [ 0, 2, 12, 6 ], [ 0, 4, 9, 7 ],812[ 0, 6, 6, 8 ], [ 0, 8, 3, 9 ], [ 0, 10, 0, 10 ],813[ 1, 1, 7, 11 ], [ 1, 3, 4, 12 ], [ 1, 5, 1, 13 ],814[ 2, 0, 2, 16 ] ]815gap> FactorizationsElementWRTNumericalSemigroup(230,s);816[ [ 23, 0, 0 ], [ 12, 10, 0 ], [ 1, 20, 0 ], [ 14, 7, 1 ],817[ 3, 17, 1 ], [ 16, 4, 2 ], [ 5, 14, 2 ], [ 18, 1, 3 ],818[ 7, 11, 3 ], [ 9, 8, 4 ], [ 11, 5, 5 ], [ 0, 15, 5 ],819[ 13, 2, 6 ], [ 2, 12, 6 ], [ 4, 9, 7 ], [ 6, 6, 8 ],820[ 8, 3, 9 ], [ 10, 0, 10 ], [ 1, 7, 11 ], [ 3, 4, 12 ],821[ 5, 1, 13 ], [ 0, 2, 16 ] ]822]]></Example>823</Description>824</ManSection>825826<ManSection>827<Func Arg="n, S" Name="HomogeneousBettiElementsOfNumericalSemigroup"></Func>828<Description>829<A>S</A> is a numerical semigroup.830831The output is the set of Betti elements of the homogenization of <A>S</A>.832833<Example><![CDATA[834gap> s:=NumericalSemigroup(10,17,19);;835gap> BettiElementsOfNumericalSemigroup(s);836[ 57, 68, 70 ]837gap> HomogeneousBettiElementsOfNumericalSemigroup(s);838[ [ 5, 57 ], [ 5, 68 ], [ 6, 95 ], [ 7, 70 ], [ 9, 153 ] ]839]]></Example>840</Description>841</ManSection>842843<ManSection>844<Func Arg="S" Name="HomogeneousCatenaryDegreeOfNumericalSemigroup"></Func>845<Description>846<A>S</A> is a numerical semigroup.847848The output is the homogeneous catenary degree of <A>S</A>. Observe that for a single element in the homogenization of <A>S</A>, its catenary degree can be computed with CatenaryDegreeOfSetOfFactorizations and FactorizationsInHomogenizationOfNumericalSemigroup.849850<Example><![CDATA[851gap> s:=NumericalSemigroup(10,17,19);;852gap> CatenaryDegreeOfNumericalSemigroup(s);8537854gap> HomogeneousCatenaryDegreeOfNumericalSemigroup(s);8559856]]></Example>857</Description>858</ManSection>859860</Section>861862<Section>863<Heading>864Divisors, posets865</Heading>866867Given a numerical semigroup <M>S</M> and two integers <M>a,b</M>, we write <M>a\le_S b</M> if <M>b-a\in S</M>. We also say that <M>a</M> divides <M>b</M> (with respect to <M>S</M>). The semigroup <M>S</M> with this binary relation is a poset.<P/>868869The set of divisors of <M>n</M> in <M>S</M> will be denoted by <M>\mathrm{D}_S(n)</M>. If we are given <M>n_1,\ldots,n_r\in S</M>, the set of the divisors of these elements is <M>\mathrm{D}(n_1,\ldots, n_r)= \bigcup_{i=1}^r \mathrm{D}(n_i)</M>.870871<ManSection>872<Func Arg="S,n" Name="MoebiusFunctionAssociatedToNumericalSemigroup"></Func>873<Description>874<A>S</A> is a numerical semigroup and <A>n</A> is an integer.875876As <M>(S,\le_S)</M> is a poset, we can define the Möbius function associated to it as in <Cite Key="CHRA"></Cite>. The output is the value of the Möbius function in the integer <A>n</A>, that is, the alternate sum of the number of chains from 0 to <A>n</A>.877878<Example><![CDATA[879gap> s:=NumericalSemigroup(3,5,7);;880gap> MoebiusFunctionAssociatedToNumericalSemigroup(s,10);8812882gap> MoebiusFunctionAssociatedToNumericalSemigroup(s,34);88325884]]></Example>885</Description>886</ManSection>887888889<ManSection>890<Oper Arg="S,n" Name="DivisorsOfElementInNumericalSemigroup"/>891<Description>892<A>S</A> is a numerical semigroup and <A>n</A> is an integer. The arguments can also be given as <A>n, S</A>.893894The output is the set of divisors of <A>n</A> in <A>S</A>.895896<Example><![CDATA[897gap> s:=NumericalSemigroup(5,7,11);;898gap> DivisorsOfElementInNumericalSemigroup(s,20);899[ 0, 5, 10, 15, 20 ]900gap> DivisorsOfElementInNumericalSemigroup(20,s);901[ 0, 5, 10, 15, 20 ]902]]></Example>903</Description>904</ManSection>905906907</Section>908909<Section>910<Heading>911Feng-Rao distances and numbers912</Heading>913914Let <M>S</M> be a numerical semigroup and let <M>n\in S</M>. The Feng-Rao distance of <M>n</M> is then defined as <M>\delta_S(n)=\min\{ \#\mathrm{D}(x)\mid n\le x,\ x\in S\}</M>.<P/>915916The <M>r</M>th generalized distance is <M>\delta_S^r(n)=\{ \#\mathrm{D}(n_1,\ldots,n_r) \mid n\le n_1 < \cdots < n_r,\ n_i\in S\}</M>.917918<ManSection>919<Func Arg="S,r" Name="FengRaoDistance"></Func>920<Description>921<A>S</A> is a numerical semigroup, <A>r</A> and <A>m</A> integers.922923The output is the <A>r</A>-th Feng-Rao distance of the element <A>m</A> in the numerical semigroup <A>S</A>.924925<Example><![CDATA[926gap> S := NumericalSemigroup(7,9,17);;927gap> FengRaoDistance(S,6,100);92886929]]></Example>930</Description>931</ManSection>932933<ManSection>934<Oper Arg="S,r" Name="FengRaoNumber"/>935<Description>936<A>S</A> is a numerical semigroup and <A>r</A> is an integer.937938The output is the <A>r</A>-th Feng-Rao number of the numerical semigroup <A>S</A>.939940<Example><![CDATA[941gap> S := NumericalSemigroup(7,8,17);;942gap> FengRaoNumber(S,209);943224944gap> FengRaoNumber(209,S);945224946]]></Example>947</Description>948</ManSection>949950951</Section>952953954