Changeset 3939bc in git


Ignore:
Timestamp:
May 29, 1998, 5:02:06 PM (26 years ago)
Author:
Hans Schönemann <hannes@…>
Branches:
(u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
Children:
1d4300694bf8c8b67ec71e837ab58b13264fedf7
Parents:
311499b3c35b89d435a5b5b44c51e0ace5b13c6c
Message:
* hannes: changed res->nres, resu->res


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

Legend:

Unmodified
Added
Removed
  • Singular/ChangeLog

    r311499 r3939bc  
     1Fri May 29 17:00:27 MET DST 1998 hannes
     2        * change res to nres (cmd), resu to res(standard.lib)
     3          including changes to libs, docs (partially)
    14Wed May 27 19:13:10 MET DST 1998 hannes
    25        * removed #define HAVE_GMP and non-gmp-parts
  • Singular/LIB/deform.lib

    r311499 r3939bc  
    1 // $Id: deform.lib,v 1.11 1998-05-14 18:44:57 Singular Exp $
     1// $Id: deform.lib,v 1.12 1998-05-29 15:01:55 Singular 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.11 1998-05-14 18:44:57 Singular Exp $";
     5version="$Id: deform.lib,v 1.12 1998-05-29 15:01:55 Singular Exp $";
    66info="
    77LIBRARY:  deform.lib       PROCEDURES FOR COMPUTING MINIVERSAL DEFORMATION
     
    579579   matrix M0,M1,M2,ker,kb1,lift1,kb2,A,B,C,D;
    580580//------- resM ---------------------------------------------------------------
    581    list resM = res(Mo,3);
     581   list resM = nres(Mo,3);
    582582   M0 = resM[1];
    583583   M1 = resM[2];
  • Singular/LIB/fastsolv.lib

    r311499 r3939bc  
    11//
    2 version="$Id: fastsolv.lib,v 1.4 1998-05-14 18:44:59 Singular Exp $";
     2version="$Id: fastsolv.lib,v 1.5 1998-05-29 15:01:56 Singular Exp $";
    33info="";
    44
     
    181181     if (#[4]==1)
    182182     {
    183        mres(@a,1,@a0);
    184        @a=@a0(1);
     183       @a=mres(@a,1)[1];
    185184     }
    186185     return(@a);
     
    229228   if (#[4]==1)
    230229   {
    231      mres(@b,1,@b0);
    232      @b=@b0(1);
     230     @b=mres(@b,1)[1];
    233231   }
    234232
  • Singular/LIB/finvar.lib

    r311499 r3939bc  
    1 // $Id: finvar.lib,v 1.11 1998-05-14 18:45:00 Singular Exp $
     1// $Id: finvar.lib,v 1.12 1998-05-29 15:01:57 Singular Exp $
    22// author: Agnes Eileen Heydtmann, email:agnes@math.uni-sb.de
    33// last change: 3.5.98
    44//////////////////////////////////////////////////////////////////////////////
    5 version="$Id: finvar.lib,v 1.11 1998-05-14 18:45:00 Singular Exp $"
     5version="$Id: finvar.lib,v 1.12 1998-05-29 15:01:57 Singular Exp $"
    66info="
    77LIBRARY:  finvar.lib       LIBRARY TO CALCULATE INVARIANT RINGS & MORE
     
    50815081    M(1)[i,1..k]=B[1..k];              // we will look for the syzygies of M(1)
    50825082  }
    5083   module M(2)=res(M(1),2)[2];
     5083  module M(2)=nres(M(1),2)[2];
    50845084  int m=ncols(M(2));                   // number of generators of the module
    50855085                                       // M(2) -
  • Singular/LIB/homolog.lib

    r311499 r3939bc  
    1 // $Id: homolog.lib,v 1.6 1998-05-05 11:55:28 krueger Exp $
     1// $Id: homolog.lib,v 1.7 1998-05-29 15:01:58 Singular Exp $
    22//(BM/GMG, last modified 22.06.96)
    33///////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: homolog.lib,v 1.6 1998-05-05 11:55:28 krueger Exp $";
     5version="$Id: homolog.lib,v 1.7 1998-05-29 15:01:58 Singular Exp $";
    66info="
    77LIBRARY:  homolog.lib   PROCEDURES FOR HOMOLOGICAL ALGEBRA
     
    5656//apply Hom(-,M) and compute the Ext's
    5757//-----------------------------------------------------------------------------
    58    list resM = res(M,3);
     58   list resM = nres(M,3);
    5959   M1 = resM[2];
    6060   M2 = resM[3];
     
    241241//                     N<--G(0)<--- ...  <---G(q+1)
    242242//-----------------------------------------------------------------------------
    243    list resM = res(M,p+q+1);
     243   list resM = nres(M,p+q+1);
    244244   M1 = resM[p];
    245245   M2 = resM[p+1];
    246    list resN = res(N,q+1);
     246   list resN = nres(N,q+1);
    247247   N1 = resN[q];
    248248   N2 = resN[q+1];
  • Singular/LIB/matrix.lib

    r311499 r3939bc  
    1 // $Id: matrix.lib,v 1.7 1998-05-14 18:45:10 Singular Exp $
     1// $Id: matrix.lib,v 1.8 1998-05-29 15:01:59 Singular Exp $
    22// (GMG/BM, last modified 22.06.96)
    33///////////////////////////////////////////////////////////////////////////////
    44
    5 version="$Id: matrix.lib,v 1.7 1998-05-14 18:45:10 Singular Exp $";
     5version="$Id: matrix.lib,v 1.8 1998-05-29 15:01:59 Singular Exp $";
    66info="
    77LIBRARY:  matrix.lib    PROCEDURES FOR MATRIX OPERATIONS
     
    233233   ring r=32003,(x,y,z),ds;
    234234   ideal i=x4+y5+z6,xyz,yx2+xz2+zy7;
    235    list L=res(i,0);
     235   list L=nres(i,0);
    236236   is_complex(L);
    237237   L[4]=matrix(i);
  • Singular/LIB/primdec.lib

    r311499 r3939bc  
    1 // $Id: primdec.lib,v 1.20 1998-05-20 13:03:56 schmidt Exp $
     1// $Id: primdec.lib,v 1.21 1998-05-29 15:02:00 Singular Exp $
    22////////////////////////////////////////////////////////////////////////////////
    33// primdec.lib                                                                //
     
    88// algorithms for primary decomposition based on                              //
    99// the ideas of Shimoyama/Yokoyama                                            //
    10 // written by Wolfram Decker and Hans Schoenemann                             // 
     10// written by Wolfram Decker and Hans Schoenemann                             //
    1111////////////////////////////////////////////////////////////////////////////////
    1212
    13 version="$Id: primdec.lib,v 1.20 1998-05-20 13:03:56 schmidt Exp $";
     13version="$Id: primdec.lib,v 1.21 1998-05-29 15:02:00 Singular Exp $";
    1414info="
    1515LIBRARY: primdec.lib: PROCEDURE FOR PRIMARY DECOMPOSITION
     
    193193   ideal fac=tsil[2];
    194194   poly f=tsil[3];
    195    
     195
    196196   ideal star=quotient(laedi,f);
    197197   action=1;
     
    208208        g=1;
    209209        verg=laedi;
    210        
     210
    211211         for(j=1;j<=size(fac);j++)
    212212         {
     
    217217         }
    218218         verg=quotient(laedi,g);
    219          
     219
    220220         if(specialIdealsEqual(verg,star)==1)
    221221         {
     
    231231      }
    232232   }
    233    l=star,fac,f;   
     233   l=star,fac,f;
    234234   return(l);
    235235}
     
    239239{
    240240  poly keep=p;
    241  
     241
    242242   int i;
    243243   poly q=act[1][1]^act[2][1];
     
    252252      "ERROR IN FACTOR";
    253253      basering;
    254      
     254
    255255      act;
    256256      keep;
    257257      pause;
    258      
     258
    259259      p;
    260260      q;
     
    478478         m=m-1;
    479479      }
    480       //check whether i[m] =(c*var(n)+h)^e modulo prm for some 
     480      //check whether i[m] =(c*var(n)+h)^e modulo prm for some
    481481      //h in K[var(n+1),...,var(nvars(basering))], c in K
    482482      //if not (0) is returned, else var(n)+h is added to prm
     
    655655   {
    656656     attrib(l[2*i-1],"isSB",1);
    657      
     657
    658658     if((size(ser)>0)&&(size(reduce(ser,l[2*i-1],1))==0)&&(deg(l[2*i-1][1])>0))
    659659     {
    660660       "Achtung in split";
    661        
     661
    662662         l[2*i-1]=ideal(1);
    663663         l[2*i]=ideal(1);
     
    724724     return(primary);
    725725  }
    726  
    727   j=interred(j); 
     726
     727  j=interred(j);
    728728  attrib(j,"isSB",1);
    729729  if(vdim(j)==deg(j[1]))
    730   {   
     730  {
    731731     act=factor(j[1]);
    732732     for(@k=1;@k<=size(act[1]);@k++)
     
    746746       primary[2*@k]=interred(@qh);
    747747       attrib( primary[2*@k-1],"isSB",1);
    748        
     748
    749749       if((size(ser)>0)&&(size(reduce(ser,primary[2*@k-1],1))==0))
    750750       {
    751751          primary[2*@k-1]=ideal(1);
    752           primary[2*@k]=ideal(1);         
     752          primary[2*@k]=ideal(1);
    753753       }
    754754     }
     
    824824  }
    825825  else
    826   { 
     826  {
    827827     primary[1]=j;
    828828     if((size(#)>0)&&(act[2][1]>1))
     
    843843  if(size(#)==0)
    844844  {
    845    
     845
    846846     primary=splitPrimary(primary,ser,@wr,act);
    847      
     847
    848848  }
    849849
     
    868868    }
    869869  }
    870    
     870
    871871  @k=0;
    872872  ideal keep;
     
    894894                    jmap2[zz]=primary[2*@k-1][@n];
    895895                    @qht[@n]=var(zz);
    896                      
     896
    897897                }
    898898             }
     
    906906       phi1=@P,jmap1;
    907907       phi=@P,jmap;
    908  
     908
    909909       for(@n=1;@n<=nva;@n++)
    910910       {
     
    915915
    916916       @qh=phi(@qht);
    917        
     917
    918918       if(npars(@P)>0)
    919919       {
     
    943943       kill @Phelp1;
    944944       @qh=clearSB(@qh);
    945        attrib(@qh,"isSB",1);       
     945       attrib(@qh,"isSB",1);
    946946       ser1=phi1(ser);
    947947       @lh=zero_decomp (@qh,phi(ser1),@wr);
    948948//       @lh=zero_decomp (@qh,psi(ser),@wr);
    949        
    950        
     949
     950
    951951       kill lres0;
    952952       list lres0;
     
    15471547   map phi=@P,qr[2];
    15481548   i=qr[1];
    1549    
     1549
    15501550   execute "ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),("
    15511551             +ordstr(basering)+");";
     
    17881788      }
    17891789  }
    1790  
     1790
    17911791  homo=homog(i);
    1792  
     1792
    17931793  if(homo==1)
    17941794  {
     
    18371837  option(redSB);
    18381838
    1839   ideal ser=fetch(@P,ser); 
     1839  ideal ser=fetch(@P,ser);
    18401840
    18411841  if(homo==1)
     
    18911891    }
    18921892  }
    1893  
     1893
    18941894  //----------------------------------------------------------------
    18951895  //j is the ring
     
    19291929     return(primary);
    19301930  }
    1931  
     1931
    19321932 //------------------------------------------------------------------
    19331933 //the zero-dimensional case
     
    19831983      indep=maxIndependSet(@j);
    19841984   }
    1985  
     1985
    19861986  ideal jkeep=@j;
    19871987
     
    20072007      ideal jwork=std(imap(gnir,@j),@hilb);
    20082008    }
    2009    
     2009
    20102010  }
    20112011  else
     
    20182018  di=dim(jwork);
    20192019  keepdi=di;
    2020  
     2020
    20212021  setring gnir;
    20222022  for(@m=1;@m<=size(indep);@m++)
     
    20342034        attrib(@j,"isSB",1);
    20352035        ideal ser=fetch(gnir,ser);
    2036        
     2036
    20372037     }
    20382038     else
     
    20512051        }
    20522052        ideal ser=phi(ser);
    2053        
    2054      }
    2055      option(noredSB);     
     2053
     2054     }
     2055     option(noredSB);
    20562056     if((deg(@j[1])==0)||(dim(@j)<jdim))
    20572057     {
     
    21092109        }
    21102110        //the primary decomposition of j*K(var(nnp+1),..,var(nva))[..the rest..]
    2111         option(redSB);       
     2111        option(redSB);
    21122112        list uprimary= zero_decomp(@j,ser,@wr);
    21132113        option(noredSB);
     
    21712171     //mentioned above is really computed
    21722172     for(@n=@n3/2+1;@n<=@n2/2;@n++)
    2173      {       
     2173     {
    21742174        if(specialIdealsEqual(quprimary[2*@n-1],quprimary[2*@n]))
    21752175        {
     
    21862186        }
    21872187     }
    2188    
     2188
    21892189     if(size(@h)>0)
    21902190     {
     
    21962196        if(@wr!=1)
    21972197        {
    2198           @q=minSat(jwork,@h)[2];   
     2198          @q=minSat(jwork,@h)[2];
    21992199        }
    22002200        else
     
    22162216        }
    22172217        jwork=std(jwork,@q);
    2218         keepdi=dim(jwork);       
     2218        keepdi=dim(jwork);
    22192219        if(keepdi<di)
    22202220        {
     
    22412241  {
    22422242    keepdi=di-1;
    2243   } 
     2243  }
    22442244  //---------------------------------------------------------------
    22452245  //notice that j=sat(j,gh) intersected with (j,gh^n)
     
    22722272
    22732273        if(size(ser)>0)
    2274         { 
    2275            ser=intersect(htest,ser); 
     2274        {
     2275           ser=intersect(htest,ser);
    22762276        }
    22772277        else
    22782278        {
    22792279          ser=htest;
    2280         } 
     2280        }
    22812281        setring gnir;
    22822282        ser=imap(@Phelp,ser);
    22832283     }
    22842284     if(size(reduce(ser,peek,1))!=0)
    2285      {       
     2285     {
    22862286        for(@m=1;@m<=size(restindep);@m++)
    22872287        {
    22882288         // if(restindep[@m][3]>=keepdi)
    2289          // { 
     2289         // {
    22902290           isat=0;
    22912291           @n2=0;
    22922292           option(redSB);
    2293            
     2293
    22942294           if(restindep[@m][1]==varstr(basering))
    22952295           //this is the good case, nothing to do, just to have the same notations
     
    23182318           }
    23192319           option(noredSB);
    2320            
     2320
    23212321           for (lauf=1;lauf<=size(@j);lauf++)
    23222322           {
     
    23672367           }
    23682368           //the primary decomposition of j*K(var(nnp+1),..,var(nva))[..the rest..]
    2369            
     2369
    23702370           option(redSB);
    23712371           list uprimary= zero_decomp(@j,ser,@wr);
    23722372           option(noredSB);
    2373            
    2374            
     2373
     2374
    23752375           //we need the intersection of the ideals in the list quprimary with the
    23762376           //polynomialring, i.e. let q=(f1,...,fr) in the quotientring such an ideal
     
    24072407           @n2=size(quprimary);
    24082408           @n3=@n2;
    2409            
     2409
    24102410           for(@n1=1;@n1<=size(collectprimary)/2;@n1++)
    24112411           {
     
    24202420              }
    24212421           }
    2422            
    2423            
     2422
     2423
    24242424           //here the intersection with the polynomialring
    24252425           //mentioned above is really computed
     
    24602460              ser=imap(@Phelp,ser);
    24612461           }
    2462            
     2462
    24632463         // }
    2464         }             
     2464        }
    24652465        if(size(reduce(ser,peek,1))!=0)
    24662466        {
     
    24822482        }
    24832483     }
    2484      
     2484
    24852485   }
    24862486  //------------------------------------------------------------
     
    24882488  //the final result: primary
    24892489  //------------------------------------------------------------
    2490  
     2490
    24912491  setring @P;
    24922492  primary=imap(gnir,quprimary);
     
    25202520   return(phi(j));
    25212521}
    2522  
     2522
    25232523
    25242524///////////////////////////////////////////////////////////////////////////////
     
    25342534      return(ideal(0));
    25352535   }
    2536    
     2536
    25372537   def  @P = basering;
    25382538   list indep,allindep,restindep,fett,@mu;
     
    25942594
    25952595      return(ideal(@p));
    2596    }   
     2596   }
    25972597   //------------------------------------------------------------------
    25982598   //the case of a complete intersection
     
    26102610   if (jdim==0)
    26112611   {
    2612       @j1=finduni(@j); 
     2612      @j1=finduni(@j);
    26132613      for(@k=1;@k<=size(@j1);@k++)
    26142614      {
     
    26252625      return(@j);
    26262626   }
    2627  
     2627
    26282628   //------------------------------------------------------------------
    26292629   //search for a maximal independent set indep,i.e.
     
    26342634
    26352635   indep=maxIndependSet(@j);
    2636  
     2636
    26372637   di=dim(@j);
    26382638
     
    27632763      {
    27642764         fac=ideal(0);
    2765          for(lauf=1;lauf<=ncols(@h);lauf++)   
     2765         for(lauf=1;lauf<=ncols(@h);lauf++)
    27662766         {
    27672767            if(deg(@h[lauf])>0)
     
    27772777         }
    27782778
    2779        
     2779
    27802780         @mu=mstd(quotient(@j+ideal(@q),rad));
    27812781         @j=@mu[1];
    27822782         attrib(@j,"isSB",1);
    2783        
     2783
    27842784      }
    27852785      if((deg(rad[1])>0)&&(deg(collectrad[1])>0))
     
    27962796
    27972797      te=simplify(reduce(te*rad,@j),2);
    2798  
     2798
    27992799      if((dim(@j)<di)||(size(te)==0))
    28002800      {
     
    28102810   {
    28112811      return(rad);
    2812    }   
     2812   }
    28132813  // rad=intersect(rad,radicalKL(@mu,rad,@wr));
    28142814   rad=intersect(rad,radicalKL(@mu,ideal(1),@wr));
     
    28292829      il=#[1];
    28302830   }
    2831    
     2831
    28322832   option(redSB);
    28332833   list m=mstd(i);
     
    28462846        return(quotient(I,J));
    28472847      }
    2848    
     2848
    28492849      for(l=1;l<=cod;l++)
    28502850      {
     
    28642864         if(il==1)
    28652865         {
    2866      
     2866
    28672867            return(radI1);
    28682868         }
     
    28742874            return(radI1);
    28752875         }
    2876          return(intersect(radI1,radicalEHV(I2,re,il)));       
     2876         return(intersect(radI1,radicalEHV(I2,re,il)));
    28772877      }
    28782878   }
     
    29042904  }
    29052905  return(ann);
    2906 } 
    2907  
     2906}
     2907
    29082908///////////////////////////////////////////////////////////////////////////////
    29092909
     
    29152915  {
    29162916     matrix f=transpose(re[n+1]);      //Hom(_,R)
    2917      module k=res(f,2)[2];             //the kernel
     2917     module k=nres(f,2)[2];            //the kernel
    29182918     matrix g=transpose(re[n]);        //the image of Hom(_,R)
    29192919
     
    29242924     ideal ann=Ann(transpose(re[n]));
    29252925  }
    2926   return(ann);           
     2926  return(ann);
    29272927}
    29282928///////////////////////////////////////////////////////////////////////////////
     
    29372937      re=intersect1(re,quotient(a,module(b[i])));
    29382938   }
    2939    return(re);   
     2939   return(re);
    29402940}
    29412941
     
    29442944
    29452945proc analyze(list pr)
    2946 { 
     2946{
    29472947   int ii,jj;
    29482948   for(ii=1;ii<=size(pr)/2;ii++)
     
    29642964         }
    29652965      }
    2966    }   
     2966   }
    29672967}
    29682968
     
    29762976{
    29772977  def r=basering;
    2978  
     2978
    29792979  int j,k;
    29802980  map phi;
    29812981  poly p;
    2982  
     2982
    29832983  ideal iwork=i;
    29842984  ideal imap1=maxideal(1);
    29852985  ideal imap2=maxideal(1);
    2986  
     2986
    29872987
    29882988  for(j=1;j<=nvars(basering);j++)
     
    29992999        iwork[k]=var(j);
    30003000        imap1=maxideal(1);
    3001         imap2[j]=-p;       
     3001        imap2[j]=-p;
    30023002        break;
    30033003      }
     
    30073007}
    30083008
    3009        
     3009
    30103010///////////////////////////////////////////////////////
    30113011// ini_mod
     
    36053605            }
    36063606        }
    3607         dimSP=dim(SP);
     3607        dimSP=dim(SP);
    36083608        for(j=size(m);j>=1; j--)
    36093609        {
     
    38023802      {
    38033803        f=polys[k];
    3804         degf=deg(f);
     3804        degf=deg(f);
    38053805      }
    38063806    }
     
    40124012   return(0);
    40134013}
    4014        
    4015        
     4014
     4015
    40164016proc quotient2(module a,module b)
    40174017{
     
    40304030  setring @newP;
    40314031 ideal re=imap(@newr,re);
    4032  return(re);   
     4032 return(re);
    40334033}
    40344034///////////////////////////////////////////////////////////////////////////////
     
    40434043      re[i]=he;
    40444044   }
    4045    return(re);   
     4045   return(re);
    40464046}
    40474047///////////////////////////////////////////////////////////////////////////////
     
    40564056      re[2*i]=l[i][2];
    40574057   }
    4058    return(re);   
     4058   return(re);
    40594059}
    40604060
     
    40664066
    40674067proc primdecGTZ(ideal i)
    4068 "USAGE:  primdecGTZ(i); i ideal 
    4069 RETURN:  list = list of primary ideals 
     4068"USAGE:  primdecGTZ(i); i ideal
     4069RETURN:  list = list of primary ideals
    40704070                and their associated primes
    40714071NOTE:    Algorithm of Gianni, Traeger, Zacharias
     
    40874087
    40884088proc primdecSY(ideal i)
    4089 "USAGE:  primdecSY(i); i ideal 
    4090 RETURN:  list = list of primary ideals 
     4089"USAGE:  primdecSY(i); i ideal
     4090RETURN:  list = list of primary ideals
    40914091                and their associated primes
    40924092NOTE:    Algorithm of Shimoyama-Yokoyama
     
    41494149proc equiRadical(ideal i)
    41504150"USAGE:  equiRadical(i); i ideal
    4151 RETURN:  ideal = the intersection of associated primes 
     4151RETURN:  ideal = the intersection of associated primes
    41524152         of i of dimension of i
    41534153NOTE:
     
    41704170"USAGE:  radical(i); i ideal
    41714171RETURN:  ideal = the radical of i
    4172 NOTE:    a combination of the algorithms of Krick/Logar 
     4172NOTE:    a combination of the algorithms of Krick/Logar
    41734173         and Eisenbud/Huneke/Vasconcelos
    41744174EXAMPLE: example radical; shows an example
     
    41794179   if(size(#)>0)
    41804180   {
    4181      il=#[1]; 
     4181     il=#[1];
    41824182   }
    41834183   ideal re=1;
     
    41864186   map phi=@P,qr[2];
    41874187   i=qr[1];
    4188    
     4188
    41894189   list pr=facstd(i);
    41904190
     
    42234223     int odim=dim(pr[1]);
    42244224     int count=1;
    4225    
     4225
    42264226     for(j=2;j<=s;j++)
    42274227     {
     
    42814281  else
    42824282  {
    4283      list re=mres(i,0);             
    4284   } 
     4283    list re=mres(i,0);
     4284  }
    42854285  for(e=cod;e<=nvars(basering);e++)
    42864286  {
     
    42934293  }
    42944294  return(er);
    4295 } 
     4295}
    42964296example
    42974297{ "EXAMPLE:";  echo = 2;
     
    43064306proc testPrimary(list pr, ideal k)
    43074307"USAGE:   testPrimary(pr,k) pr=primdecGTZ(k) or primdecSY(k)
    4308 RETURN:   int = 1, if the intersection of the primary ideals 
     4308RETURN:   int = 1, if the intersection of the primary ideals
    43094309                in pr is k, 0 if not
    43104310NOTE:
  • Singular/LIB/sing.lib

    r311499 r3939bc  
    1 // $Id: sing.lib,v 1.11 1998-05-14 18:45:16 Singular Exp $
     1// $Id: sing.lib,v 1.12 1998-05-29 15:02:01 Singular Exp $
    22//system("random",787422842);
    33//(GMG/BM, last modified 26.06.96)
    44///////////////////////////////////////////////////////////////////////////////
    55
    6 version="$Id: sing.lib,v 1.11 1998-05-14 18:45:16 Singular Exp $";
     6version="$Id: sing.lib,v 1.12 1998-05-29 15:02:01 Singular Exp $";
    77info="
    88LIBRARY:  sing.lib      PROCEDURES FOR SINGULARITIES
     
    539539//--------------------------- presentation of J -------------------------------
    540540   int rk;
    541   def P = basering;
     541   def P = basering;
    542542   module jac, t1;
    543543   jac  = jacob(J);                 // jacobian matrix of J converted to module
    544    res(J,2,A);                      // compute presentation of J
    545                                     // A(2) = 1st syzygy module of J
     544   list A=nres(J,2);                // compute presentation of J
     545   def A(1..2)=A[1..2]; kill A;     // A(2) = 1st syzygy module of J
    546546//---------- go to quotient ring mod J and compute normal bundle --------------
    547   qring  R    = std(J);
     547   qring  R    = std(J);
    548548   module jac = fetch(P,jac);
    549549   module t1  = transpose(fetch(P,A(2)));
    550    res(t1,2,B);                     // resolve t1, B(2)=(J/J^2)*=normal_bdl
     550   list B=nres(t1,2,B);             // resolve t1, B(2)=(J/J^2)*=normal_bdl
     551   def B(1..2)=B[1..2]; kill B;
    551552   t1         = modulo(B(2),jac);   // pres. of normal_bdl/trivial_deformations
    552553   rk=nrows(t1);
    553554//-------------------------- pull back to basering ----------------------------
    554   setring P;
     555   setring P;
    555556   t1 = fetch(R,t1)+J*freemodule(rk);  // T1-module, presentation of T1
    556557   t1 = std(t1);
     
    609610   int n,rk;
    610611//------------------- presentation of non-trivial syzygies --------------------
    611    res(J,2,A);                            // resolve J, A(2)=syz
     612   list A=nres(J,2);                      // resolve J, A(2)=syz
     613   def A(1..2)=A[1..2]; kill A;
    612614   kos  = koszul(2,J);                    // module of Koszul relations
    613615   SK   = modulo(A(2),kos);               // presentation of syz/kos
     
    615617//?*** sollte bei der Berechnung von res mit anfallen, zu aendern!!
    616618//---------------------- fetch to quotient ring mod J -------------------------
    617   qring R = J0;                           // make P/J the basering
     619   qring R = J0;                          // make P/J the basering
    618620   module A2' = transpose(fetch(P,A(2))); // dual of syz
    619621   module t2  = transpose(fetch(P,SK));   // dual of syz/kos
    620    res(t2,2,B);                           // resolve (syz/kos)*
     622   list B=nres(t2,2);                     // resolve (syz/kos)*
     623   def B(1..2)=B[1..2]; kill B;
    621624   t2 = modulo(B(2),A2');                 // presentation of T2
    622625   rk = nrows(t2);
    623626//---------------------  fetch back to basering -------------------------------
    624   setring P;
     627   setring P;
    625628   t2 = fetch(R,t2)+J*freemodule(rk);
    626629   t2 = std(t2);
     
    683686   ideal  i0 = std(i);
    684687//-------------------- presentation of non-trivial syzygies -------------------
    685    list I= res(i,2);                            // resolve i
     688   list I= nres(i,2);                           // resolve i
    686689   Syz  = matrix(I[2]);                         // syz(i)
    687690   jac = jacob(i);                              // jacobi ideal
     
    693696   matrix No  = transpose(fetch(P,Syz));        // ker(No) = Hom(syz,Ox)
    694697   module So  = transpose(fetch(P,SK));         // Hom(syz/kos,R)
    695    list resS  = res(So,2);
     698   list resS  = nres(So,2);
    696699   matrix Sx  = resS[2];
    697    list resN  = res(No,2);
     700   list resN  = nres(No,2);
    698701   matrix Nx  = resN[2];
    699702   module T2  = modulo(Sx,No);                  // presentation of T2
  • Singular/LIB/standard.lib

    r311499 r3939bc  
    1 // $Id: standard.lib,v 1.16 1998-05-25 21:28:33 obachman Exp $
     1// $Id: standard.lib,v 1.17 1998-05-29 15:02:02 Singular Exp $
    22//////////////////////////////////////////////////////////////////////////////
    33
    4 version="$Id: standard.lib,v 1.16 1998-05-25 21:28:33 obachman Exp $";
     4version="$Id: standard.lib,v 1.17 1998-05-29 15:02:02 Singular Exp $";
    55info="
    66LIBRARY: standard.lib   PROCEDURES WHICH ARE ALWAYS LOADED AT START-UP
     
    88 stdfglm(ideal[,ord])   standard basis of the ideal via fglm [and ordering ord]
    99 stdhilb(ideal)         standard basis of the ideal using the Hilbert function
    10  groebner(ideal/module) standard basis of ideal or module using a 
    11                         heuristically choosen method 
     10 groebner(ideal/module) standard basis of ideal or module using a
     11                        heuristically choosen method
    1212";
    1313
     
    126126proc groebner(def i, list #)
    127127"USAGE: groebner(i[, wait]) i -- ideal/module; wait -- int
    128 RETURNS: Standard basis of ideal or module which is computed using a 
    129          heuristically choosen method: 
     128RETURNS: Standard basis of ideal or module which is computed using a
     129         heuristically choosen method:
    130130         If the ordering of the current ring is a local ordering, or
    131131         if it is a non-block ordering and the current ring has no
    132          parameters, then std(i) is returned. 
     132         parameters, then std(i) is returned.
    133133         Otherwise, i is mapped into a ring with no parameters and
    134134         ordering dp, where its Hilbert series is computed. This is
     
    136136         original ring.
    137137NOTE: If a 2nd argument 'wait' is given, then the computation proceeds
    138       at most 'wait' seconds. That is, if no result could be computed in 
    139       'wait' seconds, then the computation is interrupted, 0 is returned, 
    140       a warning message is displayed, and the global variable 
    141       'groebner_error' is defined. 
     138      at most 'wait' seconds. That is, if no result could be computed in
     139      'wait' seconds, then the computation is interrupted, 0 is returned,
     140      a warning message is displayed, and the global variable
     141      'groebner_error' is defined.
    142142EXAMPLE: example groebner; shows an example"
    143143{
     
    153153        int wait = #[1];
    154154        int j = 10;
    155        
     155
    156156        string bs = nameof(basering);
    157157        link l_fork = "MPtcp:fork";
     
    160160        int pid = read(l_fork);
    161161        write(l_fork, quote(groebner(eval(i))));
    162        
     162
    163163        // sleep in small intervalls for appr. one second
    164164        if (wait > 0)
     
    170170          }
    171171        }
    172        
     172
    173173        // sleep in intervalls of one second from now on
    174174        j = 1;
     
    178178          j = j + 1;
    179179        }
    180        
     180
    181181        if (status(l_fork, "read", "ready"))
    182182        {
     
    226226    return(std(i));
    227227  }
    228    
     228
    229229  int IsSimple_P;
    230230  if (system("nblocks") <= 2)
     
    265265    option(mem);
    266266  }
    267    
     267
    268268  // construct ring in which first std computation is done
    269269  string varstr_P = varstr(P);
    270270  string parstr_P = parstr(P);
    271   int is_homog = (homog(i) && (npars_P == 0)); 
    272    
     271  int is_homog = (homog(i) && (npars_P == 0));
     272
    273273  string ri = "ring Phelp =" + string(char(P)) + ",(" + varstr_P;
    274274  // parameters are converted to ring variables
     
    287287  // change the ring
    288288  execute(ri);
    289    
     289
    290290  // get ideal from previous ring
    291291  if (is_homog)
     
    298298    ideal qh=homog(imap(P,i),@t);
    299299  }
    300    
     300
    301301  // compute std and hilbert series
    302302  if (p_opt)
     
    322322    // additional variables were introduced
    323323    // need another intermediate ring
    324     ri = "ring Phelp1 =" + string(char(P)) 
     324    ri = "ring Phelp1 =" + string(char(P))
    325325      + ",(" + varstr(Phelp) + "),(" + ordstr_P;
    326      
     326
    327327    // for lp without parameters, we do not need a block ordering
    328328    if ( ! (IsSimple_P && (npars_P + is_homog < 2) && find(ordstr_P, "l")))
     
    332332    }
    333333    ri = ri + ");";
    334      
     334
    335335    // change to intermediate ring
    336336    execute(ri);
     
    348348      qh = subst(qh, @t, 1);
    349349    }
    350      
     350
    351351    // go back to original ring
    352352    setring P;
     
    370370  "EXAMPLE: "; echo = 2;
    371371  ring r = 0, (a,b,c,d), lp;
    372   option(prot); 
     372  option(prot);
    373373  ideal i = a+b+c+d, ab+ad+bc+cd, abc+abd+acd+bcd, abcd-1; // cyclic 4
    374374  groebner(i);
     
    384384
    385385//////////////////////////////////////////////////////////////////////////
    386 proc resu(list #)
     386proc res(list #)
    387387{
    388388   def P=basering;
    389389   list result;
    390390   def m=#[1]; //the ideal or module
    391    
     391
    392392   int i=#[2]; //the length of the resolution
    393393               //if size(#)>2 a minimal resolution is computed
     
    414414      setring P;
    415415      result=imap(Phelp,re);
    416       return(result);   
     416      return(result);
    417417   }
    418418
     
    439439   setring P;
    440440   result=imap(Phelp,re);
    441    return(result);     
     441   return(result);
    442442}
    443443
    444444proc minresu(list #)
    445445{
    446    return(resu(#[1],#[2],1));
    447 }
     446   return(res(#[1],#[2],1));
     447}
  • Singular/iparith.cc

    r311499 r3939bc  
    219219  { "not",         0, NOT ,               NOT},
    220220  { "npars",       0, NPARS_CMD ,         CMD_1},
     221  #ifdef OLD_RES
     222  { "nres",        0, RES_CMD ,           CMD_23},
     223  #else
     224  { "nres",        0, RES_CMD ,           CMD_2},
     225  #endif
    221226  { "nrows",       0, ROWS_CMD ,          CMD_1},
    222227  { "number",      0, NUMBER_CMD ,        RING_DECL},
     
    246251  { "reduce",      0, REDUCE_CMD ,        CMD_23},
    247252  { "regularity",  0, REGULARITY_CMD ,    CMD_1},
    248   #ifdef OLD_RES
    249   { "res",         0, RES_CMD ,           CMD_23},
    250   #else
    251   { "res",         0, RES_CMD ,           CMD_2},
    252   #endif
    253253  { "reservedName",0, RESERVEDNAME_CMD ,  CMD_M},
    254254  { "resolution",  0, RESOLUTION_CMD ,    RING_DECL},
Note: See TracChangeset for help on using the changeset viewer.