1############################################################################# 2## 3#W elements.gd Manuel Delgado <mdelgado@fc.up.pt> 4#W Pedro A. Garcia-Sanchez <pedro@ugr.es> 5#W Jose Morais <josejoao@fc.up.pt> 6## 7## 8#Y Copyright 2005 by Manuel Delgado, 9#Y Pedro Garcia-Sanchez and Jose Joao Morais 10#Y We adopt the copyright regulations of GAP as detailed in the 11#Y copyright notice in the GAP manual. 12## 13############################################################################# 14############################################################################# 15## 16#F ElementsUpTo(S,b) 17## 18## Returns the elements of S up to the positive integer b 19## 20############################################################################# 21DeclareGlobalFunction("ElementsUpTo"); 22 23############################################################################# 24## 25#A SmallElements(S) 26#A SmallElementsOfNumericalSemigroup(S) 27## 28## Returns the list of elements in the numerical semigroup S, 29## not greater than the Frobenius number + 1. 30## 31############################################################################# 32#DeclareAttribute( "SmallElements", IsNumericalSemigroup); 33DeclareSynonymAttr( "SmallElementsOfNumericalSemigroup", SmallElements); 34############################################################################# 35#A Length 36## 37## The number of left elements of the semigroup (the elements up to the conductor) 38############################################################################# 39DeclareAttribute( "Length", IsNumericalSemigroup); 40 41############################################################################# 42## 43#F SmallElements(S) 44## 45## If S is a numerical semigroup, then this function just passes the task of computing the minimal generating system to SmallElementsOfNumericalSemigroup 46## If S is an ideal of numerical semigroup, then this function just passes the task of computing the minimal generating system to SmallElementsOfIdealOfNumericalSemigroup 47## 48############################################################################# 49##DeclareGlobalFunction("SmallElements"); 50 51 52############################################################################# 53## 54#A Gaps(S) 55#A GapsOfNumericalSemigroup(S) 56## 57## Returns the list of the gaps of the numerical semigroup S. 58## 59############################################################################# 60#DeclareAttribute( "Gaps", IsNumericalSemigroup); 61DeclareSynonymAttr( "GapsOfNumericalSemigroup", Gaps); 62 63############################################################################# 64## 65#A Weight(S) 66## 67## Returns the sum of all gaps of the numerical semigroup S. 68## 69############################################################################# 70DeclareAttribute( "Weight", IsNumericalSemigroup); 71 72 73############################################################################# 74## 75#F DesertsOfNumericalSemigroup(S) 76## 77## Returns the lists of runs of gaps of the numerical semigroup S 78## 79############################################################################# 80DeclareGlobalFunction("DesertsOfNumericalSemigroup"); 81DeclareOperation("Deserts",[IsNumericalSemigroup]); 82 83############################################################################# 84## 85#A GenusOfNumericalSemigroup(S) 86## 87## Returns the number of gaps of the numerical semigroup S. 88## 89############################################################################# 90DeclareAttribute( "Genus", IsNumericalSemigroup); 91DeclareSynonymAttr( "GenusOfNumericalSemigroup", Genus); 92 93############################################################################# 94## 95#A WilfNumberOfNumericalSemigroup(S) 96## 97## Let c,edim and se be the conductor, embedding dimension and number of 98## elements smaller than c in S. Returns the edim*se-c, which was conjetured 99## by Wilf to be nonnegative. 100## 101############################################################################# 102DeclareAttribute( "WilfNumber", IsNumericalSemigroup); 103DeclareSynonymAttr( "WilfNumberOfNumericalSemigroup",WilfNumber); 104 105 106############################################################################# 107## 108#A TruncatedWilfNumberOfNumericalSemigroup(S) 109#A EliahouNumber 110## 111## Returns W_0(S) (see [E]) 112## 113############################################################################# 114DeclareAttribute( "EliahouNumber", IsNumericalSemigroup); 115DeclareSynonymAttr( "TruncatedWilfNumberOfNumericalSemigroup", EliahouNumber); 116 117 118############################################################################# 119## 120#F ProfileOfNumericalSemigroup(S) 121## 122## Returns the profile of a numerical semigroup (see [E]) 123## 124############################################################################# 125DeclareGlobalFunction("ProfileOfNumericalSemigroup"); 126 127############################################################################# 128## 129#F EliahouSlicesOfNumericalSemigroup(S) 130## 131## Returns a list of lists of integers, each list is the set of elements in 132## S belonging to [jm-r, (j+1)m-r[ where m is the mulitiplicity of S, 133## and j in [1..q-1]; with q,r such that c=qm-r, c the conductor of S 134## (see [E]) 135## 136############################################################################# 137DeclareGlobalFunction("EliahouSlicesOfNumericalSemigroup"); 138 139 140######################################################### 141## 142#F LatticePathAssociatedToNumericalSemigroup(s,p,q) 143## 144## s is a numerical semigroup, and p,q are elements in s 145## Then s is an oversemigroup of <p,q> and all its gaps 146## are gaps of <p,q>. If c is the conductor of <p,q>, 147## every gap g in <p,q> is expressed uniquely as 148## g=c-1-(ap+bq) for some nonnegative integers a and b, 149## whence g has associated coordinates (a,b) 150## The output is the path in N^2 such that every point 151## in N^2 corresponding to a gap of <p,q> above the path 152## correspond to gaps of s (see [K-W]) 153######################################################### 154DeclareGlobalFunction("LatticePathAssociatedToNumericalSemigroup"); 155