Changeset 3939bc in git
- Timestamp:
- May 29, 1998, 5:02:06 PM (26 years ago)
- Branches:
- (u'spielwiese', '17f1d200f27c5bd38f5dfc6e8a0879242279d1d8')
- Children:
- 1d4300694bf8c8b67ec71e837ab58b13264fedf7
- Parents:
- 311499b3c35b89d435a5b5b44c51e0ace5b13c6c
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/ChangeLog
r311499 r3939bc 1 Fri 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) 1 4 Wed May 27 19:13:10 MET DST 1998 hannes 2 5 * removed #define HAVE_GMP and non-gmp-parts -
Singular/LIB/deform.lib
r311499 r3939bc 1 // $Id: deform.lib,v 1.1 1 1998-05-14 18:44:57Singular Exp $1 // $Id: deform.lib,v 1.12 1998-05-29 15:01:55 Singular Exp $ 2 2 // author: Bernd Martin email: martin@math.tu-cottbus.de 3 3 //(bm, last modified 4/98) 4 4 /////////////////////////////////////////////////////////////////////////////// 5 version="$Id: deform.lib,v 1.1 1 1998-05-14 18:44:57Singular Exp $";5 version="$Id: deform.lib,v 1.12 1998-05-29 15:01:55 Singular Exp $"; 6 6 info=" 7 7 LIBRARY: deform.lib PROCEDURES FOR COMPUTING MINIVERSAL DEFORMATION … … 579 579 matrix M0,M1,M2,ker,kb1,lift1,kb2,A,B,C,D; 580 580 //------- resM --------------------------------------------------------------- 581 list resM = res(Mo,3);581 list resM = nres(Mo,3); 582 582 M0 = resM[1]; 583 583 M1 = resM[2]; -
Singular/LIB/fastsolv.lib
r311499 r3939bc 1 1 // 2 version="$Id: fastsolv.lib,v 1. 4 1998-05-14 18:44:59Singular Exp $";2 version="$Id: fastsolv.lib,v 1.5 1998-05-29 15:01:56 Singular Exp $"; 3 3 info=""; 4 4 … … 181 181 if (#[4]==1) 182 182 { 183 mres(@a,1,@a0); 184 @a=@a0(1); 183 @a=mres(@a,1)[1]; 185 184 } 186 185 return(@a); … … 229 228 if (#[4]==1) 230 229 { 231 mres(@b,1,@b0); 232 @b=@b0(1); 230 @b=mres(@b,1)[1]; 233 231 } 234 232 -
Singular/LIB/finvar.lib
r311499 r3939bc 1 // $Id: finvar.lib,v 1.1 1 1998-05-14 18:45:00Singular Exp $1 // $Id: finvar.lib,v 1.12 1998-05-29 15:01:57 Singular Exp $ 2 2 // author: Agnes Eileen Heydtmann, email:agnes@math.uni-sb.de 3 3 // last change: 3.5.98 4 4 ////////////////////////////////////////////////////////////////////////////// 5 version="$Id: finvar.lib,v 1.1 1 1998-05-14 18:45:00Singular Exp $"5 version="$Id: finvar.lib,v 1.12 1998-05-29 15:01:57 Singular Exp $" 6 6 info=" 7 7 LIBRARY: finvar.lib LIBRARY TO CALCULATE INVARIANT RINGS & MORE … … 5081 5081 M(1)[i,1..k]=B[1..k]; // we will look for the syzygies of M(1) 5082 5082 } 5083 module M(2)= res(M(1),2)[2];5083 module M(2)=nres(M(1),2)[2]; 5084 5084 int m=ncols(M(2)); // number of generators of the module 5085 5085 // 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 $ 2 2 //(BM/GMG, last modified 22.06.96) 3 3 /////////////////////////////////////////////////////////////////////////////// 4 4 5 version="$Id: homolog.lib,v 1. 6 1998-05-05 11:55:28 krueger Exp $";5 version="$Id: homolog.lib,v 1.7 1998-05-29 15:01:58 Singular Exp $"; 6 6 info=" 7 7 LIBRARY: homolog.lib PROCEDURES FOR HOMOLOGICAL ALGEBRA … … 56 56 //apply Hom(-,M) and compute the Ext's 57 57 //----------------------------------------------------------------------------- 58 list resM = res(M,3);58 list resM = nres(M,3); 59 59 M1 = resM[2]; 60 60 M2 = resM[3]; … … 241 241 // N<--G(0)<--- ... <---G(q+1) 242 242 //----------------------------------------------------------------------------- 243 list resM = res(M,p+q+1);243 list resM = nres(M,p+q+1); 244 244 M1 = resM[p]; 245 245 M2 = resM[p+1]; 246 list resN = res(N,q+1);246 list resN = nres(N,q+1); 247 247 N1 = resN[q]; 248 248 N2 = resN[q+1]; -
Singular/LIB/matrix.lib
r311499 r3939bc 1 // $Id: matrix.lib,v 1. 7 1998-05-14 18:45:10Singular Exp $1 // $Id: matrix.lib,v 1.8 1998-05-29 15:01:59 Singular Exp $ 2 2 // (GMG/BM, last modified 22.06.96) 3 3 /////////////////////////////////////////////////////////////////////////////// 4 4 5 version="$Id: matrix.lib,v 1. 7 1998-05-14 18:45:10Singular Exp $";5 version="$Id: matrix.lib,v 1.8 1998-05-29 15:01:59 Singular Exp $"; 6 6 info=" 7 7 LIBRARY: matrix.lib PROCEDURES FOR MATRIX OPERATIONS … … 233 233 ring r=32003,(x,y,z),ds; 234 234 ideal i=x4+y5+z6,xyz,yx2+xz2+zy7; 235 list L= res(i,0);235 list L=nres(i,0); 236 236 is_complex(L); 237 237 L[4]=matrix(i); -
Singular/LIB/primdec.lib
r311499 r3939bc 1 // $Id: primdec.lib,v 1.2 0 1998-05-20 13:03:56 schmidtExp $1 // $Id: primdec.lib,v 1.21 1998-05-29 15:02:00 Singular Exp $ 2 2 //////////////////////////////////////////////////////////////////////////////// 3 3 // primdec.lib // … … 8 8 // algorithms for primary decomposition based on // 9 9 // the ideas of Shimoyama/Yokoyama // 10 // written by Wolfram Decker and Hans Schoenemann // 10 // written by Wolfram Decker and Hans Schoenemann // 11 11 //////////////////////////////////////////////////////////////////////////////// 12 12 13 version="$Id: primdec.lib,v 1.2 0 1998-05-20 13:03:56 schmidtExp $";13 version="$Id: primdec.lib,v 1.21 1998-05-29 15:02:00 Singular Exp $"; 14 14 info=" 15 15 LIBRARY: primdec.lib: PROCEDURE FOR PRIMARY DECOMPOSITION … … 193 193 ideal fac=tsil[2]; 194 194 poly f=tsil[3]; 195 195 196 196 ideal star=quotient(laedi,f); 197 197 action=1; … … 208 208 g=1; 209 209 verg=laedi; 210 210 211 211 for(j=1;j<=size(fac);j++) 212 212 { … … 217 217 } 218 218 verg=quotient(laedi,g); 219 219 220 220 if(specialIdealsEqual(verg,star)==1) 221 221 { … … 231 231 } 232 232 } 233 l=star,fac,f; 233 l=star,fac,f; 234 234 return(l); 235 235 } … … 239 239 { 240 240 poly keep=p; 241 241 242 242 int i; 243 243 poly q=act[1][1]^act[2][1]; … … 252 252 "ERROR IN FACTOR"; 253 253 basering; 254 254 255 255 act; 256 256 keep; 257 257 pause; 258 258 259 259 p; 260 260 q; … … 478 478 m=m-1; 479 479 } 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 481 481 //h in K[var(n+1),...,var(nvars(basering))], c in K 482 482 //if not (0) is returned, else var(n)+h is added to prm … … 655 655 { 656 656 attrib(l[2*i-1],"isSB",1); 657 657 658 658 if((size(ser)>0)&&(size(reduce(ser,l[2*i-1],1))==0)&&(deg(l[2*i-1][1])>0)) 659 659 { 660 660 "Achtung in split"; 661 661 662 662 l[2*i-1]=ideal(1); 663 663 l[2*i]=ideal(1); … … 724 724 return(primary); 725 725 } 726 727 j=interred(j); 726 727 j=interred(j); 728 728 attrib(j,"isSB",1); 729 729 if(vdim(j)==deg(j[1])) 730 { 730 { 731 731 act=factor(j[1]); 732 732 for(@k=1;@k<=size(act[1]);@k++) … … 746 746 primary[2*@k]=interred(@qh); 747 747 attrib( primary[2*@k-1],"isSB",1); 748 748 749 749 if((size(ser)>0)&&(size(reduce(ser,primary[2*@k-1],1))==0)) 750 750 { 751 751 primary[2*@k-1]=ideal(1); 752 primary[2*@k]=ideal(1); 752 primary[2*@k]=ideal(1); 753 753 } 754 754 } … … 824 824 } 825 825 else 826 { 826 { 827 827 primary[1]=j; 828 828 if((size(#)>0)&&(act[2][1]>1)) … … 843 843 if(size(#)==0) 844 844 { 845 845 846 846 primary=splitPrimary(primary,ser,@wr,act); 847 847 848 848 } 849 849 … … 868 868 } 869 869 } 870 870 871 871 @k=0; 872 872 ideal keep; … … 894 894 jmap2[zz]=primary[2*@k-1][@n]; 895 895 @qht[@n]=var(zz); 896 896 897 897 } 898 898 } … … 906 906 phi1=@P,jmap1; 907 907 phi=@P,jmap; 908 908 909 909 for(@n=1;@n<=nva;@n++) 910 910 { … … 915 915 916 916 @qh=phi(@qht); 917 917 918 918 if(npars(@P)>0) 919 919 { … … 943 943 kill @Phelp1; 944 944 @qh=clearSB(@qh); 945 attrib(@qh,"isSB",1); 945 attrib(@qh,"isSB",1); 946 946 ser1=phi1(ser); 947 947 @lh=zero_decomp (@qh,phi(ser1),@wr); 948 948 // @lh=zero_decomp (@qh,psi(ser),@wr); 949 950 949 950 951 951 kill lres0; 952 952 list lres0; … … 1547 1547 map phi=@P,qr[2]; 1548 1548 i=qr[1]; 1549 1549 1550 1550 execute "ring gnir = ("+charstr(basering)+"),("+varstr(basering)+"),(" 1551 1551 +ordstr(basering)+");"; … … 1788 1788 } 1789 1789 } 1790 1790 1791 1791 homo=homog(i); 1792 1792 1793 1793 if(homo==1) 1794 1794 { … … 1837 1837 option(redSB); 1838 1838 1839 ideal ser=fetch(@P,ser); 1839 ideal ser=fetch(@P,ser); 1840 1840 1841 1841 if(homo==1) … … 1891 1891 } 1892 1892 } 1893 1893 1894 1894 //---------------------------------------------------------------- 1895 1895 //j is the ring … … 1929 1929 return(primary); 1930 1930 } 1931 1931 1932 1932 //------------------------------------------------------------------ 1933 1933 //the zero-dimensional case … … 1983 1983 indep=maxIndependSet(@j); 1984 1984 } 1985 1985 1986 1986 ideal jkeep=@j; 1987 1987 … … 2007 2007 ideal jwork=std(imap(gnir,@j),@hilb); 2008 2008 } 2009 2009 2010 2010 } 2011 2011 else … … 2018 2018 di=dim(jwork); 2019 2019 keepdi=di; 2020 2020 2021 2021 setring gnir; 2022 2022 for(@m=1;@m<=size(indep);@m++) … … 2034 2034 attrib(@j,"isSB",1); 2035 2035 ideal ser=fetch(gnir,ser); 2036 2036 2037 2037 } 2038 2038 else … … 2051 2051 } 2052 2052 ideal ser=phi(ser); 2053 2054 } 2055 option(noredSB); 2053 2054 } 2055 option(noredSB); 2056 2056 if((deg(@j[1])==0)||(dim(@j)<jdim)) 2057 2057 { … … 2109 2109 } 2110 2110 //the primary decomposition of j*K(var(nnp+1),..,var(nva))[..the rest..] 2111 option(redSB); 2111 option(redSB); 2112 2112 list uprimary= zero_decomp(@j,ser,@wr); 2113 2113 option(noredSB); … … 2171 2171 //mentioned above is really computed 2172 2172 for(@n=@n3/2+1;@n<=@n2/2;@n++) 2173 { 2173 { 2174 2174 if(specialIdealsEqual(quprimary[2*@n-1],quprimary[2*@n])) 2175 2175 { … … 2186 2186 } 2187 2187 } 2188 2188 2189 2189 if(size(@h)>0) 2190 2190 { … … 2196 2196 if(@wr!=1) 2197 2197 { 2198 @q=minSat(jwork,@h)[2]; 2198 @q=minSat(jwork,@h)[2]; 2199 2199 } 2200 2200 else … … 2216 2216 } 2217 2217 jwork=std(jwork,@q); 2218 keepdi=dim(jwork); 2218 keepdi=dim(jwork); 2219 2219 if(keepdi<di) 2220 2220 { … … 2241 2241 { 2242 2242 keepdi=di-1; 2243 } 2243 } 2244 2244 //--------------------------------------------------------------- 2245 2245 //notice that j=sat(j,gh) intersected with (j,gh^n) … … 2272 2272 2273 2273 if(size(ser)>0) 2274 { 2275 ser=intersect(htest,ser); 2274 { 2275 ser=intersect(htest,ser); 2276 2276 } 2277 2277 else 2278 2278 { 2279 2279 ser=htest; 2280 } 2280 } 2281 2281 setring gnir; 2282 2282 ser=imap(@Phelp,ser); 2283 2283 } 2284 2284 if(size(reduce(ser,peek,1))!=0) 2285 { 2285 { 2286 2286 for(@m=1;@m<=size(restindep);@m++) 2287 2287 { 2288 2288 // if(restindep[@m][3]>=keepdi) 2289 // { 2289 // { 2290 2290 isat=0; 2291 2291 @n2=0; 2292 2292 option(redSB); 2293 2293 2294 2294 if(restindep[@m][1]==varstr(basering)) 2295 2295 //this is the good case, nothing to do, just to have the same notations … … 2318 2318 } 2319 2319 option(noredSB); 2320 2320 2321 2321 for (lauf=1;lauf<=size(@j);lauf++) 2322 2322 { … … 2367 2367 } 2368 2368 //the primary decomposition of j*K(var(nnp+1),..,var(nva))[..the rest..] 2369 2369 2370 2370 option(redSB); 2371 2371 list uprimary= zero_decomp(@j,ser,@wr); 2372 2372 option(noredSB); 2373 2374 2373 2374 2375 2375 //we need the intersection of the ideals in the list quprimary with the 2376 2376 //polynomialring, i.e. let q=(f1,...,fr) in the quotientring such an ideal … … 2407 2407 @n2=size(quprimary); 2408 2408 @n3=@n2; 2409 2409 2410 2410 for(@n1=1;@n1<=size(collectprimary)/2;@n1++) 2411 2411 { … … 2420 2420 } 2421 2421 } 2422 2423 2422 2423 2424 2424 //here the intersection with the polynomialring 2425 2425 //mentioned above is really computed … … 2460 2460 ser=imap(@Phelp,ser); 2461 2461 } 2462 2462 2463 2463 // } 2464 } 2464 } 2465 2465 if(size(reduce(ser,peek,1))!=0) 2466 2466 { … … 2482 2482 } 2483 2483 } 2484 2484 2485 2485 } 2486 2486 //------------------------------------------------------------ … … 2488 2488 //the final result: primary 2489 2489 //------------------------------------------------------------ 2490 2490 2491 2491 setring @P; 2492 2492 primary=imap(gnir,quprimary); … … 2520 2520 return(phi(j)); 2521 2521 } 2522 2522 2523 2523 2524 2524 /////////////////////////////////////////////////////////////////////////////// … … 2534 2534 return(ideal(0)); 2535 2535 } 2536 2536 2537 2537 def @P = basering; 2538 2538 list indep,allindep,restindep,fett,@mu; … … 2594 2594 2595 2595 return(ideal(@p)); 2596 } 2596 } 2597 2597 //------------------------------------------------------------------ 2598 2598 //the case of a complete intersection … … 2610 2610 if (jdim==0) 2611 2611 { 2612 @j1=finduni(@j); 2612 @j1=finduni(@j); 2613 2613 for(@k=1;@k<=size(@j1);@k++) 2614 2614 { … … 2625 2625 return(@j); 2626 2626 } 2627 2627 2628 2628 //------------------------------------------------------------------ 2629 2629 //search for a maximal independent set indep,i.e. … … 2634 2634 2635 2635 indep=maxIndependSet(@j); 2636 2636 2637 2637 di=dim(@j); 2638 2638 … … 2763 2763 { 2764 2764 fac=ideal(0); 2765 for(lauf=1;lauf<=ncols(@h);lauf++) 2765 for(lauf=1;lauf<=ncols(@h);lauf++) 2766 2766 { 2767 2767 if(deg(@h[lauf])>0) … … 2777 2777 } 2778 2778 2779 2779 2780 2780 @mu=mstd(quotient(@j+ideal(@q),rad)); 2781 2781 @j=@mu[1]; 2782 2782 attrib(@j,"isSB",1); 2783 2783 2784 2784 } 2785 2785 if((deg(rad[1])>0)&&(deg(collectrad[1])>0)) … … 2796 2796 2797 2797 te=simplify(reduce(te*rad,@j),2); 2798 2798 2799 2799 if((dim(@j)<di)||(size(te)==0)) 2800 2800 { … … 2810 2810 { 2811 2811 return(rad); 2812 } 2812 } 2813 2813 // rad=intersect(rad,radicalKL(@mu,rad,@wr)); 2814 2814 rad=intersect(rad,radicalKL(@mu,ideal(1),@wr)); … … 2829 2829 il=#[1]; 2830 2830 } 2831 2831 2832 2832 option(redSB); 2833 2833 list m=mstd(i); … … 2846 2846 return(quotient(I,J)); 2847 2847 } 2848 2848 2849 2849 for(l=1;l<=cod;l++) 2850 2850 { … … 2864 2864 if(il==1) 2865 2865 { 2866 2866 2867 2867 return(radI1); 2868 2868 } … … 2874 2874 return(radI1); 2875 2875 } 2876 return(intersect(radI1,radicalEHV(I2,re,il))); 2876 return(intersect(radI1,radicalEHV(I2,re,il))); 2877 2877 } 2878 2878 } … … 2904 2904 } 2905 2905 return(ann); 2906 } 2907 2906 } 2907 2908 2908 /////////////////////////////////////////////////////////////////////////////// 2909 2909 … … 2915 2915 { 2916 2916 matrix f=transpose(re[n+1]); //Hom(_,R) 2917 module k= res(f,2)[2];//the kernel2917 module k=nres(f,2)[2]; //the kernel 2918 2918 matrix g=transpose(re[n]); //the image of Hom(_,R) 2919 2919 … … 2924 2924 ideal ann=Ann(transpose(re[n])); 2925 2925 } 2926 return(ann); 2926 return(ann); 2927 2927 } 2928 2928 /////////////////////////////////////////////////////////////////////////////// … … 2937 2937 re=intersect1(re,quotient(a,module(b[i]))); 2938 2938 } 2939 return(re); 2939 return(re); 2940 2940 } 2941 2941 … … 2944 2944 2945 2945 proc analyze(list pr) 2946 { 2946 { 2947 2947 int ii,jj; 2948 2948 for(ii=1;ii<=size(pr)/2;ii++) … … 2964 2964 } 2965 2965 } 2966 } 2966 } 2967 2967 } 2968 2968 … … 2976 2976 { 2977 2977 def r=basering; 2978 2978 2979 2979 int j,k; 2980 2980 map phi; 2981 2981 poly p; 2982 2982 2983 2983 ideal iwork=i; 2984 2984 ideal imap1=maxideal(1); 2985 2985 ideal imap2=maxideal(1); 2986 2986 2987 2987 2988 2988 for(j=1;j<=nvars(basering);j++) … … 2999 2999 iwork[k]=var(j); 3000 3000 imap1=maxideal(1); 3001 imap2[j]=-p; 3001 imap2[j]=-p; 3002 3002 break; 3003 3003 } … … 3007 3007 } 3008 3008 3009 3009 3010 3010 /////////////////////////////////////////////////////// 3011 3011 // ini_mod … … 3605 3605 } 3606 3606 } 3607 3607 dimSP=dim(SP); 3608 3608 for(j=size(m);j>=1; j--) 3609 3609 { … … 3802 3802 { 3803 3803 f=polys[k]; 3804 3804 degf=deg(f); 3805 3805 } 3806 3806 } … … 4012 4012 return(0); 4013 4013 } 4014 4015 4014 4015 4016 4016 proc quotient2(module a,module b) 4017 4017 { … … 4030 4030 setring @newP; 4031 4031 ideal re=imap(@newr,re); 4032 return(re); 4032 return(re); 4033 4033 } 4034 4034 /////////////////////////////////////////////////////////////////////////////// … … 4043 4043 re[i]=he; 4044 4044 } 4045 return(re); 4045 return(re); 4046 4046 } 4047 4047 /////////////////////////////////////////////////////////////////////////////// … … 4056 4056 re[2*i]=l[i][2]; 4057 4057 } 4058 return(re); 4058 return(re); 4059 4059 } 4060 4060 … … 4066 4066 4067 4067 proc primdecGTZ(ideal i) 4068 "USAGE: primdecGTZ(i); i ideal 4069 RETURN: list = list of primary ideals 4068 "USAGE: primdecGTZ(i); i ideal 4069 RETURN: list = list of primary ideals 4070 4070 and their associated primes 4071 4071 NOTE: Algorithm of Gianni, Traeger, Zacharias … … 4087 4087 4088 4088 proc primdecSY(ideal i) 4089 "USAGE: primdecSY(i); i ideal 4090 RETURN: list = list of primary ideals 4089 "USAGE: primdecSY(i); i ideal 4090 RETURN: list = list of primary ideals 4091 4091 and their associated primes 4092 4092 NOTE: Algorithm of Shimoyama-Yokoyama … … 4149 4149 proc equiRadical(ideal i) 4150 4150 "USAGE: equiRadical(i); i ideal 4151 RETURN: ideal = the intersection of associated primes 4151 RETURN: ideal = the intersection of associated primes 4152 4152 of i of dimension of i 4153 4153 NOTE: … … 4170 4170 "USAGE: radical(i); i ideal 4171 4171 RETURN: ideal = the radical of i 4172 NOTE: a combination of the algorithms of Krick/Logar 4172 NOTE: a combination of the algorithms of Krick/Logar 4173 4173 and Eisenbud/Huneke/Vasconcelos 4174 4174 EXAMPLE: example radical; shows an example … … 4179 4179 if(size(#)>0) 4180 4180 { 4181 il=#[1]; 4181 il=#[1]; 4182 4182 } 4183 4183 ideal re=1; … … 4186 4186 map phi=@P,qr[2]; 4187 4187 i=qr[1]; 4188 4188 4189 4189 list pr=facstd(i); 4190 4190 … … 4223 4223 int odim=dim(pr[1]); 4224 4224 int count=1; 4225 4225 4226 4226 for(j=2;j<=s;j++) 4227 4227 { … … 4281 4281 else 4282 4282 { 4283 list re=mres(i,0);4284 } 4283 list re=mres(i,0); 4284 } 4285 4285 for(e=cod;e<=nvars(basering);e++) 4286 4286 { … … 4293 4293 } 4294 4294 return(er); 4295 } 4295 } 4296 4296 example 4297 4297 { "EXAMPLE:"; echo = 2; … … 4306 4306 proc testPrimary(list pr, ideal k) 4307 4307 "USAGE: testPrimary(pr,k) pr=primdecGTZ(k) or primdecSY(k) 4308 RETURN: int = 1, if the intersection of the primary ideals 4308 RETURN: int = 1, if the intersection of the primary ideals 4309 4309 in pr is k, 0 if not 4310 4310 NOTE: -
Singular/LIB/sing.lib
r311499 r3939bc 1 // $Id: sing.lib,v 1.1 1 1998-05-14 18:45:16Singular Exp $1 // $Id: sing.lib,v 1.12 1998-05-29 15:02:01 Singular Exp $ 2 2 //system("random",787422842); 3 3 //(GMG/BM, last modified 26.06.96) 4 4 /////////////////////////////////////////////////////////////////////////////// 5 5 6 version="$Id: sing.lib,v 1.1 1 1998-05-14 18:45:16Singular Exp $";6 version="$Id: sing.lib,v 1.12 1998-05-29 15:02:01 Singular Exp $"; 7 7 info=" 8 8 LIBRARY: sing.lib PROCEDURES FOR SINGULARITIES … … 539 539 //--------------------------- presentation of J ------------------------------- 540 540 int rk; 541 def P = basering;541 def P = basering; 542 542 module jac, t1; 543 543 jac = jacob(J); // jacobian matrix of J converted to module 544 res(J,2,A);// compute presentation of J545 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 546 546 //---------- go to quotient ring mod J and compute normal bundle -------------- 547 qring R = std(J);547 qring R = std(J); 548 548 module jac = fetch(P,jac); 549 549 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; 551 552 t1 = modulo(B(2),jac); // pres. of normal_bdl/trivial_deformations 552 553 rk=nrows(t1); 553 554 //-------------------------- pull back to basering ---------------------------- 554 setring P;555 setring P; 555 556 t1 = fetch(R,t1)+J*freemodule(rk); // T1-module, presentation of T1 556 557 t1 = std(t1); … … 609 610 int n,rk; 610 611 //------------------- 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; 612 614 kos = koszul(2,J); // module of Koszul relations 613 615 SK = modulo(A(2),kos); // presentation of syz/kos … … 615 617 //?*** sollte bei der Berechnung von res mit anfallen, zu aendern!! 616 618 //---------------------- fetch to quotient ring mod J ------------------------- 617 qring R = J0;// make P/J the basering619 qring R = J0; // make P/J the basering 618 620 module A2' = transpose(fetch(P,A(2))); // dual of syz 619 621 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; 621 624 t2 = modulo(B(2),A2'); // presentation of T2 622 625 rk = nrows(t2); 623 626 //--------------------- fetch back to basering ------------------------------- 624 setring P;627 setring P; 625 628 t2 = fetch(R,t2)+J*freemodule(rk); 626 629 t2 = std(t2); … … 683 686 ideal i0 = std(i); 684 687 //-------------------- presentation of non-trivial syzygies ------------------- 685 list I= res(i,2);// resolve i688 list I= nres(i,2); // resolve i 686 689 Syz = matrix(I[2]); // syz(i) 687 690 jac = jacob(i); // jacobi ideal … … 693 696 matrix No = transpose(fetch(P,Syz)); // ker(No) = Hom(syz,Ox) 694 697 module So = transpose(fetch(P,SK)); // Hom(syz/kos,R) 695 list resS = res(So,2);698 list resS = nres(So,2); 696 699 matrix Sx = resS[2]; 697 list resN = res(No,2);700 list resN = nres(No,2); 698 701 matrix Nx = resN[2]; 699 702 module T2 = modulo(Sx,No); // presentation of T2 -
Singular/LIB/standard.lib
r311499 r3939bc 1 // $Id: standard.lib,v 1.1 6 1998-05-25 21:28:33 obachmanExp $1 // $Id: standard.lib,v 1.17 1998-05-29 15:02:02 Singular Exp $ 2 2 ////////////////////////////////////////////////////////////////////////////// 3 3 4 version="$Id: standard.lib,v 1.1 6 1998-05-25 21:28:33 obachmanExp $";4 version="$Id: standard.lib,v 1.17 1998-05-29 15:02:02 Singular Exp $"; 5 5 info=" 6 6 LIBRARY: standard.lib PROCEDURES WHICH ARE ALWAYS LOADED AT START-UP … … 8 8 stdfglm(ideal[,ord]) standard basis of the ideal via fglm [and ordering ord] 9 9 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 12 12 "; 13 13 … … 126 126 proc groebner(def i, list #) 127 127 "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: 128 RETURNS: Standard basis of ideal or module which is computed using a 129 heuristically choosen method: 130 130 If the ordering of the current ring is a local ordering, or 131 131 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. 133 133 Otherwise, i is mapped into a ring with no parameters and 134 134 ordering dp, where its Hilbert series is computed. This is … … 136 136 original ring. 137 137 NOTE: 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. 142 142 EXAMPLE: example groebner; shows an example" 143 143 { … … 153 153 int wait = #[1]; 154 154 int j = 10; 155 155 156 156 string bs = nameof(basering); 157 157 link l_fork = "MPtcp:fork"; … … 160 160 int pid = read(l_fork); 161 161 write(l_fork, quote(groebner(eval(i)))); 162 162 163 163 // sleep in small intervalls for appr. one second 164 164 if (wait > 0) … … 170 170 } 171 171 } 172 172 173 173 // sleep in intervalls of one second from now on 174 174 j = 1; … … 178 178 j = j + 1; 179 179 } 180 180 181 181 if (status(l_fork, "read", "ready")) 182 182 { … … 226 226 return(std(i)); 227 227 } 228 228 229 229 int IsSimple_P; 230 230 if (system("nblocks") <= 2) … … 265 265 option(mem); 266 266 } 267 267 268 268 // construct ring in which first std computation is done 269 269 string varstr_P = varstr(P); 270 270 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 273 273 string ri = "ring Phelp =" + string(char(P)) + ",(" + varstr_P; 274 274 // parameters are converted to ring variables … … 287 287 // change the ring 288 288 execute(ri); 289 289 290 290 // get ideal from previous ring 291 291 if (is_homog) … … 298 298 ideal qh=homog(imap(P,i),@t); 299 299 } 300 300 301 301 // compute std and hilbert series 302 302 if (p_opt) … … 322 322 // additional variables were introduced 323 323 // need another intermediate ring 324 ri = "ring Phelp1 =" + string(char(P)) 324 ri = "ring Phelp1 =" + string(char(P)) 325 325 + ",(" + varstr(Phelp) + "),(" + ordstr_P; 326 326 327 327 // for lp without parameters, we do not need a block ordering 328 328 if ( ! (IsSimple_P && (npars_P + is_homog < 2) && find(ordstr_P, "l"))) … … 332 332 } 333 333 ri = ri + ");"; 334 334 335 335 // change to intermediate ring 336 336 execute(ri); … … 348 348 qh = subst(qh, @t, 1); 349 349 } 350 350 351 351 // go back to original ring 352 352 setring P; … … 370 370 "EXAMPLE: "; echo = 2; 371 371 ring r = 0, (a,b,c,d), lp; 372 option(prot); 372 option(prot); 373 373 ideal i = a+b+c+d, ab+ad+bc+cd, abc+abd+acd+bcd, abcd-1; // cyclic 4 374 374 groebner(i); … … 384 384 385 385 ////////////////////////////////////////////////////////////////////////// 386 proc res u(list #)386 proc res(list #) 387 387 { 388 388 def P=basering; 389 389 list result; 390 390 def m=#[1]; //the ideal or module 391 391 392 392 int i=#[2]; //the length of the resolution 393 393 //if size(#)>2 a minimal resolution is computed … … 414 414 setring P; 415 415 result=imap(Phelp,re); 416 return(result); 416 return(result); 417 417 } 418 418 … … 439 439 setring P; 440 440 result=imap(Phelp,re); 441 return(result); 441 return(result); 442 442 } 443 443 444 444 proc minresu(list #) 445 445 { 446 return(res u(#[1],#[2],1));447 } 446 return(res(#[1],#[2],1)); 447 } -
Singular/iparith.cc
r311499 r3939bc 219 219 { "not", 0, NOT , NOT}, 220 220 { "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 221 226 { "nrows", 0, ROWS_CMD , CMD_1}, 222 227 { "number", 0, NUMBER_CMD , RING_DECL}, … … 246 251 { "reduce", 0, REDUCE_CMD , CMD_23}, 247 252 { "regularity", 0, REGULARITY_CMD , CMD_1}, 248 #ifdef OLD_RES249 { "res", 0, RES_CMD , CMD_23},250 #else251 { "res", 0, RES_CMD , CMD_2},252 #endif253 253 { "reservedName",0, RESERVEDNAME_CMD , CMD_M}, 254 254 { "resolution", 0, RESOLUTION_CMD , RING_DECL},
Note: See TracChangeset
for help on using the changeset viewer.