Changeset 3c13f6 in git for Singular


Ignore:
Timestamp:
Dec 7, 2000, 3:29:52 PM (23 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
Children:
7e5a38066ae0e56f9dc4a8093e8300f9ea748f7f
Parents:
0cc028e315fea401732a82d9424c27a008320402
Message:
*anne: spcurve.lib


git-svn-id: file:///usr/local/Singular/svn/trunk@4832 2c84dea3-7e68-4137-9b89-c4e89433aadc
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/LIB/spcurve.lib

    r0cc028 r3c13f6  
    1 // $Id: spcurve.lib,v 1.9 2000-05-12 12:17:18 krueger Exp $
     1// $Id: spcurve.lib,v 1.10 2000-12-07 14:29:52 Singular Exp $
    22// (anne, last modified 31.5.99)
    33/////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: spcurve.lib,v 1.9 2000-05-12 12:17:18 krueger Exp $";
     5version="$Id: spcurve.lib,v 1.10 2000-12-07 14:29:52 Singular Exp $";
    66info="
    7 LIBRARY:  spcurve.lib    PROCEDURES FOR CM CODIMENSION 2 SINGULARITIES
    8 AUTHOR:   Anne Fruehbis-Krueger, anne@mathematik.uni-kl.de
     7LIBRARY: spcurve.lib    PROCEDURES FOR CM CODIMENSION 2 SINGULARITIES
     8AUTHOR:  Anne Fruehbis-Krueger, anne@mathematik.uni-kl.de
    99last modified: 31.5.99
    10 SEE ALSO: sing_lib, deform_lib
    11 
    12 PROCEDURES:
     10
    1311 isCMcod2(i);            presentation matrix of the ideal i, if i is CM
    1412 CMtype(i);              Cohen-Macaulay type of the ideal i
     
    3230
    3331proc isCMcod2(ideal kurve)
    34 "USAGE:   @code{isCMcod2(i)};   @code{i} ideal
    35 RETURN:  presentation matrix of @code{i}, if @code{i} is Cohen-Macaulay of codimension 2
    36          @* a zero matrix otherwise
    37 EXAMPLE: @code{example isCMcod2}; shows an example
    38 "
     32"USAGE:   isCMcod2(i);   i an ideal
     33RETURN:  presentation matrix of i, if i is Cohen-Macaulay of codimension2
     34         a zero matrix otherwise
     35EXAMPLE: example isCMcod2; shows an example"
    3936{
    4037  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    6461
    6562proc CMtype(ideal kurve)
    66 "USAGE:   @code{CMtype(i)};  @code{i} ideal, CM of codimension 2
    67 RETURN:  Cohen-Macaulay type of @code{i} (integer)
    68          @*(-1, if i is not Cohen-Macaulay of codimension 2)
    69 EXAMPLE: @code{example CMtype}; shows an example
    70 "
     63"USAGE:   CMtype(i);  i an ideal, CM of codimension 2
     64RETURN:  Cohen-Macaulay type of i (integer)
     65         (-1, if i is not Cohen-Macaulay of codimension 2)
     66EXAMPLE: example CMtype; shows an example"
    7167{
    7268  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    10197
    10298proc matrixT1(matrix M ,int n)
    103 "USAGE:   @code{matrixT1(M,n)};  @code{M} matrix, @code{n} integer
    104 ASSUME:  @code{M} is a presentation matrix of an ideal i, CM of codimension 2;
    105          @* consider i as a family of ideals in a ring in the first @code{n}
     99"USAGE:   matrixT1(M,n);  M matrix, n integer
     100ASSUME:  M is a presentation matrix of an ideal i, CM of codimension 2;
     101         consider i as a family of ideals in a ring in the first n
    106102         variables where the remaining variables are considered as
    107103         parameters
    108 RETURN:  list consisting of the k x (k+1) matrix @code{M} and a
    109          module @math{K_M} such that @math{T1=Mat(k,k+1;R)/K_M} is the space
    110          of first order deformations of i
    111 EXAMPLE: @code{example matrixT1}; shows an example
    112 "
     104RETURN:  list consisting of the k x (k+1) matrix M and a module K_M such that
     105         T1=Mat(k,k+1;R)/K_M is the space of first order deformations of i
     106EXAMPLE: example matrixT1; shows an example"
    113107{
    114108  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    121115  {
    122116    M=transpose(M);
    123     temp=nc;
     117    int temp=nc;
    124118    nc=nr;
    125119    nr=temp;
    126     tra=1;
     120    int tra=1;
    127121  }
    128122  if ( nr != (nc+1) )
    129123  {
    130     dbprint(p,"//not a k x (k+1) matrix");
    131     return("ERROR");
     124    ERROR("not a k x (k+1) matrix");
    132125  }
    133126//---------------------------------------------------------------------------
     
    187180example
    188181{ "EXAMPLE:"; echo = 2;
    189   ring r=32003,(x(1),x(2),x(3)),dp;
     182  ring r=32003,(x(1),x(2),x(3)),ds;
    190183  ideal curve=x(1)*x(2),x(1)*x(3),x(2)*x(3);
    191184  matrix M=isCMcod2(curve);
     
    195188
    196189proc semiCMcod2(matrix M, module t1)
    197 "USAGE:   @code{semiCMcod2(M,t1)}; @code{M} matrix, @code{t1} module
    198 ASSUME:  @code{M} is a presentation matrix of an ideal i, CM of codimension 2,
    199          and @code{t1} is a presentation of the space of first order
    200          deformations of i (@code{(M,t1)} as returned by the procedure
    201          @code{matrixT1})
     190"USAGE:   semiCMcod2(M,t1); M matrix, t1 module
     191ASSUME:  M is a presentation matrix of an ideal i, CM of codimension 2,
     192         and t1 is a presentation of the space of first order deformations
     193         of i ((M,t1) as returned by the procedure matrixT1)
    202194CREATE:  new basering with name rneu
    203195RETURN:  ideal in rneu describing the semiuniversal deformation of i
    204196NOTE:    The current basering should not contain any variables named
    205197         A(j) where j is some integer!
    206 EXAMPLE: @code{example semiCMcod2}; shows an example
    207 "
     198EXAMPLE: example semiCMcod2; shows an example"
    208199{
    209200  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    232223    if (jj==-1)
    233224    {
    234       "Your ring contains a variable T(i)!";
    235       return("ERROR");
     225      ERROR("Your ring contains a variable T(i)!");
    236226    }
    237227  }
     
    267257example
    268258{ "EXAMPLE:"; echo=2;
    269   ring r=32003,(x(1),x(2),x(3)),dp;
     259  ring r=32003,(x(1),x(2),x(3)),ds;
    270260  ideal curve=x(1)*x(2),x(1)*x(3),x(2)*x(3);
    271261  matrix M=isCMcod2(curve);
     
    276266
    277267proc discr(ideal kurve, int n)
    278 "USAGE:   @code{discr(sem,n)};  @code{sem} ideal, @code{n} integer
    279 ASSUME:  @code{sem} is the versal deformation of an ideal of codimension 2
    280          @*the first n variables of the ring are treated as variables
     268"USAGE:   discr(sem,n);  sem ideal, n integer
     269ASSUME:  sem is the versal deformation of an ideal of codimension 2
     270         the first n variables of the ring are treated as variables
    281271         all the others as parameters
    282272RETURN:  ideal describing the discriminant
    283273NOTE:    This is not a powerful algorithm!
    284 EXAMPLE: @code{example discr}; shows an example
    285 "
     274EXAMPLE: example discr; shows an example"
    286275{
    287276  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    320309example
    321310{ "EXAMPLE:"; echo=2;
    322   ring r=32003,(x(1),x(2),x(3)),dp;
     311  ring r=32003,(x(1),x(2),x(3)),ds;
    323312  ideal curve=x(1)*x(2),x(1)*x(3),x(2)*x(3);
    324313  matrix M=isCMcod2(curve);
     
    331320
    332321proc qhmatrix(matrix M)
    333 "USAGE:   @code{qhmatrix(M)};   @code{M} a k x (k+1) matrix
     322"USAGE:   qhmatrix(M);   M a k x (k+1) matrix
    334323RETURN:  list, consisting of an integer vector containing the weights of
    335324         the variables of the basering and an integer matrix giving the
    336          weights of the entries of @code{M}, if @code{M} is quasihomogeneous;
    337          @*zero integer vector and zero integer matrix, if @code{M} is not
     325         weights of the entries of M, if M is quasihomogeneous;
     326         zero integer vector and zero integer matrix, if M is not
    338327         quasihomogeneous, i.e. does not allow row and column weights
    339 EXAMPLE: @code{example qhmatrix}; shows an example
    340 "
     328EXAMPLE: example qhmatrix; shows an example"
    341329{
    342330  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    359347  if ( nc != (nr+1) )
    360348  {
    361     dbprint(p,"//not a k x (k+1) matrix");
    362     return("ERROR");
     349    ERROR("not a k x (k+1) matrix");
    363350  }
    364351  ideal m=minor(M,nr);
     
    512499
    513500proc relweight(matrix N, intmat W, intvec a)
    514 "USAGE:   @code{relweight(N,W,a)}; @code{N} matrix, @code{W} intmat, @code{a} intvec
    515 ASSUME:  @code{N} is a non-zero matrix
    516          @* @code{W} is an integer matrix of the same size as @code{N}
    517          @* @code{a} is an integer vector giving the weights of the variables
    518 RETURN:  integer, @math{max(a-weighted order(N_ij) - W_ij | all entries ij)}
    519          @* string \"ERROR\" if sizes do not match
    520 EXAMPLE: @code{example relweight}; shows an example
    521 "
     501"USAGE:   relweight(N,W,a); N matrix, W intmat, a intvec
     502ASSUME:  N is a non-zero matrix
     503         W is an integer matrix of the same size as N
     504         a is an integer vector giving the weights of the variables
     505RETURN:  integer, max(a-weighted order(N_ij) - W_ij | all entries ij)
     506         string "ERROR" if sizes do not match
     507EXAMPLE: example relweight; shows an example"
    522508{
    523509  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    527513  if ((size(N)!=size(W)) || (ncols(N)!=ncols(W)))
    528514  {
    529     dbprint(p,"//matrix size does not match");
    530     return("ERROR");
     515    ERROR("matrix size does not match");
    531516  }
    532517  if (size(a)!=nvars(basering))
    533518  {
    534     dbprint(p,"//length of weight vector != number of variables");
    535     return("ERROR");
     519    ERROR("length of weight vector != number of variables");
    536520  }
    537521  int i,j,temp;
     
    574558
    575559proc posweight(matrix M, module t1, int choose, list #)
    576 "USAGE:   @code{posweight(M,t1,n[,s])}; @code{M} matrix, @code{t1} module, @code{n} int, @code{s} string
    577          @*@code{n}=0 : all deformations of non-negative weight
    578          @*@code{n}=1 : only non-constant deformations of non-negative weight
    579          @*@code{n}=2 : all deformations of positive weight
    580          @*As an optional parameter the name of a new ring may be
     560"USAGE:   posweight(M,t1,n[,s]); M matrix, t1 module, n int, s string
     561         n=0 : all deformations of non-negative weight
     562         n=1 : only non-constant deformations of non-negative weight
     563         n=2 : all deformations of positive weight
     564         As an optional parameter the name of a new ring may be
    581565         specified.
    582 ASSUME:  @code{M} is a presentation matrix of a Cohen-Macaulay codimension 2
    583          ideal and @code{t1} is a presentation of its T1 space in matrix
    584          notation
     566ASSUME:  M is a presentation matrix of a Cohen-Macaulay codimension 2
     567         ideal and t1 is its T1 space in matrix notation
    585568CREATE:  new basering (default name: rneu); a different name for this ring
    586569         may be given as a 4th parameter
     
    590573NOTE:   The current basering should not contain any variables named
    591574         T(i) where i is some integer!
    592 EXAMPLE: @code{example posweight}; shows an example
    593 "
     575EXAMPLE: example posweight; shows an example"
    594576{
    595577//---------------------------------------------------------------------------
     
    625607    if (jj==-1)
    626608    {
    627       "Your ring contains a variable T(i)!";
    628       return("ERROR");
     609      ERROR("Your ring contains a variable T(i)!");
    629610    }
    630611  }
     
    642623  if ((size(l[1])==1) && (l[1][1]==0) && (size(l[2])==1) && (l[2][1,1]==0))
    643624  {
    644     return("ERROR");
     625    ERROR("Internal Error: Problem determining the weights.");
    645626  }
    646627//---------------------------------------------------------------------------
     
    667648    else
    668649    {
    669       return("ERROR");
     650      ERROR("Internal Error: Problem determining relative weight.");
    670651    }
    671652  }
     
    675656  if(size(rlw)==0)
    676657  {
    677     return("ERROR");
     658    ERROR("Internal Error: Problem determining relative weight.");
    678659  }
    679660  intvec iv=rlw[1..size(rlw)];
     
    726707example
    727708{ "EXAMPLE:"; echo=2;
    728   ring r=32003,(x(1),x(2),x(3)),dp;
     709  ring r=32003,(x(1),x(2),x(3)),ds;
    729710  ideal curve=(x(3)-x(1)^2)*x(3),(x(3)-x(1)^2)*x(2),x(2)^2-x(1)^7*x(3);
    730711  matrix M=isCMcod2(curve);
     
    737718
    738719proc KSpencerKernel(matrix M,list #)
    739 "USAGE:     @code{KSpencerKernel(M[,s][,v])};  @code{M} matrix, @code{s} string, @code{v} intvec
    740            @*optional parameters (please specify in this order, if both are
     720"USAGE:     KSpencerKernel(M[,s][,v]);  M matrix, s string, v intvec
     721           optional parameters (please specify in this order, if both are
    741722           present):
    742            @* *  @code{s} = first of the names of the new rings
    743            @*   e.g. \"R\" leads to ring names R and R1
    744            @* *  @code{v} of size n(n+1) leads to the following module ordering
    745            @*   @code{gen(v[1]) > gen(v[2]) > ... > gen(v[n(n+1)])}
    746            @*   where the matrix entry ij corresponds to @code{gen((i-1)*n+j)}
    747 ASSUME:    @code{M} is a quasihomogeneous n x (n+1) matrix where the n minors
    748            define an isolated space curve singularity
     723           *  s = first of the names of the new rings
     724              e.g. \"R\" leads to ring names R and R1
     725           *  v of size n(n+1) leads to the following module ordering
     726              gen(v[1]) > gen(v[2]) > ... > gen(v[n(n+1)])
     727              where the matrix entry ij corresponds to gen((i-1)*n+j)
     728ASSUME:    M is a quasihomogeneous n x (n+1) matrix where the n minors define
     729           an isolated space curve singularity
    749730CREATE:    2 new rings (default names: rneu and reneu)
    750731           different ring names may be specified as a 2nd parameter
     
    757738           * setting an intvec with 5 entries and name watchProgress
    758739             shows the progress of the computations:
    759            @*  watchProgress[1]>0  => option(prot) in groebner commands
    760            @*  watchProgress[2]>0  => trace output for highcorner
    761            @*  watchProgress[3]>0  => output of deformed matrix
    762            @*  watchProgress[4]>0  => result of elimination step
    763            @*  watchProgress[4]>1  => trace output of multiplications with xyz
    764            @*                         and subsequent reductions
    765            @*  watchProgress[5]>0  => matrix representing the kernel using print
    766 EXAMPLE:   @code{example KSpencerKernel}; shows an example
    767 "
     740             watchProgress[1]>0  => option(prot) in groebner commands
     741             watchProgress[2]>0  => trace output for highcorner
     742             watchProgress[3]>0  => output of deformed matrix
     743             watchProgress[4]>0  => result of elimination step
     744             watchProgress[4]>1  => trace output of multiplications with xyz
     745                                    and subsequent reductions
     746             watchProgress[5]>0  => matrix representing the kernel
     747                                    using print
     748EXAMPLE:   example KSpencerKernel; shows an example"
    768749{
    769750  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    803784  if (nvars(basering) != 3 )
    804785  {
    805     "It should be a curve in 3 space";
    806     return("ERROR");
     786    ERROR("It should be a curve in 3 space");
    807787  }
    808788//---------------------------------------------------------------------------
     
    813793  if ((size(wl)!=2) || ((wl[1]==0) && (wl[2]==0)))
    814794  {
    815     "The matrix was not n x (n+1) or not quasihomogenous";
    816     return("ERROR");
     795    ERROR("The matrix was not n x (n+1) or not quasihomogenous");
    817796  }
    818797  string ringre=" ring r=" + charstr(rt) + ",(x,y,z), Ws(" + string(wl[1]) + ");";
     
    835814  if (dim(std(l[2])) != 0)
    836815  {
    837     "The matrix does not define an isolated space curve singularity";
    838     return("ERROR");
     816    ERROR("The matrix does not define an isolated space curve singularity");
    839817  }
    840818  module t1qh=l[2];
     
    854832  if (jj==-1)
    855833  {
    856     "Your ring contains a variable e(" +string(i)+")!";
    857     return("ERROR");
     834    ERROR("Your ring contains a variable e(i)!");
    858835  }
    859836  if(defined(desiredorder)>1)
     
    933910  if (size(li)<=1)
    934911  {
    935     return("ERROR");
     912    ERROR("Internal Error: Problem determining perturbations of weight > 0.")
    936913  }
    937914  if (defined(watchProgress))
     
    11131090
    11141091proc mod2id(matrix M,intvec vpos)
    1115 "USAGE:     @code{mod2id(M,vpos)}; @code{M} matrix, @code{vpos} intvec
    1116 ASSUME:    @code{vpos} is an integer vector such that @code{gen(i)} corresponds
    1117            to @code{var(vpos[i])}
    1118            @*the basering contains variables @code{var(vpos[i])} which do not
    1119            occur in @code{M}
     1092"USAGE:     mod2id(M,vpos); M matrix, vpos intvec
     1093ASSUME:    vpos is an integer vector such that gen(i) corresponds
     1094           to var(vpos[i])
     1095           the basering contains variables var(vpos[i]) which do not occur
     1096           in M
    11201097NOTE:      this procedure should be used in the following situation:
    11211098           one wants to pass to a ring with new variables, say e(1),..,e(s),
    11221099           which correspond to the components gen(1),..,gen(s) of the
    1123            module @code{M} such that e(i)*e(j)=0 for all i,j
     1100           module M such that e(i)*e(j)=0 for all i,j
    11241101           the new ring should already exist and be the current ring
    1125 RETURN:    ideal i in which each gen(i) from the module is replaced by
    1126            @code{var(vpos[i])} and all monomials @code{var(vpos[i])*var(vpos[j])}
    1127            have been added to the generating set of i
    1128 EXAMPLE:   @code{example mod2id}; shows an example
    1129 "
     1102RETURN:    ideal i in which each gen(i) from the module is replaced by
     1103           var(vpos[i]) and all monomials var(vpos[i])*var(vpos[j]) have
     1104           been added to the generating set of i
     1105EXAMPLE:   example mod2id; shows an example"
    11301106{
    11311107  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    11631139
    11641140proc id2mod(ideal i,intvec vpos)
    1165 "USAGE:     @code{id2mod(I,vpos)}; @code{I} ideal, @code{vpos} intvec
     1141"USAGE:     id2mod(I,vpos); I ideal, vpos intvec
    11661142NOTE:      * use this procedure only makes sense if the ideal contains
    1167              all @code{var(vpos[i])*var(vpos[j])} as monomial generators and
     1143             all var(vpos[i])*var(vpos[j]) as monomial generators and
    11681144             all other generators are linear combinations of the
    1169              @code{var(vpos[i])} over the ring in the other variables
    1170            @* * this is the inverse procedure to @code{mod2id} and should be
    1171              applied only to ideals created by @code{mod2id} using the same
    1172              intvec @code{vpos} (possibly after a standard basis computation)
    1173 RETURN:    module corresponding to the ideal by replacing @code{var(vpos[i])} by
    1174            gen(i) and omitting all generators @code{var(vpos[i])*var(vpos[j])}
    1175 EXAMPLE:   @code{example id2mod}; shows an example"
     1145             var(vpos[i]) over the ring in the other variables
     1146           * this is the inverse procedure to mod2id and should be applied
     1147             only to ideals created by mod2id using the same intvec vpos
     1148             (possibly after a standard basis computation)
     1149RETURN:    module corresponding to the ideal by replacing var(vpos[i]) by
     1150           gen(i) and omitting all generators var(vpos[i])*var(vpos[j])
     1151EXAMPLE:   example id2mod; shows an example"
    11761152{
    11771153  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    12081184
    12091185proc subrInterred(ideal mon, ideal sm, intvec iv)
    1210 "USAGE:    @code{subrInterred(mon,sm,iv)};
    1211           @*@code{sm}:   ideal in a ring r with n + s variables,
     1186"USAGE:    subrInterred(mon,sm,iv);
     1187          sm:   ideal in a ring r with n + s variables,
    12121188                e.g. x_1,..,x_n and t_1,..,t_s
    1213           @*@code{mon}:  ideal with monomial generators (not divisible by
     1189          mon:  ideal with monomial generators (not divisible by
    12141190                one of the t_i) such that sm is contained in the module
    1215                 @code{k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)]}
    1216           @*@code{iv}:   intvec listing the variables which are supposed to be
    1217                 used as x_i
     1191                k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)]
     1192          iv:   intvec listing the variables which are supposed to be used
     1193                as x_i
    12181194RETURN:   interreduced system of generators of sm seen as a submodule
    1219           of @code{k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)]}
    1220 EXAMPLE:  @code{example subrInterred}; shows an example
    1221 "
     1195          of k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)]
     1196EXAMPLE:  example subrInterred; shows an example"
    12221197{
    12231198  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
     
    12361211  if (err==1)
    12371212  {
    1238     "mon has to be generated by monomials";
    1239     return("ERROR");
     1213    ERROR("mon has to be generated by monomials");
    12401214  }
    12411215  intvec sv=sortvec(mon);
     
    12801254    if(sm[i]-dummy[i]!=0)
    12811255    {
    1282       "the second argument is not a submodule of the assumed structure";
    1283       return("ERROR");
     1256      ERROR("the second argument is not a submodule of the assumed structure");
    12841257    }
    12851258  }
     
    13151288}
    13161289////////////////////////////////////////////////////////////////////////
    1317 
Note: See TracChangeset for help on using the changeset viewer.