Changeset 8960ec in git
- Timestamp:
- Mar 20, 2001, 7:19:48 PM (22 years ago)
- Branches:
- (u'spielwiese', '8d54773d6c9e2f1d2593a28bc68b7eeab54ed529')
- Children:
- b297cc5e6b076f05d48a0f72703fb142cccbb94c
- Parents:
- 93085ab6a10664d6aa7d18b816dda107e95acdb8
- Location:
- Singular/LIB
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Singular/LIB/gaussman.lib
r93085a r8960ec 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: gaussman.lib,v 1.3 5 2001-03-20 14:16:46mschulze Exp $";2 version="$Id: gaussman.lib,v 1.36 2001-03-20 18:19:48 mschulze Exp $"; 3 3 category="Singularities"; 4 4 … … 16 16 spectrum(f); singularity spectrum of f 17 17 endfilt(poly f,list V); endomorphism filtration of filtration V 18 gamma(list S); gamma invariant of spectrum S19 18 spprint(list S); print spectrum S 20 19 spadd(list S1,list S2); sum of spectra S1 and S2 … … 24 23 spissemicont(list S[,opt]); test spectrum S for semicontinuity 25 24 spsemicont(list S0,list S[,opt]); relative semicontinuity of spectra S0 and S 26 spgeomgenus(list S); geometric genus of spectrum S 25 spmilnor(list S); milnor number of spectrum S 26 spgeomgenus(list S); geometrical genus of spectrum S 27 spgamma(list S); gamma invariant of spectrum S 27 28 28 29 SEE ALSO: mondromy_lib, spectrum_lib … … 89 90 proc monodromy(poly f,list #) 90 91 "USAGE: monodromy(f[,opt]); poly f, int opt 91 ASSUME: basering has local ordering, f has isolated singularity at 0 92 ASSUME: basering has characteristic 0 and local ordering, 93 f has isolated singularity at 0 92 94 RETURN: 93 95 @format … … 103 105 " 104 106 { 105 int opt=1; 106 if(size(#)>0) 107 { 108 if(typeof(#[1])=="int") 109 { 110 opt=#[1]; 111 } 112 } 113 114 int i,j; 107 if(charstr(basering)!="0") 108 { 109 ERROR("characteristic 0 expected"); 110 } 115 111 int n=nvars(basering)-1; 116 for(i =n+1;i>=1;i--)112 for(int i=n+1;i>=1;i--) 117 113 { 118 114 if(var(i)>1) 119 115 { 120 ERROR(" no local ordering");116 ERROR("local ordering expected"); 121 117 } 122 118 } … … 127 123 if(vdim(sJ)==0) 128 124 { 129 ERROR(" no singularity at 0");125 ERROR("singularity at 0 expected"); 130 126 } 131 127 else 132 128 { 133 ERROR("no isolated singularity at 0"); 134 } 135 } 129 ERROR("isolated singularity at 0 expected"); 130 } 131 } 132 int opt=1; 133 if(size(#)>0) 134 { 135 if(typeof(#[1])=="int") 136 { 137 opt=#[1]; 138 } 139 } 140 136 141 ideal m=kbase(sJ); 137 142 int mu,modm=ncols(m),maxorddif(m); … … 145 150 int sdH=1; 146 151 int k=-1; 147 int K,N,mide;152 int j,K,N,mide; 148 153 149 154 while(k<K||sdH>0) … … 327 332 proc vfiltration(poly f,list #) 328 333 "USAGE: vfiltration(f[,opt]); poly f, int opt 329 ASSUME: basering has local ordering, f has isolated singularity at 0 334 ASSUME: basering has characteristic 0 and local ordering, 335 f has isolated singularity at 0 330 336 RETURN: 331 337 @format … … 349 355 " 350 356 { 351 int opt=1; 352 if(size(#)>0) 353 { 354 if(typeof(#[1])=="int") 355 { 356 opt=#[1]; 357 } 358 } 359 360 int i,j; 357 if(charstr(basering)!="0") 358 { 359 ERROR("characteristic 0 expected"); 360 } 361 361 int n=nvars(basering)-1; 362 for(i =n+1;i>=1;i--)362 for(int i=n+1;i>=1;i--) 363 363 { 364 364 if(var(i)>1) 365 365 { 366 ERROR(" no local ordering");366 ERROR("local ordering expected"); 367 367 } 368 368 } … … 373 373 if(vdim(sJ)==0) 374 374 { 375 ERROR(" no singularity at 0");375 ERROR("singularity at 0 expected"); 376 376 } 377 377 else 378 378 { 379 ERROR("no isolated singularity at 0"); 380 } 381 } 379 ERROR("isolated singularity at 0 expected"); 380 } 381 } 382 int opt=1; 383 if(size(#)>0) 384 { 385 if(typeof(#[1])=="int") 386 { 387 opt=#[1]; 388 } 389 } 390 382 391 ideal m=kbase(sJ); 383 392 int mu,modm=ncols(m),maxorddif(m); … … 391 400 int sdH=1; 392 401 int k=-1; 393 int K;402 int j,K; 394 403 395 404 while(k<K||sdH>0) … … 698 707 proc spectrum(poly f) 699 708 "USAGE: spectrum(f); poly f 700 ASSUME: basering has local ordering, f has isolated singularity at 0 709 ASSUME: basering has characteristic 0 and local ordering, 710 f has isolated singularity at 0 701 711 RETURN: 702 712 @format … … 723 733 proc endfilt(poly f,list V) 724 734 "USAGE: endfilt(f,V); poly f, list V 725 ASSUME: basering has local ordering, f has isolated singularity at 0 735 ASSUME: basering has characteristic 0 and local ordering, 736 f has isolated singularity at 0 726 737 RETURN: 727 738 @format … … 741 752 " 742 753 { 754 if(charstr(basering)!="0") 755 { 756 ERROR("characteristic 0 expected"); 757 } 758 int n=nvars(basering)-1; 759 for(int i=n+1;i>=1;i--) 760 { 761 if(var(i)>1) 762 { 763 ERROR("local ordering expected"); 764 } 765 } 766 ideal sJ=std(jacob(f)); 767 if(vdim(sJ)<=0) 768 { 769 if(vdim(sJ)==0) 770 { 771 ERROR("singularity at 0 expected"); 772 } 773 else 774 { 775 ERROR("isolated singularity at 0 expected"); 776 } 777 } 778 743 779 def a,d,v,m=V[1..4]; 744 780 int mu=ncols(m); 745 ideal sJ=std(jacob(f)); 746 747 int i,j,k; 781 748 782 module V0=v[1]; 749 783 for(i=2;i<=size(v);i++) … … 761 795 } 762 796 763 int i0,j0,i1,j1;797 int j,k,i0,j0,i1,j1; 764 798 number b0=number(a[1]-a[ncols(a)]); 765 799 number b1,b2; … … 880 914 poly f=x5+x2y2+y5; 881 915 endfilt(f,vfiltration(f)); 882 }883 ///////////////////////////////////////////////////////////////////////////////884 885 proc gamma(list S)886 "USAGE: gamma(S); list S887 RETURN: number: gamma invariant of spectrum S888 EXAMPLE: example gamma; shows an example889 "890 {891 ideal a=S[1];892 intvec d=S[2];893 int n=nvars(basering)-1;894 number g=0;895 int i,j;896 for(i=1;i<=ncols(a);i++)897 {898 for(j=1;j<=d[i];j++)899 {900 g=g+(number(a[i])-number(n-1)/2)^2;901 }902 }903 g=-g/4+sum(d)*number(a[ncols(a)]-a[1])/48;904 return(g);905 }906 example907 { "EXAMPLE:"; echo=2;908 ring R=0,(x,y),ds;909 poly f=x5+x2y2+y5;910 gamma(spectrum(f));911 916 } 912 917 /////////////////////////////////////////////////////////////////////////////// … … 1191 1196 /////////////////////////////////////////////////////////////////////////////// 1192 1197 1198 proc spmilnor(list S) 1199 "USAGE: spmilnor(S); list S 1200 RETURN: int: Milnor number of spectrum S 1201 EXAMPLE: example spmilnor; shows an example 1202 " 1203 { 1204 return(sum(S[2])); 1205 } 1206 example 1207 { "EXAMPLE:"; echo=2; 1208 ring R=0,(x,y),ds; 1209 list S=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1210 spprint(S); 1211 spmilnor(S); 1212 } 1213 /////////////////////////////////////////////////////////////////////////////// 1214 1193 1215 proc spgeomgenus(list S) 1194 1216 "USAGE: spgeomgenus(S); list S 1195 RETURN: int g: geometricgenus of spectrum S1217 RETURN: int: geometrical genus of spectrum S 1196 1218 EXAMPLE: example spgeomgenus; shows an example 1197 1219 " … … 1218 1240 } 1219 1241 /////////////////////////////////////////////////////////////////////////////// 1242 1243 proc spgamma(list S) 1244 "USAGE: spgamma(S); list S 1245 RETURN: number: gamma invariant of spectrum S 1246 EXAMPLE: example spgamma; shows an example 1247 " 1248 { 1249 int i,j; 1250 number g=0; 1251 for(i=1;i<=ncols(S[1]);i++) 1252 { 1253 for(j=1;j<=S[2][i];j++) 1254 { 1255 g=g+(number(S[1][i])-number(nvars(basering)-2)/2)^2; 1256 } 1257 } 1258 g=-g/4+sum(S[2])*number(S[1][ncols(S[1])]-S[1][1])/48; 1259 return(g); 1260 } 1261 example 1262 { "EXAMPLE:"; echo=2; 1263 ring R=0,(x,y),ds; 1264 list S=list(ideal(-1/2,-3/10,-1/10,0,1/10,3/10,1/2),intvec(1,2,2,1,2,2,1)); 1265 spprint(S); 1266 spgamma(S); 1267 } 1268 /////////////////////////////////////////////////////////////////////////////// -
Singular/LIB/spectrum.lib
r93085a r8960ec 1 1 /////////////////////////////////////////////////////////////////////////////// 2 version="$Id: spectrum.lib,v 1.1 3 2001-03-20 14:18:03mschulze Exp $";2 version="$Id: spectrum.lib,v 1.14 2001-03-20 18:19:48 mschulze Exp $"; 3 3 category="Singularities"; 4 4 info=" … … 19 19 @format 20 20 list S: 21 ideal S[1]: spectral numbers 21 ideal S[1]: spectral numbers in increasing order 22 22 intvec S[2]: 23 23 int S[2][i]: multiplicity of spectral number S[1][i] … … 32 32 if(size(#)==0) 33 33 { 34 list l=system("spectrum",f);34 list S=system("spectrum",f); 35 35 } 36 36 else 37 37 { 38 list l=system("spectrum",f,#[1]);38 list S=system("spectrum",f,#[1]); 39 39 } 40 ideal s=number(l[4][1])/l[5][1]-1;40 ideal a=number(S[4][1])/S[5][1]-1; 41 41 int i; 42 for(i= l[3];i>1;i--)42 for(i=S[3];i>1;i--) 43 43 { 44 s[i]=number(l[4][i])/l[5][i]-1;44 a[i]=number(S[4][i])/S[5][i]-1; 45 45 } 46 return(list( s,l[6]));46 return(list(a,S[6])); 47 47 } 48 48 example 49 49 { "EXAMPLE:"; echo = 2; 50 ring r=0,(x,y),ds;50 ring R=0,(x,y),ds; 51 51 poly f=x^31+x^6*y^7+x^2*y^12+x^13*y^2+y^29; 52 52 spectrumnd(f); … … 65 65 } 66 66 /////////////////////////////////////////////////////////////////////////////// 67
Note: See TracChangeset
for help on using the changeset viewer.