Changeset 275721f in git
- Timestamp:
- Nov 20, 2001, 2:00:41 PM (22 years ago)
- Branches:
- (u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
- Children:
- 20f6fdc67e5c7c3be158b51d3369c84b45b48cc0
- Parents:
- 1f1e936f1d8cfea771388e62a2423fe8f47f7d2e
- Location:
- Singular/LIB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/gaussman.lib
r1f1e93 r275721f 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: gaussman.lib,v 1.5 7 2001-11-07 09:55:50mschulze Exp $";2 version="$Id: gaussman.lib,v 1.58 2001-11-20 13:00:34 mschulze Exp $"; 3 3 category="Singularities"; 4 4 5 5 info=" 6 LIBRARY: gaussman.lib Gauss-Manin Connection of a Singularity6 LIBRARY: gaussman.lib Algorithmic Gauss-Manin Connection 7 7 8 8 AUTHOR: Mathias Schulze, email: mschulze@mathematik.uni-kl.de 9 9 10 OVERVIEW: A library to compute invariants related to the Gauss-Manin connection11 of a an isolated hypersurface singularity10 OVERVIEW: A library to compute Hodge-theoretic invariants 11 of isolated hypersurface singularities 12 12 13 13 PROCEDURES: 14 gmsring(t,s); Brieskorn lattice in Gauss-Manin system of t15 gmsnf(p,K[,Kmax]); Gauss-Manin system normal form 16 gmscoeffs(p,K[,Kmax]); Gauss-Manin system basis representation 14 gmsring(t,s); Gauss-Manin system of t with variable s 15 gmsnf(p,K[,Kmax]); Gauss-Manin system normal form of p 16 gmscoeffs(p,K[,Kmax]); Gauss-Manin system basis representation of p 17 17 monodromy(t); Jordan data of monodromy of t 18 spectrum(t); s pectrum of t18 spectrum(t); singularity spectrum of t 19 19 sppairs(t); spectral pairs of t 20 sppnf(a,w[,m][, v|V]); normalize spectral pairs21 vfilt(t); V-filtration of t on H''/H'22 vwfilt(t); weight refined V-filtration of t on H''/H'23 saito(t); matrix A0+A1*s of t onH''20 sppnf(a,w[,m][,V]); spectral pairs normal form of (a,w,m,V) 21 vfilt(t); V-filtration of t on Brieskorn lattice H'' 22 vwfilt(t); weighted V-filtration of t on Brieskorn lattice H'' 23 tmatrix(t); t-matrix on Brieskorn lattice H'' 24 24 endvfilt(V); endomorphism V-filtration on Jacobian algebra 25 25 spprint(sp); print spectrum sp … … 27 27 spadd(sp1,sp2); sum of spectra sp1 and sp2 28 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 29 spmul(sp0,k); linear combination of spectra sp 30 spissemicont(sp[,opt]); semicontinuity test of spectrum sp 31 spsemicont(sp0,sp[,opt]); semicontinuous combinations of spectra sp0 in sp 33 32 spmilnor(sp); milnor number of spectrum sp 34 33 spgeomgenus(sp); geometrical genus of spectrum sp … … 108 107 109 108 proc gmsring(poly t,string s) 110 "USAGE: gmsring(t,s); poly t, string s ;111 ASSUME: basering with characteristic 0 and local degree ordering,112 t with isolated citical point 0109 "USAGE: gmsring(t,s); poly t, string s 110 ASSUME: characteristic 0; local degree ordering; 111 isolated citical point 0 of t 113 112 RETURN: 114 113 @format 115 ring G : C{{s}}*basering,116 poly gmspoly : image of t117 ideal gmsjacob : image of Jacobian ideal118 ideal gmsstd : image ofstandard basis of Jacobian ideal119 matrix gmsmatrix :matrix(gmsjacob)*gmsmatrix=matrix(gmsstd)120 ideal gmsbasis : image ofmonomial vector space basis of Jacobian algebra121 int gmsmaxweight : maximal weight of variables of basering114 ring G; Gauss-Manin system of t with variable s 115 poly gmspoly=t; 116 ideal gmsjacob; Jacobian ideal of t 117 ideal gmsstd; standard basis of Jacobian ideal 118 matrix gmsmatrix; matrix(gmsjacob)*gmsmatrix=matrix(gmsstd) 119 ideal gmsbasis; monomial vector space basis of Jacobian algebra 120 int gmsmaxweight; maximal weight of variables 122 121 @end format 123 NOTE: do not modify gms variables if you want to use gms procedures124 122 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice 125 EXAMPLE: example gms ; shows examples123 EXAMPLE: example gmsring; shows examples 126 124 " 127 125 { … … 214 212 215 213 proc gmsnf(ideal p,int K,list #) 216 "USAGE: gmsnf(p,K[,Kmax]); poly p, int K [, int Kmax];217 ASSUME: basering constructed by gmsring,K<=Kmax214 "USAGE: gmsnf(p,K[,Kmax]); poly p, int K, int Kmax 215 ASSUME: basering returned by gmsring; K<=Kmax 218 216 RETURN: 219 217 @format 220 list l:221 ideal l[1]: projection of p to H''=C{{s}}*gmsbasis mod s^{K+1}222 ideal l[2]: p=l[1]+l[2] mod s^(Kmax+1)218 list nf; 219 ideal nf[1]; projection of p to gmsbasis mod s^(K+1) 220 ideal nf[2]; p=nf[1]+nf[2] mod s^(Kmax+1) 223 221 @end format 224 NOTE: by setting p=l[2] the computation can be continued up to order225 at most Kmax, by default Kmax=infinity226 222 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice 227 223 EXAMPLE: example gmsnf; shows examples … … 317 313 318 314 proc gmscoeffs(ideal p,int K,list #) 319 "USAGE: gmscoeffs(p,K[,Kmax]); poly p, int K [, int Kmax];315 "USAGE: gmscoeffs(p,K[,Kmax]); poly p, int K, int Kmax 320 316 ASSUME: basering constructed by gmsring, K<=Kmax 321 317 RETURN: 322 318 @format 323 list l :324 matrix l[1] : projection of p to H''=C{{s}}*gmsbasis=C{{s}}^mumod s^(K+1)325 ideal l[2] :p=matrix(gmsbasis)*l[1]+l[2] mod s^(Kmax+1)319 list l; 320 matrix l[1]; gmsbasis representation of p mod s^(K+1) 321 ideal l[2]; p=matrix(gmsbasis)*l[1]+l[2] mod s^(Kmax+1) 326 322 @end format 327 323 NOTE: by setting p=l[2] the computation can be continued up to order … … 386 382 /////////////////////////////////////////////////////////////////////////////// 387 383 384 static proc liftbound(module U,module H,int k,int K) 385 { 386 def R=basering; 387 ring S=0,s,ds; 388 module U=imap(R,U); 389 module H=imap(R,H); 390 degBound=k+K+1; 391 H=jet(lift(U,H),K); 392 degBound=0; 393 setring(R); 394 return(imap(S,H)); 395 } 396 /////////////////////////////////////////////////////////////////////////////// 397 388 398 static proc saturate(int K0) 389 399 { … … 416 426 417 427 dbprint(printlevel-voice+2,"// transform H'' to saturation of H''"); 418 l=division(H,freemodule(mu)*s^k); 419 H0=l[1]; 428 // l=division(H,freemodule(mu)*s^k); 429 // H0=l[1]; 430 H0=liftbound(H,freemodule(mu)*s^k,k,k); 420 431 421 432 return(A0,r,H,H0,k); … … 423 434 /////////////////////////////////////////////////////////////////////////////// 424 435 425 static proc tmat rix(matrix A0,ideal r,module H,int k0,int K,int K0)436 static proc tmat(matrix A0,ideal r,module H,int k0,int K,int K0) 426 437 { 427 438 dbprint(printlevel-voice+2,"// compute matrix A of t"); … … 433 444 434 445 dbprint(printlevel-voice+2,"// transform A to saturation of H''"); 435 l=division(H*s,A0*H+s^2*diff(matrix(H),s)); 436 matrix A=jet(l[1],l[2],K); 446 // l=division(H*s,A0*H+s^2*diff(matrix(H),s)); 447 // matrix A=jet(l[1],l[2],K); 448 matrix A=liftbound(H*s,A0*H+s^2*diff(matrix(H),s),k0+1,K); 437 449 438 450 return(A,A0,r); … … 440 452 /////////////////////////////////////////////////////////////////////////////// 441 453 442 static proc eig envals(matrix A0,ideal r,module H,int k0,int K0)454 static proc eigvals(matrix A0,ideal r,module H,int k0,int K0) 443 455 { 444 456 dbprint(printlevel-voice+2, 445 457 "// compute eigenvalues e with multiplicities m of A"); 446 458 matrix A; 447 A,A0,r=tmat rix(A0,r,H,k0,0,K0);448 list l=eigenval ues(A);459 A,A0,r=tmat(A0,r,H,k0,0,K0); 460 list l=eigenvals(A); 449 461 def e,m=l[1..2]; 450 462 dbprint(printlevel-voice+2,"// e="+string(e)); … … 455 467 /////////////////////////////////////////////////////////////////////////////// 456 468 457 static proc transf orm(matrix A,matrix A0,ideal r,module H,module H0,ideal e,intvec m,int k0,int k1,int K,int K0)469 static proc transf(matrix A,matrix A0,ideal r,module H,module H0,ideal e,intvec m,int k0,int k1,int K,int K0) 458 470 { 459 471 int mu=ncols(gmsbasis); … … 463 475 dbprint(printlevel-voice+2,"// e0="+string(e0)); 464 476 dbprint(printlevel-voice+2,"// e1="+string(e1)); 465 A,A0,r=tmat rix(A0,r,H,k0,K+k1,K0+k1);477 A,A0,r=tmat(A0,r,H,k0,K+k1,K0+k1); 466 478 module U0=s^k0*freemodule(mu); 467 479 … … 541 553 /////////////////////////////////////////////////////////////////////////////// 542 554 543 proc monodromy(poly t ,list #)555 proc monodromy(poly t) 544 556 "USAGE: monodromy(t); poly t 545 ASSUME: basering with characteristic 0 and local degree ordering,546 t with isolated citical point 0547 RETURN: list l : Jordan data jordan(M) of amonodromy matrix exp(-2*pi*i*M)548 SEE ALSO: mondromy_lib 557 ASSUME: characteristic 0; local degree ordering; 558 isolated citical point 0 of t 559 RETURN: list l; Jordan data jordan(M) of monodromy matrix exp(-2*pi*i*M) 560 SEE ALSO: mondromy_lib, linalg.lib 549 561 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; monodromy 550 562 EXAMPLE: example monodromy; shows examples … … 563 575 564 576 def A0,r,H,H0,k0=saturate(n); 565 e,m,A0,r,k1=eig envals(A0,r,H,k0,n);566 A,A0,r,H0,U0,e,m=transf orm(A,A0,r,H,H0,e,m,k0,k1,0,0);577 e,m,A0,r,k1=eigvals(A0,r,H,k0,n); 578 A,A0,r,H0,U0,e,m=transf(A,A0,r,H,H0,e,m,k0,k1,0,0); 567 579 568 580 setring(R); … … 579 591 proc spectrum(poly t) 580 592 "USAGE: spectrum(t); poly t 581 ASSUME: basering with characteristic 0 and local degree ordering,582 t with isolated citical point 0593 ASSUME: characteristic 0; local degree ordering; 594 isolated citical point 0 of t 583 595 RETURN: 584 596 @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]597 list sp; singularity spectrum of t 598 ideal sp[1]; 599 number sp[1][i]; i-th spectral number 600 intvec sp[2]; 601 int sp[2][i]; multiplicity of i-th spectral number 590 602 @end format 591 603 SEE ALSO: spectrum_lib … … 608 620 proc sppairs(poly t) 609 621 "USAGE: sppairs(t); poly t 610 ASSUME: basering with characteristic 0 and local degree ordering,611 t with isolated citical point 0622 ASSUME: characteristic 0; local degree ordering; 623 isolated citical point 0 of t 612 624 RETURN: 613 625 @format 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]) 626 list spp; spectral pairs of t 627 ideal spp[1]; 628 number spp[1][i]; V-filtration index of i-th spectral pair 629 intvec spp[2]; 630 int spp[2][i]; weight filtration index of i-th spectral pair 631 intvec spp[3]; 632 int spp[3][i]; multiplicity of i-th spectral pair 618 633 @end format 619 634 SEE ALSO: spectrum_lib … … 636 651 637 652 proc sppnf(ideal a,intvec w,list #) 638 "USAGE: sppnf(a,w[,m][,v|V]); ideal a, intvec w, intvec m, module v, list V 653 "USAGE: sppnf(a,w[,m][,V]); ideal a, intvec w, intvec m, list V 654 ASSUME: ncols(e)=size(w)=size(m)=size(V); module V[i] 639 655 RETURN: 640 656 @format 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]) 657 list spp; spectral pairs normal form of (a,w,m,V) 658 ideal spp[1]; 659 number spp[1][i]; V-filtration index of i-th spectral pair 660 intvec spp[2]; 661 int spp[2][i]; weight filtration index of i-th spectral pair 662 intvec spp[3]; 663 int spp[3][i]; multiplicity of i-th spectral pair 664 list spp[4]; 665 module spp[4][i]; vector space of i-th spectral pair 648 666 @end format 667 SEE ALSO: spectrum_lib 668 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; 669 mixed Hodge structure; V-filtration; weight filtration; 670 spectrum; spectral pairs 649 671 EXAMPLE: example sppnorm; shows examples 650 672 " … … 770 792 proc vfilt(poly t) 771 793 "USAGE: vfilt(t); poly t 772 ASSUME: basering with characteristic 0 and local degree ordering,773 t with isolated citical point 0774 RETURN: t794 ASSUME: characteristic 0; local degree ordering; 795 isolated citical point 0 of t 796 RETURN: 775 797 @format 776 list v : V-filtration on H''/H'777 ideal v[1] : spectral numbers in increasing order778 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 part782 783 ideal v[4] : monomial vector space basis of H''/H'784 ideal v[5] :standard basis of Jacobian ideal798 list v; V-filtration on H''/s*H'' 799 ideal v[1]; 800 number v[1][i]; V-filtration index of i-th spectral pair 801 intvec v[2]; 802 int v[2][i]; multiplicity of i-th spectral pair 803 list v[3]; 804 module v[3][i]; vector space of i-th spectral pair in terms of v[4] 805 ideal v[4]; monomial vector space basis of H''/s*H'' 806 ideal v[5]; standard basis of Jacobian ideal 785 807 @end format 786 808 SEE ALSO: spectrum_lib … … 803 825 proc vwfilt(poly t) 804 826 "USAGE: vwfilt(t); poly t 805 ASSUME: basering with characteristic 0 and local degree ordering,806 t with isolated citical point 0827 ASSUME: characteristic 0; local degree ordering; 828 isolated citical point 0 of t 807 829 RETURN: 808 830 @format 809 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 831 list vw; weighted V-filtration on H''/s*H'' 832 ideal vw[1]; 833 number vw[1][i]; V-filtration index of i-th spectral pair 834 intvec vw[2]; 835 int vw[2][i]; weight filtration index of i-th spectral pair 836 intvec vw[3]; 837 int vw[3][i]; multiplicity of i-th spectral pair 838 list vw[4]; 839 module vw[4][i]; vector space of i-th spectral pair 840 in terms of vw[5] 841 ideal vw[5]; monomial vector space basis of H''/s*H'' 842 ideal vw[6]; standard basis of Jacobian ideal 819 843 @end format 820 844 SEE ALSO: spectrum_lib … … 838 862 839 863 def A0,r,H,H0,k0=saturate(n); 840 e,m,A0,r,k1=eig envals(A0,r,H,k0,n);841 A,A0,r,H0,U0,e,m=transf orm(A,A0,r,H,H0,e,m,k0,k1,0,0);864 e,m,A0,r,k1=eigvals(A0,r,H,k0,n); 865 A,A0,r,H0,U0,e,m=transf(A,A0,r,H,H0,e,m,k0,k1,0,0); 842 866 843 867 dbprint(printlevel-voice+2,"// compute weight filtration basis"); … … 895 919 /////////////////////////////////////////////////////////////////////////////// 896 920 897 proc saito(poly t,list #) 898 "USAGE: saito(t); poly t 899 ASSUME: basering with characteristic 0 and local degree ordering, 900 t with isolated citical point 0 901 RETURN: list A: matrix A[1]+A[2]*s of t on H'' 921 static proc commutator(matrix A) 922 { 923 int n=ncols(A); 924 int i,j,k; 925 matrix C[n^2][n^2]; 926 for(i=0;i<n;i++) 927 { 928 for(j=0;j<n;j++) 929 { 930 for(k=0;k<n;k++) 931 { 932 C[i*n+j+1,k*n+j+1]=C[i*n+j+1,k*n+j+1]+A[i+1,k+1]; 933 C[i*n+j+1,i*n+k+1]=C[i*n+j+1,i*n+k+1]-A[k+1,j+1]; 934 } 935 } 936 } 937 return(C); 938 } 939 940 /////////////////////////////////////////////////////////////////////////////// 941 942 proc tmatrix(poly t,list #) 943 "USAGE: tmatrix(t); poly t 944 ASSUME: characteristic 0; local degree ordering; 945 isolated citical point 0 of t 946 RETURN: list A; t-matrix A[1]+s*A[2] on H'' 902 947 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; 903 948 mixed Hodge structure; opposite Hodge filtration; V-filtration; 904 EXAMPLE: example tmat ; shows examples949 EXAMPLE: example tmatrix; shows examples 905 950 " 906 951 { … … 918 963 919 964 def A0,r,H,H0,k0=saturate(2*n+mu-1); 920 e,m,A0,r,k1=eig envals(A0,r,H,k0,n);921 A,A0,r,H0,U0,e,m=transf orm(A,A0,r,H,H0,e,m,k0,k1,k0+k1,k0+k1);965 e,m,A0,r,k1=eigvals(A0,r,H,k0,n); 966 A,A0,r,H0,U0,e,m=transf(A,A0,r,H,H0,e,m,k0,k1,k0+k1,k0+k1); 922 967 923 968 dbprint(printlevel-voice+2,"// transform to Jordan basis"); … … 947 992 dbprint(printlevel-voice+2,"// transform to V-splitting basis"); 948 993 A=jet(A,0); 949 H=jet(division(U,H)[1],k0+k1);950 H=std( H);994 // H=std(jet(division(U,H)[1],k0+k1)); 995 H=std(liftbound(U,H,0,k0+k1)); 951 996 952 997 dbprint(printlevel-voice+2,"// compute V-leading terms of H''"); … … 995 1040 } 996 1041 F0=intersect(C,H0); 1042 997 1043 F=list(); 998 1044 j=0; … … 1053 1099 degBound=k0+k1+1; 1054 1100 option("redSB"); 1101 1055 1102 H=std(H); 1103 1056 1104 degBound=0; 1057 1105 H=simplify(jet(H,k0+k1),1); … … 1060 1108 1061 1109 dbprint(printlevel-voice+2,"// compute matrix A0+sA1 of t"); 1062 list l=division(H,s*A*H+s^2*diff(matrix(H),s)); 1063 A=jet(l[1],l[2],k0+k1+1); 1110 // list l=division(H,s*A*H+s^2*diff(matrix(H),s)); 1111 // A=jet(l[1],l[2],k0+k1+1); 1112 A=liftbound(H,s*A*H+s^2*diff(matrix(H),s),k0+k1,1); 1064 1113 A0=jet(A,0); 1065 1114 A=jet(A,1)/s; … … 1072 1121 ring R=0,(x,y),ds; 1073 1122 poly t=x5+x2y2+y5; 1074 list A= saito(t);1123 list A=tmatrix(t); 1075 1124 print(A[1]); 1076 1125 print(A[2]); … … 1078 1127 /////////////////////////////////////////////////////////////////////////////// 1079 1128 1080 proc endvfilt(list V)1081 "USAGE: endvfilt( V); list V1082 ASSUME: V computed by vfilt1129 proc endvfilt(list v) 1130 "USAGE: endvfilt(v); list v 1131 ASSUME: v returned by vfilt 1083 1132 RETURN: 1084 1133 @format 1085 list EV: endomorphism V-filtration on theJacobian algebra1086 ideal EV[1]: spectral numbers in increasing order1087 intvec EV[2]:1088 int EV[2][i]: multiplicity of spectral pair (EV[1][i],EV[2][i])1089 list EV[3]:1090 module EV[3][i]: vector space basis of the (EV[1][i],EV[2][i])-th1091 graded part in terms of EV[4]1092 ideal EV[4]: monomial vector space basis1093 ideal EV[5]:standard basis of Jacobian ideal1134 list ev; endomorphism V-filtration on Jacobian algebra 1135 ideal ev[1]; 1136 number ev[1][i]; V-filtration index of i-th spectral pair 1137 intvec ev[2]; 1138 int ev[2][i]; multiplicity of i-th spectral pair 1139 list ev[3]; 1140 module ev[3][i]; vector space of i-th spectral pair in terms of ev[4] 1141 ideal ev[4]; monomial vector space basis of Jacobian algebra 1142 ideal ev[5]; standard basis of Jacobian ideal 1094 1143 @end format 1095 1144 KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; 1096 1145 mixed Hodge structure; V-filtration; endomorphism filtration 1097 EXAMPLE: example endvfilt; shows examples1098 " 1099 { 1100 def a,d, v,m,g=V[1..5];1146 EXAMPLE: example endvfilt; shows examples 1147 " 1148 { 1149 def a,d,V,m,g=v[1..5]; 1101 1150 int mu=ncols(m); 1102 1151 1103 module V0= v[1];1104 for(int i=2;i<=size( v);i++)1105 { 1106 V0=V0, v[i];1152 module V0=V[1]; 1153 for(int i=2;i<=size(V);i++) 1154 { 1155 V0=V0,V[i]; 1107 1156 } 1108 1157 … … 1234 1283 proc spprint(list sp) 1235 1284 "USAGE: spprint(sp); list sp 1236 RETURN: string :spectrum sp1285 RETURN: string s; spectrum sp 1237 1286 EXAMPLE: example spprint; shows examples 1238 1287 " … … 1256 1305 proc sppprint(list spp) 1257 1306 "USAGE: sppprint(spp); list spp 1258 RETURN: string :spectral pairs spp1307 RETURN: string s; spectral pairs spp 1259 1308 EXAMPLE: example sppprint; shows examples 1260 1309 " … … 1277 1326 1278 1327 proc spadd(list sp1,list sp2) 1279 "USAGE: spadd(sp1,sp2); list sp1, sp21280 RETURN: list :sum of spectra sp1 and sp21328 "USAGE: spadd(sp1,sp2); list sp1, list sp2 1329 RETURN: list sp; sum of spectra sp1 and sp2 1281 1330 EXAMPLE: example spadd; shows examples 1282 1331 " … … 1350 1399 1351 1400 proc spsub(list sp1,list sp2) 1352 "USAGE: spsub(sp1,sp2); list sp1, sp21353 RETURN: list :difference of spectra sp1 and sp21401 "USAGE: spsub(sp1,sp2); list sp1, list sp2 1402 RETURN: list sp; difference of spectra sp1 and sp2 1354 1403 EXAMPLE: example spsub; shows examples 1355 1404 " … … 1369 1418 1370 1419 proc spmul(list #) 1371 "USAGE: 1372 @format 1373 1) spmul(sp,k); list sp, int k 1374 2) spmul(sp,k); list sp, intvec k 1375 @end format 1376 RETURN: 1377 @format 1378 1) list: product of spectrum sp and integer k 1379 2) list: linear combination of spectra sp with coefficients k 1380 @end format 1420 "USAGE: spmul(sp0,k); list sp0, int[vec] k 1421 RETURN: list sp; linear combination of spectra sp0 with coefficients k 1381 1422 EXAMPLE: example spmul; shows examples 1382 1423 " … … 1418 1459 1419 1460 proc spissemicont(list sp,list #) 1420 "USAGE: spissemicont(sp[, opt]); list sp, int opt1461 "USAGE: spissemicont(sp[,1]); list sp, int opt 1421 1462 RETURN: 1422 1463 @format 1423 1464 int k= 1424 if opt=0: 1425 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 1427 if opt=1: 1428 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 1430 default: opt=0 1465 1; if sum of sp is positive on all intervals [a,a+1) [and (a,a+1)] 1466 0; if sum of sp is negative on some interval [a,a+1) [or (a,a+1)] 1431 1467 @end format 1432 1468 EXAMPLE: example spissemicont; shows examples … … 1481 1517 1482 1518 proc spsemicont(list sp0,list sp,list #) 1483 "USAGE: spsemicont(sp,k[,opt]); list sp0, list sp, int opt 1484 RETURN: list of intvecs l: 1485 spissemicont(sub(sp0,spmul(sp,k)),opt)==1 iff k<=l[i] for some i 1519 "USAGE: spsemicont(sp0,sp,k[,1]); list sp0, list sp 1520 RETURN: 1521 @format 1522 list l; 1523 intvec l[i]; if k<=l[i] then spissemicont(sub(sp0,spmul(sp,k))[,1])==1 1524 @end format 1486 1525 NOTE: if the spectra sp occur with multiplicities k in a deformation 1487 of the [quasihomogeneous] s pectrum sp0 then1526 of the [quasihomogeneous] singularity with spectrum sp0 then 1488 1527 spissemicont(sub(sp0,spmul(sp,k))[,1])==1 1489 1528 EXAMPLE: example spsemicont; shows examples … … 1554 1593 proc spmilnor(list sp) 1555 1594 "USAGE: spmilnor(sp); list sp 1556 RETURN: int :Milnor number of spectrum sp1595 RETURN: int mu; Milnor number of spectrum sp 1557 1596 EXAMPLE: example spmilnor; shows examples 1558 1597 " … … 1571 1610 proc spgeomgenus(list sp) 1572 1611 "USAGE: spgeomgenus(sp); list sp 1573 RETURN: int :geometrical genus of spectrum sp1612 RETURN: int g; geometrical genus of spectrum sp 1574 1613 EXAMPLE: example spgeomgenus; shows examples 1575 1614 " … … 1599 1638 proc spgamma(list sp) 1600 1639 "USAGE: spgamma(sp); list sp 1601 RETURN: number :gamma invariant of spectrum sp1640 RETURN: number gamma; gamma invariant of spectrum sp 1602 1641 EXAMPLE: example spgamma; shows examples 1603 1642 " -
Singular/LIB/linalg.lib
r1f1e93 r275721f 1 1 //GMG last modified: 04/25/2000 2 2 ////////////////////////////////////////////////////////////////////////////// 3 version="$Id: linalg.lib,v 1.2 0 2001-11-05 09:17:05mschulze Exp $";3 version="$Id: linalg.lib,v 1.21 2001-11-20 13:00:41 mschulze Exp $"; 4 4 category="Linear Algebra"; 5 5 info=" 6 LIBRARY: linalg.lib 6 LIBRARY: linalg.lib Algorithmic Linear Algebra 7 7 AUTHORS: Ivor Saynisch (ivs@math.tu-cottbus.de) 8 8 @* Mathias Schulze (mschulze@mathematik.uni-kl.de) … … 25 25 U_D_O(A); P*A=U*D*O, P,D,U,O=permutaion,diag,lower-,upper-triang 26 26 pos_def(A,i); test symmetric matrix for positive definiteness 27 hessenberg(M); transforms M to Hessenberg form 28 spnf(a[,m][,v|V]); normalize spectrum 29 eigenvalues(M); eigenvalues of M with multiplicities 30 jordan(M); Jordan data of constant square matrix M 31 jordanbasis(M); Jordan basis of constant square matrix M 32 jordanmatrix(e,b); Jordan matrix with eigenvalues e and Jordan block sizes b 33 jordanform(M); Jordan matrix of constant square matrix M 34 commutator(A); matrix of commutator B->[A,B]=AB-BA 27 hessenberg(M); Hessenberg form of M 28 spnf(a[,m][,V]); spectrum normal form of (a,m,V) 29 eigenvals(M); eigenvalues and multiplicities of M 30 jordan(M); Jordan data of M 31 jordanbasis(M); Jordan basis and weight filtration of M 32 jordanmatrix(e,b); Jordan matrix with Jordan data (e,b) 33 jordannf(M); Jordan normal form of M 35 34 "; 36 35 … … 1302 1301 "USAGE: hessenberg(M); matrix M 1303 1302 ASSUME: M constant square matrix 1304 RETURN: matrix H in Hessenberg form with H=inverse(U)*M*U for some U1303 RETURN: matrix H; Hessenberg form of M 1305 1304 EXAMPLE: example hessenberg; shows examples 1306 1305 " … … 1336 1335 1337 1336 proc spnf(ideal e,list #) 1338 "USAGE: spnf(e[,m][,v|V]); ideal e, intvec m, module v, list V 1337 "USAGE: spnf(e[,m][,V]); ideal e, intvec m, list V of modules 1338 ASSUME: ncols(e)=size(m)=size(V) 1339 1339 RETURN: 1340 1340 @format 1341 list Sp: normalized spectrum(e,m[,V])1342 ideal Sp[1]: numbers in ain increasing order1343 intvec Sp[2]:1344 int Sp[2][i]: multiplicity of number Sp[1][i] in e1345 list Spp[3]:1346 module Spp[3][i]: module associated to number Spp[1][i]1341 list sp; spectrum normal form of (e,m[,V]) 1342 ideal sp[1]; numbers in e in increasing order 1343 intvec sp[2]; 1344 int sp[2][i]; multiplicity of number sp[1][i] in e 1345 list sp[3]; 1346 module sp[3][i]; module associated to number sp[1][i] 1347 1347 @end format 1348 1348 EXAMPLE: example spnf; shows examples … … 1462 1462 /////////////////////////////////////////////////////////////////////////////// 1463 1463 1464 proc eigenval ues(matrix M)1465 "USAGE: eigenval ues(M); matrix M1466 ASSUME: M constant square matrix, eigenvalues of M in coefficientfield1464 proc eigenvals(matrix M) 1465 "USAGE: eigenvals(M); matrix M 1466 ASSUME: eigenvalues of M in basefield 1467 1467 RETURN: 1468 1468 @format 1469 list l :1470 ideal l[1] :eigenvalues of M1471 intvec l[2] :1472 int l[2][i] :multiplicity of eigenvalue l[1][i]1469 list l; 1470 ideal l[1]; eigenvalues of M 1471 intvec l[2]; 1472 int l[2][i]; multiplicity of eigenvalue l[1][i] 1473 1473 @end format 1474 EXAMPLE: example eigenval ues; shows examples1474 EXAMPLE: example eigenvals; shows examples 1475 1475 " 1476 1476 { … … 1530 1530 matrix M[3][3]=3,2,1,0,2,1,0,0,3; 1531 1531 print(M); 1532 eigenval ues(M);1532 eigenvals(M); 1533 1533 } 1534 1534 /////////////////////////////////////////////////////////////////////////////// … … 1536 1536 proc jordan(matrix M,list #) 1537 1537 "USAGE: jordan(M); matrix M 1538 ASSUME: M constant square matrix, eigenvalues of M in coefficientfield1538 ASSUME: eigenvalues of M in basefield 1539 1539 RETURN: 1540 1540 @format 1541 list l: 1542 ideal l[1]: eigenvalues of M in increasing order 1543 intvec l[2]: corresponding Jordan block sizes 1544 intvec l[3]: corresponding multiplicities 1541 list l; Jordan data of M 1542 ideal l[1]; 1543 number l[1][i]; eigenvalue of i-th Jordan block of M 1544 intvec l[2]; 1545 int l[2][i]; size of i-th Jordan block of M 1546 intvec l[3]; 1547 int l[3][i]; multiplicity of i-th Jordan block of M 1545 1548 @end format 1546 1549 EXAMPLE: example jordan; shows examples … … 1560 1563 if(size(#)==0) 1561 1564 { 1562 #=eigenval ues(M);1565 #=eigenvals(M); 1563 1566 } 1564 1567 def e0,m0=#[1..2]; … … 1567 1570 for(i=1;i<=ncols(e0);i++) 1568 1571 { 1569 if(deg(e0[i]>0)) 1570 { 1572 if(deg(e0[i])>0) 1573 { 1574 1571 1575 ERROR("eigenvalues in coefficient field expected"); 1572 1576 return(list()); … … 1627 1631 proc jordanbasis(matrix M,list #) 1628 1632 "USAGE: jordanbasis(M); matrix M 1629 ASSUME: M constant square matrix, eigenvalues of M in coefficientfield1633 ASSUME: eigenvalues of M in basefield 1630 1634 RETURN: 1631 1635 @format 1632 1636 list l: 1633 module l[1]: inverse(l[1])*M*l[1] has Jordan normal form 1634 intvec l[2]: weight filtration indices of l[1] with center 0 1637 module l[1]; inverse(l[1])*M*l[1] Jordan normal form 1638 intvec l[2]; 1639 int l[2][i]; weight filtration index of l[1][i] 1635 1640 @end format 1636 1641 EXAMPLE: example jordanbasis; shows examples … … 1650 1655 if(size(#)==0) 1651 1656 { 1652 #=eigenval ues(M);1657 #=eigenvals(M); 1653 1658 } 1654 1659 def e,m=#[1..2]; … … 1726 1731 proc jordanmatrix(ideal e,intvec s,intvec m) 1727 1732 "USAGE: jordanmatrix(e,s,m); ideal e, intvec s, intvec m 1733 ASSUME: ncols(e)=size(s)=size(m) 1728 1734 RETURN: 1729 1735 @format 1730 matrix J : Jordan normal form with eigenvalues e and Jordan block sizes s1731 withmultiplicities m1736 matrix J; Jordan matrix with eigenvalues e, Jordan block sizes s, 1737 and multiplicities m 1732 1738 @end format 1733 1739 EXAMPLE: example jordanmatrix; shows examples … … 1769 1775 /////////////////////////////////////////////////////////////////////////////// 1770 1776 1771 proc jordan form(matrix M,list #)1772 "USAGE: jordan form(M); matrix M1773 ASSUME: M constant square matrix, eigenvalues of M in coefficientfield1774 RETURN: matrix J in Jordan normal form with J=inverse(U)*M*U for some U1775 EXAMPLE: example jordan form; shows examples1777 proc jordannf(matrix M,list #) 1778 "USAGE: jordannf(M); matrix M 1779 ASSUME: eigenvalues of M in basefield 1780 RETURN: matrix J; Jordan normal form of M 1781 EXAMPLE: example jordannf; shows examples 1776 1782 " 1777 1783 { … … 1784 1790 matrix M[3][3]=3,2,1,0,2,1,0,0,3; 1785 1791 print(M); 1786 print(jordanform(M)); 1787 } 1788 /////////////////////////////////////////////////////////////////////////////// 1789 1790 proc commutator(matrix A) 1791 "USAGE: (A); matrix A 1792 ASSUME: A is a square matrix 1793 RETURN: matrix C of the commutator B->[A,B]=AB-BA w.r.t. rowwise ordered basis 1794 EXAMPLE: example commutator; shows examples 1795 " 1796 { 1797 int n=ncols(A); 1798 if(n!=nrows(A)) 1799 { 1800 ERROR("square matrix expected"); 1801 } 1802 int i,j,k; 1803 matrix C[n^2][n^2]; 1804 for(i=0;i<n;i++) 1805 { 1806 for(j=0;j<n;j++) 1807 { 1808 for(k=0;k<n;k++) 1809 { 1810 C[i*n+j+1,k*n+j+1]=C[i*n+j+1,k*n+j+1]+A[i+1,k+1]; 1811 C[i*n+j+1,i*n+k+1]=C[i*n+j+1,i*n+k+1]-A[k+1,j+1]; 1812 } 1813 } 1814 } 1815 return(C); 1816 } 1817 example 1818 { "EXAMPLE:"; echo=2; 1819 ring R; 1820 matrix A[2][2]=1,2,3,4; 1821 print(A); 1822 print(commutator(A)); 1823 } 1824 1792 print(jordannf(M)); 1793 } 1825 1794 /////////////////////////////////////////////////////////////////////////////// 1826 1795
Note: See TracChangeset
for help on using the changeset viewer.