Changeset d70bc7 in git
- Timestamp:
- Nov 5, 2001, 2:58:38 PM (22 years ago)
- Branches:
- (u'spielwiese', 'f6c3dc58b0df4bd712574325fe76d0626174ad97')
- Children:
- 5b3302cc6f7c9964ee19073aca0b273ad9e606a9
- Parents:
- 1f8111cd2acad6f5a631540b24272cf5aca44000
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/gaussman.lib
r1f8111c rd70bc7 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: gaussman.lib,v 1.5 5 2001-11-05 09:16:48 mschulze Exp $";2 version="$Id: gaussman.lib,v 1.56 2001-11-05 13:58:38 mschulze Exp $"; 3 3 category="Singularities"; 4 4 … … 23 23 saito(t); matrix A0+A1*s of t on H'' 24 24 endvfilt(V); endomorphism V-filtration 25 spprint( Sp); print spectrum Sp26 sppprint( Spp); print spectral pairs Spp27 spadd( Sp1,Sp2); sum of spectra Sp1 and Sp228 spsub( Sp1,Sp2); difference of spectra Sp1 and Sp229 spmul( Sp,k); product of spectrum Sp and integer k30 spmul( Sp,k); linear combination of spectra Sp with coeffs k31 spissemicont( Sp[,opt]); test spectrum Sp for semicontinuity32 spsemicont( Sp0,Sp[,opt]); semicontinuity of spectra Sp0 and Sp33 spmilnor( Sp); milnor number of spectrum Sp34 spgeomgenus( Sp); geometrical genus of spectrum Sp35 spgamma( Sp); gamma invariant of spectrum Sp25 spprint(sp); print spectrum sp 26 sppprint(spp); print spectral pairs spp 27 spadd(sp1,sp2); sum of spectra sp1 and sp2 28 spsub(sp1,sp2); difference of spectra sp1 and sp2 29 spmul(sp,k); product of spectrum sp and integer k 30 spmul(sp,k); linear combination of spectra sp with coeffs k 31 spissemicont(sp[,opt]); test spectrum sp for semicontinuity 32 spsemicont(sp0,sp[,opt]); semicontinuity of spectra sp0 and sp 33 spmilnor(sp); milnor number of spectrum sp 34 spgeomgenus(sp); geometrical genus of spectrum sp 35 spgamma(sp); gamma invariant of spectrum sp 36 36 37 37 SEE ALSO: mondromy_lib, spectrum_lib … … 39 39 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; 40 40 monodromy; spectrum; spectral pairs; 41 Hodge filtration; V-filtration; weight filtration41 mixed Hodge structure; V-filtration; weight filtration 42 42 "; 43 43 … … 572 572 { "EXAMPLE:"; echo=2; 573 573 ring R=0,(x,y),ds; 574 poly f=x5+x2y2+y5;575 print(monodromy(f));574 poly t=x5+x2y2+y5; 575 monodromy(t); 576 576 } 577 577 /////////////////////////////////////////////////////////////////////////////// … … 583 583 RETURN: 584 584 @format 585 list Sp: spectrum of t586 ideal Sp[1]: V-filtration indices in increasing order587 intvec Sp[2]: weight filtration indices in decreasing order588 intvec Sp[3]:589 int Sp[3][i]: multiplicity of spectral number Sp[1][i]585 list sp: spectrum of t 586 ideal sp[1]: V-filtration indices in increasing order 587 intvec sp[2]: weight filtration indices in decreasing order 588 intvec sp[3]: 589 int sp[3][i]: multiplicity of spectral number sp[1][i] 590 590 @end format 591 591 SEE ALSO: spectrum_lib 592 592 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; 593 mixed Hodge structure; spectrum593 mixed Hodge structure; V-filtration; spectrum 594 594 EXAMPLE: example spectrum; shows examples 595 595 " … … 612 612 RETURN: 613 613 @format 614 list Spp: spectrum of t615 ideal Spp[1],intvec Spp[2]: spectral pairs in in-/decreasing lex. order616 intvec Spp[3]:617 int Spp[3][i]: multiplicity of spectral pair (Spp[1][i],Spp[2][i])614 list spp: spectrum of t 615 ideal spp[1],intvec spp[2]: spectral pairs in in-/decreasing lex. order 616 intvec spp[3]: 617 int spp[3][i]: multiplicity of spectral pair (spp[1][i],spp[2][i]) 618 618 @end format 619 619 SEE ALSO: spectrum_lib 620 620 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; 621 mixed Hodge structure; spectrum; spectral pairs 621 mixed Hodge structure; V-filtration; weight filtration; 622 spectrum; spectral pairs 622 623 EXAMPLE: example sppairs; shows examples 623 624 " … … 638 639 RETURN: 639 640 @format 640 list Spp: normalized spectral pairs (a,w,m[,V])641 ideal Spp[1]: numbers in a in increasing order642 intvec Spp[2]: integers in w in decreasing order643 intvec Spp[3]:644 int Spp[3][i]: multiplicity of pair (Spp[1][i],Spp[2][i]) in (a,w)645 list Spp[4]:646 module Spp[4][i]: module associated to pair (Spp[1][i],Spp[2][i])641 list spp: normalized spectral pairs (a,w,m[,V]) 642 ideal spp[1]: numbers in a in increasing order 643 intvec spp[2]: integers in w in decreasing order 644 intvec spp[3]: 645 int spp[3][i]: multiplicity of pair (spp[1][i],spp[2][i]) in (a,w) 646 list spp[4]: 647 module spp[4][i]: module associated to pair (spp[1][i],spp[2][i]) 647 648 @end format 648 649 EXAMPLE: example sppnorm; shows examples … … 771 772 ASSUME: basering with characteristic 0 and local degree ordering, 772 773 t with isolated citical point 0 773 RETURN: 774 RETURN:t 774 775 @format 775 list V: V-filtration on H''/H'776 ideal V[1]: spectral numbers in increasing order777 intvec V[2]:778 int V[2][i]: multiplicity of spectral number V[1][i]779 list V[4]:780 module V[4][i]: vector space basis of V[1][i]-th graded part781 in terms of V[4]782 ideal V[4]: monomial vector space basis of H''/H'783 ideal V[5]: standard basis of Jacobian ideal776 list v: V-filtration on H''/H' 777 ideal v[1]: spectral numbers in increasing order 778 intvec v[2]: 779 int v[2][i]: multiplicity of spectral number v[1][i] 780 list v[4]: 781 module v[4][i]: vector space basis of v[1][i]-th graded part 782 in terms of v[4] 783 ideal v[4]: monomial vector space basis of H''/H' 784 ideal v[5]: standard basis of Jacobian ideal 784 785 @end format 785 786 SEE ALSO: spectrum_lib … … 806 807 RETURN: 807 808 @format 808 list VW: weight refined V-filtration on H''/H'809 ideal VW[1]: spectral numbers in increasing order810 intvec VW[2]: weights in decreasing order811 intvec VW[3]:812 int VW[3][i]: multiplicity of spectral pair (VW[1][i],VW[2][i])813 list VW[4]:814 module VW[4][i]: vector space basis of (VW[1][i],VW[2][i])-th graded part815 in terms of VW[5]816 ideal VW[5]: monomial vector space basis of H''/H'817 ideal VW[6]: standard basis of Jacobian ideal809 list vw: weight refined V-filtration on H''/H' 810 ideal vw[1]: spectral numbers in increasing order 811 intvec vw[2]: weights in decreasing order 812 intvec vw[3]: 813 int vw[3][i]: multiplicity of spectral pair (vw[1][i],vw[2][i]) 814 list vw[4]: 815 module vw[4][i]: vector space basis of (vw[1][i],vw[2][i])-th graded part 816 in terms of vw[5] 817 ideal vw[5]: monomial vector space basis of H''/H' 818 ideal vw[6]: standard basis of Jacobian ideal 818 819 @end format 819 820 SEE ALSO: spectrum_lib … … 879 880 } 880 881 kill v; 881 module v=simplify( grmat(H*U0*H0,2*k0),1);882 module v=simplify(jet(H*U0*H0,2*k0)/s^(2*k0),1); 882 883 883 884 setring(R); … … 891 892 poly t=x5+x2y2+y5; 892 893 vwfilt(t); 893 }894 ///////////////////////////////////////////////////////////////////////////////895 896 proc vfilt1(poly t,list #)897 "USAGE: vfilt1(t[,opt]); poly t, int opt898 ASSUME: basering with characteristic 0 and local degree ordering,899 t with isolated citical point 0900 RETURN:901 @format902 list V: V-filtration of t on H''/H'903 intvec V[1]: spectral numbers in increasing order904 intvec V[2]:905 int V[2][i]: multiplicity of spectral number V[1][i]/V[2][i]906 if opt>=1:907 list V[4]:908 module V[3][i]: vector space basis of V[1][i]/V[2][i]-th graded part909 in terms of V[5]910 ideal V[4]: monomial vector space basis of H''/H'911 ideal V[5]: standard basis of Jacobian ideal912 default: opt=1913 @end format914 NOTE: H' and H'' denote the Brieskorn lattices915 SEE ALSO: spectrum_lib916 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice;917 Hodge filtration; V-filtration; spectrum918 EXAMPLE: example vfilt1; shows examples919 "920 {921 int opt=1;922 if(size(#)>0)923 {924 if(typeof(#[1])=="int")925 {926 opt=#[1];927 }928 }929 930 def R=basering;931 int n=nvars(R)-1;932 def G=gmsring(t,"s");933 setring G;934 935 int mu=ncols(gmsbasis);936 ideal r=gmspoly*gmsbasis;937 list l;938 matrix A[mu][mu],C;939 module H,H1=freemodule(mu),freemodule(mu);940 module H0;941 int k=-1;942 int N=n+1;943 944 while(size(reduce(H,std(H0*s)))>0)945 {946 k++;947 dbprint(printlevel-voice+2,"// k="+string(k));948 dbprint(printlevel-voice+2,"// compute matrix A of t");949 l=gmscoeffs(r,k);950 C,r=l[1..2];951 A=A+C;952 953 dbprint(printlevel-voice+2,"// compute saturation of H''");954 H0=H;955 H1=jet(module(A*H1+s^2*diff(matrix(H1),s)),k);956 H=H*s+H1;957 }958 A=A-k*s;959 960 dbprint(printlevel-voice+2,"// compute basis of saturation of H''");961 H=std(H0);962 int d0=maxdeg1(H);963 dbprint(printlevel-voice+2,"// k="+string(d0+N));964 dbprint(printlevel-voice+2,"// compute matrix A of t");965 l=gmscoeffs(r,d0+N,d0+N);966 C,r=l[1..2];967 A=A+C;968 969 dbprint(printlevel-voice+2,"// transform H'' to saturation of H''");970 l=division(H,freemodule(mu)*s^k);971 H0=jet(l[1],l[2],N-1);972 973 dbprint(printlevel-voice+2,"// compute vector spaces");974 poly p;975 int i0,j0,i1,j1;976 matrix V0[mu*N][mu*N];977 matrix V1[mu*N][mu*(N-1)];978 for(i0=mu;i0>=1;i0--)979 {980 for(i1=mu;i1>=1;i1--)981 {982 p=H0[i1,i0];983 while(p!=0)984 {985 j1=leadexp(p)[1];986 for(j0=N-j1-1;j0>=0;j0--)987 {988 V0[i1+(j1+j0)*mu,i0+j0*mu]=V0[i1+(j1+j0)*mu,i0+j0*mu]+leadcoef(p);989 if(j1+j0+1<N)990 {991 V1[i1+(j1+j0+1)*mu,i0+j0*mu]=992 V1[i1+(j1+j0+1)*mu,i0+j0*mu]+leadcoef(p);993 }994 }995 p=p-lead(p);996 }997 }998 }999 1000 dbprint(printlevel-voice+2,"// transform A to saturation of H''");1001 l=division(H*s,A*H+s^2*diff(matrix(H),s));1002 A=jet(l[1],l[2],N-1);1003 1004 dbprint(printlevel-voice+2,"// compute matrix M of A");1005 matrix M[mu*N][mu*N];1006 for(i0=mu;i0>=1;i0--)1007 {1008 for(i1=mu;i1>=1;i1--)1009 {1010 p=A[i1,i0];1011 while(p!=0)1012 {1013 j1=leadexp(p)[1];1014 for(j0=N-j1-1;j0>=0;j0--)1015 {1016 M[i1+(j0+j1)*mu,i0+j0*mu]=leadcoef(p);1017 }1018 p=p-lead(p);1019 }1020 }1021 }1022 for(i0=mu;i0>=1;i0--)1023 {1024 for(j0=N-1;j0>=0;j0--)1025 {1026 M[i0+j0*mu,i0+j0*mu]=M[i0+j0*mu,i0+j0*mu]+j0;1027 }1028 }1029 1030 dbprint(printlevel-voice+2,"// compute eigenvalues eA of A");1031 ideal eA=eigenvalues(jet(A,0))[1];1032 dbprint(printlevel-voice+2,"// eA="+string(eA));1033 1034 dbprint(printlevel-voice+2,"// compute eigenvalues eM of M");1035 ideal eM;1036 k=0;1037 intvec u;1038 for(int i=N;i>=1;i--)1039 {1040 u[i]=1;1041 }1042 i0=1;1043 while(u[N]<=ncols(eA))1044 {1045 for(i,i1=i0+1,i0;i<=N;i++)1046 {1047 if(eA[u[i]]+i<eA[u[i1]]+i1)1048 {1049 i1=i;1050 }1051 }1052 k++;1053 eM[k]=eA[u[i1]]+i1-1;1054 u[i1]=u[i1]+1;1055 if(u[i1]>ncols(eA))1056 {1057 i0=i1+1;1058 }1059 }1060 dbprint(printlevel-voice+2,"// eM="+string(eM));1061 1062 dbprint(printlevel-voice+2,"// compute V-filtration on H''/sH''");1063 ideal a;1064 k=0;1065 list V;1066 V[ncols(eM)+1]=interred(V1);1067 intvec d;1068 if(opt<=0)1069 {1070 for(i=ncols(eM);number(eM[i])-1>number(n-1)/2;i--)1071 {1072 dbprint(printlevel-voice+2,"// compute V["+string(i)+"]");1073 V1=module(V1)+syz(power(M-eM[i],n+1));1074 V[i]=interred(intersect(V1,V0));1075 1076 if(size(V[i])>size(V[i+1]))1077 {1078 k++;1079 a[k]=eM[i]-1;1080 d[k]=size(V[i])-size(V[i+1]);1081 }1082 }1083 1084 dbprint(printlevel-voice+2,"// symmetry index found");1085 int j=k;1086 1087 if(number(eM[i])-1==number(n-1)/2)1088 {1089 dbprint(printlevel-voice+2,"// compute V["+string(i)+"]");1090 V1=module(V1)+syz(power(M-eM[i],n+1));1091 V[i]=interred(intersect(V1,V0));1092 1093 if(size(V[i])>size(V[i+1]))1094 {1095 k++;1096 a[k]=eM[i]-1;1097 d[k]=size(V[i])-size(V[i+1]);1098 }1099 }1100 1101 dbprint(printlevel-voice+2,"// apply symmetry");1102 while(j>=1)1103 {1104 k++;1105 a[k]=a[j];1106 a[j]=n-1-a[k];1107 d[k]=d[j];1108 j--;1109 }1110 1111 setring(R);1112 ideal a=imap(G,a);1113 return(list(a,d));1114 }1115 else1116 {1117 list v;1118 int j=-1;1119 for(i=ncols(eM);i>=1;i--)1120 {1121 dbprint(printlevel-voice+2,"// compute V["+string(i)+"]");1122 V1=module(V1)+syz(power(M-eM[i],n+1));1123 V[i]=interred(intersect(V1,V0));1124 1125 if(size(V[i])>size(V[i+1]))1126 {1127 if(number(eM[i]-1)>=number(n-1)/2)1128 {1129 k++;1130 a[k]=eM[i]-1;1131 v[k]=matrix(freemodule(ncols(V[i])),mu,mu*N)*division(V0,V[i])[1];1132 }1133 else1134 {1135 if(j<0)1136 {1137 if(a[k]==number(n-1)/2)1138 {1139 j=k-1;1140 }1141 else1142 {1143 j=k;1144 }1145 }1146 k++;1147 a[k]=a[j];1148 a[j]=eM[i]-1;1149 v[k]=v[j];1150 v[j]=matrix(freemodule(ncols(V[i])),mu,mu*N)*division(V0,V[i])[1];1151 j--;1152 }1153 }1154 }1155 1156 dbprint(printlevel-voice+2,"// compute graded parts");1157 for(k=1;k<size(v);k++)1158 {1159 v[k]=interred(reduce(v[k],std(v[k+1])));1160 d[k]=size(v[k]);1161 }1162 v[k]=interred(v[k]);1163 d[k]=size(v[k]);1164 1165 setring(R);1166 ideal a=imap(G,a);1167 list v=imap(G,v);1168 ideal m=imap(G,gmsbasis);1169 ideal g=imap(G,gmsstd);1170 attrib(g,"isSB",1);1171 return(list(a,d,v,m,g));1172 }1173 }1174 example1175 { "EXAMPLE:"; echo=2;1176 ring R=0,(x,y),ds;1177 poly t=x5+x2y2+y5;1178 vfilt1(t);1179 }1180 ///////////////////////////////////////////////////////////////////////////////1181 1182 static proc grmat(matrix A,int k)1183 {1184 int i,j;1185 for(i=1;i<=ncols(A);i++)1186 {1187 for(j=1;j<=nrows(A);j++)1188 {1189 A[i,j]=jet(A[i,j]/var(1)^k,0);1190 }1191 }1192 return(A);1193 894 } 1194 895 /////////////////////////////////////////////////////////////////////////////// … … 1199 900 t with isolated citical point 0 1200 901 RETURN: list A: matrix A[1]+A[2]*s of t on H'' 1201 SEE ALSO: spectrum_lib1202 902 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; 1203 mixed Hodge structure; V-filtration; weight filtration; 1204 spectrum; spectral pairs 903 mixed Hodge structure; opposite Hodge filtration; V-filtration; 1205 904 EXAMPLE: example saito; shows examples 1206 905 " … … 1238 937 for(j=0;j<k;j++) 1239 938 { 1240 V=matrix(V)- grmat(A,k-j)*grmat(U,j);939 V=matrix(V)-(jet(A,k-j)/s^(k-j))*(jet(U,j)/s^j); 1241 940 } 1242 941 v=V[1..mu,1..mu]; … … 1363 1062 list l=division(H,s*A*H+s^2*diff(matrix(H),s)); 1364 1063 A=jet(l[1],l[2],k0+k1+1); 1365 A0= grmat(A,0);1366 A= grmat(A,1);1064 A0=jet(A,0); 1065 A=jet(A,1)/s; 1367 1066 1368 1067 setring(R); … … 1394 1093 ideal EV[5]: standard basis of Jacobian ideal 1395 1094 @end format 1396 SEE ALSO: spectrum_lib1397 1095 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; 1398 mixed Hodge structure; V-filtration; weight filtration; 1399 endomorphism filtration 1096 mixed Hodge structure; V-filtration; endomorphism filtration 1400 1097 EXAMPLE: example endvwfilt; shows examples 1401 1098 " … … 1535 1232 /////////////////////////////////////////////////////////////////////////////// 1536 1233 1537 proc spprint(list Sp)1538 "USAGE: spprint( Sp); list Sp1539 RETURN: string: spectrum Sp1234 proc spprint(list sp) 1235 "USAGE: spprint(sp); list sp 1236 RETURN: string: spectrum sp 1540 1237 EXAMPLE: example spprint; shows examples 1541 1238 " 1542 1239 { 1543 1240 string s; 1544 for(int i=1;i<size( Sp[2]);i++)1545 { 1546 s=s+"("+string( Sp[1][i])+","+string(Sp[2][i])+"),";1547 } 1548 s=s+"("+string( Sp[1][i])+","+string(Sp[2][i])+")";1241 for(int i=1;i<size(sp[2]);i++) 1242 { 1243 s=s+"("+string(sp[1][i])+","+string(sp[2][i])+"),"; 1244 } 1245 s=s+"("+string(sp[1][i])+","+string(sp[2][i])+")"; 1549 1246 return(s); 1550 1247 } … … 1552 1249 { "EXAMPLE:"; echo=2; 1553 1250 ring R=0,(x,y),ds; 1554 list Sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));1555 spprint( Sp);1556 } 1557 /////////////////////////////////////////////////////////////////////////////// 1558 1559 proc sppprint(list Spp)1560 "USAGE: sppprint( Sp); list Spp1561 RETURN: string: spectral pairs Spp1251 list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1252 spprint(sp); 1253 } 1254 /////////////////////////////////////////////////////////////////////////////// 1255 1256 proc sppprint(list spp) 1257 "USAGE: sppprint(spp); list spp 1258 RETURN: string: spectral pairs spp 1562 1259 EXAMPLE: example sppprint; shows examples 1563 1260 " 1564 1261 { 1565 1262 string s; 1566 for(int i=1;i<size( Spp[3]);i++)1567 { 1568 s=s+"(("+string( Spp[1][i])+","+string(Spp[2][i])+"),"+string(Spp[3][i])+"),";1569 } 1570 s=s+"(("+string( Spp[1][i])+","+string(Spp[2][i])+"),"+string(Spp[3][i])+")";1263 for(int i=1;i<size(spp[3]);i++) 1264 { 1265 s=s+"(("+string(spp[1][i])+","+string(spp[2][i])+"),"+string(spp[3][i])+"),"; 1266 } 1267 s=s+"(("+string(spp[1][i])+","+string(spp[2][i])+"),"+string(spp[3][i])+")"; 1571 1268 return(s); 1572 1269 } … … 1574 1271 { "EXAMPLE:"; echo=2; 1575 1272 ring R=0,(x,y),ds; 1576 list Spp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(2,1,1,1,1,1,0),intvec(1,2,2,1,2,2,1));1577 sppprint( Spp);1578 } 1579 /////////////////////////////////////////////////////////////////////////////// 1580 1581 proc spadd(list Sp1,list Sp2)1582 "USAGE: spadd( Sp1,Sp2); list Sp1,Sp21583 RETURN: list: sum of spectra Sp1 and Sp21273 list spp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(2,1,1,1,1,1,0),intvec(1,2,2,1,2,2,1)); 1274 sppprint(spp); 1275 } 1276 /////////////////////////////////////////////////////////////////////////////// 1277 1278 proc spadd(list sp1,list sp2) 1279 "USAGE: spadd(sp1,sp2); list sp1,sp2 1280 RETURN: list: sum of spectra sp1 and sp2 1584 1281 EXAMPLE: example spadd; shows examples 1585 1282 " … … 1588 1285 intvec m; 1589 1286 int i,i1,i2=1,1,1; 1590 while(i1<=size( Sp1[2])||i2<=size(Sp2[2]))1591 { 1592 if(i1<=size( Sp1[2]))1593 { 1594 if(i2<=size( Sp2[2]))1595 { 1596 if(number( Sp1[1][i1])<number(Sp2[1][i2]))1287 while(i1<=size(sp1[2])||i2<=size(sp2[2])) 1288 { 1289 if(i1<=size(sp1[2])) 1290 { 1291 if(i2<=size(sp2[2])) 1292 { 1293 if(number(sp1[1][i1])<number(sp2[1][i2])) 1597 1294 { 1598 s[i]= Sp1[1][i1];1599 m[i]= Sp1[2][i1];1295 s[i]=sp1[1][i1]; 1296 m[i]=sp1[2][i1]; 1600 1297 i++; 1601 1298 i1++; … … 1603 1300 else 1604 1301 { 1605 if(number( Sp1[1][i1])>number(Sp2[1][i2]))1302 if(number(sp1[1][i1])>number(sp2[1][i2])) 1606 1303 { 1607 s[i]= Sp2[1][i2];1608 m[i]= Sp2[2][i2];1304 s[i]=sp2[1][i2]; 1305 m[i]=sp2[2][i2]; 1609 1306 i++; 1610 1307 i2++; … … 1612 1309 else 1613 1310 { 1614 if( Sp1[2][i1]+Sp2[2][i2]!=0)1311 if(sp1[2][i1]+sp2[2][i2]!=0) 1615 1312 { 1616 s[i]= Sp1[1][i1];1617 m[i]= Sp1[2][i1]+Sp2[2][i2];1313 s[i]=sp1[1][i1]; 1314 m[i]=sp1[2][i1]+sp2[2][i2]; 1618 1315 i++; 1619 1316 } … … 1625 1322 else 1626 1323 { 1627 s[i]= Sp1[1][i1];1628 m[i]= Sp1[2][i1];1324 s[i]=sp1[1][i1]; 1325 m[i]=sp1[2][i1]; 1629 1326 i++; 1630 1327 i1++; … … 1633 1330 else 1634 1331 { 1635 s[i]= Sp2[1][i2];1636 m[i]= Sp2[2][i2];1332 s[i]=sp2[1][i2]; 1333 m[i]=sp2[2][i2]; 1637 1334 i++; 1638 1335 i2++; … … 1644 1341 { "EXAMPLE:"; echo=2; 1645 1342 ring R=0,(x,y),ds; 1646 list Sp1=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));1647 spprint( Sp1);1648 list Sp2=list(ideal(-1/6,1/6),intvec(1,1));1649 spprint( Sp2);1650 spprint(spadd( Sp1,Sp2));1651 } 1652 /////////////////////////////////////////////////////////////////////////////// 1653 1654 proc spsub(list Sp1,list Sp2)1655 "USAGE: spsub( Sp1,Sp2); list Sp1,Sp21656 RETURN: list: difference of spectra Sp1 and Sp21343 list sp1=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1344 spprint(sp1); 1345 list sp2=list(ideal(-1/6,1/6),intvec(1,1)); 1346 spprint(sp2); 1347 spprint(spadd(sp1,sp2)); 1348 } 1349 /////////////////////////////////////////////////////////////////////////////// 1350 1351 proc spsub(list sp1,list sp2) 1352 "USAGE: spsub(sp1,sp2); list sp1,sp2 1353 RETURN: list: difference of spectra sp1 and sp2 1657 1354 EXAMPLE: example spsub; shows examples 1658 1355 " 1659 1356 { 1660 return(spadd( Sp1,spmul(Sp2,-1)));1661 } 1662 example 1663 { "EXAMPLE:"; echo=2; 1664 ring R=0,(x,y),ds; 1665 list Sp1=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));1666 spprint( Sp1);1667 list Sp2=list(ideal(-1/6,1/6),intvec(1,1));1668 spprint( Sp2);1669 spprint(spsub( Sp1,Sp2));1357 return(spadd(sp1,spmul(sp2,-1))); 1358 } 1359 example 1360 { "EXAMPLE:"; echo=2; 1361 ring R=0,(x,y),ds; 1362 list sp1=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1363 spprint(sp1); 1364 list sp2=list(ideal(-1/6,1/6),intvec(1,1)); 1365 spprint(sp2); 1366 spprint(spsub(sp1,sp2)); 1670 1367 } 1671 1368 /////////////////////////////////////////////////////////////////////////////// … … 1674 1371 "USAGE: 1675 1372 @format 1676 1) spmul( Sp,k); list Sp, int k1677 2) spmul( Sp,k); list Sp, intvec k1373 1) spmul(sp,k); list sp, int k 1374 2) spmul(sp,k); list sp, intvec k 1678 1375 @end format 1679 1376 RETURN: 1680 1377 @format 1681 1) list: product of spectrum Sp and integer k1682 2) list: linear combination of spectra Sp with coefficients k1378 1) list: product of spectrum sp and integer k 1379 2) list: linear combination of spectra sp with coefficients k 1683 1380 @end format 1684 1381 EXAMPLE: example spmul; shows examples … … 1695 1392 if(typeof(#[2])=="intvec") 1696 1393 { 1697 list Sp0=list(ideal(),intvec(0));1394 list sp0=list(ideal(),intvec(0)); 1698 1395 for(int i=size(#[2]);i>=1;i--) 1699 1396 { 1700 Sp0=spadd(Sp0,spmul(#[1][i],#[2][i]));1397 sp0=spadd(sp0,spmul(#[1][i],#[2][i])); 1701 1398 } 1702 return( Sp0);1399 return(sp0); 1703 1400 } 1704 1401 } … … 1709 1406 { "EXAMPLE:"; echo=2; 1710 1407 ring R=0,(x,y),ds; 1711 list Sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));1712 spprint( Sp);1713 spprint(spmul( Sp,2));1714 list Sp1=list(ideal(-1/6,1/6),intvec(1,1));1715 spprint( Sp1);1716 list Sp2=list(ideal(-1/3,0,1/3),intvec(1,2,1));1717 spprint( Sp2);1718 spprint(spmul(list( Sp1,Sp2),intvec(1,2)));1719 } 1720 /////////////////////////////////////////////////////////////////////////////// 1721 1722 proc spissemicont(list Sp,list #)1723 "USAGE: spissemicont( Sp[,opt]); list Sp, int opt1408 list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1409 spprint(sp); 1410 spprint(spmul(sp,2)); 1411 list sp1=list(ideal(-1/6,1/6),intvec(1,1)); 1412 spprint(sp1); 1413 list sp2=list(ideal(-1/3,0,1/3),intvec(1,2,1)); 1414 spprint(sp2); 1415 spprint(spmul(list(sp1,sp2),intvec(1,2))); 1416 } 1417 /////////////////////////////////////////////////////////////////////////////// 1418 1419 proc spissemicont(list sp,list #) 1420 "USAGE: spissemicont(sp[,opt]); list sp, int opt 1724 1421 RETURN: 1725 1422 @format 1726 1423 int k= 1727 1424 if opt=0: 1728 1, if sum of spectrum Sp over all intervals [a,a+1) is positive1729 0, if sum of spectrum Sp over some interval [a,a+1) is negative1425 1, if sum of spectrum sp over all intervals [a,a+1) is positive 1426 0, if sum of spectrum sp over some interval [a,a+1) is negative 1730 1427 if opt=1: 1731 1, if sum of spectrum Sp over all intervals [a,a+1) and (a,a+1) is positive1732 0, if sum of spectrum Sp over some interval [a,a+1) or (a,a+1) is negative1428 1, if sum of spectrum sp over all intervals [a,a+1) and (a,a+1) is positive 1429 0, if sum of spectrum sp over some interval [a,a+1) or (a,a+1) is negative 1733 1430 default: opt=0 1734 1431 @end format … … 1745 1442 } 1746 1443 int i,j,k=1,1,0; 1747 while(j<=size( Sp[2]))1748 { 1749 while(j+1<=size( Sp[2])&&Sp[1][j]<Sp[1][i]+1)1750 { 1751 k=k+ Sp[2][j];1444 while(j<=size(sp[2])) 1445 { 1446 while(j+1<=size(sp[2])&&sp[1][j]<sp[1][i]+1) 1447 { 1448 k=k+sp[2][j]; 1752 1449 j++; 1753 1450 } 1754 if(j==size( Sp[2])&&Sp[1][j]<Sp[1][i]+1)1755 { 1756 k=k+ Sp[2][j];1451 if(j==size(sp[2])&&sp[1][j]<sp[1][i]+1) 1452 { 1453 k=k+sp[2][j]; 1757 1454 j++; 1758 1455 } … … 1761 1458 return(0); 1762 1459 } 1763 k=k- Sp[2][i];1460 k=k-sp[2][i]; 1764 1461 if(k<0&&opt==1) 1765 1462 { … … 1773 1470 { "EXAMPLE:"; echo=2; 1774 1471 ring R=0,(x,y),ds; 1775 list Sp1=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));1776 spprint( Sp1);1777 list Sp2=list(ideal(-1/6,1/6),intvec(1,1));1778 spprint( Sp2);1779 spissemicont(spsub( Sp1,spmul(Sp2,5)));1780 spissemicont(spsub( Sp1,spmul(Sp2,5)),1);1781 spissemicont(spsub( Sp1,spmul(Sp2,6)));1782 } 1783 /////////////////////////////////////////////////////////////////////////////// 1784 1785 proc spsemicont(list Sp0,list Sp,list #)1786 "USAGE: spsemicont( Sp,k[,opt]); list Sp0, list Sp, int opt1472 list sp1=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1473 spprint(sp1); 1474 list sp2=list(ideal(-1/6,1/6),intvec(1,1)); 1475 spprint(sp2); 1476 spissemicont(spsub(sp1,spmul(sp2,5))); 1477 spissemicont(spsub(sp1,spmul(sp2,5)),1); 1478 spissemicont(spsub(sp1,spmul(sp2,6))); 1479 } 1480 /////////////////////////////////////////////////////////////////////////////// 1481 1482 proc spsemicont(list sp0,list sp,list #) 1483 "USAGE: spsemicont(sp,k[,opt]); list sp0, list sp, int opt 1787 1484 RETURN: list of intvecs l: 1788 spissemicont(sub( Sp0,spmul(Sp,k)),opt)==1 iff k<=l[i] for some i1789 NOTE: if the spectra Sp occur with multiplicities k in a deformation1790 of the [quasihomogeneous] spectrum Sp0 then1791 spissemicont(sub( Sp0,spmul(Sp,k))[,1])==11485 spissemicont(sub(sp0,spmul(sp,k)),opt)==1 iff k<=l[i] for some i 1486 NOTE: if the spectra sp occur with multiplicities k in a deformation 1487 of the [quasihomogeneous] spectrum sp0 then 1488 spissemicont(sub(sp0,spmul(sp,k))[,1])==1 1792 1489 EXAMPLE: example spsemicont; shows examples 1793 1490 " … … 1795 1492 list l,l0; 1796 1493 int i,j,k; 1797 while(spissemicont( Sp0,#))1798 { 1799 if(size( Sp)>1)1800 { 1801 l0=spsemicont( Sp0,list(Sp[1..size(Sp)-1]));1494 while(spissemicont(sp0,#)) 1495 { 1496 if(size(sp)>1) 1497 { 1498 l0=spsemicont(sp0,list(sp[1..size(sp)-1])); 1802 1499 for(i=1;i<=size(l0);i++) 1803 1500 { … … 1811 1508 if(l[j]==l0[i]) 1812 1509 { 1813 l[j][size( Sp)]=k;1510 l[j][size(sp)]=k; 1814 1511 } 1815 1512 else 1816 1513 { 1817 l0[i][size( Sp)]=k;1514 l0[i][size(sp)]=k; 1818 1515 l=l+list(l0[i]); 1819 1516 } … … 1825 1522 } 1826 1523 } 1827 Sp0=spsub(Sp0,Sp[size(Sp)]);1524 sp0=spsub(sp0,sp[size(sp)]); 1828 1525 k++; 1829 1526 } 1830 if(size( Sp)>1)1527 if(size(sp)>1) 1831 1528 { 1832 1529 return(l); … … 1840 1537 { "EXAMPLE:"; echo=2; 1841 1538 ring R=0,(x,y),ds; 1842 list Sp0=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));1843 spprint( Sp0);1844 list Sp1=list(ideal(-1/6,1/6),intvec(1,1));1845 spprint( Sp1);1846 list Sp2=list(ideal(-1/3,0,1/3),intvec(1,2,1));1847 spprint( Sp2);1848 list Sp=Sp1,Sp2;1849 list l=spsemicont( Sp0,Sp);1539 list sp0=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1540 spprint(sp0); 1541 list sp1=list(ideal(-1/6,1/6),intvec(1,1)); 1542 spprint(sp1); 1543 list sp2=list(ideal(-1/3,0,1/3),intvec(1,2,1)); 1544 spprint(sp2); 1545 list sp=sp1,sp2; 1546 list l=spsemicont(sp0,sp); 1850 1547 l; 1851 spissemicont(spsub( Sp0,spmul(Sp,l[1])));1852 spissemicont(spsub( Sp0,spmul(Sp,l[1]-1)));1853 spissemicont(spsub( Sp0,spmul(Sp,l[1]+1)));1854 } 1855 /////////////////////////////////////////////////////////////////////////////// 1856 1857 proc spmilnor(list Sp)1858 "USAGE: spmilnor( Sp); list Sp1859 RETURN: int: Milnor number of spectrum Sp1548 spissemicont(spsub(sp0,spmul(sp,l[1]))); 1549 spissemicont(spsub(sp0,spmul(sp,l[1]-1))); 1550 spissemicont(spsub(sp0,spmul(sp,l[1]+1))); 1551 } 1552 /////////////////////////////////////////////////////////////////////////////// 1553 1554 proc spmilnor(list sp) 1555 "USAGE: spmilnor(sp); list sp 1556 RETURN: int: Milnor number of spectrum sp 1860 1557 EXAMPLE: example spmilnor; shows examples 1861 1558 " 1862 1559 { 1863 return(sum( Sp[2]));1864 } 1865 example 1866 { "EXAMPLE:"; echo=2; 1867 ring R=0,(x,y),ds; 1868 list Sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));1869 spprint( Sp);1870 spmilnor( Sp);1871 } 1872 /////////////////////////////////////////////////////////////////////////////// 1873 1874 proc spgeomgenus(list Sp)1875 "USAGE: spgeomgenus( Sp); list Sp1876 RETURN: int: geometrical genus of spectrum Sp1560 return(sum(sp[2])); 1561 } 1562 example 1563 { "EXAMPLE:"; echo=2; 1564 ring R=0,(x,y),ds; 1565 list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1566 spprint(sp); 1567 spmilnor(sp); 1568 } 1569 /////////////////////////////////////////////////////////////////////////////// 1570 1571 proc spgeomgenus(list sp) 1572 "USAGE: spgeomgenus(sp); list sp 1573 RETURN: int: geometrical genus of spectrum sp 1877 1574 EXAMPLE: example spgeomgenus; shows examples 1878 1575 " … … 1880 1577 int g=0; 1881 1578 int i=1; 1882 while(i+1<=size( Sp[2])&&number(Sp[1][i])<=number(0))1883 { 1884 g=g+ Sp[2][i];1579 while(i+1<=size(sp[2])&&number(sp[1][i])<=number(0)) 1580 { 1581 g=g+sp[2][i]; 1885 1582 i++; 1886 1583 } 1887 if(i==size( Sp[2])&&number(Sp[1][i])<=number(0))1888 { 1889 g=g+ Sp[2][i];1584 if(i==size(sp[2])&&number(sp[1][i])<=number(0)) 1585 { 1586 g=g+sp[2][i]; 1890 1587 } 1891 1588 return(g); … … 1894 1591 { "EXAMPLE:"; echo=2; 1895 1592 ring R=0,(x,y),ds; 1896 list Sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));1897 spprint( Sp);1898 spgeomgenus( Sp);1899 } 1900 /////////////////////////////////////////////////////////////////////////////// 1901 1902 proc spgamma(list Sp)1903 "USAGE: spgamma( Sp); list Sp1904 RETURN: number: gamma invariant of spectrum Sp1593 list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1594 spprint(sp); 1595 spgeomgenus(sp); 1596 } 1597 /////////////////////////////////////////////////////////////////////////////// 1598 1599 proc spgamma(list sp) 1600 "USAGE: spgamma(sp); list sp 1601 RETURN: number: gamma invariant of spectrum sp 1905 1602 EXAMPLE: example spgamma; shows examples 1906 1603 " … … 1908 1605 int i,j; 1909 1606 number g=0; 1910 for(i=1;i<=ncols( Sp[1]);i++)1911 { 1912 for(j=1;j<= Sp[2][i];j++)1913 { 1914 g=g+(number( Sp[1][i])-number(nvars(basering)-2)/2)^2;1915 } 1916 } 1917 g=-g/4+sum( Sp[2])*number(Sp[1][ncols(Sp[1])]-Sp[1][1])/48;1607 for(i=1;i<=ncols(sp[1]);i++) 1608 { 1609 for(j=1;j<=sp[2][i];j++) 1610 { 1611 g=g+(number(sp[1][i])-number(nvars(basering)-2)/2)^2; 1612 } 1613 } 1614 g=-g/4+sum(sp[2])*number(sp[1][ncols(sp[1])]-sp[1][1])/48; 1918 1615 return(g); 1919 1616 } … … 1921 1618 { "EXAMPLE:"; echo=2; 1922 1619 ring R=0,(x,y),ds; 1923 list Sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1));1924 spprint( Sp);1925 spgamma( Sp);1926 } 1927 /////////////////////////////////////////////////////////////////////////////// 1620 list sp=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1621 spprint(sp); 1622 spgamma(sp); 1623 } 1624 ///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.