Index: Singular/LIB/spcurve.lib
===================================================================
--- Singular/LIB/spcurve.lib	(revision 5909989d37a53ff85938a4254092415537555abb)
+++ Singular/LIB/spcurve.lib	(revision 8893c4b18dc23caf911d7ec697a8a89d60b36248)
@@ -1,7 +1,7 @@
-// $Id: spcurve.lib,v 1.10 2000-12-07 14:29:52 Singular Exp $
+// $Id: spcurve.lib,v 1.11 2000-12-12 13:50:46 anne Exp $
 // (anne, last modified 31.5.99)
 /////////////////////////////////////////////////////////////////////////////
 
-version="$Id: spcurve.lib,v 1.10 2000-12-07 14:29:52 Singular Exp $";
+version="$Id: spcurve.lib,v 1.11 2000-12-12 13:50:46 anne Exp $";
 info="
 LIBRARY: spcurve.lib    PROCEDURES FOR CM CODIMENSION 2 SINGULARITIES
@@ -18,7 +18,4 @@
  posweight(M,T1,i);      deformation of coker(M) of non-negative weight
  KSpencerKernel(M);      kernel of the Kodaira-Spencer map
- mod2id(M,iv);           conversion of a module M to an ideal
- id2mod(i,iv);           conversion inverse to mod2id
- subrInterred(i1,i2,iv)  interred w.r.t. a subset of variables
 ";
 
@@ -1089,201 +1086,2 @@
 ///////////////////////////////////////////////////////////////////////////
 
