  
  [1m[4m[31mA. Generalities[0m
  
  Here  we  describe  some  functions  which  are  not  specific for numerical
  semigroups  but  are  used  to  do  computations with them. As they may have
  interest by themselves, we decribe them here.
  
  
  [1m[4m[31mA.1 Bézout sequences[0m
  
  A  sequence  of  positive  rational  numbers  a_1/b_1 < cdots < a_n/b_n with
  a_i,b_i positive integers is a [22m[36mBézout sequence[0m if a_i+1b_i - a_i b_i+1=1 for
  all iin 1,...,n-1.
  
  The following function uses an algorithm presented in [R].
  
  [1m[4m[31mA.1-1 BezoutSequence[0m
  
  [1m[34m> BezoutSequence( [0m[22m[34marg[0m[1m[34m ) ____________________________________________[0mfunction
  
  [22m[34marg[0m  consits  of two rational numbers or a list of two rational numbers. The
  output  is  a  Bézout  sequence  with  ends  the two rational numbers given.
  (Warning:   rational  numbers  are  silently  transformed  into  irreducible
  fractions.)
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> BezoutSequence(4/5,53/27);[0m
    [22m[35m[ 4/5, 1, 3/2, 5/3, 7/4, 9/5, 11/6, 13/7, 15/8, 17/9, 19/10, 21/11, 23/12,[0m
    [22m[35m  25/13, 27/14, 29/15, 31/16, 33/17, 35/18, 37/19, 39/20, 41/21, 43/22,[0m
    [22m[35m  45/23, 47/24, 49/25, 51/26, 53/27 ][0m
    [22m[35m[0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31mA.1-2 IsBezoutSequence[0m
  
  [1m[34m> IsBezoutSequence( [0m[22m[34mL[0m[1m[34m ) ____________________________________________[0mfunction
  
  [22m[34mL[0m  is  a  list  of  rational numbers. [22m[32mIsBezoutSequence[0m returns [22m[32mtrue[0m or [22m[32mfalse[0m
  according to whether [22m[34mL[0m is a Bézout sequence or not.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> IsBezoutSequence([ 4/5, 1, 3/2, 5/3, 7/4, 9/5, 11/6]);[0m
    [22m[35mtrue[0m
    [22m[35mgap> IsBezoutSequence([ 4/5, 1, 3/2, 5/3, 7/4, 9/5, 11/3]);[0m
    [22m[35mTake the 6 and the 7 elements of the sequence[0m
    [22m[35mfalse[0m
  [22m[35m------------------------------------------------------------------[0m
  
  [1m[4m[31mA.1-3 CeilingOfRational[0m
  
  [1m[34m> CeilingOfRational( [0m[22m[34mr[0m[1m[34m ) ___________________________________________[0mfunction
  
  Returns the smallest integer greater than or equal to the rational [22m[34mr[0m.
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> CeilingOfRational(3/5);[0m
    [22m[35m1[0m
  [22m[35m------------------------------------------------------------------[0m
  
  
  [1m[4m[31mA.2 Periodic subadditive functions[0m
  
  A  periodic  function  f  of period m from the set N of natural numbers into
  itself  may be specified through a list of m natural numbers. The function f
  is said to be [22m[36msubadditive[0m if f(i+j)<= f(i)+f(j) and f(0)=0.
  
  [1m[4m[31mA.2-1 RepresentsPeriodicSubAdditiveFunction[0m
  
  [1m[34m> RepresentsPeriodicSubAdditiveFunction( [0m[22m[34mL[0m[1m[34m ) _______________________[0mfunction
  
  [22m[34mL[0m  is a list of integers. [22m[32mRepresentsPeriodicSubAdditiveFunction[0m returns [22m[32mtrue[0m
  or [22m[32mfalse[0m according to whether [22m[34mL[0m represents a periodic subAdditive function f
  periodic  of  period m or not. To avoid defining f(0) (which we assume to be
  0)  we  define  f(m)=0  and  so the last element of the list must be 0. This
  technical  need is due to the fact that positions in a list must be positive
  (not a 0).
  
  [22m[35m---------------------------  Example  ----------------------------[0m
    [22m[35mgap> RepresentsPeriodicSubAdditiveFunction([1,2,3,4,0]);[0m
    [22m[35mtrue[0m
  [22m[35m------------------------------------------------------------------[0m
  
