Changeset e480544 in git
- Timestamp:
- Aug 25, 2001, 4:56:55 PM (22 years ago)
- Branches:
- (u'spielwiese', '0d6b7fcd9813a1ca1ed4220cfa2b104b97a0a003')
- Children:
- 3de58c9ca0aeaafdf5cb29f986967bffa405b542
- Parents:
- a0c62d0d8c47cf16eb73078941175d95d2ab38e7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/gaussman.lib
ra0c62d re480544 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: gaussman.lib,v 1.5 1 2001-08-25 10:52:01mschulze Exp $";2 version="$Id: gaussman.lib,v 1.52 2001-08-25 14:56:55 mschulze Exp $"; 3 3 category="Singularities"; 4 4 … … 15 15 gmsnf(p,K[,Kmax]); Gauss-Manin system normal form 16 16 gmscoeffs(p,K[,Kmax]); Gauss-Manin system basis representation 17 monodromy(t [,opt]); Jordan data or eigenvaluesof monodromy of t17 monodromy(t); Jordan data of monodromy of t 18 18 spectrum(t); spectrum of t 19 sppairs(t[,opt]); spectral pairs or spectrum of t 19 sppnormalize(a,w[,m]); normalize spectral pairs 20 sppairs(t); spectral pairs of t 20 21 vfilt(t[,opt]); V-filtration on H''/H' or spectrum of t 21 22 endfilt(t,V); endomorphism filtration of V-filtration V 22 spgen(a); generate spectrum defined by a 23 sppgen(a,w); generate spectral pairs defined by a and w 24 spprint(list Sp); print spectrum or spectral pairs Sp 25 spadd(list Sp1,list Sp2); sum of spectra Sp1 and Sp2 26 spsub(list Sp1,list Sp2); difference of spectra Sp1 and Sp2 27 spmul(list Sp,int k); product of spectrum Sp and integer k 28 spmul(list Sp,intvec k); linear combination of spectra Sp with coeffs k 29 spissemicont(list Sp[,opt]); test spectrum Sp for semicontinuity 30 spsemicont(list Sp0,list Sp[,opt]); semicontinuity of spectra Sp0 and Sp 31 spmilnor(list Sp); milnor number of spectrum Sp 32 spgeomgenus(list Sp); geometrical genus of spectrum Sp 33 spgamma(list Sp); gamma invariant of spectrum Sp 23 spprint(Sp); print spectrum Sp 24 sppprint(Spp); print spectral pairs Spp 25 spadd(Sp1,Sp2); sum of spectra Sp1 and Sp2 26 spsub(Sp1,Sp2); difference of spectra Sp1 and Sp2 27 spmul(Sp,k); product of spectrum Sp and integer k 28 spmul(Sp,k); linear combination of spectra Sp with coeffs k 29 spissemicont(Sp[,opt]); test spectrum Sp for semicontinuity 30 spsemicont(Sp0,Sp[,opt]); semicontinuity of spectra Sp0 and Sp 31 spmilnor(Sp); milnor number of spectrum Sp 32 spgeomgenus(Sp); geometrical genus of spectrum Sp 33 spgamma(Sp); gamma invariant of spectrum Sp 34 34 35 35 SEE ALSO: mondromy_lib, spectrum_lib … … 446 446 matrix A; 447 447 A,A0,r=tmatrix(A0,r,H,0,K0); 448 list l=eigenval (A);448 list l=eigenvalues(A); 449 449 def e,m=l[1..2]; 450 450 dbprint(printlevel-voice+2,"// e="+string(e)); … … 468 468 int i,j,i0,j0,i1,j1; 469 469 module U,V; 470 list l; 470 471 471 472 while(e1>=e0+1) … … 519 520 H0=transpose(H0); 520 521 522 l=spnormalize(e,m); 523 e,m=l[1..2]; 524 521 525 e1=e1-1; 522 526 dbprint(printlevel-voice+2,"// e1="+string(e1)); … … 526 530 } 527 531 528 return( A,A0,r,H0);532 return(e,m,A,A0,r,H0); 529 533 } 530 534 /////////////////////////////////////////////////////////////////////////////// … … 552 556 def A0,r,H,H0=saturate(n); 553 557 e,m,A0,r=eigenvals(A0,r,H,n); 554 A,A0,r,H0=transform(e,m,A,A0,r,H,H0,0,0);558 e,m,A,A0,r,H0=transform(e,m,A,A0,r,H,H0,0,0); 555 559 556 560 setring(R); 557 561 matrix A=imap(G,A); 558 559 return(jordan(A)); 562 ideal e=imap(G,e); 563 564 return(jordan(A,e,m)); 560 565 } 561 566 example … … 583 588 " 584 589 { 585 return(spgen(sppairs(t))); 590 list l=sppairs(t); 591 return(spnormalize(l[1],l[3])); 586 592 } 587 593 example … … 590 596 poly t=x5+x2y2+y5; 591 597 spprint(spectrum(t)); 598 } 599 /////////////////////////////////////////////////////////////////////////////// 600 601 static proc sppappend(list l,number a,int w,int m) 602 { 603 if(size(l)==0) 604 { 605 l=list(ideal(a),intvec(w),intvec(m)); 606 } 607 else 608 { 609 int n=ncols(l[1]); 610 l[1][n+1]=a; 611 l[2][n+1]=w; 612 l[3][n+1]=m; 613 } 614 return(l); 615 } 616 /////////////////////////////////////////////////////////////////////////////// 617 618 proc sppnormalize(ideal a,intvec w,list #) 619 "USAGE: sppnormalize(a,w[,m]); 620 RETURN: 621 @format 622 list Spp: normalized spectral pairs (a,w,m) 623 ideal Spp[1]: numbers in a in increasing order 624 intvec Spp[2]: integers in w in decreasing order 625 intvec Spp[3]: 626 int Spp[3][i]: multiplicity of pair (Spp[1][i],Spp[2][i]) in a,w 627 @end format 628 EXAMPLE: example sppnormalize; shows examples 629 " 630 { 631 intvec m; 632 int i,j; 633 if(size(#)==0) 634 { 635 for(i=ncols(a);i>=1;i--) 636 { 637 m[i]=1; 638 } 639 } 640 else 641 { 642 m=#[1]; 643 } 644 645 list l; 646 number a0; 647 int w0,m0; 648 for(i=ncols(a);i>=1;i--) 649 { 650 if(m[i]!=0) 651 { 652 for(j=i-1;j>=1;j--) 653 { 654 if(m[j]!=0) 655 { 656 if(number(a[i])>number(a[j])|| 657 (number(a[i])==number(a[j])&&w[i]<w[j])) 658 { 659 a0=number(a[i]); 660 a[i]=a[j]; 661 a[j]=a0; 662 w0=w[i]; 663 w[i]=w[j]; 664 w[j]=w0; 665 m0=m[i]; 666 m[i]=m[j]; 667 m[j]=m0; 668 } 669 if(number(a[i])==number(a[j])&&w[i]==w[j]) 670 { 671 m[i]=m[i]+m[j]; 672 m[j]=0; 673 } 674 } 675 } 676 l=sppappend(l,number(a[i]),w[i],m[i]); 677 } 678 } 679 680 return(l); 681 } 682 example 683 { "EXAMPLE:"; echo=2; 592 684 } 593 685 /////////////////////////////////////////////////////////////////////////////// … … 597 689 ASSUME: basering with characteristic 0 and local degree ordering, 598 690 t with isolated citical point 0 599 RETURN: list l:691 RETURN: list Spp: 600 692 @format 601 ideal l[1]: spectral numbers in increasing order602 intvec l[2]: weight filtration indices in decreasing order603 intvec l[3]:604 int l[3][i]: multiplicity of spectral pair (l[1][i],l[2][i])693 ideal Spp[1]: spectral numbers in increasing order 694 intvec Spp[2]: weight filtration indices in decreasing order 695 intvec Spp[3]: 696 int Spp[3][i]: multiplicity of spectral pair (Spp[1][i],Spp[2][i]) 605 697 @end format 606 698 SEE ALSO: spectrum_lib … … 622 714 def A0,r,H,H0=saturate(n); 623 715 e,m,A0,r=eigenvals(A0,r,H,n); 624 A,A0,r,H0=transform(e,m,A,A0,r,H,H0,0,0);716 e,m,A,A0,r,H0=transform(e,m,A,A0,r,H,H0,0,0); 625 717 626 718 dbprint(printlevel-voice+2,"// compute weight filtration basis"); 627 list l=jordanbasis(A );719 list l=jordanbasis(A,e,m); 628 720 def U,v=l[1..2]; 629 721 module V=inverse(U); 630 A0= jet(V*A*U,0);722 A0=V*A*U; 631 723 vector u; 632 724 int i,j,k; 633 i=1; 634 while(i<ncols(A0)) 635 { 636 j=i+1; 637 while(j<ncols(A0)&&A0[i,i]==A0[j,j]) 638 { 639 if(v[i]<v[j]) 725 for(i=ncols(A0);i>=2;i--) 726 { 727 for(j=i-1;j>=1;j--) 728 { 729 if(A0[i,i]==A0[j,j]&&v[i]>v[j]) 640 730 { 641 731 k=v[i]; … … 646 736 U[j]=u; 647 737 } 648 j++; 649 } 650 if(j==ncols(A0)&&A0[i,i]==A0[j,j]&&v[i]<v[j]) 651 { 652 k=v[i]; 653 v[i]=v[j]; 654 v[i]=k; 655 u=U[i]; 656 U[i]=U[j]; 657 U[j]=u; 658 } 659 i=j; 738 } 660 739 } 661 740 … … 678 757 setring(R); 679 758 680 return(spp gen(imap(G,a),w));759 return(sppnormalize(imap(G,a),w)); 681 760 } 682 761 example … … 684 763 ring R=0,(x,y),ds; 685 764 poly t=x5+x2y2+y5; 686 spp rint(sppairs(t));765 sppprint(sppairs(t)); 687 766 } 688 767 /////////////////////////////////////////////////////////////////////////////// … … 823 902 824 903 dbprint(printlevel-voice+2,"// compute eigenvalues eA of A"); 825 ideal eA=eigenval (jet(A,0))[1];904 ideal eA=eigenvals(jet(A,0))[1]; 826 905 dbprint(printlevel-voice+2,"// eA="+string(eA)); 827 906 … … 1128 1207 /////////////////////////////////////////////////////////////////////////////// 1129 1208 1130 proc spgen(ideal a)1131 "USAGE: spgen(a); ideal a1132 RETURN:1133 @format1134 list Sp: numbers in a with multiplicities1135 ideal Sp[1]: numbers in a in increasing order1136 intvec Sp[2]:1137 int Sp[2][i]: multiplicity of number Sp[1][i] in a1138 @end format1139 EXAMPLE: example spgen; shows examples1140 "1141 {1142 ideal a0=jet(a,0);1143 int i,j;1144 poly p;1145 for(i=1;i<=ncols(a0);i++)1146 {1147 for(j=i+1;j<=ncols(a0);j++)1148 {1149 if(number(a0[i])>number(a0[j]))1150 {1151 p=a0[i];1152 a0[i]=a0[j];1153 a0[j]=p;1154 }1155 }1156 }1157 j=1;1158 a=a0[1];1159 intvec m=1;1160 for(i=2;i<=ncols(a0);i++)1161 {1162 if(a0[i]==a[j])1163 {1164 m[j]=m[j]+1;1165 }1166 else1167 {1168 j++;1169 a[j]=a0[i];1170 m[j]=1;1171 }1172 }1173 return(list(a,m));1174 }1175 example1176 { "EXAMPLE:"; echo=2;1177 ring R=0,(x,y),ds;1178 ideal a=-1/2,-3/10,-3/10,-1/10,-1/10,0,1/10,1/10,3/10,3/10,1/2;1179 spprint(spgen(a));1180 }1181 ///////////////////////////////////////////////////////////////////////////////1182 1183 proc sppgen(ideal a,intvec w)1184 "USAGE: sppgen(a,w); ideal a, intvec w1185 RETURN:1186 @format1187 list Spp: pairs in a and w with multiplicities1188 ideal Spp[1]: numbers in a in increasing order1189 intvec Spp[2]: integers in w in decreasing order1190 intvec Spp[3]:1191 int Spp[3][i]: multiplicity of pair (Spp[1][i],Spp[2][i]) in a,w1192 @end format1193 EXAMPLE: example sppgen; shows examples1194 "1195 {1196 ideal a0=jet(a,0);1197 intvec w0=w;1198 int i,j,k;1199 poly p;1200 for(i=1;i<=ncols(a0);i++)1201 {1202 for(j=i+1;j<=ncols(a0);j++)1203 {1204 if(number(a0[i])>number(a0[j])||a0[i]==a0[j]&&w0[i]>w0[j])1205 {1206 p=a0[i];1207 a0[i]=a0[j];1208 a0[j]=p;1209 k=w0[i];1210 w0[i]=w0[j];1211 w0[j]=k;1212 }1213 }1214 }1215 j=1;1216 a=a0[1];1217 w=w0[1];1218 intvec m=1;1219 for(i=2;i<=ncols(a0);i++)1220 {1221 if(a0[i]==a[j]&&w0[i]==w[j])1222 {1223 m[j]=m[j]+1;1224 }1225 else1226 {1227 j++;1228 a[j]=a0[i];1229 w[j]=w0[i];1230 m[j]=1;1231 }1232 }1233 return(list(a,w,m));1234 }1235 example1236 { "EXAMPLE:"; echo=2;1237 ring R=0,(x,y),ds;1238 ideal a=-1/2,-3/10,-3/10,-1/10,-1/10,0,1/10,1/10,3/10,3/10,1/2;1239 intvec w=2,1,1,1,1,1,1,1,1,1,0;1240 spprint(sppgen(a,w));1241 }1242 ///////////////////////////////////////////////////////////////////////////////1243 1244 1209 proc spprint(list Sp) 1245 1210 "USAGE: spprint(Sp); list Sp 1246 RETURN: string: spectrum or spectral pairsSp1211 RETURN: string: spectrum Sp 1247 1212 EXAMPLE: example spprint; shows examples 1248 1213 " 1249 1214 { 1250 1215 string s; 1251 if(size(Sp)==2) 1252 { 1253 for(int i=1;i<size(Sp[2]);i++) 1254 { 1255 s=s+"("+string(Sp[1][i])+","+string(Sp[2][i])+"),"; 1256 } 1257 s=s+"("+string(Sp[1][i])+","+string(Sp[2][i])+")"; 1258 } 1259 else 1260 { 1261 for(int i=1;i<size(Sp[3]);i++) 1262 { 1263 s=s+"(("+string(Sp[1][i])+","+string(Sp[2][i])+"),"+string(Sp[3][i])+"),"; 1264 } 1265 s=s+"(("+string(Sp[1][i])+","+string(Sp[2][i])+"),"+string(Sp[3][i])+")"; 1266 } 1216 for(int i=1;i<size(Sp[2]);i++) 1217 { 1218 s=s+"("+string(Sp[1][i])+","+string(Sp[2][i])+"),"; 1219 } 1220 s=s+"("+string(Sp[1][i])+","+string(Sp[2][i])+")"; 1267 1221 return(s); 1268 1222 } … … 1272 1226 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)); 1273 1227 spprint(Sp); 1228 } 1229 /////////////////////////////////////////////////////////////////////////////// 1230 1231 proc sppprint(list Spp) 1232 "USAGE: sppprint(Sp); list Spp 1233 RETURN: string: spectral pairs Spp 1234 EXAMPLE: example sppprint; shows examples 1235 " 1236 { 1237 string s; 1238 for(int i=1;i<size(Spp[3]);i++) 1239 { 1240 s=s+"(("+string(Spp[1][i])+","+string(Spp[2][i])+"),"+string(Spp[3][i])+"),"; 1241 } 1242 s=s+"(("+string(Spp[1][i])+","+string(Spp[2][i])+"),"+string(Spp[3][i])+")"; 1243 return(s); 1244 } 1245 example 1246 { "EXAMPLE:"; echo=2; 1247 ring R=0,(x,y),ds; 1248 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)); 1249 sppprint(Spp); 1274 1250 } 1275 1251 ///////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset
for help on using the changeset viewer.