-proc mod2id(matrix M,intvec vpos)
-"USAGE:     mod2id(M,vpos); M matrix, vpos intvec
-ASSUME:    vpos is an integer vector such that gen(i) corresponds
-           to var(vpos[i])
-           the basering contains variables var(vpos[i]) which do not occur
-           in M
-NOTE:      this procedure should be used in the following situation:
-           one wants to pass to a ring with new variables, say e(1),..,e(s),
-           which correspond to the components gen(1),..,gen(s) of the
-           module M such that e(i)*e(j)=0 for all i,j
-           the new ring should already exist and be the current ring
-RETURN:    ideal i in which each gen(i) from the module is replaced by
-           var(vpos[i]) and all monomials var(vpos[i])*var(vpos[j]) have
-           been added to the generating set of i
-EXAMPLE:   example mod2id; shows an example"
-{
-  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
-//----------------------------------------------------------------------
-// define the ideal generated by the var(vpos[i]) and set up the matrix
-// for the multiplication
-//----------------------------------------------------------------------
-  ideal vars=var(vpos[1]);
-  for(int i=2;i<=size(vpos);i++)
-  {
-    vars=vars,var(vpos[i]);
-  }
-  matrix varm[1][size(vpos)]=vars;
-  if (size(vpos) > nrows(M))
-  {
-    matrix Mt[size(vpos)][ncols(M)];
-    Mt[1..nrows(M),1..ncols(M)]=M;
-    kill M;
-    matrix M=Mt;
-  }
-//----------------------------------------------------------------------
-// define the desired ideal
-//----------------------------------------------------------------------
-  ideal ret=vars^2,varm*M;
-  return(ret);
-}
-example
-{ "EXAMPLE:"; echo=2;
-  ring r=0,(e(1),e(2),x,y,z),(dp(2),ds(3));
-  module mo=x*gen(1)+y*gen(2);
-  intvec iv=2,1;
-  mod2id(mo,iv);
-}
-////////////////////////////////////////////////////////////////////////
-
-proc id2mod(ideal i,intvec vpos)
-"USAGE:     id2mod(I,vpos); I ideal, vpos intvec
-NOTE:      * use this procedure only makes sense if the ideal contains
-             all var(vpos[i])*var(vpos[j]) as monomial generators and
-             all other generators are linear combinations of the
-             var(vpos[i]) over the ring in the other variables
-           * this is the inverse procedure to mod2id and should be applied
-             only to ideals created by mod2id using the same intvec vpos
-             (possibly after a standard basis computation)
-RETURN:    module corresponding to the ideal by replacing var(vpos[i]) by
-           gen(i) and omitting all generators var(vpos[i])*var(vpos[j])
-EXAMPLE:   example id2mod; shows an example"
-{
-  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
-//---------------------------------------------------------------------
-// Initialization
-//---------------------------------------------------------------------
-  int n=size(i);
-  int v=size(vpos);
-  matrix tempmat;
-  matrix mm[v][n];
-//---------------------------------------------------------------------
-// Conversion
-//---------------------------------------------------------------------
-  for(int j=1;j<=v;j++)
-  {
-    tempmat=coeffs(i,var(vpos[j]));
-    mm[j,1..n]=tempmat[2,1..n];
-  }
-  for(j=1;j<=v;j++)
-  {
-    mm=subst(mm,var(vpos[j]),0);
-  }
-  module ret=simplify(mm,10);
-  return(ret);
-}
-example
-{ "EXAMPLE:"; echo=2;
-  ring r=0,(e(1),e(2),x,y,z),(dp(2),ds(3));
-  ideal i=e(2)^2,e(1)*e(2),e(1)^2,e(1)*y+e(2)*x;
-  intvec iv=2,1;
-  id2mod(i,iv);
-}
-///////////////////////////////////////////////////////////////////////
-
-proc subrInterred(ideal mon, ideal sm, intvec iv)
-"USAGE:    subrInterred(mon,sm,iv);
-          sm:   ideal in a ring r with n + s variables,
-                e.g. x_1,..,x_n and t_1,..,t_s
-          mon:  ideal with monomial generators (not divisible by
-                one of the t_i) such that sm is contained in the module
-                k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)]
-          iv:   intvec listing the variables which are supposed to be used
-                as x_i
-RETURN:   interreduced system of generators of sm seen as a submodule
-          of k[t_1,..,t_s]*mon[1]+..+k[t_1,..,t_s]*mon[size(mon)]
-EXAMPLE:  example subrInterred; shows an example"
-{
-  int p = printlevel-voice+3;  // p=printlevel+1 (default: p=1)
-//-----------------------------------------------------------------------
-// check that mon is really generated by monomials
-// and sort its generators with respect to the monomial ordering
-//-----------------------------------------------------------------------
-  int err;
-  for(int i=1;i<=ncols(mon);i++)
-  {
-    if ( size(mon[i]) > 1 )
-    {
-      err=1;
-    }
-  }
-  if (err==1)
-  {
-    ERROR("mon has to be generated by monomials");
-  }
-  intvec sv=sortvec(mon);
-  ideal mons;
-  for(i=1;i<=size(sv);i++)
-  {
-    mons[i]=mon[sv[i]];
-  }
-  ideal itemp=maxideal(1);
-  for(i=1;i<=size(iv);i++)
-  {
-    itemp=subst(itemp,var(iv[i]),0);
-  }
-  itemp=simplify(itemp,10);
-  def r=basering;
-  string tempstr="ring rtemp=" + charstr(basering) + ",(" + string(itemp)
-                               + "),(C,dp);";
-//-----------------------------------------------------------------------
-// express m in terms of the generators of mon and check whether m
-// can be considered as a submodule of k[t_1,..,t_n]*mon
-//-----------------------------------------------------------------------
-  module motemp;
-  motemp[ncols(sm)]=0;
-  poly ptemp;
-  int j;
-  for(i=1;i<=ncols(mons);i++)
-  {
-    for(j=1;j<=ncols(sm);j++)
-    {
-      ptemp=sm[j]/mons[i];
-      motemp[j]=motemp[j]+ptemp*gen(i);
-    }
-  }
-  for(i=1;i<=size(iv);i++)
-  {
-    motemp=subst(motemp,var(iv[i]),0);
-  }
-  matrix monmat[1][ncols(mons)]=mons;
-  ideal dummy=monmat*motemp;
-  for(i=1;i<=size(sm);i++)
-  {
-    if(sm[i]-dummy[i]!=0)
-    {
-      ERROR("the second argument is not a submodule of the assumed structure");
-    }
-  }
-//----------------------------------------------------------------------
-// do the interreduction and convert back
-//----------------------------------------------------------------------
-  execute(tempstr);
-  def motemp=imap(r,motemp);
-  motemp=interred(motemp);
-  setring r;
-  kill motemp;
-  def motemp=imap(rtemp,motemp);
-  list ret=monmat,motemp,monmat*motemp;
-  for(i=1;i<=ncols(ret[2]);i++)
-  {
-    ret[2][i]=cleardenom(ret[2][i]);
-  }
-  for(i=1;i<=ncols(ret[3]);i++)
-  {
-    ret[3][i]=cleardenom(ret[3][i]);
-  }
-  return(ret);
-}
-example
-{ "EXAMPLE:"; echo=2;
-  ring r=0,(x,y,z),dp;
-  ideal i=x^2+x*y^2,x*y+x^2*y,z;
-  ideal j=x^2+x*y^2,x*y,z;
-  ideal mon=x^2,z,x*y;
-  intvec iv=1,3;
-  subrInterred(mon,i,iv);
-  subrInterred(mon,j,iv);
-}
-////////////////////////////////////////////////////////////////////////
