Changeset 4ac997 in git


Ignore:
Timestamp:
Dec 22, 2000, 2:43:10 PM (22 years ago)
Author:
Gert-Martin Greuel <greuel@…>
Branches:
(u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
Children:
558eb2e4904ef3d1c00dc5ccf1cdf5d4d5e4532a
Parents:
5a1141ebfb120e63485f9ef6b7dd5dc003ac29bf
Message:
* GMG: Kosmetik


git-svn-id: file:///usr/local/Singular/svn/trunk@4979 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular/LIB
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/ainvar.lib

    r5a1141 r4ac997  
    1 // $Id: ainvar.lib,v 1.3 2000-12-19 15:05:15 anne Exp $
     1// $Id: ainvar.lib,v 1.4 2000-12-22 13:32:17 greuel Exp $
    22/////////////////////////////////////////////////////////////////////////////
    3 
    4 version="$Id: ainvar.lib,v 1.3 2000-12-19 15:05:15 anne Exp $";
     3version="$Id: ainvar.lib,v 1.4 2000-12-22 13:32:17 greuel Exp $";
    54category="Invariant theory";
    65info="
    7 LIBRARY: ainvar.lib   PROCEDURES FOR COMPUTING INVARIANTS RINGS OF THE ADDITIVE GROUP
     6LIBRARY: ainvar.lib    Invariant Rings of the Additive Group
    87AUTHORS: Gerhard Pfister,  email: pfister@mathematik.uni-kl.de
    98         Gert-Martin Greuel,  email: greuel@mathematik.uni-kl.de
  • Singular/LIB/algebra.lib

    r5a1141 r4ac997  
    11///////////////////////////////////////////////////////////////////////////////
    2 version="$Id: algebra.lib,v 1.6 2000-12-19 14:41:41 anne Exp $";
     2version="$Id: algebra.lib,v 1.7 2000-12-22 13:34:59 greuel Exp $";
    33category="Commutative Algebra";
    44info="
    5 LIBRARY:  algebra.lib   PROCEDURES FOR COMPUTING WITH ALGBRAS AND MAPS
    6 AUTHORS:  Gert-Martin Greuel, email: greuel@mathematik.uni-kl.de,
    7           Agnes Eileen Heydtmann, email:agnes@math.uni-sb.de,
    8           Gerhard Pfister, email: pfister@mathematik.uni-kl.de
     5LIBRARY:  algebra.lib   Compute with Algbras and Algebra Maps
     6AUTHORS:  Gert-Martin Greuel,     greuel@mathematik.uni-kl.de,
     7          Agnes Eileen Heydtmann, agnes@math.uni-sb.de,
     8          Gerhard Pfister,       pfister@mathematik.uni-kl.de
    99
    1010PROCEDURES:
  • Singular/LIB/brnoeth.lib

    r5a1141 r4ac997  
    1 version="$Id: brnoeth.lib,v 1.5 2000-12-19 15:05:16 anne Exp $";
    2 category="Coding theory";
     1version="$Id: brnoeth.lib,v 1.6 2000-12-22 13:38:23 greuel Exp $";
    32info="
    4 LIBRARY:   brnoeth.lib  PROCEDURES FOR THE BRILL-NOETHER ALGORITHM
    5            
    6 AUTHORS:   Jose Ignacio Farran Martin,    ignfar@eis.uva.es
    7            Christoph Lossen,              lossen@mathematik.uni-kl.de
    8 
    9 SEE ALSO:  hnoether_lib, triang_lib
    10 
    11 KEYWORDS:  Weierstrass semigroup; Algebraic Geometry codes;
    12            Brill-Noether algorithm
    13 
    14 OVERVIEW:  Implementation of the Brill-Noether algorithm for solving the
    15            Riemann-Roch problem and applications in Algebraic Geometry codes.
    16            The computation of Weierstrass semigroups is also implemented.@*
    17            The procedures are intended only for plane (singular) curves
    18            defined over a prime field of positive charateristic.@*
    19            You can get more information about the library just
    20            by reading the end of the file brnoeth.lib.
     3LIBRARY:   brnoeth.lib  Brill-Noether Algorithm, Weierstrass-SG and AG-codes
     4AUTHORS:   Jose Ignacio Farran Martin, ignfar@eis.uva.es
     5           Christoph Lossen,           lossen@mathematik.uni-kl.de
     6
     7OVERVIEW: 
     8 Implementation of the Brill-Noether algorithm for solving the
     9 Riemann-Roch problem and applications in Algebraic Geometry codes.
     10 The computation of Weierstrass semigroups is also implemented.@*
     11 The procedures are intended only for plane (singular) curves defined over
     12 a prime field of positive charateristic.@*
     13 For more information about the library see the end of the file brnoeth.lib.
    2114
    2215MAIN PROCEDURES:
     
    2619 Weierstrass(P,m,C);    computes the Weierstrass semigroup of C at P up to m
    2720 extcurve(d,C);         extends the curve C to an extension of degree d
    28  AGcode_L(G,D,E);       computes the evaluation AG code with given divisors
    29                         G and D
    30  AGcode_Omega(G,D,E);   computes the residual AG code with given divisors
    31                         G and D
     21 AGcode_L(G,D,E);       computes the evaluation AG code with divisors G and D
     22 AGcode_Omega(G,D,E);   computes the residual AG code with divisors G and D
    3223 prepSV(G,D,F,E);       preprocessing for the basic decoding algorithm
    3324 decodeSV(y,K);         decoding of a word with the basic decoding algorithm
     
    3829 sys_code(C);           computes an equivalent systematic code
    3930 permute_L(L,P);        applies a permutation to a list
     31
     32SEE ALSO:  hnoether_lib, triang_lib
     33
     34KEYWORDS:  Weierstrass semigroup; Algebraic Geometry codes;
     35           Brill-Noether algorithm
    4036";
    41 
    42 
    43 // ===========================================================================
    44 
    4537
    4638LIB "matrix.lib";
    4739LIB "triang.lib";
    4840LIB "hnoether.lib";
    49 // -> LIB "general.lib","ring.lib";
    50 // maybe useful : LIB "linalg.lib","primdec.lib","normal.lib";
    51 
    52 
    53 // ===========================================================================
    54 
     41
     42///////////////////////////////////////////////////////////////////////////////
    5543
    5644// **********************************************************
     
    5846// **********************************************************
    5947
    60 
    6148proc closed_points (ideal I)
    62 "USAGE:     closed_points(I), where I is an ideal
    63 
    64 RETURN:     list of prime ideals (std), corresponding to the (distinct affine
    65             closed) points of V(I).
    66 
     49"USAGE:     closed_points(I); I an ideal
     50RETURN:     list of prime ideals (each a Groebner basis), corresponding to
     51            the (distinct affine closed) points of V(I)
    6752NOTE:       The ideal must have dimension 0, the basering must have 2
    6853            variables, the ordering must be lp, and the base field must
    6954            be finite and prime.@*
    7055            The option(redSB) is convenient to be set in advance.
    71 
    7256SEE ALSO:   triang_lib
    73 
    7457EXAMPLE:    example closed_points; shows an example
    7558"
     
    121104  L;
    122105}
    123 
     106///////////////////////////////////////////////////////////////////////////////
    124107
    125108static proc pd2 (poly g1,poly g2)
     
    178161  return(L);
    179162}
    180 
    181 
     163///////////////////////////////////////////////////////////////////////////////
    182164static proc isPinL (ideal P,list L)
    183165{
     
    202184  return(0);
    203185}
    204 
    205 
     186///////////////////////////////////////////////////////////////////////////////
    206187static proc s_locus (poly f)
    207188{
     
    222203  }
    223204}
    224 
    225 
     205///////////////////////////////////////////////////////////////////////////////
    226206static proc curve (poly f)
    227 "USAGE:      curve(f), where f is a polynomial (affine of projective)
    228 CREATE:     poly CHI in both ring aff_r=p,(x,y),lp and ring Proj_R=p,(x,y,z),lp
     207"USAGE:      curve(f), where f is a polynomial (affine or projective)
     208CREATE:     poly CHI in both rings aff_r=p,(x,y),lp and Proj_R=p,(x,y,z),lp
    229209            also ideal (std) Aff_SLocus of affine singular locus in the ring
    230210            aff_r
    231 RETURN:     list (size 3) with aff_r,Proj_R and deg(f)
     211RETURN:     list (size 3) with two rings aff_r,Proj_R and an integer deg(f)
    232212NOTE:       f must be absolutely irreducible, but this is not checked
    233213            it is not implemented yet for extensions of prime fields
     
    282262  ERROR("basering must have 2 or 3 variables");
    283263}
    284 
    285 
     264///////////////////////////////////////////////////////////////////////////////
    286265static proc Aff_SL (ideal ISL)
    287266{
     
    310289  return(SL);
    311290}
    312 
    313 
     291///////////////////////////////////////////////////////////////////////////////
    314292static proc inf_P (poly f)
    315293{
     
    422400  return(list(IP_S,IP_NS));
    423401}
    424 
    425 
     402///////////////////////////////////////////////////////////////////////////////
    426403static proc closed_points_ext (poly f,int d,ideal SL)
    427404{
     
    464441  return(LP);
    465442}
    466 
    467 
     443///////////////////////////////////////////////////////////////////////////////
    468444static proc degree_P (list P)
    469445"USAGE:      degree_P(P), where P is either a polynomial or an ideal
     
    509485  }
    510486}
    511 
    512 
     487///////////////////////////////////////////////////////////////////////////////
    513488static proc closed_points_deg (poly f,int d,ideal SL)
    514489{
     
    530505  return(LP);
    531506}
    532 
    533 
     507///////////////////////////////////////////////////////////////////////////////
    534508static proc subset (ideal I,ideal J)
    535509{
     
    547521  return(1);
    548522}
    549 
    550 
     523///////////////////////////////////////////////////////////////////////////////
    551524static proc belongs (list P,ideal I)
    552525{
     
    562535  }
    563536}
    564 
    565 
     537///////////////////////////////////////////////////////////////////////////////
    566538static proc equals (ideal I,ideal J)
    567539{
     
    578550  return(answer);
    579551}
    580 
    581 
     552///////////////////////////////////////////////////////////////////////////////
    582553static proc isInLP (ideal P,list LP)
    583554{
     
    603574  return(0);
    604575}
    605 
    606 
     576///////////////////////////////////////////////////////////////////////////////
    607577static proc res_deg ()
    608578{
     
    624594  return(ext);
    625595}
    626 
    627 
     596///////////////////////////////////////////////////////////////////////////////
    628597static proc Frobenius (etwas,int r)
    629598{
     
    694663  return(etwas);
    695664}
    696 
    697 
     665///////////////////////////////////////////////////////////////////////////////
    698666static proc conj_b (list L,int r)
    699667{
     
    740708  return(LL);
    741709}
    742 
    743 
     710///////////////////////////////////////////////////////////////////////////////
    744711static proc grad_b (list L,int r)
    745712{
     
    764731  return(gr);
    765732}
    766 
    767 
     733///////////////////////////////////////////////////////////////////////////////
    768734static proc conj_bs (list L,int r)
    769735{
     
    795761  return(branches);
    796762}
    797 
    798 
     763///////////////////////////////////////////////////////////////////////////////
    799764static proc subfield (sf)
    800765{
     
    868833  }
    869834}
    870 
    871 
     835///////////////////////////////////////////////////////////////////////////////
    872836static proc importdatum (sf,string datum,string rel)
    873837{
     
    901865  }
    902866}
    903 
    904 
     867///////////////////////////////////////////////////////////////////////////////
    905868static proc rationalize (lf,string datum,string rel)
    906869{
     
    940903  }
    941904}
    942 
    943 
     905///////////////////////////////////////////////////////////////////////////////
    944906static proc place (intvec Pp,int sing,list CURVE)
    945907{
     
    17281690  return(update_CURVE);
    17291691}
    1730 
    1731 
     1692///////////////////////////////////////////////////////////////////////////////
    17321693static proc local_conductor (int k,SS)
    17331694{
     
    18541815  return(Cq);
    18551816}
    1856 
    1857 
     1817///////////////////////////////////////////////////////////////////////////////
    18581818static proc max_D (intvec D1,intvec D2)
    18591819{
     
    18991859  }
    19001860}
    1901 
    1902 
     1861///////////////////////////////////////////////////////////////////////////////
    19031862static proc deg_D (intvec D,list PP)
    19041863{
     
    19131872  return(d);
    19141873}
    1915 
     1874///////////////////////////////////////////////////////////////////////////////
    19161875
    19171876// ============================================================================
     
    19191878// ============================================================================
    19201879
    1921 
    19221880proc Adj_div (poly f,list #)
    1923 "USAGE:      Adj_div( f [,#] ), where f is a poly, [ # a list ]
    1924 
    1925 RETURN:      list L with the computed data:
     1881"USAGE:    Adj_div( f [,l] ); f a poly, [l a list]
     1882RETURN:   list L with the computed data:
    19261883  @format
    1927   L[1] is a list of rings: L[1][1]=aff_r (affine), L[1][2]=Proj_R (projective),
    1928   L[2] is an intvec with 2 entries (degree, genus),
    1929   L[3] is a list of intvec (closed places),
    1930   L[4] is an intvec (conductor),
    1931   L[5] is a list of lists:
    1932          L[5][d][1] is a (local) ring over an extension of degree d,
    1933          L[5][d][2] is an intvec (degrees of base points of places of degree d)
     1884  L[1] a list of rings: L[1][1]=aff_r (affine), L[1][2]=Proj_R (projective),
     1885  L[2] an intvec with 2 entries (degree, genus),
     1886  L[3] a list of intvec (closed places),
     1887  L[4] an intvec (conductor),
     1888  L[5] a list of lists:
     1889     L[5][d][1] a (local) ring over an extension of degree d,
     1890     L[5][d][2] an intvec (degrees of base points of places of degree d)
    19341891  @end format
    1935 
    1936 NOTE:       @code{Adj_div(f);} computes and stores the fundamental data of the
    1937             plane curve defined by f as needed for AG codes. 
    1938             In the affine ring you can find the following data:
     1892NOTE:     @code{Adj_div(f);} computes and stores the fundamental data of the
     1893          plane curve defined by f as needed for AG codes. 
     1894          In the affine ring you can find the following data:
    19391895   @format
    19401896   poly CHI:  affine equation of the curve,
     
    19451901   list Aff_SPoints:  affine singular points (if not empty).
    19461902   @end format
    1947             In the projective ring you can find the projective equation
    1948             CHI of the curve (poly).
    1949             In the local rings L[5][d][1] you find:
     1903          In the projective ring you can find the projective equation
     1904          CHI of the curve (poly).
     1905          In the local rings L[5][d][1] you find:
    19501906   @format
    19511907   list POINTS:  base points of the places of degree d,
     
    19541910   list PARAMETRIZATIONS:  local parametrizations of the places,
    19551911   @end format
    1956             Each entry of the list L[3] corresponds to one closed place (i.e.,
    1957             a place and all its conjugates) which is represented by an intvec
    1958             of size two, the first entry is the degree of the place (in
    1959             particular, it tells the local ring where to find the data
    1960             describing one representative of the closed place), and the
    1961             second one is the position of those data in the lists POINTS, etc.,
    1962             inside this local ring.@*
    1963             In the intvec L[4] (conductor) the i-th entry corresponds to the
    1964             i-th entry in the list of places L[3].@*
     1912          Each entry of the list L[3] corresponds to one closed place (i.e.,
     1913          a place and all its conjugates) which is represented by an intvec
     1914          of size two, the first entry is the degree of the place (in
     1915          particular, it tells the local ring where to find the data
     1916          describing one representative of the closed place), and the
     1917          second one is the position of those data in the lists POINTS, etc.,
     1918          inside this local ring.@*
     1919          In the intvec L[4] (conductor) the i-th entry corresponds to the
     1920          i-th entry in the list of places L[3].@*
    19651921     
    1966             With no optional arguments, the conductor is computed by
    1967             local invariants of the singularities; otherwise it is computed
    1968             by the Dedekind formula. @*
    1969             An affine point is represented by a list P where P[1] is std
    1970             of a prime ideal and P[2] is an intvec containing the position
    1971             of the places above P in the list of closed places L[3]. @*
    1972             If the point is at infinity, P[1] is a homogeneous irreducible
    1973             polynomial in two variables.
    1974 
    1975 KEYWORDS:   Hamburger-Noether expansions; adjunction divisor
    1976 
    1977 SEE ALSO:   closed_points, NSplaces
    1978 
    1979 EXAMPLE:    example Adj_div; shows an example
     1922          With no optional arguments, the conductor is computed by
     1923          local invariants of the singularities; otherwise it is computed
     1924          by the Dedekind formula. @*
     1925          An affine point is represented by a list P where P[1] is std
     1926          of a prime ideal and P[2] is an intvec containing the position
     1927          of the places above P in the list of closed places L[3]. @*
     1928          If the point is at infinity, P[1] is a homogeneous irreducible
     1929          polynomial in two variables.
     1930KEYWORDS: Hamburger-Noether expansions; adjunction divisor
     1931SEE ALSO: closed_points, NSplaces
     1932EXAMPLE:  example Adj_div; shows an example
    19801933"
    19811934{
     
    21382091  printlevel=plevel;
    21392092}
    2140 
    2141 
    2142 // ============================================================================
    2143 
     2093///////////////////////////////////////////////////////////////////////////////
    21442094
    21452095proc NSplaces (int h,list CURVE)
    2146 "USAGE:    NSplaces( h, CURVE ), where h is an integer and CURVE is a list
    2147 
    2148 RETURN:    list L with updated data of CURVE after computing all
    2149            points up to degree H+h (H the maximum degree of the previously
    2150            computed places: @*
     2096"USAGE:   NSplaces( h, CURVE ), where h is an integer and CURVE is a list
     2097RETURN:   list L with updated data of CURVE after computing all
     2098          points up to degree H+h (H the maximum degree of the previously
     2099          computed places): @*
    21512100   @format
    2152    in affine ring L[1][1]:
    2153        lists Aff_Points(d) with affine non-singular points of degree d
    2154                                        (if non-empty)
    2155    in L[3]:  the newly computed closed places are added,
    2156    in L[5]:  local rings created/updated to store (represent. of) new places.
     2101   in L[1][1]: (affine ring) lists Aff_Points(d) with affine non-singular
     2102               points of degree d (if non-empty)
     2103   in L[3]:    the newly computed closed places are added,
     2104   in L[5]:    local rings created/updated to store (repres. of) new places.
    21572105   @end format
    2158            See @ref{Adj_div} for a description of the entries in L.
    2159 
    2160 NOTE:      The list_expression should be the output of the procedure Adj_div.@*
    2161 
    2162 SEE ALSO:  closed_points, Adj_div
    2163 EXAMPLE:   example NSplaces; shows an example
     2106          See @ref{Adj_div} for a description of the entries in L.
     2107NOTE:     The list_expression should be the output of the procedure Adj_div.@*
     2108SEE ALSO: closed_points, Adj_div
     2109EXAMPLE:  example NSplaces; shows an example
    21642110"
    21652111{
     
    22272173  printlevel=plevel;
    22282174}
    2229 
     2175///////////////////////////////////////////////////////////////////////////////
    22302176
    22312177// ** SPECIAL PROCEDURES FOR LINEAR ALGEBRA **
    2232 
    22332178
    22342179static proc Ker (matrix A)
     
    22412186  return(M);
    22422187}
    2243 
    2244 
     2188///////////////////////////////////////////////////////////////////////////////
    22452189static proc get_NZsol (matrix A)
    22462190{
     
    22482192  return(submat(sol,1..1,1..ncols(sol)));
    22492193}
    2250 
    2251 
     2194///////////////////////////////////////////////////////////////////////////////
    22522195static proc supplement (matrix W,matrix V)
    22532196"USAGE:     supplement(W,V), where W,V are matrices of numbers such that the
     
    22812224  return(H*V);
    22822225}
    2283 
    2284 
     2226///////////////////////////////////////////////////////////////////////////////
    22852227static proc supplem (matrix M)
    22862228"USAGE:      suplement(M), where M is a matrix of numbers with maximal rank
     
    23212263  return(supl);
    23222264}
    2323 
    2324 
     2265///////////////////////////////////////////////////////////////////////////////
    23252266static proc mat_rank (matrix A)
    23262267{
     
    23322273  return(r);
    23332274}
    2334 
     2275///////////////////////////////////////////////////////////////////////////////
    23352276
    23362277// ***************************************************************
    23372278// * PROCEDURES FOR INTERPOLATION, INTERSECTION AND EXTRA PLACES *
    23382279// ***************************************************************
    2339 
    23402280
    23412281static proc estim_n (intvec Dplus,int dgX,list PL)
     
    23512291  return(estim);
    23522292}
    2353 
    2354 
     2293///////////////////////////////////////////////////////////////////////////////
    23552294static proc nforms (int n)
    23562295{
     
    23862325  return(N-1);
    23872326}
    2388 
    2389 
     2327///////////////////////////////////////////////////////////////////////////////
    23902328static proc nmultiples (int n,int dgX,poly f)
    23912329{
     
    24182356  return(transpose(lift(nFORMS(n),nmults)));
    24192357}
    2420 
    2421 
     2358///////////////////////////////////////////////////////////////////////////////
    24222359static proc interpolating_forms (intvec D,int n,list CURVE)
    24232360{
     
    27202657  return(Ker(totalM));
    27212658}
    2722 
    2723 
     2659///////////////////////////////////////////////////////////////////////////////
    27242660static proc local_IN (poly h,int m)
    27252661{
     
    27902726  return(answer);
    27912727}
    2792 
    2793 
     2728///////////////////////////////////////////////////////////////////////////////
    27942729static proc extra_place (ideal P)
    27952730{
     
    28992834  return(answer);
    29002835}
    2901 
    2902 
     2836///////////////////////////////////////////////////////////////////////////////
    29032837static proc intersection_div (poly H,list CURVE)
    29042838"USAGE:     intersection_div(H,CURVE), where H is a homogeneous polynomial
     
    31763110  return(answer);
    31773111}
    3178 
    3179 
     3112///////////////////////////////////////////////////////////////////////////////
    31803113static proc local_eq (poly H,SS,int m)
    31813114{
     
    32193152  return(str_h);
    32203153}
    3221 
    3222 
     3154///////////////////////////////////////////////////////////////////////////////
    32233155static proc min_wt_rmat (matrix M)
    32243156{
     
    32563188  return(k);
    32573189}
    3258 
     3190///////////////////////////////////////////////////////////////////////////////
    32593191
    32603192// ============================================================================
     
    32623194// ============================================================================
    32633195
    3264 
    32653196proc BrillNoether (intvec G,list CURVE)
    3266 "USAGE:     BrillNoether(G,CURVE), where G is an intvec and CURVE is a list
    3267 
    3268 RETURN:     list of ideals (each of them with two homogeneous generators,
    3269             which represent the nominator, resp. denominator, of a rational
    3270             function).@*
    3271             The corresponding rational functions form a vector basis of the
    3272             linear system L(G), G a rational divisor over a non-singular curve.
    3273 
    3274 NOTE:       The procedure must be called from the ring CURVE[1][2], where
    3275             CURVE is the output of the procedure @code{NSplaces}. @*
    3276             The intvec G represents a rational divisor supported on the closed
    3277             places of CURVE[3] (e.g. @code{G=2,0,-1;} means 2 times the closed
    3278             place 1 minus 1 times the closed place 3).
    3279 
    3280 SEE ALSO:   Adj_div, NSplaces, Weierstrass
    3281 
    3282 EXAMPLE:    example BrillNoether; shows an example
     3197"USAGE:    BrillNoether(G,CURVE); G an intvec, CURVE a list
     3198RETURN:   list of ideals (each of them with two homogeneous generators,
     3199          which represent the nominator, resp. denominator, of a rational
     3200          function).@*
     3201          The corresponding rational functions form a vector basis of the
     3202          linear system L(G), G a rational divisor over a non-singular curve.
     3203NOTE:     The procedure must be called from the ring CURVE[1][2], where
     3204          CURVE is the output of the procedure @code{NSplaces}. @*
     3205          The intvec G represents a rational divisor supported on the closed
     3206          places of CURVE[3] (e.g. @code{G=2,0,-1;} means 2 times the closed
     3207          place 1 minus 1 times the closed place 3).
     3208SEE ALSO: Adj_div, NSplaces, Weierstrass
     3209EXAMPLE:  example BrillNoether; shows an example
    32833210"
    32843211{
     
    33863313  printlevel=plevel;
    33873314}
    3388 
     3315///////////////////////////////////////////////////////////////////////////////
    33893316
    33903317// *** procedures for dealing with "RATIONAL FUNCTIONS" over a plane curve ***
    33913318// a rational function F may be given by (homogeneous) ideal or (affine) poly
    33923319// (or number)
    3393 
    33943320
    33953321static proc polytoRF (F)
     
    34023328  return(RF);
    34033329}
    3404 
    3405 
     3330///////////////////////////////////////////////////////////////////////////////
    34063331static proc simplifyRF (ideal F)
    34073332{
     
    34123337  return(ideal(division(auxp,F)[1]));
    34133338}
    3414 
    3415 
     3339///////////////////////////////////////////////////////////////////////////////
    34163340static proc sumRF (F,G)
    34173341{
     
    34523376  }
    34533377}
    3454 
    3455 
     3378///////////////////////////////////////////////////////////////////////////////
    34563379static proc negRF (F)
    34573380{
     
    34683391  }
    34693392}
    3470 
    3471 
     3393///////////////////////////////////////////////////////////////////////////////
    34723394static proc escprodRF (l,F)
    34733395{
     
    34853407  }
    34863408}
    3487 
     3409///////////////////////////////////////////////////////////////////////////////
    34883410
    34893411// ******** procedures to compute Weierstrass semigroups ********
    34903412
    3491 
    34923413static proc orderRF (ideal F,SS,int m)
    3493 "USAGE:     orderRF(F,SS,m), where F is an ideal, SS is a ring and m is an
    3494             integer
    3495 RETURN:     list with the order (int) and the leading coefficient (number)
    3496 NOTE:       F represents a rational function, thus the procedure must be
    3497             called from R or R(d).
    3498             SS contains the name of a local ring where rational places are
    3499             stored, and then we take that which is in position m in the
    3500             corresponding lists of data.
    3501             The order of F at the place given by SS,m is returned together
    3502             with the coefficient of minimum degree in the corresponding power
    3503             series.
     3414"USAGE:  orderRF(F,SS,m); F an ideal, SS a ring and m an integer
     3415RETURN: list with the order (int) and the leading coefficient (number)
     3416NOTE:   F represents a rational function, thus the procedure must be
     3417        called from global ring R or R(d).
     3418        SS contains the name of a local ring where rational places are
     3419        stored, and then we take that which is in position m in the
     3420        corresponding lists of data.
     3421        The order of F at the place given by SS,m is returned together
     3422        with the coefficient of minimum degree in the corresponding power
     3423        series.
    35043424"
    35053425{
     
    35253445  return(list(oo,LC));
    35263446}
    3527 
    3528 
    3529 // ============================================================================
    3530 
     3447///////////////////////////////////////////////////////////////////////////////
    35313448
    35323449proc Weierstrass (int P,int m,list CURVE)
    3533 "USAGE:     Weierstrass( i, m, CURVE ), where i,m are integers and CURVE a list
    3534 
    3535 RETURN:     list WS of two lists:
     3450"USAGE:    Weierstrass( i, m, CURVE );  i,m integers and CURVE a list
     3451RETURN:   list WS of two lists:
    35363452  @format
    3537   WS[1] is a list of integers (the Weierstrass semigroup of the curve
    3538                                                       at the place i up to m)
    3539   WS[2] is a list of ideals (the associated rational functions)
     3453  WS[1] list of integers (Weierstr. semigroup of the curve at place i up to m)
     3454  WS[2] list of ideals (the associated rational functions)
    35403455  @end format
    3541 
    3542 
    3543 NOTE:       The procedure must be called from the ring CURVE[1][2],
    3544             where CURVE is the output of the procedure @code{NSplaces}.
    3545             i represents the place CURVE[3][i].
    3546 
    3547             WARNING: the place must be rational, i.e., necessarily
    3548             CURVE[3][P][1]=1.
    3549            
    3550             Rational functions are represented by nominator/denominator
    3551             in form of ideals with two homogeneous generators.
    3552 
    3553 SEE ALSO:   Adj_div, NSplaces, BrillNoether
    3554 
    3555 EXAMPLE:    example Weierstrass; shows an example
     3456NOTE:     The procedure must be called from the ring CURVE[1][2],
     3457          where CURVE is the output of the procedure @code{NSplaces}.
     3458          i represents the place CURVE[3][i].
     3459          WARNING: the place must be rational, i.e., necessarily
     3460          CURVE[3][P][1]=1.           
     3461          Rational functions are represented by nominator/denominator
     3462          in form of ideals with two homogeneous generators.
     3463SEE ALSO: Adj_div, NSplaces, BrillNoether
     3464EXAMPLE:  example Weierstrass; shows an example
    35563465"
    35573466{
     
    36603569  printlevel=plevel;
    36613570}
    3662 
    3663 
    3664 // ============================================================================
    3665 
     3571///////////////////////////////////////////////////////////////////////////////
    36663572
    36673573// axiliary procedure for permuting a list or intvec
    36683574
    3669 
    36703575proc permute_L (L,P)
    3671 "USAGE:     permute_L( L, P ), where L,P are either intvecs or lists
    3672 
    3673 RETURN:     list obtained from L by applying the permutation given by P.
    3674 
    3675 NOTE:       If P is a list, all entries must be integers.
    3676 
    3677 SEE ALSO:   sys_code, AGcode_Omega, prepSV
    3678 
    3679 EXAMPLE:    example permute_L; shows an example
     3576"USAGE:    permute_L( L, P ); L,P either intvecs or lists
     3577RETURN:   list obtained from L by applying the permutation given by P.
     3578NOTE:     If P is a list, all entries must be integers.
     3579SEE ALSO: sys_code, AGcode_Omega, prepSV
     3580EXAMPLE:  example permute_L; shows an example
    36803581"
    36813582{
     
    37123613  permute_L(L,P);
    37133614}
    3714 
    3715 
     3615///////////////////////////////////////////////////////////////////////////////
    37163616static proc evalRF (ideal F,SS,int m)
    37173617"USAGE:     evalRF(F,SS,m), where F is an ideal, SS is a ring and m is an
     
    37463646  }
    37473647}
    3748 
    3749 
     3648///////////////////////////////////////////////////////////////////////////////
     3649//
    37503650// ******** procedures for constructing AG codes ********
    3751 
     3651//
     3652///////////////////////////////////////////////////////////////////////////////
    37523653
    37533654static proc gen_mat (list LF,intvec LP,RP)
    3754 "USAGE:      gen_mat(LF,LP,RP), LF list of rational functions,
     3655"USAGE:      gen_mat(LF,LP,RP); LF list of rational functions,
    37553656            LP intvec of rational places and RP a local ring
    37563657RETURN:     a generator matrix of the evaluation code given by LF and LP
     
    37773678  return(GM);
    37783679}
    3779 
    3780 
    3781 // ============================================================================
    3782 
     3680///////////////////////////////////////////////////////////////////////////////
    37833681
    37843682proc dual_code (matrix G)
    3785 "USAGE:     dual_code(G), where G is a matrix of numbers
    3786 
    3787 RETURN:     a generator matrix of the dual code generated by G.
    3788  
    3789 NOTE:       The input should be a matrix G of numbers. @*
    3790             The output is also a parity check matrix for the code defined
    3791             by G.
    3792 
    3793 KEYWORDS:   linear code, dual
    3794 
    3795 EXAMPLE:    example dual_code; shows an example
     3683"USAGE:   dual_code(G); G a matrix of numbers
     3684RETURN:   a generator matrix of the dual code generated by G
     3685NOTE:     The input should be a matrix G of numbers. @*
     3686          The output is also a parity check matrix for the code defined by G
     3687KEYWORDS: linear code, dual
     3688EXAMPLE:  example dual_code; shows an example
    37963689"
    37973690{
     
    38113704  print(H);
    38123705}
    3813 
     3706///////////////////////////////////////////////////////////////////////////////
    38143707
    38153708// ======================================================================
    38163709// *********** initial test for disjointness ***************
    38173710// ======================================================================
    3818 
    38193711
    38203712static proc disj_divs (intvec H,intvec P,list EC)
     
    38913783  return(1);
    38923784}
    3893 
    3894 
    3895 
    3896 
    3897 // ============================================================================
    3898 
     3785///////////////////////////////////////////////////////////////////////////////
    38993786
    39003787proc AGcode_L (intvec G,intvec D,list EC)
    3901 "USAGE:      AGcode_L( G, D, EC ), where G,D are intvec and EC is a list
    3902 
    3903 RETURN:     a generator matrix for the evaluation AG code defined by the
    3904             divisors G and D.
    3905 
    3906 NOTE:       The procedure must be called within the ring EC[1][4],
    3907             where EC is the output of @code{extcurve(d)} (or within
    3908             the ring EC[1][2] if d=1). @*
    3909             The entry i in the intvec D refers to the i-th rational
    3910             place in EC[1][5] (i.e., to POINTS[i], etc., see @ref{extcurve}).@*
    3911             The intvec G represents a rational divisor (see @ref{BrillNoether}
    3912             for more details).@*
    3913             The code evaluates the vector basis of L(G) at the rational
    3914             places given by D.
    3915 
    3916 WARNINGS:   G should satisfy @math{ 2*genus-2 < deg(G) < size(D) }, which is
    3917             not checked by the algorithm.
    3918             G and D should have disjoint supports (checked by the algorithm).
    3919 
    3920 SEE ALSO:   Adj_div, BrillNoether, extcurve, AGcode_Omega
    3921 
    3922 EXAMPLE:    example AGcode_L; shows an example
     3788"USAGE:    AGcode_L( G, D, EC );  G,D intvec, EC a list
     3789RETURN:   a generator matrix for the evaluation AG code defined by the
     3790          divisors G and D.
     3791NOTE:     The procedure must be called within the ring EC[1][4],
     3792          where EC is the output of @code{extcurve(d)} (or within
     3793          the ring EC[1][2] if d=1). @*
     3794          The entry i in the intvec D refers to the i-th rational
     3795          place in EC[1][5] (i.e., to POINTS[i], etc., see @ref{extcurve}).@*
     3796          The intvec G represents a rational divisor (see @ref{BrillNoether}
     3797          for more details).@*
     3798          The code evaluates the vector basis of L(G) at the rational
     3799          places given by D.
     3800WARNINGS: G should satisfy @math{ 2*genus-2 < deg(G) < size(D) }, which is
     3801          not checked by the algorithm.
     3802          G and D should have disjoint supports (checked by the algorithm).
     3803SEE ALSO: Adj_div, BrillNoether, extcurve, AGcode_Omega
     3804EXAMPLE:  example AGcode_L; shows an example
    39233805"
    39243806{
     
    39763858  printlevel=plevel;
    39773859}
    3978 
    3979 
    3980 // =============================================================================
    3981 
     3860///////////////////////////////////////////////////////////////////////////////
    39823861
    39833862proc AGcode_Omega (intvec G,intvec D,list EC)
    3984 "USAGE:      AGcode_Omega( G, D, EC ), where G,D are intvec and EC is a list
    3985 
    3986 RETURN:     a generator matrix for the residual AG code defined by the
    3987             divisors G and D.
    3988 
    3989 NOTE:       The procedure must be called within the ring EC[1][4],
    3990             where EC is the output of @code{extcurve(d)} (or within
    3991             the ring EC[1][2] if d=1). @*
    3992             The entry i in the intvec D refers to the i-th rational
    3993             place in EC[1][5] (i.e., to POINTS[i], etc., see @ref{extcurve}).@*
    3994             The intvec G represents a rational divisor (see @ref{BrillNoether}
    3995             for more details).@*
    3996             The code computes the residues of a vector space basis of
    3997             @math{\Omega(G-D)} at the rational places given by D.
    3998 
    3999 WARNINGS:   G should satisfy @math{ 2*genus-2 < deg(G) < size(D) }, which is
    4000             not checked by the algorithm.
    4001             G and D should have disjoint supports (checked by the algorithm).
    4002 
    4003 SEE ALSO:   Adj_div, BrillNoether, extcurve, AGcode_L
    4004 
    4005 EXAMPLE:    example AGcode_Omega; shows an example
     3863"USAGE:    AGcode_Omega( G, D, EC ); G,D intvec, EC a list
     3864RETURN:   a generator matrix for the residual AG code defined by the
     3865          divisors G and D.
     3866NOTE:     The procedure must be called within the ring EC[1][4],
     3867          where EC is the output of @code{extcurve(d)} (or within
     3868          the ring EC[1][2] if d=1). @*
     3869          The entry i in the intvec D refers to the i-th rational
     3870          place in EC[1][5] (i.e., to POINTS[i], etc., see @ref{extcurve}).@*
     3871          The intvec G represents a rational divisor (see @ref{BrillNoether}
     3872          for more details).@*
     3873          The code computes the residues of a vector space basis of
     3874          @math{\Omega(G-D)} at the rational places given by D.
     3875WARNINGS: G should satisfy @math{ 2*genus-2 < deg(G) < size(D) }, which is
     3876          not checked by the algorithm.
     3877          G and D should have disjoint supports (checked by the algorithm).
     3878SEE ALSO: Adj_div, BrillNoether, extcurve, AGcode_L
     3879EXAMPLE:  example AGcode_Omega; shows an example
    40063880"
    40073881{
     
    40323906  printlevel=plevel;
    40333907}
    4034 
     3908///////////////////////////////////////////////////////////////////////////////
    40353909
    40363910// ============================================================================
     
    40383912// ============================================================================
    40393913
    4040 
    40413914proc extcurve (int d,list CURVE)
    4042 "USAGE:      extcurve( d, CURVE ), where d is an integer and CURVE is a list
    4043 
    4044 RETURN:     list L which is the update of the list CURVE with additional
    4045             entries
     3915"USAGE:    extcurve( d, CURVE ); d an integer, CURVE a list
     3916RETURN:   list L which is the update of the list CURVE with additional entries
    40463917   @format
    4047    L[1][3]:   ring (p,a),(x,y),lp (affine),
    4048    L[1][4]:   ring (p,a),(x,y,z),lp (projective),
    4049    L[1][5]:   ring (p,a),(x,y,t),ls (local),
    4050    L[2][3]:   int  (the number of rational places),
     3918   L[1][3]: ring (p,a),(x,y),lp (affine),
     3919   L[1][4]: ring (p,a),(x,y,z),lp (projective),
     3920   L[1][5]: ring (p,a),(x,y,t),ls (local),
     3921   L[2][3]: int  (the number of rational places),
    40513922   @end format
    4052             the rings being defined over a field extension of degree d.
    4053 
    4054             If d<2 then @code{extcurve(d,CURVE);} creates a list L which
    4055             is the update of the list CURVE with additional entries
     3923          the rings being defined over a field extension of degree d.
     3924          If d<2 then @code{extcurve(d,CURVE);} creates a list L which
     3925          is the update of the list CURVE with additional entries
    40563926   @format
    4057    L[1][5]:   ring p,(x,y,t),ls,
    4058    L[2][3]:   int  (the number of places over the base field).
     3927   L[1][5]: ring p,(x,y,t),ls,
     3928   L[2][3]: int  (the number of places over the base field).
    40593929   @end format
    4060             In both cases, in the ring L[1][5] lists with the data for all the
    4061             rational places (after a field extension of degree d) are
    4062             created (see @ref{Adj_div}):
     3930          In both cases, in the ring L[1][5] lists with the data for all the
     3931          rational places (after a field extension of degree d) are
     3932          created (see @ref{Adj_div}):
    40633933   @format
    40643934   lists POINTS, LOC_EQS, BRANCHES, PARAMETRIZATIONS.
    40653935   @end format
    4066 
    4067 NOTE:       The list CURVE should be the output of @code{NSplaces} and has
    4068             to contain (at least) all places up to degree d. @*
    4069             This procedure must be executed before constructing AG codes,
    4070             even if no extension is needed. The ring L[1][4] must be active
    4071             when constructing codes over the field extension.@*
    4072 
    4073 SEE ALSO:   closed_points, Adj_div, NSplaces, AGcode_L, AGcode_Omega
    4074 
    4075 EXAMPLE:    example extcurve; shows an example
     3936NOTE:     The list CURVE should be the output of @code{NSplaces} and has
     3937          to contain (at least) all places up to degree d. @*
     3938          This procedure must be executed before constructing AG codes,
     3939          even if no extension is needed. The ring L[1][4] must be active
     3940          when constructing codes over the field extension.@*
     3941SEE ALSO: closed_points, Adj_div, NSplaces, AGcode_L, AGcode_Omega
     3942EXAMPLE:  example extcurve; shows an example
    40763943"
    40773944{
     
    42784145  printlevel=plevel;
    42794146}
    4280 
     4147///////////////////////////////////////////////////////////////////////////////
    42814148
    42824149// specific procedures for linear/AG codes
    4283 
    42844150
    42854151static proc Hamming_wt (matrix A)
     
    43084174  return(w);
    43094175}
    4310 
     4176///////////////////////////////////////////////////////////////////////////////
    43114177
    43124178// Basic Algorithm of Skorobogatov and Vladut for decoding AG codes
     
    43144180//     the decoding since they will never be checked by the procedures
    43154181
    4316 
    4317 // ============================================================================
    4318 
    4319 
    43204182proc prepSV (intvec G,intvec D,intvec F,list EC)
    4321 "USAGE:     prepSV( G, D, F, EC ), where G,D,F are intvec and EC is a list
    4322 
    4323 RETURN:     list E of size n+3, where n=size(D). All its entries but E[n+3]
    4324             are matrices:
     4183"USAGE:    prepSV( G, D, F, EC ); G,D,F intvecs and EC a list
     4184RETURN:   list E of size n+3, where n=size(D). All its entries but E[n+3]
     4185          are matrices:
    43254186   @format
    43264187   E[1]:  parity check matrix for the current AG code
    43274188   E[2] ... E[n+2]:  matrices used in the procedure decodeSV
    43284189   E[n+3]:  intvec with
    4329        E[n+3][1]:  correction capacity @math{\epsilon} of the algorithm
    4330        E[n+3][2]:  designed Goppa distance @math{\delta} of the current AG code
     4190       E[n+3][1]: correction capacity @math{\epsilon} of the algorithm
     4191       E[n+3][2]: designed Goppa distance @math{\delta} of the current AG code
    43314192   @end format
    4332 
    4333 NOTE:       Computes the preprocessing for the basic (Skorobogatov-Vladut)
    4334             decoding algorithm.@*
    4335             The procedure must be called within the ring EC[1][4],
    4336             where EC is the output of @code{extcurve(d)} (or within
    4337             the ring EC[1][2] if d=1). @*
    4338             The intvec G and F represent rational divisors   (see
    4339             @ref{BrillNoether} for more details).@*
    4340             The intvec D refers to rational places (see @ref{AGcode_Omega}
    4341             for more details.).
    4342             The current AG code is @code{AGcode_Omega(G,D,EC)}.@*
    4343             If you know the exact minimum distance d and you want to use it in
    4344             @code{decodeSV} instead of @math{\delta}, you can change the value
    4345             of E[n+3][2] to d before applying decodeSV.
    4346             If you have a systematic encoding for the current code and want to
    4347             keep it during the decoding, you must previously permute D (using
    4348             @code{permute_L(D,P);}), e.g., according to the permutation
    4349             P=L[3], L being the output of @code{sys_code}.
    4350 
    4351 WARNINGS:   F must be a divisor with support disjoint to the support of D and
    4352             with degree @math{\epsilon + genus}, where
    4353             @math{\epsilon:=[(deg(G)-3*genus+1)/2]}.@*
    4354             G should satisfy @math{ 2*genus-2 < deg(G) < size(D) }, which is
    4355             not checked by the algorithm.
    4356             G and D should also have disjoint supports (checked by the
    4357             algorithm).
    4358 
    4359 KEYWORDS:   SV-decoding algorithm, preprocessing
    4360 
    4361 SEE ALSO:   extcurve, AGcode_Omega, decodeSV, sys_code, permute_L
    4362 
    4363 EXAMPLE:    example prepSV; shows an example
     4193NOTE:     Computes the preprocessing for the basic (Skorobogatov-Vladut)
     4194          decoding algorithm.@*
     4195          The procedure must be called within the ring EC[1][4], where EC is
     4196          the output of @code{extcurve(d)} (or in the ring EC[1][2] if d=1) @*
     4197          The intvec G and F represent rational divisors (see
     4198          @ref{BrillNoether} for more details).@*
     4199          The intvec D refers to rational places (see @ref{AGcode_Omega}
     4200          for more details.).
     4201          The current AG code is @code{AGcode_Omega(G,D,EC)}.@*
     4202          If you know the exact minimum distance d and you want to use it in
     4203          @code{decodeSV} instead of @math{\delta}, you can change the value
     4204          of E[n+3][2] to d before applying decodeSV.
     4205          If you have a systematic encoding for the current code and want to
     4206          keep it during the decoding, you must previously permute D (using
     4207          @code{permute_L(D,P);}), e.g., according to the permutation
     4208          P=L[3], L being the output of @code{sys_code}.
     4209WARNINGS: F must be a divisor with support disjoint to the support of D and
     4210          with degree @math{\epsilon + genus}, where
     4211          @math{\epsilon:=[(deg(G)-3*genus+1)/2]}.@*
     4212          G should satisfy @math{ 2*genus-2 < deg(G) < size(D) }, which is
     4213          not checked by the algorithm.
     4214          G and D should also have disjoint supports (checked by the
     4215          algorithm).
     4216KEYWORDS: SV-decoding algorithm, preprocessing
     4217SEE ALSO: extcurve, AGcode_Omega, decodeSV, sys_code, permute_L
     4218EXAMPLE:  example prepSV; shows an example
    43644219"
    43654220{
     
    44374292  printlevel=plevel;
    44384293}
    4439 
    4440 
    4441 // ============================================================================
    4442 
     4294///////////////////////////////////////////////////////////////////////////////
    44434295
    44444296proc decodeSV (matrix y,list K)
    4445 "USAGE:     decodeSV( y, K ), where y is a row-matrix and K is a list
    4446 
     4297"USAGE:     decodeSV( y, K ); y a row-matrix and K a list
    44474298RETURN:     a codeword (row-matrix) if possible, resp. the 0-matrix (of size
    44484299            1) if decoding is impossible.
    44494300            For decoding the basic (Skorobogatov-Vladut) decoding algorithm
    44504301            is applied.
    4451 
    44524302NOTE:       The list_expression should be the output K of the procedure
    44534303            @code{prepSV}.@*
     
    44564306            The decoding may fail if the number of errors is greater than
    44574307            the correction capacity of the algorithm.
    4458 
    44594308KEYWORDS:   SV-decoding algorithm
    4460 
    44614309SEE ALSO:   extcurve, AGcode_Omega, prepSV
    4462 
    44634310EXAMPLE:    example decodeSV; shows an example
    44644311"
     
    45964443  printlevel=plevel;
    45974444}
    4598 
    4599 
    4600 // ============================================================================
    4601 
     4445///////////////////////////////////////////////////////////////////////////////
    46024446
    46034447proc sys_code (matrix C)
    4604 "USAGE:     sys_code(C) where C is a matrix of constants
    4605 
    4606 RETURN:     list L with:
     4448"USAGE:    sys_code(C); C is a matrix of constants
     4449RETURN:   list L with:
    46074450   @format
    46084451   L[1] is the generator matrix in standard form of an equivalent code,
     
    46104453   L[3] is an intvec which represents the needed permutation.
    46114454   @end format
    4612 
    4613 NOTE:       Computes a systematic code which is equivalent to the given one.@*
    4614             The input should be a matrix of numbers.@*
    4615             The output has to be interpreted as follows: if the input was
    4616             the generator matrix of an AG code then one should apply the
    4617             permutation L[3] to the divisor D of rational points by means
    4618             of @code{permute_L(D,L[3]);} before continuing to work with the
    4619             code (for instance, if you want to use the systematic encoding
    4620             together with a decoding algorithm).
    4621 
    4622 KEYWORDS:   linear code, systematic
    4623 
    4624 SEE ALSO:   permute_L, AGcode_Omega, prepSV
    4625 
    4626 EXAMPLE:    example sys_code; shows an example
     4455NOTE:     Computes a systematic code which is equivalent to the given one.@*
     4456          The input should be a matrix of numbers.@*
     4457          The output has to be interpreted as follows: if the input was
     4458          the generator matrix of an AG code then one should apply the
     4459          permutation L[3] to the divisor D of rational points by means
     4460          of @code{permute_L(D,L[3]);} before continuing to work with the
     4461          code (for instance, if you want to use the systematic encoding
     4462          together with a decoding algorithm).
     4463KEYWORDS: linear code, systematic
     4464SEE ALSO: permute_L, AGcode_Omega, prepSV
     4465EXAMPLE:  example sys_code; shows an example
    46274466"
    46284467{
     
    47604599  print(L[1]*transpose(L[2]));
    47614600}
    4762 
     4601///////////////////////////////////////////////////////////////////////////////
    47634602
    47644603/*
    4765 
    4766 
    47674604// ============================================================================
    47684605// *******       ADDITIONAL INFORMATION ABOUT THE LIBRARY              ********
    47694606// ============================================================================
    47704607
    4771 
    47724608A SINGULAR library for plane curves, Weierstrass semigroups and AG codes
    47734609Also available via http://wmatem.eis.uva.es/~ignfar/singular/
    4774 
    47754610
    47764611PREVIOUS WARNINGS :
     
    47874622   (3) The curve must be absolutely irreducible (but it is not checked)
    47884623   (4) Only (algebraic projective) plane curves are considered
    4789 
    47904624
    47914625GENERAL CONCEPTS :
     
    48094643       in form of ideals with two homogeneous generators
    48104644
    4811 
    48124645OUTLINE/EXAMPLE OF THE USE OF THE LIBRARY :
    48134646
     
    49394772}
    49404773
    4941 
    49424774// **** Other interesting examples :
    49434775
     
    49544786CURVE=extcurve(6,CURVE);
    49554787
    4956 
    49574788*/
    4958 
    4959 
    49604789;
  • Singular/LIB/classify.lib

    r5a1141 r4ac997  
    1 e// $Id: classify.lib,v 1.44 2000-12-19 15:05:17 anne Exp $
    2 // KK, last modified: 04.04.1998
    3 ///////////////////////////////////////////////////////////////////////////////
    4 
    5 version  = "$Id: classify.lib,v 1.44 2000-12-19 15:05:17 anne Exp $";
     1// KK,GMG last modified: 17.12.00
     2///////////////////////////////////////////////////////////////////////////////
     3version  = "$Id: classify.lib,v 1.45 2000-12-22 13:39:53 greuel Exp $";
    64category="Singularities";
    75info="
    8 LIBRARY:  classify.lib  Procedures for the Arnold-Classifier of Singularities
     6LIBRARY:  classify.lib  Arnold Classifier of Singularties
     7AUTHOR:   Kai Krueger, krueger@mathematik.uni-kl.de
    98
    109OVERVIEW:
    1110   A library for classifying isolated hypersurface singularities w.r.t. right
    1211   equivalence, based on the determinator of singularities by V.I. Arnold.
    13 
    14 AUTHOR:
    15    Kai Krueger, krueger@mathematik.uni-kl.de
    1612
    1713PROCEDURES:
  • Singular/LIB/deform.lib

    r5a1141 r4ac997  
    1 // $Id: deform.lib,v 1.22 2000-12-19 15:05:19 anne Exp $
     1// $Id: deform.lib,v 1.23 2000-12-22 13:41:22 greuel Exp $
    22// author: Bernd Martin email: martin@math.tu-cottbus.de
    33//(bm, last modified 4/98)
    44///////////////////////////////////////////////////////////////////////////////
    5 version="$Id: deform.lib,v 1.22 2000-12-19 15:05:19 anne Exp $";
     5version="$Id: deform.lib,v 1.23 2000-12-22 13:41:22 greuel Exp $";
    66category="Singularities";
    77info="
    8 LIBRARY:  deform.lib       PROCEDURES FOR COMPUTING MINIVERSAL DEFORMATION
    9 
    10 AUTHOR: Bernd Martin, email: martin@math.tu-cottbus.de
     8LIBRARY:  deform.lib    Miniversal Deformation of Singularities and Modules
     9AUTHOR:   Bernd Martin, email: martin@math.tu-cottbus.de
    1110
    1211PROCEDURES:
     
    1716 kill_rings([\"prefix\"])  kills the exported rings from above
    1817";
    19 ///////////////////////////////////////////////////////////////////////////////
     18
    2019LIB "inout.lib";
    2120LIB "general.lib";
     
    2423LIB "sing.lib";
    2524///////////////////////////////////////////////////////////////////////////////
     25
    2626proc versal (ideal Fo,list #)
    2727"USAGE:   versal(Fo[,d,any]); Fo=ideal, d=int, any=list
     
    179179       Cup = jet(Cup,@d,@jv);
    180180     }
    181 //------- express obstructions in kbase of T_2  --------------------------------
     181//------- express obstructions in kbase of T_2  -------------------------------
    182182     if ( @noObstr==0 )
    183183     {  Cup' = reduce(Cup,PreO');
     
    294294}
    295295///////////////////////////////////////////////////////////////////////////////
     296
    296297proc mod_versal(matrix Mo, ideal I, list #)
    297 "
    298 USAGE:   mod_versal(Mo,I[,d,any]); I=ideal, M=module, d=int, any =list
     298"USAGE:   mod_versal(Mo,I[,d,any]); I=ideal, M=module, d=int, any =list
    299299COMUPTE: miniversal deformation of coker(Mo) over Qo=Po/Io, Po=basering;
    300300CREATE:  Ringsr (exported):
     
    545545  kill Px,Qx,So;
    546546}
    547 //=============================================================================
    548547///////////////////////////////////////////////////////////////////////////////
    549548proc kill_rings(list #)
     
    641640   return(iv,M1,kb1,lift1,L');
    642641}
    643 //////////////////////////////////////////////////////////////////////////////
     642///////////////////////////////////////////////////////////////////////////////
    644643proc get_rings(ideal Io,int e1,int switch, list #)
    645644"
     
    678677  return();
    679678}
    680 //////////////////////////////////////////////////////////////////////////////
     679///////////////////////////////////////////////////////////////////////////////
    681680proc get_inf_def(list #)
    682681"
     
    705704//////////////////////////////////////////////////////////////////////////////
    706705proc lift_rel_kb (module N, module M, list #)
    707 "
    708 USAGE:   lift_rel_kb(N,M[,kbaseM,p]);
     706"USAGE:   lift_rel_kb(N,M[,kbaseM,p]);
    709707ASSUME:  [p a monomial ] or the product of all variables
    710          N, M modules of same rank,
    711          M depending only on variables not in p and vdim(M) finite in this ring,
     708         N, M modules of same rank, M depending only on variables not in p
     709         and vdim(M) is finite in this ring,
    712710         [ kbaseM the kbase of M in the subring given by variables not in p ]
    713          warning: check that these assumtions are fulfilled!
     711         warning: these assumtions are not checked by the procedure
    714712RETURN:  matrix A, whose j-th columnes present the coeff's of N[j] in kbaseM,
    715713         i.e. kbaseM*A = reduce(N,std(M))
     
    882880  return(degA);
    883881}
    884 //////////////////////////////////////////////////////////////////////////////////
     882///////////////////////////////////////////////////////////////////////////////
    885883proc homog_test(intvec w_vec, matrix Mo, matrix A)
    886884"
     
    920918  return(@nv);
    921919}
    922 //////////////////////////////////////////////////////////////////////////////////
     920///////////////////////////////////////////////////////////////////////////////
    923921proc homog_t(intvec d_vec, matrix Fo, matrix A)
    924922"
     
    951949   return(dv);
    952950}
    953 
     951///////////////////////////////////////////////////////////////////////////////
  • Singular/LIB/elim.lib

    r5a1141 r4ac997  
    1 // $Id: elim.lib,v 1.10 2000-12-19 14:41:42 anne Exp $
     1// $Id: elim.lib,v 1.11 2000-12-22 13:42:34 greuel Exp $
    22// (GMG, last modified 22.06.96)
    33///////////////////////////////////////////////////////////////////////////////
    4 
    5 version="$Id: elim.lib,v 1.10 2000-12-19 14:41:42 anne Exp $";
     4version="$Id: elim.lib,v 1.11 2000-12-22 13:42:34 greuel Exp $";
    65category="Commutative Algebra";
    76info="
    8 LIBRARY:  elim.lib      PROCEDURES FOR ELIMINATIOM, SATURATION AND BLOWING UP
     7LIBRARY:  elim.lib      Elimination, Saturation and Blowing up
    98
    109PROCEDURES:
     
    142141
    143142proc elim1 (id, poly vars)
    144 "USAGE:   elim1(id,poly); id ideal/module, poly=product of vars to be eliminated
     143"USAGE:   elim1(id,p); id ideal/module, p product of vars to be eliminated
    145144RETURN:  ideal/module obtained from id by eliminating vars occuring in poly
    146145NOTE:    no special monomial ordering is required, result is a SB with
  • Singular/LIB/equising.lib

    r5a1141 r4ac997  
    1 // $Id: equising.lib,v 1.3 2000-12-19 15:05:20 anne Exp $
     1version="$Id: equising.lib,v 1.4 2000-12-22 13:43:10 greuel Exp $";
    22category="Singularities";
    33info="
    4 LIBRARY:  Equising.lib PROCEDURES FOR EQUISINGULARITY STRATA
    5 
     4LIBRARY:  equising.lib  EQUISINGULARITY STRATUM OF A FAMILY OF PLANE CURVES
    65AUTHOR:   Andrea Mindnich, e-mail:mindnich@mathematik.uni-kl.de
     6
    77PROCEDURES:
    88 esStratum   computes the equisingularity stratum of a deformation
    9  isEquising  tests, if a given deformation is equisingular
     9 isEquising  tests, whether a given deformation is equisingular
    1010"
    1111
     
    1414LIB "hnoether.lib";
    1515
    16 
    17 ///////////////////////////////////////////////////////////////////////////////
    18 ///////////////////////////////////////////////////////////////////////////////
    19 
    20 
     16///////////////////////////////////////////////////////////////////////////////
    2117// COMPUTES  a weight vector. x and y get weight 1 and all other
    2218//           variables get weight 0.
     
    2925  return (iv);
    3026}
    31 
    32 
    33 ///////////////////////////////////////////////////////////////////////////////
    34 
    35 
     27///////////////////////////////////////////////////////////////////////////////
    3628// exchanges the variables x and y in the polynomial p_f
    3729static proc swapXY(poly f)
     
    4537  return (f);
    4638}
    47 
    48 
    49 ///////////////////////////////////////////////////////////////////////////////
    50 
    51 
     39///////////////////////////////////////////////////////////////////////////////
    5240// ASSUME:   p_mon is a monomial
    5341//            and p_g is the product of the variables in p_mon.
     
    7058  return (p_c);
    7159}
    72 
    73 
    74 ///////////////////////////////////////////////////////////////////////////////
    75 
    76 
     60///////////////////////////////////////////////////////////////////////////////
    7761// in p_F the variable p_vari is substituted by the polynomial p_g.
    7862static proc eSubst(poly p_F, poly p_vari, poly p_g)
     
    9175  return (p_F);
    9276}
    93 
    94 
    95 ///////////////////////////////////////////////////////////////////////////////
    96 
    97 
     77///////////////////////////////////////////////////////////////////////////////
    9878// All ring variables of p_F which occur in (the set of generators of) the
    9979// ideal  Id, are substituted by 0
     
    131111  return(error);
    132112}
    133 
    134 ///////////////////////////////////////////////////////////////////////////////
    135 
    136 
     113///////////////////////////////////////////////////////////////////////////////
    137114static  proc getInput (list #)
    138115{
     
    156133  return(maxStep);
    157134}
    158 
    159 
    160135//////////////////////////////////////////////////////////////////////////////
    161 
    162 
    163136// RETURNS: 0, if the ideal cond only depends on the deformation parameters
    164137//          1, otherwise.
     
    186159
    187160///////////////////////////////////////////////////////////////////////////////
    188 
    189 
    190161// COMPUTES string(minpoly) and substitutes the parameter by newParName
    191162static proc makeMinPolyString (string newParName)
     
    218189
    219190///////////////////////////////////////////////////////////////////////////////
    220 
    221 
    222191// Defines a new ring without deformation-parameters.
    223192static proc createHNERing()
     
    234203  keepring(HNERing);
    235204}
    236 
    237 
    238 ///////////////////////////////////////////////////////////////////////////////
    239 
    240 
     205///////////////////////////////////////////////////////////////////////////////
    241206// RETURNS: 1, if p_f = 0 or char(basering) divides the order of p_f
    242207//             or p_f is not squarefree.
     
    271236  return(0);
    272237}
    273 
    274 
    275 ///////////////////////////////////////////////////////////////////////////////
    276 
    277 
     238///////////////////////////////////////////////////////////////////////////////
    278239// COMPUTES  the multiplicity sequence of p_f
    279240static proc calcMultSequence (poly p_f)
     
    321282  return(multSeq, xNotTransversal, fIrreducible);
    322283}
    323 
    324 
    325 ///////////////////////////////////////////////////////////////////////////////
    326 
    327 
     284///////////////////////////////////////////////////////////////////////////////
    328285// ASSUME:  The basering is no qring and has at least 3 variables
    329286// DEFINES: A new basering, "myRing",
     
    406363}
    407364
    408 
    409365///////////////////////////////////////////////////////////////////////////////
    410366/////////// procedures to compute the equisingularity stratum /////////////////
    411367///////////////////////////////////////////////////////////////////////////////
    412 
    413 
    414368// DEFINES a new basering, myRing,  which has one variable
    415369//         more than the old ring.
     
    463417  keepring(myRing);
    464418}
    465 
    466 
    467 ///////////////////////////////////////////////////////////////////////////////
    468 
    469 
     419///////////////////////////////////////////////////////////////////////////////
    470420// COMPUTES an ideal equimultCond, such that F_(n-1) mod equimultCond =0,
    471421//          where F_(n-1) is the (nNew-1)-jet of p_F with respect to x,y.
     
    494444  return(equimultCond, p_F);
    495445}
    496 
    497 
    498 ///////////////////////////////////////////////////////////////////////////////
    499 
    500 
     446///////////////////////////////////////////////////////////////////////////////
    501447// COMPUTES smallest integer >= nNew/nOld -1
    502448static proc calcNZeroSteps (int nOld,int nNew)
     
    516462 return(nZeroSteps);
    517463}
    518 
    519 
    520 ///////////////////////////////////////////////////////////////////////////////
    521 
    522 
     464///////////////////////////////////////////////////////////////////////////////
    523465// ASSUME: ord_(X,Y)(F)=nNew
    524466// COMPUTES an ideal I such that (p_F mod I)_nNew  = p_c*y^nNew.
     
    550492  return(id_help, p_F, p_c);
    551493}
    552 
    553 
    554 ///////////////////////////////////////////////////////////////////////////////
    555 
    556 
     494///////////////////////////////////////////////////////////////////////////////
    557495// ASSUME: ord_(X,Y)(F)=nNew
    558496// COMPUTES an ideal I such that p_Fn mod I = p_c*(y-p_a*x)^nNew,
     
    632570  return(id_help, HCond, p_F, p_c, p_a);
    633571}
    634 
    635 
    636 ///////////////////////////////////////////////////////////////////////////////
    637 
    638 
     572///////////////////////////////////////////////////////////////////////////////
    639573// eliminates the variables H(1),..,H(nHelpV) from the ideal ES + HCond
    640574static proc helpVarElim(ideal ES, ideal HCond, int nHelpV)
     
    646580  return(ES);
    647581}
    648 
    649 
    650 ///////////////////////////////////////////////////////////////////////////////
    651 
    652 
     582///////////////////////////////////////////////////////////////////////////////
    653583// ASSUME:   ord(F)=nNew and p_c(y-p_a*x)^n is the nNew-jet of F with respect
    654584//           to X,Y
     
    674604  return (p_F);
    675605}
    676 
    677 
    678 ///////////////////////////////////////////////////////////////////////////////
    679 
    680 
     606///////////////////////////////////////////////////////////////////////////////
    681607// ASSUME:  p_F in K[t(1)..t(s),x,y]
    682608// COMPUTES the minimal ideal ES, such that the deformation p_F mod ES is
     
    822748}
    823749
    824 
    825 ///////////////////////////////////////////////////////////////////////////////
    826 
     750///////////////////////////////////////////////////////////////////////////////
     751//                           main procedure
     752///////////////////////////////////////////////////////////////////////////////
    827753
    828754proc esStratum (poly p_F, list #)
     
    933859
    934860///////////////////////////////////////////////////////////////////////////////
    935 //////////////////// procedures for equisingularity test///////////////////////
    936 ///////////////////////////////////////////////////////////////////////////////
    937 
    938 
     861//                  procedures for equisingularity test
     862///////////////////////////////////////////////////////////////////////////////
    939863
    940864// DEFINES a new basering, myRing,  which has one variable
     
    983907  keepring(myRing);
    984908}
    985 
    986 
    987 ///////////////////////////////////////////////////////////////////////////////
    988 
    989 
     909///////////////////////////////////////////////////////////////////////////////
    990910// tests, if ord p_F = nNew.
    991911static proc equimultTest (poly p_F, int nHelpV, int nNew, ideal HCond)
     
    1018938  return(1, p_F);
    1019939}
    1020 
    1021 
    1022 ///////////////////////////////////////////////////////////////////////////////
    1023 
    1024 
     940///////////////////////////////////////////////////////////////////////////////
    1025941// ASSUME: ord(p_F)=nNew
    1026942// tests, if p_F =  p_c*y^nNew for some p_c.
     
    1055971  return(1, p_c);
    1056972}
    1057 
    1058 
    1059 ///////////////////////////////////////////////////////////////////////////////
    1060 
    1061 
     973///////////////////////////////////////////////////////////////////////////////
    1062974// ASSUME: ord(p_F)=nNew
    1063975// tests, if p_F =  p_c*(y - p_a*x)^nNew for some p_a, p_c.
     
    11061018  return(1, p_F, p_c, p_a, HCond);
    11071019}
    1108 
    1109 
    11101020//////////////////////////////////////////////////////////////////////////////
    1111 
    1112 
    11131021// eliminates the variables H(1),..,H(nHelpV) from the ideal ES + HCond
    11141022static proc T_helpVarElim(ideal ES, ideal HCond, int nHelpV)
     
    11621070}
    11631071///////////////////////////////////////////////////////////////////////////////
    1164 
    1165 
    11661072// ASSUME:  F in K[t(1)..t(s),x,y],
    11671073//          the ringordering is ds
     
    12511157  return(1);
    12521158}
    1253 
    1254 ///////////////////////////////////////////////////////////////////////////////
    1255 
     1159///////////////////////////////////////////////////////////////////////////////
    12561160
    12571161proc isEquising (poly p_F, list #)
     
    13491253   isEquising(F,2);
    13501254}
    1351 
     1255///////////////////////////////////////////////////////////////////////////////
     1256/*
     1257  Weiter Beispiele aus Dipl. von A. Mindnich einfuegen
     1258*/
Note: See TracChangeset for help on using the changeset viewer.