GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
<?xml version="1.0" encoding="UTF-8"?>1<Section>2<Heading>Some basic tests</Heading>3This section describes some basic tests on numerical semigroups. The first described tests refer to what the semigroup is currently known to be (not necessarily the way it was created).4Then are presented functions to test if a given list represents5the small elements, gaps or the Apéry set (see <Ref Label="zlab1" />) of a numerical semigroup; to test if an integer belongs to a numerical semigroup6and if a numerical semigroup is a subsemigroup of another one.78<ManSection>9<Attr Name="IsNumericalSemigroup" Arg="NS"/>10<Attr Name="IsNumericalSemigroupByGenerators" Arg="NS"/>11<Attr Name="IsNumericalSemigroupByMinimalGenerators" Arg="NS"/>12<Attr Name="IsNumericalSemigroupByInterval" Arg="NS"/>13<Attr Name="IsNumericalSemigroupByOpenInterval" Arg="NS"/>14<Attr Name="IsNumericalSemigroupBySubAdditiveFunction" Arg="NS"/>15<Attr Name="IsNumericalSemigroupByAperyList" Arg="NS"/>16<Attr Name="IsNumericalSemigroupBySmallElements" Arg="NS"/>17<Attr Name="IsNumericalSemigroupByGaps" Arg="NS"/>18<Attr Name="IsNumericalSemigroupByFundamentalGaps" Arg="NS"/>19<Attr Name="IsProportionallyModularNumericalSemigroup" Arg="NS"/>20<Attr Name="IsModularNumericalSemigroup" Arg="NS"/>21<Description>22<A>NS</A> is a numerical semigroup and these attributes are available23(their names should be self explanatory).24<Example><![CDATA[25gap> s:=NumericalSemigroup(3,7);26<Numerical semigroup with 2 generators>27gap> AperyListOfNumericalSemigroupWRTElement(s,30);;28gap> t:=NumericalSemigroupByAperyList(last);29<Numerical semigroup>30gap> IsNumericalSemigroupByGenerators(s);31true32gap> IsNumericalSemigroupByGenerators(t);33false34gap> IsNumericalSemigroupByAperyList(s);35false36gap> IsNumericalSemigroupByAperyList(t);37true38]]></Example>39</Description>40</ManSection>414243<ManSection>44<Attr Name="RepresentsSmallElementsOfNumericalSemigroup" Arg="L"/>45<Description>46Tests if the list <A>L</A> (which has to be a set) may represent the ``small" elements of a numerical semigroup.47<Example><![CDATA[48gap> L:=[ 0, 3, 6, 9, 11, 12, 14, 15, 17, 18, 20 ];49[ 0, 3, 6, 9, 11, 12, 14, 15, 17, 18, 20 ]50gap> RepresentsSmallElementsOfNumericalSemigroup(L);51true52gap> L:=[ 6, 9, 11, 12, 14, 15, 17, 18, 20 ];53[ 6, 9, 11, 12, 14, 15, 17, 18, 20 ]54gap> RepresentsSmallElementsOfNumericalSemigroup(L);55false56]]></Example>57</Description>58</ManSection>59606162<ManSection>63<Attr Name="RepresentsGapsOfNumericalSemigroup" Arg="L"/>64<Description>65Tests if the list <A>L</A> may represent the gaps66(see <Ref Label="xx1" />) of a numerical semigroup.67<Example><![CDATA[68gap> s:=NumericalSemigroup(3,7);69<Numerical semigroup with 2 generators>70gap> L:=GapsOfNumericalSemigroup(s);71[ 1, 2, 4, 5, 8, 11 ]72gap> RepresentsGapsOfNumericalSemigroup(L);73true74gap> L:=Set(List([1..21],i->RandomList([1..50])));75[ 2, 6, 7, 8, 10, 12, 14, 19, 24, 28, 31, 35, 42, 50 ]76gap> RepresentsGapsOfNumericalSemigroup(L);77false78]]></Example>79</Description>80</ManSection>8182<ManSection>83<Func Name="IsAperyListOfNumericalSemigroup" Arg="L"/>84<Description>85Tests whether a list <A>L</A> of integers may represent the Apéry list of a86numerical semigroup. It returns <K>true</K> when the periodic function87represented by <A>L</A> is subadditive88(see <Ref Func="RepresentsPeriodicSubAdditiveFunction" />)89and the remainder of the division of90<C>L[i]</C> by the length of <A>L</A> is <C>i</C> and returns <K>false</K>91otherwise (the criterium used is the one explained in <Cite Key="R96"></Cite>).92<Example><![CDATA[93gap> IsAperyListOfNumericalSemigroup([0,21,7,28,14]);94true95]]></Example>96</Description>97</ManSection>9899<ManSection>100<Func Name="IsSubsemigroupOfNumericalSemigroup" Arg="S, T"/>101<Description>102<A>S</A> and <A>T</A>103are numerical semigroups. Tests whether <A>T</A> is contained in <A>S</A>.104<Example><![CDATA[105gap> S := NumericalSemigroup("modular", 5,53);106<Modular numerical semigroup satisfying 5x mod 53 <= x >107gap> T:=NumericalSemigroup(2,3);108<Numerical semigroup with 2 generators>109gap> IsSubsemigroupOfNumericalSemigroup(T,S);110true111gap> IsSubsemigroupOfNumericalSemigroup(S,T);112false113]]></Example>114</Description>115</ManSection>116<ManSection>117<Attr Name="IsSubset" Arg="S, T"/>118<Description>119<A>S</A> is a numerical semigroup. <A>T</A> can be a numerical semigroup, in which case the function is just a synonym of <Ref Func="IsSubsemigroupOfNumericalSemigroup" />, or a list of integers, in which case tests whether all elements of the list belong to <A>S</A>.120<Example><![CDATA[121gap> ns1 := NumericalSemigroup(5,7);;122gap> ns2 := NumericalSemigroup(5,7,11);;123gap> IsSubset(ns1,ns2);124false125gap> IsSubset(ns2,[5,15]);126true127gap> IsSubset(ns1,[5,11]);128false129gap> IsSubset(ns2,ns1);130true131]]></Example>132</Description>133</ManSection>134135136<ManSection>137<Oper Name="BelongsToNumericalSemigroup" Arg="n,S"/>138<Oper Name="\in" Arg="n,S" Label="membership test for numerical semigroup"/>139<Description>140<A>n</A> is an integer and <A>S</A> is a numerical semigroup. Tests whether141<A>n</A> belongs to <A>S</A>. <C>\in(n,S)</C> calls the infix variant <C>n in S</C>, and both can be seen as a short for <C>BelongsToNumericalSemigroup(n,S)</C>.142<Example><![CDATA[143gap> S := NumericalSemigroup("modular", 5,53);144<Modular numerical semigroup satisfying 5x mod 53 <= x >145gap> BelongsToNumericalSemigroup(15,S);146false147gap> 15 in S;148false149gap> SmallElementsOfNumericalSemigroup(S);150[ 0, 11, 12, 13, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36, 37, 38, 39, 43 ]151gap> BelongsToNumericalSemigroup(13,S);152true153gap> 13 in S;154true155]]></Example>156</Description>157</ManSection>158</Section>159160161