[0c4bd7] | 1 | /////////////////////////////////////////////////////////////////////////////// |
---|
[962b1f] | 2 | version="$Id: gaussman.lib,v 1.70 2002-02-25 18:14:39 mschulze Exp $"; |
---|
[fd3fb7] | 3 | category="Singularities"; |
---|
[c52356d] | 4 | |
---|
[0c4bd7] | 5 | info=" |
---|
[275721f] | 6 | LIBRARY: gaussman.lib Algorithmic Gauss-Manin Connection |
---|
[0c4bd7] | 7 | |
---|
[61dadae] | 8 | AUTHOR: Mathias Schulze, email: mschulze@mathematik.uni-kl.de |
---|
[0c4bd7] | 9 | |
---|
[275721f] | 10 | OVERVIEW: A library to compute Hodge-theoretic invariants |
---|
| 11 | of isolated hypersurface singularities |
---|
[cc3a04] | 12 | |
---|
[0c4bd7] | 13 | PROCEDURES: |
---|
[04c344] | 14 | gmsring(t,s); Gauss-Manin connection of t with variable s |
---|
[38c0dca] | 15 | gmsnf(p,K); Gauss-Manin connection normal form of p |
---|
| 16 | gmscoeffs(p,K); Gauss-Manin connection basis representation of p |
---|
[e480544] | 17 | monodromy(t); Jordan data of monodromy of t |
---|
[275721f] | 18 | spectrum(t); singularity spectrum of t |
---|
[e480544] | 19 | sppairs(t); spectral pairs of t |
---|
[adf5bd6] | 20 | spnf(a[,m][,V]); spectrum normal form of (a,m,V) |
---|
[275721f] | 21 | sppnf(a,w[,m][,V]); spectral pairs normal form of (a,w,m,V) |
---|
[04c344] | 22 | vfilt(t); V-filtration of t on Brieskorn lattice |
---|
| 23 | vwfilt(t); weighted V-filtration of t on Brieskorn lattice |
---|
| 24 | tmatrix(t); t-matrix on Brieskorn lattice |
---|
[64eab4] | 25 | endvfilt(V); endomorphism V-filtration on Jacobian algebra |
---|
[d70bc7] | 26 | spprint(sp); print spectrum sp |
---|
| 27 | sppprint(spp); print spectral pairs spp |
---|
| 28 | spadd(sp1,sp2); sum of spectra sp1 and sp2 |
---|
| 29 | spsub(sp1,sp2); difference of spectra sp1 and sp2 |
---|
[275721f] | 30 | spmul(sp0,k); linear combination of spectra sp |
---|
| 31 | spissemicont(sp[,opt]); semicontinuity test of spectrum sp |
---|
| 32 | spsemicont(sp0,sp[,opt]); semicontinuous combinations of spectra sp0 in sp |
---|
[d70bc7] | 33 | spmilnor(sp); milnor number of spectrum sp |
---|
| 34 | spgeomgenus(sp); geometrical genus of spectrum sp |
---|
| 35 | spgamma(sp); gamma invariant of spectrum sp |
---|
[cc3a04] | 36 | |
---|
[b30162] | 37 | SEE ALSO: mondromy_lib, spectrum_lib |
---|
[8a87a6] | 38 | |
---|
[34a9eb1] | 39 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; |
---|
| 40 | monodromy; spectrum; spectral pairs; |
---|
[d70bc7] | 41 | mixed Hodge structure; V-filtration; weight filtration |
---|
[0c4bd7] | 42 | "; |
---|
| 43 | |
---|
[962b1f] | 44 | LIB "linalg2.lib"; |
---|
[0c4bd7] | 45 | |
---|
| 46 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 47 | |
---|
[442ed6] | 48 | static proc stdtrans(ideal I) |
---|
| 49 | { |
---|
[500122] | 50 | def R=basering; |
---|
[442ed6] | 51 | |
---|
[34a9eb1] | 52 | string os=ordstr(R); |
---|
| 53 | int j=find(os,",C"); |
---|
[442ed6] | 54 | if(j==0) |
---|
| 55 | { |
---|
[34a9eb1] | 56 | j=find(os,"C,"); |
---|
[442ed6] | 57 | } |
---|
| 58 | if(j==0) |
---|
| 59 | { |
---|
[34a9eb1] | 60 | j=find(os,",c"); |
---|
[442ed6] | 61 | } |
---|
| 62 | if(j==0) |
---|
| 63 | { |
---|
[34a9eb1] | 64 | j=find(os,"c,"); |
---|
[442ed6] | 65 | } |
---|
| 66 | if(j>0) |
---|
| 67 | { |
---|
[34a9eb1] | 68 | os[j..j+1]=" "; |
---|
[442ed6] | 69 | } |
---|
| 70 | |
---|
[34a9eb1] | 71 | execute("ring S="+charstr(R)+",(gmspoly,"+varstr(R)+"),(c,dp,"+os+");"); |
---|
[442ed6] | 72 | |
---|
[500122] | 73 | ideal I=homog(imap(R,I),gmspoly); |
---|
[442ed6] | 74 | module M=transpose(transpose(I)+freemodule(ncols(I))); |
---|
| 75 | M=std(M); |
---|
| 76 | |
---|
[500122] | 77 | setring(R); |
---|
[d341d0] | 78 | execute("map h=S,1,"+varstr(R)+";"); |
---|
[442ed6] | 79 | module M=h(M); |
---|
| 80 | |
---|
| 81 | for(int i=ncols(M);i>=1;i--) |
---|
| 82 | { |
---|
| 83 | for(j=ncols(M);j>=1;j--) |
---|
| 84 | { |
---|
| 85 | if(M[i][1]==0) |
---|
| 86 | { |
---|
| 87 | M[i]=0; |
---|
| 88 | } |
---|
| 89 | if(i!=j&&M[j][1]!=0) |
---|
| 90 | { |
---|
| 91 | if(lead(M[i][1])/lead(M[j][1])!=0) |
---|
| 92 | { |
---|
| 93 | M[i]=0; |
---|
| 94 | } |
---|
| 95 | } |
---|
| 96 | } |
---|
| 97 | } |
---|
| 98 | |
---|
| 99 | M=transpose(simplify(M,2)); |
---|
| 100 | I=M[1]; |
---|
| 101 | attrib(I,"isSB",1); |
---|
| 102 | M=M[2..ncols(M)]; |
---|
| 103 | module U=transpose(M); |
---|
| 104 | |
---|
| 105 | return(list(I,U)); |
---|
| 106 | } |
---|
| 107 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 108 | |
---|
[500122] | 109 | proc gmsring(poly t,string s) |
---|
[275721f] | 110 | "USAGE: gmsring(t,s); poly t, string s |
---|
| 111 | ASSUME: characteristic 0; local degree ordering; |
---|
[a8cc0a] | 112 | isolated critical point 0 of t |
---|
[e3f423] | 113 | RETURN: |
---|
| 114 | @format |
---|
[04c344] | 115 | ring G; Gauss-Manin connection of t with variable s |
---|
[275721f] | 116 | poly gmspoly=t; |
---|
| 117 | ideal gmsjacob; Jacobian ideal of t |
---|
| 118 | ideal gmsstd; standard basis of Jacobian ideal |
---|
[04c344] | 119 | matrix gmsmatrix; matrix(gmsjacob)*gmsmatrix==matrix(gmsstd) |
---|
[275721f] | 120 | ideal gmsbasis; monomial vector space basis of Jacobian algebra |
---|
[9526639] | 121 | int gmsmaxdeg; maximal weight of variables |
---|
[e3f423] | 122 | @end format |
---|
[34a9eb1] | 123 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice |
---|
[275721f] | 124 | EXAMPLE: example gmsring; shows examples |
---|
[e3f423] | 125 | " |
---|
[04b295] | 126 | { |
---|
[500122] | 127 | def R=basering; |
---|
| 128 | if(charstr(R)!="0") |
---|
[04b295] | 129 | { |
---|
| 130 | ERROR("characteristic 0 expected"); |
---|
| 131 | } |
---|
[500122] | 132 | for(int i=nvars(R);i>=1;i--) |
---|
[04b295] | 133 | { |
---|
| 134 | if(var(i)>1) |
---|
| 135 | { |
---|
| 136 | ERROR("local ordering expected"); |
---|
| 137 | } |
---|
| 138 | } |
---|
| 139 | |
---|
| 140 | ideal dt=jacob(t); |
---|
[442ed6] | 141 | list l=stdtrans(dt); |
---|
| 142 | ideal g=l[1]; |
---|
[04b295] | 143 | if(vdim(g)<=0) |
---|
| 144 | { |
---|
| 145 | if(vdim(g)==0) |
---|
| 146 | { |
---|
| 147 | ERROR("singularity at 0 expected"); |
---|
| 148 | } |
---|
| 149 | else |
---|
| 150 | { |
---|
[a8cc0a] | 151 | ERROR("isolated critical point 0 expected"); |
---|
[04b295] | 152 | } |
---|
[ccf8d9] | 153 | } |
---|
[9526639] | 154 | matrix B=l[2]; |
---|
[04b295] | 155 | ideal m=kbase(g); |
---|
| 156 | |
---|
[9526639] | 157 | int gmsmaxdeg; |
---|
[500122] | 158 | for(i=nvars(R);i>=1;i--) |
---|
| 159 | { |
---|
[9526639] | 160 | if(deg(var(i))>gmsmaxdeg) |
---|
[500122] | 161 | { |
---|
[9526639] | 162 | gmsmaxdeg=deg(var(i)); |
---|
[500122] | 163 | } |
---|
| 164 | } |
---|
| 165 | |
---|
[34a9eb1] | 166 | string os=ordstr(R); |
---|
| 167 | int j=find(os,",C"); |
---|
| 168 | if(j==0) |
---|
| 169 | { |
---|
| 170 | j=find(os,"C,"); |
---|
| 171 | } |
---|
| 172 | if(j==0) |
---|
| 173 | { |
---|
| 174 | j=find(os,",c"); |
---|
| 175 | } |
---|
| 176 | if(j==0) |
---|
| 177 | { |
---|
| 178 | j=find(os,"c,"); |
---|
| 179 | } |
---|
| 180 | if(j>0) |
---|
| 181 | { |
---|
| 182 | os[j..j+1]=" "; |
---|
| 183 | } |
---|
| 184 | |
---|
[d341d0] | 185 | execute("ring G="+string(charstr(R))+",("+s+","+varstr(R)+"),(ws("+ |
---|
[9526639] | 186 | string(deg(highcorner(g))+2*gmsmaxdeg)+"),"+os+",c);"); |
---|
[04b295] | 187 | |
---|
[500122] | 188 | poly gmspoly=imap(R,t); |
---|
| 189 | ideal gmsjacob=imap(R,dt); |
---|
| 190 | ideal gmsstd=imap(R,g); |
---|
[9526639] | 191 | matrix gmsmatrix=imap(R,B); |
---|
[500122] | 192 | ideal gmsbasis=imap(R,m); |
---|
[04b295] | 193 | |
---|
[500122] | 194 | attrib(gmsstd,"isSB",1); |
---|
[9526639] | 195 | export gmspoly,gmsjacob,gmsstd,gmsmatrix,gmsbasis,gmsmaxdeg; |
---|
[04b295] | 196 | |
---|
[500122] | 197 | return(G); |
---|
[e3f423] | 198 | } |
---|
| 199 | example |
---|
| 200 | { "EXAMPLE:"; echo=2; |
---|
| 201 | ring R=0,(x,y),ds; |
---|
[86c1f0] | 202 | poly t=x5+x2y2+y5; |
---|
| 203 | def G=gmsring(t,"s"); |
---|
[e3f423] | 204 | setring(G); |
---|
[500122] | 205 | gmspoly; |
---|
| 206 | print(gmsjacob); |
---|
| 207 | print(gmsstd); |
---|
| 208 | print(gmsmatrix); |
---|
[86c1f0] | 209 | print(gmsbasis); |
---|
[9526639] | 210 | gmsmaxdeg; |
---|
[04b295] | 211 | } |
---|
| 212 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 213 | |
---|
[38c0dca] | 214 | proc gmsnf(ideal p,int K) |
---|
| 215 | "USAGE: gmsnf(p,K); poly p, int K |
---|
| 216 | ASSUME: basering returned by gmsring |
---|
[e3f423] | 217 | RETURN: |
---|
| 218 | @format |
---|
[275721f] | 219 | list nf; |
---|
| 220 | ideal nf[1]; projection of p to gmsbasis mod s^(K+1) |
---|
[38c0dca] | 221 | ideal nf[2]; p=nf[1]+nf[2] |
---|
[e3f423] | 222 | @end format |
---|
[38c0dca] | 223 | NOTE: by setting p=nf[2] the computation can be continued |
---|
[34a9eb1] | 224 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice |
---|
[e3f423] | 225 | EXAMPLE: example gmsnf; shows examples |
---|
| 226 | " |
---|
[04b295] | 227 | { |
---|
[38c0dca] | 228 | return(system("gmsnf",p,gmsstd,gmsmatrix,(K+1)*deg(var(1))-2*gmsmaxdeg,K)); |
---|
[e3f423] | 229 | } |
---|
| 230 | example |
---|
| 231 | { "EXAMPLE:"; echo=2; |
---|
| 232 | ring R=0,(x,y),ds; |
---|
[86c1f0] | 233 | poly t=x5+x2y2+y5; |
---|
| 234 | def G=gmsring(t,"s"); |
---|
[e3f423] | 235 | setring(G); |
---|
[500122] | 236 | list l0=gmsnf(gmspoly,0); |
---|
[e3f423] | 237 | print(l0[1]); |
---|
[500122] | 238 | list l1=gmsnf(gmspoly,1); |
---|
[e3f423] | 239 | print(l1[1]); |
---|
| 240 | list l=gmsnf(l0[2],1); |
---|
| 241 | print(l[1]); |
---|
[04b295] | 242 | } |
---|
| 243 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 244 | |
---|
[38c0dca] | 245 | proc gmscoeffs(ideal p,int K) |
---|
| 246 | "USAGE: gmscoeffs(p,K); poly p, int K |
---|
| 247 | ASSUME: basering constructed by gmsring |
---|
[e3f423] | 248 | RETURN: |
---|
| 249 | @format |
---|
[275721f] | 250 | list l; |
---|
| 251 | matrix l[1]; gmsbasis representation of p mod s^(K+1) |
---|
[38c0dca] | 252 | ideal l[2]; p=matrix(gmsbasis)*l[1]+l[2] |
---|
[e3f423] | 253 | @end format |
---|
[38c0dca] | 254 | NOTE: by setting p=l[2] the computation can be continued |
---|
[34a9eb1] | 255 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice |
---|
[e3f423] | 256 | EXAMPLE: example gmscoeffs; shows examples |
---|
| 257 | " |
---|
[04b295] | 258 | { |
---|
[38c0dca] | 259 | list l=gmsnf(p,K); |
---|
[e3f423] | 260 | ideal r,q=l[1..2]; |
---|
[04b295] | 261 | poly v=1; |
---|
| 262 | for(int i=2;i<=nvars(basering);i++) |
---|
| 263 | { |
---|
| 264 | v=v*var(i); |
---|
| 265 | } |
---|
[500122] | 266 | matrix C=coeffs(r,gmsbasis,v); |
---|
[04b295] | 267 | return(C,q); |
---|
| 268 | } |
---|
[e3f423] | 269 | example |
---|
| 270 | { "EXAMPLE:"; echo=2; |
---|
| 271 | ring R=0,(x,y),ds; |
---|
[86c1f0] | 272 | poly t=x5+x2y2+y5; |
---|
| 273 | def G=gmsring(t,"s"); |
---|
[e3f423] | 274 | setring(G); |
---|
[500122] | 275 | list l0=gmscoeffs(gmspoly,0); |
---|
[e3f423] | 276 | print(l0[1]); |
---|
[500122] | 277 | list l1=gmscoeffs(gmspoly,1); |
---|
[e3f423] | 278 | print(l1[1]); |
---|
| 279 | list l=gmscoeffs(l0[2],1); |
---|
| 280 | print(l[1]); |
---|
| 281 | } |
---|
[04b295] | 282 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 283 | |
---|
[0ff6b5] | 284 | static proc min(ideal e) |
---|
[0c4bd7] | 285 | { |
---|
[0ff6b5] | 286 | int i; |
---|
| 287 | number m=number(e[1]); |
---|
| 288 | for(i=2;i<=ncols(e);i++) |
---|
[0c4bd7] | 289 | { |
---|
[0ff6b5] | 290 | if(number(e[i])<m) |
---|
[0c4bd7] | 291 | { |
---|
[0ff6b5] | 292 | m=number(e[i]); |
---|
[0c4bd7] | 293 | } |
---|
| 294 | } |
---|
[0ff6b5] | 295 | return(m); |
---|
[0c4bd7] | 296 | } |
---|
| 297 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 298 | |
---|
[0ff6b5] | 299 | static proc max(ideal e) |
---|
[0c4bd7] | 300 | { |
---|
[0ff6b5] | 301 | int i; |
---|
| 302 | number m=number(e[1]); |
---|
| 303 | for(i=2;i<=ncols(e);i++) |
---|
[8960ec] | 304 | { |
---|
[0ff6b5] | 305 | if(number(e[i])>m) |
---|
[8960ec] | 306 | { |
---|
[0ff6b5] | 307 | m=number(e[i]); |
---|
[0c4bd7] | 308 | } |
---|
| 309 | } |
---|
[0ff6b5] | 310 | return(m); |
---|
| 311 | } |
---|
| 312 | /////////////////////////////////////////////////////////////////////////////// |
---|
[8960ec] | 313 | |
---|
[2ca72f] | 314 | static proc saturate() |
---|
[0ff6b5] | 315 | { |
---|
[86c1f0] | 316 | int mu=ncols(gmsbasis); |
---|
[34a9eb1] | 317 | ideal r=gmspoly*gmsbasis; |
---|
| 318 | matrix A0[mu][mu],C; |
---|
[0c4bd7] | 319 | module H0; |
---|
[0ff6b5] | 320 | module H,H1=freemodule(mu),freemodule(mu); |
---|
[0c4bd7] | 321 | int k=-1; |
---|
[0ff6b5] | 322 | list l; |
---|
| 323 | |
---|
[34a9eb1] | 324 | while(size(reduce(H,std(H0*s)))>0) |
---|
[0c4bd7] | 325 | { |
---|
[0ff6b5] | 326 | dbprint(printlevel-voice+2,"// compute matrix A of t"); |
---|
[0c4bd7] | 327 | k++; |
---|
[1418c4] | 328 | dbprint(printlevel-voice+2,"// k="+string(k)); |
---|
[38c0dca] | 329 | l=gmscoeffs(r,k); |
---|
[34a9eb1] | 330 | C,r=l[1..2]; |
---|
[04b295] | 331 | A0=A0+C; |
---|
[12c3e5] | 332 | |
---|
[1418c4] | 333 | dbprint(printlevel-voice+2,"// compute saturation of H''"); |
---|
[04b295] | 334 | H0=H; |
---|
[86c1f0] | 335 | H1=jet(module(A0*H1+s^2*diff(matrix(H1),s)),k); |
---|
| 336 | H=H*s+H1; |
---|
[04b295] | 337 | } |
---|
| 338 | |
---|
[0ff6b5] | 339 | A0=A0-k*s; |
---|
[1418c4] | 340 | dbprint(printlevel-voice+2,"// compute basis of saturation of H''"); |
---|
[34a9eb1] | 341 | H=std(H0); |
---|
[0ff6b5] | 342 | |
---|
| 343 | dbprint(printlevel-voice+2,"// transform H'' to saturation of H''"); |
---|
[962b1f] | 344 | H0=division(freemodule(mu)*s^k,H,k,intvec(1))[1]; |
---|
[0ff6b5] | 345 | |
---|
[61549b] | 346 | return(A0,r,H,H0,k); |
---|
[0ff6b5] | 347 | } |
---|
| 348 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 349 | |
---|
[2ca72f] | 350 | static proc basisrep(matrix A0,ideal r,module H,int k0,int K) |
---|
[0ff6b5] | 351 | { |
---|
[1418c4] | 352 | dbprint(printlevel-voice+2,"// compute matrix A of t"); |
---|
[61549b] | 353 | dbprint(printlevel-voice+2,"// k="+string(K+k0+1)); |
---|
[38c0dca] | 354 | list l=gmscoeffs(r,K+k0+1); |
---|
[0ff6b5] | 355 | matrix C; |
---|
[34a9eb1] | 356 | C,r=l[1..2]; |
---|
[04b295] | 357 | A0=A0+C; |
---|
[0ff6b5] | 358 | |
---|
[1418c4] | 359 | dbprint(printlevel-voice+2,"// transform A to saturation of H''"); |
---|
[962b1f] | 360 | matrix A=division(module(A0*H+s^2*diff(matrix(H),s)),H,K+1,intvec(1))[1]/s; |
---|
[0ff6b5] | 361 | |
---|
| 362 | return(A,A0,r); |
---|
| 363 | } |
---|
| 364 | /////////////////////////////////////////////////////////////////////////////// |
---|
[04b295] | 365 | |
---|
[2ca72f] | 366 | static proc eigvals(matrix A0,ideal r,module H,int k0) |
---|
[0ff6b5] | 367 | { |
---|
[04b295] | 368 | dbprint(printlevel-voice+2, |
---|
[962b1f] | 369 | "// compute eigenvalues e with multiplicities m of A0"); |
---|
[0ff6b5] | 370 | matrix A; |
---|
[2ca72f] | 371 | A,A0,r=basisrep(A0,r,H,k0,0); |
---|
[275721f] | 372 | list l=eigenvals(A); |
---|
[1418c4] | 373 | def e,m=l[1..2]; |
---|
| 374 | dbprint(printlevel-voice+2,"// e="+string(e)); |
---|
| 375 | dbprint(printlevel-voice+2,"// m="+string(m)); |
---|
[04b295] | 376 | |
---|
[2ca72f] | 377 | return(e,m,A0,r); |
---|
[0ff6b5] | 378 | } |
---|
| 379 | /////////////////////////////////////////////////////////////////////////////// |
---|
[1418c4] | 380 | |
---|
[2ca72f] | 381 | static proc transf(matrix A,matrix A0,ideal r,module H,module H0,ideal e,intvec m,int k0,int K,int opt) |
---|
[0ff6b5] | 382 | { |
---|
[61549b] | 383 | int mu=ncols(gmsbasis); |
---|
| 384 | |
---|
[0ff6b5] | 385 | number e0,e1=min(e),max(e); |
---|
[2ca72f] | 386 | |
---|
| 387 | int i,j,k; |
---|
| 388 | int k1; |
---|
| 389 | intvec d; |
---|
| 390 | d[ncols(e)]=0; |
---|
| 391 | if(opt) |
---|
| 392 | { |
---|
| 393 | dbprint(printlevel-voice+2, |
---|
| 394 | "// compute maximal differences d of e"); |
---|
| 395 | for(i=1;i<=ncols(e);i++) |
---|
| 396 | { |
---|
| 397 | d[i]=int(e[i]-e0); |
---|
| 398 | } |
---|
| 399 | } |
---|
| 400 | else |
---|
| 401 | { |
---|
| 402 | dbprint(printlevel-voice+2, |
---|
| 403 | "// compute maximal integer differences d of e"); |
---|
| 404 | for(i=1;i<ncols(e);i++) |
---|
| 405 | { |
---|
| 406 | for(j=i+1;i<=ncols(e);i++) |
---|
| 407 | { |
---|
| 408 | k=int(e[i]-e[j]); |
---|
| 409 | if(number(e[i]-e[j])==k) |
---|
| 410 | { |
---|
| 411 | if(k>d[i]) |
---|
| 412 | { |
---|
| 413 | d[i]=k; |
---|
| 414 | } |
---|
| 415 | if(-k>d[j]) |
---|
| 416 | { |
---|
| 417 | d[j]=-k; |
---|
| 418 | } |
---|
| 419 | } |
---|
| 420 | } |
---|
| 421 | } |
---|
| 422 | } |
---|
| 423 | dbprint(printlevel-voice+2,"// d="+string(d)); |
---|
| 424 | |
---|
| 425 | for(i,k=1,0;i<=size(d);i++) |
---|
| 426 | { |
---|
| 427 | if(k<d[i]) |
---|
| 428 | { |
---|
| 429 | k=d[i]; |
---|
| 430 | } |
---|
| 431 | } |
---|
| 432 | |
---|
| 433 | A,A0,r=basisrep(A0,r,H,k0,K+k1); |
---|
[61549b] | 434 | module U0=s^k0*freemodule(mu); |
---|
[0ff6b5] | 435 | |
---|
[2ca72f] | 436 | if(k>0) |
---|
[0c4bd7] | 437 | { |
---|
[2ca72f] | 438 | int i0,j0,i1,j1; |
---|
[0ff6b5] | 439 | module U,V; |
---|
[e480544] | 440 | list l; |
---|
[0c4bd7] | 441 | |
---|
[2ca72f] | 442 | while(k>0) |
---|
[0c4bd7] | 443 | { |
---|
[0ff6b5] | 444 | dbprint(printlevel-voice+2,"// transform to separate eigenvalues"); |
---|
[34a9eb1] | 445 | U=0; |
---|
[ccf8d9] | 446 | for(i=1;i<=ncols(e);i++) |
---|
[0c4bd7] | 447 | { |
---|
[ccf8d9] | 448 | U=U+syz(power(jet(A,0)-e[i],m[i])); |
---|
[34a9eb1] | 449 | } |
---|
[0ff6b5] | 450 | V=inverse(U); |
---|
| 451 | A=V*A*U; |
---|
| 452 | H0=V*H0; |
---|
[61549b] | 453 | U0=U0*U; |
---|
[34a9eb1] | 454 | |
---|
[2ca72f] | 455 | dbprint(printlevel-voice+2, |
---|
| 456 | "// transform to reduce d by 1"); |
---|
[0ff6b5] | 457 | for(i0,i=1,1;i0<=ncols(e);i0++) |
---|
[34a9eb1] | 458 | { |
---|
[0ff6b5] | 459 | for(i1=1;i1<=m[i0];i1,i=i1+1,i+1) |
---|
[0c4bd7] | 460 | { |
---|
[0ff6b5] | 461 | for(j0,j=1,1;j0<=ncols(e);j0++) |
---|
[0c4bd7] | 462 | { |
---|
[0ff6b5] | 463 | for(j1=1;j1<=m[j0];j1,j=j1+1,j+1) |
---|
[34a9eb1] | 464 | { |
---|
[2ca72f] | 465 | if(d[i0]==0&&d[j0]>0) |
---|
[0ff6b5] | 466 | { |
---|
| 467 | A[i,j]=A[i,j]/s; |
---|
| 468 | } |
---|
[2ca72f] | 469 | if(d[i0]>0&&d[j0]==0) |
---|
[0ff6b5] | 470 | { |
---|
| 471 | A[i,j]=A[i,j]*s; |
---|
| 472 | } |
---|
[34a9eb1] | 473 | } |
---|
[ccf8d9] | 474 | } |
---|
[0c4bd7] | 475 | } |
---|
| 476 | } |
---|
[0ff6b5] | 477 | |
---|
| 478 | H0=transpose(H0); |
---|
| 479 | for(i0,i=1,1;i0<=ncols(e);i0++) |
---|
[6ab855] | 480 | { |
---|
[2ca72f] | 481 | if(d[i0]>0) |
---|
[34a9eb1] | 482 | { |
---|
[0ff6b5] | 483 | for(i1=1;i1<=m[i0];i1,i=i1+1,i+1) |
---|
| 484 | { |
---|
| 485 | A[i,i]=A[i,i]-1; |
---|
| 486 | H0[i]=H0[i]*s; |
---|
[61549b] | 487 | U0[i]=U0[i]/s; |
---|
[0ff6b5] | 488 | } |
---|
| 489 | e[i0]=e[i0]-1; |
---|
[2ca72f] | 490 | d[i0]=d[i0]-1; |
---|
[34a9eb1] | 491 | } |
---|
[ccf8d9] | 492 | else |
---|
| 493 | { |
---|
| 494 | i=i+m[i0]; |
---|
| 495 | } |
---|
[6ab855] | 496 | } |
---|
[0ff6b5] | 497 | H0=transpose(H0); |
---|
[1418c4] | 498 | |
---|
[2ca72f] | 499 | l=sppnf(e,d,m); |
---|
| 500 | e,d,m=l[1..3]; |
---|
[e480544] | 501 | |
---|
[2ca72f] | 502 | k--; |
---|
[6ab855] | 503 | } |
---|
[34a9eb1] | 504 | |
---|
[0ff6b5] | 505 | A=jet(A,K); |
---|
[0c4bd7] | 506 | } |
---|
| 507 | |
---|
[61549b] | 508 | return(A,A0,r,H0,U0,e,m); |
---|
[0ff6b5] | 509 | } |
---|
| 510 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 511 | |
---|
[275721f] | 512 | proc monodromy(poly t) |
---|
[0ff6b5] | 513 | "USAGE: monodromy(t); poly t |
---|
[275721f] | 514 | ASSUME: characteristic 0; local degree ordering; |
---|
[a8cc0a] | 515 | isolated critical point 0 of t |
---|
[275721f] | 516 | RETURN: list l; Jordan data jordan(M) of monodromy matrix exp(-2*pi*i*M) |
---|
| 517 | SEE ALSO: mondromy_lib, linalg.lib |
---|
[0ff6b5] | 518 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; monodromy |
---|
| 519 | EXAMPLE: example monodromy; shows examples |
---|
| 520 | " |
---|
| 521 | { |
---|
| 522 | def R=basering; |
---|
| 523 | int n=nvars(R)-1; |
---|
| 524 | def G=gmsring(t,"s"); |
---|
| 525 | setring(G); |
---|
| 526 | |
---|
| 527 | matrix A; |
---|
[61549b] | 528 | module U0; |
---|
[0ff6b5] | 529 | ideal e; |
---|
| 530 | intvec m; |
---|
| 531 | |
---|
[2ca72f] | 532 | def A0,r,H,H0,k0=saturate(); |
---|
| 533 | e,m,A0,r=eigvals(A0,r,H,k0); |
---|
| 534 | A,A0,r,H0,U0,e,m=transf(A,A0,r,H,H0,e,m,k0,0,0); |
---|
[0ff6b5] | 535 | |
---|
[51534b6] | 536 | list l=jordan(A,e,m); |
---|
[500122] | 537 | setring(R); |
---|
[51534b6] | 538 | list l=imap(G,l); |
---|
[9526639] | 539 | kill G,gmsmaxdeg; |
---|
[51534b6] | 540 | |
---|
| 541 | return(l); |
---|
[0c4bd7] | 542 | } |
---|
| 543 | example |
---|
| 544 | { "EXAMPLE:"; echo=2; |
---|
| 545 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 546 | poly t=x5+x2y2+y5; |
---|
| 547 | monodromy(t); |
---|
[0c4bd7] | 548 | } |
---|
| 549 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 550 | |
---|
[86c1f0] | 551 | proc spectrum(poly t) |
---|
| 552 | "USAGE: spectrum(t); poly t |
---|
[275721f] | 553 | ASSUME: characteristic 0; local degree ordering; |
---|
[a8cc0a] | 554 | isolated critical point 0 of t |
---|
[057c22e] | 555 | RETURN: |
---|
[7c7ca9] | 556 | @format |
---|
[275721f] | 557 | list sp; singularity spectrum of t |
---|
| 558 | ideal sp[1]; |
---|
| 559 | number sp[1][i]; i-th spectral number |
---|
| 560 | intvec sp[2]; |
---|
| 561 | int sp[2][i]; multiplicity of i-th spectral number |
---|
[86c1f0] | 562 | @end format |
---|
| 563 | SEE ALSO: spectrum_lib |
---|
[61549b] | 564 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; |
---|
[d70bc7] | 565 | mixed Hodge structure; V-filtration; spectrum |
---|
[61549b] | 566 | EXAMPLE: example spectrum; shows examples |
---|
[86c1f0] | 567 | " |
---|
| 568 | { |
---|
[61549b] | 569 | list l=vwfilt(t); |
---|
| 570 | return(spnf(l[1],l[3])); |
---|
[86c1f0] | 571 | } |
---|
| 572 | example |
---|
| 573 | { "EXAMPLE:"; echo=2; |
---|
| 574 | ring R=0,(x,y),ds; |
---|
| 575 | poly t=x5+x2y2+y5; |
---|
| 576 | spprint(spectrum(t)); |
---|
| 577 | } |
---|
| 578 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 579 | |
---|
[61549b] | 580 | proc sppairs(poly t) |
---|
| 581 | "USAGE: sppairs(t); poly t |
---|
[275721f] | 582 | ASSUME: characteristic 0; local degree ordering; |
---|
[a8cc0a] | 583 | isolated critical point 0 of t |
---|
[61549b] | 584 | RETURN: |
---|
| 585 | @format |
---|
[275721f] | 586 | list spp; spectral pairs of t |
---|
| 587 | ideal spp[1]; |
---|
| 588 | number spp[1][i]; V-filtration index of i-th spectral pair |
---|
| 589 | intvec spp[2]; |
---|
| 590 | int spp[2][i]; weight filtration index of i-th spectral pair |
---|
| 591 | intvec spp[3]; |
---|
| 592 | int spp[3][i]; multiplicity of i-th spectral pair |
---|
[61549b] | 593 | @end format |
---|
| 594 | SEE ALSO: spectrum_lib |
---|
| 595 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; |
---|
[d70bc7] | 596 | mixed Hodge structure; V-filtration; weight filtration; |
---|
| 597 | spectrum; spectral pairs |
---|
[61549b] | 598 | EXAMPLE: example sppairs; shows examples |
---|
| 599 | " |
---|
[e480544] | 600 | { |
---|
[61549b] | 601 | list l=vwfilt(t); |
---|
| 602 | return(list(l[1],l[2],l[3])); |
---|
| 603 | } |
---|
| 604 | example |
---|
| 605 | { "EXAMPLE:"; echo=2; |
---|
| 606 | ring R=0,(x,y),ds; |
---|
| 607 | poly t=x5+x2y2+y5; |
---|
| 608 | sppprint(sppairs(t)); |
---|
[e480544] | 609 | } |
---|
| 610 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 611 | |
---|
[adf5bd6] | 612 | proc spnf(ideal e,list #) |
---|
| 613 | "USAGE: spnf(e[,m][,V]); ideal e, intvec m, list V |
---|
| 614 | ASSUME: ncols(e)==size(m)==size(V); typeof(V[i])=="int" |
---|
| 615 | RETURN: |
---|
| 616 | @format |
---|
| 617 | list sp; spectrum normal form of (e,m,V) |
---|
| 618 | ideal sp[1]; numbers in e in increasing order |
---|
| 619 | intvec sp[2]; |
---|
| 620 | int sp[2][i]; multiplicity of number sp[1][i] in e |
---|
| 621 | list sp[3]; |
---|
| 622 | module sp[3][i]; module associated to number sp[1][i] |
---|
| 623 | @end format |
---|
| 624 | EXAMPLE: example spnf; shows examples |
---|
| 625 | " |
---|
| 626 | { |
---|
| 627 | int n=ncols(e); |
---|
| 628 | intvec m; |
---|
| 629 | module v; |
---|
| 630 | list V; |
---|
| 631 | int i,j; |
---|
| 632 | while(i<size(#)) |
---|
| 633 | { |
---|
| 634 | i++; |
---|
| 635 | if(typeof(#[i])=="intvec") |
---|
| 636 | { |
---|
| 637 | m=#[i]; |
---|
| 638 | } |
---|
| 639 | if(typeof(#[i])=="module") |
---|
| 640 | { |
---|
| 641 | v=#[i]; |
---|
| 642 | for(j=n;j>=1;j--) |
---|
| 643 | { |
---|
| 644 | V[j]=module(v[j]); |
---|
| 645 | } |
---|
| 646 | } |
---|
| 647 | if(typeof(#[i])=="list") |
---|
| 648 | { |
---|
| 649 | V=#[i]; |
---|
| 650 | } |
---|
| 651 | } |
---|
| 652 | if(m==0) |
---|
| 653 | { |
---|
| 654 | for(i=n;i>=1;i--) |
---|
| 655 | { |
---|
| 656 | m[i]=1; |
---|
| 657 | } |
---|
| 658 | } |
---|
| 659 | |
---|
| 660 | int k; |
---|
| 661 | ideal e0; |
---|
| 662 | intvec m0; |
---|
| 663 | list V0; |
---|
| 664 | number e1; |
---|
| 665 | int m1; |
---|
| 666 | for(i=n;i>=1;i--) |
---|
| 667 | { |
---|
| 668 | if(m[i]!=0) |
---|
| 669 | { |
---|
| 670 | for(j=i-1;j>=1;j--) |
---|
| 671 | { |
---|
| 672 | if(m[j]!=0) |
---|
| 673 | { |
---|
| 674 | if(number(e[i])>number(e[j])) |
---|
| 675 | { |
---|
| 676 | e1=number(e[i]); |
---|
| 677 | e[i]=e[j]; |
---|
| 678 | e[j]=e1; |
---|
| 679 | m1=m[i]; |
---|
| 680 | m[i]=m[j]; |
---|
| 681 | m[j]=m1; |
---|
| 682 | if(size(V)>0) |
---|
| 683 | { |
---|
| 684 | v=V[i]; |
---|
| 685 | V[i]=V[j]; |
---|
| 686 | V[j]=v; |
---|
| 687 | } |
---|
| 688 | } |
---|
| 689 | if(number(e[i])==number(e[j])) |
---|
| 690 | { |
---|
| 691 | m[i]=m[i]+m[j]; |
---|
| 692 | m[j]=0; |
---|
| 693 | if(size(V)>0) |
---|
| 694 | { |
---|
| 695 | V[i]=V[i]+V[j]; |
---|
| 696 | } |
---|
| 697 | } |
---|
| 698 | } |
---|
| 699 | } |
---|
| 700 | k++; |
---|
| 701 | e0[k]=e[i]; |
---|
| 702 | m0[k]=m[i]; |
---|
| 703 | if(size(V)>0) |
---|
| 704 | { |
---|
| 705 | V0[k]=V[i]; |
---|
| 706 | } |
---|
| 707 | } |
---|
| 708 | } |
---|
| 709 | |
---|
| 710 | if(size(V0)>0) |
---|
| 711 | { |
---|
| 712 | n=size(V0); |
---|
| 713 | module U=std(V0[n]); |
---|
| 714 | for(i=n-1;i>=1;i--) |
---|
| 715 | { |
---|
| 716 | V0[i]=simplify(reduce(V0[i],U),1); |
---|
| 717 | if(i>=2) |
---|
| 718 | { |
---|
| 719 | U=std(U+V0[i]); |
---|
| 720 | } |
---|
| 721 | } |
---|
| 722 | } |
---|
| 723 | |
---|
| 724 | list l; |
---|
| 725 | if(k>0) |
---|
| 726 | { |
---|
| 727 | l=e0,m0; |
---|
| 728 | if(size(V0)>0) |
---|
| 729 | { |
---|
| 730 | l[3]=V0; |
---|
| 731 | } |
---|
| 732 | } |
---|
| 733 | return(l); |
---|
| 734 | } |
---|
| 735 | example |
---|
| 736 | { "EXAMPLE:"; echo=2; |
---|
| 737 | } |
---|
| 738 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 739 | |
---|
[61549b] | 740 | proc sppnf(ideal a,intvec w,list #) |
---|
[275721f] | 741 | "USAGE: sppnf(a,w[,m][,V]); ideal a, intvec w, intvec m, list V |
---|
[04c344] | 742 | ASSUME: ncols(e)=size(w)=size(m)=size(V); typeof(V[i])=="module" |
---|
[e480544] | 743 | RETURN: |
---|
| 744 | @format |
---|
[275721f] | 745 | list spp; spectral pairs normal form of (a,w,m,V) |
---|
| 746 | ideal spp[1]; |
---|
| 747 | number spp[1][i]; V-filtration index of i-th spectral pair |
---|
| 748 | intvec spp[2]; |
---|
| 749 | int spp[2][i]; weight filtration index of i-th spectral pair |
---|
| 750 | intvec spp[3]; |
---|
| 751 | int spp[3][i]; multiplicity of i-th spectral pair |
---|
| 752 | list spp[4]; |
---|
| 753 | module spp[4][i]; vector space of i-th spectral pair |
---|
[e480544] | 754 | @end format |
---|
[275721f] | 755 | SEE ALSO: spectrum_lib |
---|
| 756 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; |
---|
| 757 | mixed Hodge structure; V-filtration; weight filtration; |
---|
| 758 | spectrum; spectral pairs |
---|
[61549b] | 759 | EXAMPLE: example sppnorm; shows examples |
---|
[e480544] | 760 | " |
---|
| 761 | { |
---|
[61549b] | 762 | int n=ncols(a); |
---|
[e480544] | 763 | intvec m; |
---|
[61549b] | 764 | module v; |
---|
| 765 | list V; |
---|
[e480544] | 766 | int i,j; |
---|
[61549b] | 767 | while(i<size(#)) |
---|
[e480544] | 768 | { |
---|
[61549b] | 769 | i++; |
---|
| 770 | if(typeof(#[i])=="intvec") |
---|
[e480544] | 771 | { |
---|
[61549b] | 772 | m=#[i]; |
---|
| 773 | } |
---|
| 774 | if(typeof(#[i])=="module") |
---|
| 775 | { |
---|
| 776 | v=#[i]; |
---|
| 777 | for(j=n;j>=1;j--) |
---|
| 778 | { |
---|
| 779 | V[j]=module(v[j]); |
---|
| 780 | } |
---|
| 781 | } |
---|
| 782 | if(typeof(#[i])=="list") |
---|
| 783 | { |
---|
| 784 | V=#[i]; |
---|
[e480544] | 785 | } |
---|
| 786 | } |
---|
[61549b] | 787 | if(m==0) |
---|
[e480544] | 788 | { |
---|
[61549b] | 789 | for(i=n;i>=1;i--) |
---|
| 790 | { |
---|
| 791 | m[i]=1; |
---|
| 792 | } |
---|
[e480544] | 793 | } |
---|
| 794 | |
---|
[61549b] | 795 | int k; |
---|
| 796 | ideal a0; |
---|
| 797 | intvec w0,m0; |
---|
| 798 | list V0; |
---|
| 799 | number a1; |
---|
| 800 | int w1,m1; |
---|
| 801 | for(i=n;i>=1;i--) |
---|
[e480544] | 802 | { |
---|
| 803 | if(m[i]!=0) |
---|
| 804 | { |
---|
| 805 | for(j=i-1;j>=1;j--) |
---|
| 806 | { |
---|
| 807 | if(m[j]!=0) |
---|
[ccf8d9] | 808 | { |
---|
[e480544] | 809 | if(number(a[i])>number(a[j])|| |
---|
| 810 | (number(a[i])==number(a[j])&&w[i]<w[j])) |
---|
| 811 | { |
---|
[61549b] | 812 | a1=number(a[i]); |
---|
[e480544] | 813 | a[i]=a[j]; |
---|
[61549b] | 814 | a[j]=a1; |
---|
| 815 | w1=w[i]; |
---|
[e480544] | 816 | w[i]=w[j]; |
---|
[61549b] | 817 | w[j]=w1; |
---|
| 818 | m1=m[i]; |
---|
[e480544] | 819 | m[i]=m[j]; |
---|
[61549b] | 820 | m[j]=m1; |
---|
| 821 | if(size(V)>0) |
---|
| 822 | { |
---|
| 823 | v=V[i]; |
---|
| 824 | V[i]=V[j]; |
---|
| 825 | V[j]=v; |
---|
| 826 | } |
---|
[e480544] | 827 | } |
---|
| 828 | if(number(a[i])==number(a[j])&&w[i]==w[j]) |
---|
| 829 | { |
---|
| 830 | m[i]=m[i]+m[j]; |
---|
| 831 | m[j]=0; |
---|
[61549b] | 832 | if(size(V)>0) |
---|
| 833 | { |
---|
| 834 | V[i]=V[i]+V[j]; |
---|
| 835 | } |
---|
[e480544] | 836 | } |
---|
| 837 | } |
---|
| 838 | } |
---|
[61549b] | 839 | k++; |
---|
| 840 | a0[k]=a[i]; |
---|
| 841 | w0[k]=w[i]; |
---|
| 842 | m0[k]=m[i]; |
---|
| 843 | if(size(V)>0) |
---|
| 844 | { |
---|
| 845 | V0[k]=V[i]; |
---|
| 846 | } |
---|
[e480544] | 847 | } |
---|
| 848 | } |
---|
| 849 | |
---|
[61549b] | 850 | if(size(V0)>0) |
---|
| 851 | { |
---|
| 852 | n=size(V0); |
---|
| 853 | module U=std(V0[n]); |
---|
| 854 | for(i=n-1;i>=1;i--) |
---|
| 855 | { |
---|
| 856 | V0[i]=simplify(reduce(V0[i],U),1); |
---|
| 857 | if(i>=2) |
---|
| 858 | { |
---|
| 859 | U=std(U+V0[i]); |
---|
| 860 | } |
---|
| 861 | } |
---|
| 862 | } |
---|
| 863 | |
---|
| 864 | list l; |
---|
| 865 | if(k>0) |
---|
| 866 | { |
---|
| 867 | l=a0,w0,m0; |
---|
| 868 | if(size(V0)>0) |
---|
| 869 | { |
---|
| 870 | l[4]=V0; |
---|
| 871 | } |
---|
| 872 | } |
---|
[e480544] | 873 | return(l); |
---|
| 874 | } |
---|
| 875 | example |
---|
| 876 | { "EXAMPLE:"; echo=2; |
---|
| 877 | } |
---|
| 878 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 879 | |
---|
[61549b] | 880 | proc vfilt(poly t) |
---|
| 881 | "USAGE: vfilt(t); poly t |
---|
[275721f] | 882 | ASSUME: characteristic 0; local degree ordering; |
---|
[a8cc0a] | 883 | isolated critical point 0 of t |
---|
[275721f] | 884 | RETURN: |
---|
[86c1f0] | 885 | @format |
---|
[275721f] | 886 | list v; V-filtration on H''/s*H'' |
---|
| 887 | ideal v[1]; |
---|
| 888 | number v[1][i]; V-filtration index of i-th spectral pair |
---|
| 889 | intvec v[2]; |
---|
| 890 | int v[2][i]; multiplicity of i-th spectral pair |
---|
| 891 | list v[3]; |
---|
[04c344] | 892 | module v[3][i]; vector space of i-th graded part in terms of v[4] |
---|
[275721f] | 893 | ideal v[4]; monomial vector space basis of H''/s*H'' |
---|
| 894 | ideal v[5]; standard basis of Jacobian ideal |
---|
[86c1f0] | 895 | @end format |
---|
| 896 | SEE ALSO: spectrum_lib |
---|
| 897 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; |
---|
[61549b] | 898 | mixed Hodge structure; V-filtration; spectrum |
---|
| 899 | EXAMPLE: example vfilt; shows examples |
---|
| 900 | " |
---|
| 901 | { |
---|
| 902 | list l=vwfilt(t); |
---|
| 903 | return(spnf(l[1],l[3],l[4])+list(l[5],l[6])); |
---|
| 904 | } |
---|
| 905 | example |
---|
| 906 | { "EXAMPLE:"; echo=2; |
---|
| 907 | ring R=0,(x,y),ds; |
---|
| 908 | poly t=x5+x2y2+y5; |
---|
| 909 | vfilt(t); |
---|
| 910 | } |
---|
| 911 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 912 | |
---|
| 913 | proc vwfilt(poly t) |
---|
| 914 | "USAGE: vwfilt(t); poly t |
---|
[275721f] | 915 | ASSUME: characteristic 0; local degree ordering; |
---|
[a8cc0a] | 916 | isolated critical point 0 of t |
---|
[61549b] | 917 | RETURN: |
---|
| 918 | @format |
---|
[275721f] | 919 | list vw; weighted V-filtration on H''/s*H'' |
---|
| 920 | ideal vw[1]; |
---|
| 921 | number vw[1][i]; V-filtration index of i-th spectral pair |
---|
| 922 | intvec vw[2]; |
---|
| 923 | int vw[2][i]; weight filtration index of i-th spectral pair |
---|
| 924 | intvec vw[3]; |
---|
| 925 | int vw[3][i]; multiplicity of i-th spectral pair |
---|
| 926 | list vw[4]; |
---|
[04c344] | 927 | module vw[4][i]; vector space of i-th graded part in terms of vw[5] |
---|
[275721f] | 928 | ideal vw[5]; monomial vector space basis of H''/s*H'' |
---|
| 929 | ideal vw[6]; standard basis of Jacobian ideal |
---|
[61549b] | 930 | @end format |
---|
| 931 | SEE ALSO: spectrum_lib |
---|
| 932 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; |
---|
| 933 | mixed Hodge structure; V-filtration; weight filtration; |
---|
[86c1f0] | 934 | spectrum; spectral pairs |
---|
[61549b] | 935 | EXAMPLE: example vwfilt; shows examples |
---|
[86c1f0] | 936 | " |
---|
| 937 | { |
---|
| 938 | def R=basering; |
---|
| 939 | int n=nvars(R)-1; |
---|
| 940 | def G=gmsring(t,"s"); |
---|
| 941 | setring(G); |
---|
| 942 | |
---|
| 943 | int mu=ncols(gmsbasis); |
---|
[0ff6b5] | 944 | matrix A; |
---|
[61549b] | 945 | module U0; |
---|
[0ff6b5] | 946 | ideal e; |
---|
| 947 | intvec m; |
---|
[86c1f0] | 948 | |
---|
[2ca72f] | 949 | def A0,r,H,H0,k0=saturate(); |
---|
| 950 | e,m,A0,r=eigvals(A0,r,H,k0); |
---|
| 951 | A,A0,r,H0,U0,e,m=transf(A,A0,r,H,H0,e,m,k0,0,1); |
---|
[86c1f0] | 952 | |
---|
[409dbae] | 953 | dbprint(printlevel-voice+2,"// compute weight filtration basis"); |
---|
[e480544] | 954 | list l=jordanbasis(A,e,m); |
---|
[0ff6b5] | 955 | def U,v=l[1..2]; |
---|
[61549b] | 956 | kill l; |
---|
[ccf8d9] | 957 | vector u0; |
---|
| 958 | int v0; |
---|
[61549b] | 959 | int i,j,k,l; |
---|
| 960 | for(k,l=1,1;l<=ncols(e);k,l=k+m[l],l+1) |
---|
[86c1f0] | 961 | { |
---|
[61549b] | 962 | for(i=k+m[l]-1;i>=k+1;i--) |
---|
[86c1f0] | 963 | { |
---|
[ccf8d9] | 964 | for(j=i-1;j>=k;j--) |
---|
[86c1f0] | 965 | { |
---|
[ccf8d9] | 966 | if(v[i]>v[j]) |
---|
| 967 | { |
---|
| 968 | v0=v[i];v[i]=v[j];v[j]=v0; |
---|
| 969 | u0=U[i];U[i]=U[j];U[j]=u0; |
---|
| 970 | } |
---|
[86c1f0] | 971 | } |
---|
| 972 | } |
---|
| 973 | } |
---|
| 974 | |
---|
| 975 | dbprint(printlevel-voice+2,"// transform to weight filtration basis"); |
---|
[ccf8d9] | 976 | matrix V=inverse(U); |
---|
[86c1f0] | 977 | A=V*A*U; |
---|
| 978 | dbprint(printlevel-voice+2,"// compute normal form of H''"); |
---|
| 979 | H0=std(V*H0); |
---|
[61549b] | 980 | U0=U0*U; |
---|
[86c1f0] | 981 | |
---|
| 982 | dbprint(printlevel-voice+2,"// compute spectral pairs"); |
---|
| 983 | ideal a; |
---|
| 984 | intvec w; |
---|
| 985 | for(i=1;i<=mu;i++) |
---|
| 986 | { |
---|
| 987 | j=leadexp(H0[i])[nvars(basering)+1]; |
---|
[61549b] | 988 | a[i]=A[j,j]+ord(H0[i])/deg(s)-1; |
---|
[0ff6b5] | 989 | w[i]=v[j]+n; |
---|
[86c1f0] | 990 | } |
---|
[61549b] | 991 | kill v; |
---|
[d70bc7] | 992 | module v=simplify(jet(H*U0*H0,2*k0)/s^(2*k0),1); |
---|
[0ff6b5] | 993 | |
---|
[51534b6] | 994 | kill l; |
---|
| 995 | list l=sppnf(a,w,v)+list(gmsbasis,gmsstd); |
---|
[86c1f0] | 996 | setring(R); |
---|
[51534b6] | 997 | list l=imap(G,l); |
---|
[9526639] | 998 | kill G,gmsmaxdeg; |
---|
[51534b6] | 999 | attrib(l[5],"isSB",1); |
---|
| 1000 | |
---|
| 1001 | return(l); |
---|
[ccf8d9] | 1002 | } |
---|
| 1003 | example |
---|
| 1004 | { "EXAMPLE:"; echo=2; |
---|
| 1005 | ring R=0,(x,y),ds; |
---|
| 1006 | poly t=x5+x2y2+y5; |
---|
[61549b] | 1007 | vwfilt(t); |
---|
[ccf8d9] | 1008 | } |
---|
| 1009 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1010 | |
---|
[275721f] | 1011 | static proc commutator(matrix A) |
---|
| 1012 | { |
---|
| 1013 | int n=ncols(A); |
---|
| 1014 | int i,j,k; |
---|
| 1015 | matrix C[n^2][n^2]; |
---|
| 1016 | for(i=0;i<n;i++) |
---|
| 1017 | { |
---|
| 1018 | for(j=0;j<n;j++) |
---|
| 1019 | { |
---|
| 1020 | for(k=0;k<n;k++) |
---|
| 1021 | { |
---|
| 1022 | C[i*n+j+1,k*n+j+1]=C[i*n+j+1,k*n+j+1]+A[i+1,k+1]; |
---|
| 1023 | C[i*n+j+1,i*n+k+1]=C[i*n+j+1,i*n+k+1]-A[k+1,j+1]; |
---|
| 1024 | } |
---|
| 1025 | } |
---|
| 1026 | } |
---|
| 1027 | return(C); |
---|
| 1028 | } |
---|
| 1029 | |
---|
| 1030 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1031 | |
---|
| 1032 | proc tmatrix(poly t,list #) |
---|
| 1033 | "USAGE: tmatrix(t); poly t |
---|
| 1034 | ASSUME: characteristic 0; local degree ordering; |
---|
[a8cc0a] | 1035 | isolated critical point 0 of t |
---|
[275721f] | 1036 | RETURN: list A; t-matrix A[1]+s*A[2] on H'' |
---|
[61549b] | 1037 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; |
---|
[d70bc7] | 1038 | mixed Hodge structure; opposite Hodge filtration; V-filtration; |
---|
[275721f] | 1039 | EXAMPLE: example tmatrix; shows examples |
---|
[61549b] | 1040 | " |
---|
| 1041 | { |
---|
| 1042 | def R=basering; |
---|
| 1043 | int n=nvars(R)-1; |
---|
| 1044 | def G=gmsring(t,"s"); |
---|
| 1045 | setring(G); |
---|
| 1046 | |
---|
| 1047 | int mu=ncols(gmsbasis); |
---|
| 1048 | matrix A; |
---|
| 1049 | module U0; |
---|
| 1050 | ideal e; |
---|
| 1051 | intvec m; |
---|
| 1052 | |
---|
[2ca72f] | 1053 | def A0,r,H,H0,k0=saturate(); |
---|
| 1054 | e,m,A0,r=eigvals(A0,r,H,k0); |
---|
| 1055 | int k1=int(max(e)-min(e)); |
---|
| 1056 | A,A0,r,H0,U0,e,m=transf(A,A0,r,H,H0,e,m,k0,k0+k1,1); |
---|
[61549b] | 1057 | |
---|
[51534b6] | 1058 | ring S=0,s,(ds,c); |
---|
| 1059 | matrix A=imap(G,A); |
---|
| 1060 | module H0=imap(G,H0); |
---|
| 1061 | ideal e=imap(G,e); |
---|
[9526639] | 1062 | kill G,gmsmaxdeg; |
---|
[51534b6] | 1063 | |
---|
[61549b] | 1064 | dbprint(printlevel-voice+2,"// transform to Jordan basis"); |
---|
| 1065 | module U=jordanbasis(A,e,m)[1]; |
---|
| 1066 | matrix V=inverse(U); |
---|
| 1067 | A=V*A*U; |
---|
[51534b6] | 1068 | module H=V*H0; |
---|
[61549b] | 1069 | |
---|
| 1070 | dbprint(printlevel-voice+2,"// compute splitting of V-filtration"); |
---|
| 1071 | int i,j,k; |
---|
| 1072 | U=freemodule(mu); |
---|
| 1073 | V=matrix(0,mu,mu); |
---|
| 1074 | matrix v[mu^2][1]; |
---|
[51534b6] | 1075 | matrix A0=commutator(jet(A,0)); |
---|
[61549b] | 1076 | for(k=1;k<=k0+k1;k++) |
---|
| 1077 | { |
---|
| 1078 | for(j=0;j<k;j++) |
---|
| 1079 | { |
---|
[d70bc7] | 1080 | V=matrix(V)-(jet(A,k-j)/s^(k-j))*(jet(U,j)/s^j); |
---|
[61549b] | 1081 | } |
---|
| 1082 | v=V[1..mu,1..mu]; |
---|
| 1083 | v=inverse(A0+k)*v; |
---|
| 1084 | V=v[1..mu^2,1]; |
---|
| 1085 | U=matrix(U)+s^k*V; |
---|
| 1086 | } |
---|
[962b1f] | 1087 | attrib(U,"isSB",1); |
---|
[61549b] | 1088 | |
---|
| 1089 | dbprint(printlevel-voice+2,"// transform to V-splitting basis"); |
---|
| 1090 | A=jet(A,0); |
---|
[962b1f] | 1091 | H=std(division(H,U,k0+k1,intvec(1))[1]); |
---|
[61549b] | 1092 | |
---|
| 1093 | dbprint(printlevel-voice+2,"// compute V-leading terms of H''"); |
---|
| 1094 | int i0,j0; |
---|
| 1095 | module H1=H; |
---|
| 1096 | for(k=ncols(H1);k>=1;k--) |
---|
| 1097 | { |
---|
| 1098 | i0=leadexp(H1[k])[nvars(basering)+1]; |
---|
[51534b6] | 1099 | j0=ord(H1[k]);//deg(s); |
---|
[61549b] | 1100 | H0[k]=lead(H1[k]); |
---|
| 1101 | H1[k]=H1[k]-lead(H1[k]); |
---|
| 1102 | if(H1[k]!=0) |
---|
| 1103 | { |
---|
| 1104 | i=leadexp(H1[k])[nvars(basering)+1]; |
---|
[51534b6] | 1105 | j=ord(H1[k]);//deg(s); |
---|
[61549b] | 1106 | while(A[i,i]+j==A[i0,i0]+j0) |
---|
| 1107 | { |
---|
| 1108 | H0[k]=H0[k]+lead(H1[k]); |
---|
| 1109 | H1[k]=H1[k]-lead(H1[k]); |
---|
| 1110 | i=leadexp(H1[k])[nvars(basering)+1]; |
---|
[51534b6] | 1111 | j=ord(H1[k]);//deg(s); |
---|
[61549b] | 1112 | } |
---|
| 1113 | } |
---|
| 1114 | } |
---|
| 1115 | H0=simplify(H0,1); |
---|
| 1116 | |
---|
| 1117 | dbprint(printlevel-voice+2,"// compute N"); |
---|
| 1118 | matrix N=A; |
---|
| 1119 | for(i=1;i<=ncols(N);i++) |
---|
| 1120 | { |
---|
| 1121 | N[i,i]=0; |
---|
| 1122 | } |
---|
| 1123 | |
---|
| 1124 | dbprint(printlevel-voice+2,"// compute splitting of Hodge filtration"); |
---|
| 1125 | U=0; |
---|
| 1126 | module U1; |
---|
| 1127 | module C; |
---|
| 1128 | list F,I; |
---|
[08fff3] | 1129 | module F0,I0,U0; |
---|
[61549b] | 1130 | for(i0,j0=1,1;i0<=ncols(e);i0++) |
---|
| 1131 | { |
---|
| 1132 | C=matrix(0,mu,1); |
---|
| 1133 | for(j=m[i0];j>=1;j,j0=j-1,j0+1) |
---|
| 1134 | { |
---|
| 1135 | C=C+gen(j0); |
---|
| 1136 | } |
---|
| 1137 | F0=intersect(C,H0); |
---|
[275721f] | 1138 | |
---|
[61549b] | 1139 | F=list(); |
---|
| 1140 | j=0; |
---|
| 1141 | while(size(F0)>0) |
---|
| 1142 | { |
---|
| 1143 | j++; |
---|
| 1144 | F[j]=matrix(0,mu,1); |
---|
| 1145 | if(size(jet(F0,0))>0) |
---|
| 1146 | { |
---|
| 1147 | for(i=ncols(F0);i>=1;i--) |
---|
| 1148 | { |
---|
| 1149 | if(ord(F0[i])==0) |
---|
| 1150 | { |
---|
| 1151 | F[j]=F[j]+F0[i]; |
---|
| 1152 | } |
---|
| 1153 | } |
---|
| 1154 | } |
---|
| 1155 | for(i=ncols(F0);i>=1;i--) |
---|
| 1156 | { |
---|
| 1157 | F0[i]=F0[i]/s; |
---|
| 1158 | } |
---|
| 1159 | } |
---|
| 1160 | |
---|
| 1161 | I=list(); |
---|
| 1162 | I0=module(); |
---|
[08fff3] | 1163 | U0=std(module()); |
---|
[61549b] | 1164 | for(i=size(F);i>=1;i--) |
---|
| 1165 | { |
---|
| 1166 | I[i]=module(); |
---|
| 1167 | } |
---|
| 1168 | for(i=1;i<=size(F);i++) |
---|
| 1169 | { |
---|
| 1170 | I0=reduce(F[i],U0); |
---|
| 1171 | j=i; |
---|
| 1172 | while(size(I0)>0) |
---|
| 1173 | { |
---|
| 1174 | U0=std(U0+I0); |
---|
| 1175 | I[j]=I[j]+I0; |
---|
| 1176 | I0=reduce(N*I0,U0); |
---|
| 1177 | j++; |
---|
| 1178 | } |
---|
| 1179 | } |
---|
| 1180 | |
---|
| 1181 | for(i=1;i<=size(I);i++) |
---|
| 1182 | { |
---|
| 1183 | U=U+I[i]; |
---|
| 1184 | } |
---|
| 1185 | } |
---|
| 1186 | |
---|
| 1187 | dbprint(printlevel-voice+2,"// transform to Hodge splitting basis"); |
---|
| 1188 | V=inverse(U); |
---|
| 1189 | A=V*A*U; |
---|
| 1190 | H=V*H; |
---|
| 1191 | |
---|
| 1192 | dbprint(printlevel-voice+2,"// compute reduced standard basis of H''"); |
---|
[51534b6] | 1193 | degBound=k0+k1+2; |
---|
[17f79e9] | 1194 | option(redSB); |
---|
[61549b] | 1195 | H=std(H); |
---|
[17f79e9] | 1196 | option(noredSB); |
---|
[61549b] | 1197 | degBound=0; |
---|
| 1198 | H=simplify(jet(H,k0+k1),1); |
---|
[962b1f] | 1199 | attrib(H,"isSB",1); |
---|
[61549b] | 1200 | |
---|
| 1201 | dbprint(printlevel-voice+2,"// compute matrix A0+sA1 of t"); |
---|
[962b1f] | 1202 | A=division(module(s*A*H+s^2*diff(matrix(H),s)),H,1,intvec(1))[1]; |
---|
[d70bc7] | 1203 | A0=jet(A,0); |
---|
| 1204 | A=jet(A,1)/s; |
---|
[61549b] | 1205 | |
---|
| 1206 | setring(R); |
---|
[51534b6] | 1207 | matrix A0=imap(S,A0); |
---|
| 1208 | matrix A1=imap(S,A); |
---|
| 1209 | kill S; |
---|
| 1210 | return(list(A0,A1)); |
---|
[61549b] | 1211 | } |
---|
| 1212 | example |
---|
| 1213 | { "EXAMPLE:"; echo=2; |
---|
| 1214 | ring R=0,(x,y),ds; |
---|
| 1215 | poly t=x5+x2y2+y5; |
---|
[275721f] | 1216 | list A=tmatrix(t); |
---|
[61549b] | 1217 | print(A[1]); |
---|
| 1218 | print(A[2]); |
---|
| 1219 | } |
---|
| 1220 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1221 | |
---|
[275721f] | 1222 | proc endvfilt(list v) |
---|
| 1223 | "USAGE: endvfilt(v); list v |
---|
| 1224 | ASSUME: v returned by vfilt |
---|
[057c22e] | 1225 | RETURN: |
---|
[7c7ca9] | 1226 | @format |
---|
[04c344] | 1227 | list ev; V-filtration on Jacobian algebra |
---|
[275721f] | 1228 | ideal ev[1]; |
---|
| 1229 | number ev[1][i]; V-filtration index of i-th spectral pair |
---|
| 1230 | intvec ev[2]; |
---|
| 1231 | int ev[2][i]; multiplicity of i-th spectral pair |
---|
| 1232 | list ev[3]; |
---|
[04c344] | 1233 | module ev[3][i]; vector space of i-th graded part in terms of ev[4] |
---|
[275721f] | 1234 | ideal ev[4]; monomial vector space basis of Jacobian algebra |
---|
| 1235 | ideal ev[5]; standard basis of Jacobian ideal |
---|
[c52356d] | 1236 | @end format |
---|
[61549b] | 1237 | KEYWORDS: singularities; Gauss-Manin connection; Brieskorn lattice; |
---|
[d70bc7] | 1238 | mixed Hodge structure; V-filtration; endomorphism filtration |
---|
[275721f] | 1239 | EXAMPLE: example endvfilt; shows examples |
---|
[0c4bd7] | 1240 | " |
---|
| 1241 | { |
---|
[275721f] | 1242 | def a,d,V,m,g=v[1..5]; |
---|
[0049b4] | 1243 | attrib(g,"isSB",1); |
---|
[0c4bd7] | 1244 | int mu=ncols(m); |
---|
| 1245 | |
---|
[275721f] | 1246 | module V0=V[1]; |
---|
| 1247 | for(int i=2;i<=size(V);i++) |
---|
[0c4bd7] | 1248 | { |
---|
[275721f] | 1249 | V0=V0,V[i]; |
---|
[0c4bd7] | 1250 | } |
---|
[d08457] | 1251 | |
---|
[1418c4] | 1252 | dbprint(printlevel-voice+2,"// compute multiplication in Jacobian algebra"); |
---|
[0c4bd7] | 1253 | list M; |
---|
[409dbae] | 1254 | module U=freemodule(ncols(m)); |
---|
[0c4bd7] | 1255 | for(i=ncols(m);i>=1;i--) |
---|
| 1256 | { |
---|
[0ff6b5] | 1257 | M[i]=division(V0,coeffs(reduce(m[i]*m,U,g),m)*V0)[1]; |
---|
[0c4bd7] | 1258 | } |
---|
| 1259 | |
---|
[8960ec] | 1260 | int j,k,i0,j0,i1,j1; |
---|
[8c4269a] | 1261 | number b0=number(a[1]-a[ncols(a)]); |
---|
| 1262 | number b1,b2; |
---|
[0c4bd7] | 1263 | matrix M0; |
---|
| 1264 | module L; |
---|
| 1265 | list v0=freemodule(ncols(m)); |
---|
[8c4269a] | 1266 | ideal a0=b0; |
---|
[a25a6a] | 1267 | list l; |
---|
[0c4bd7] | 1268 | |
---|
[8c4269a] | 1269 | while(b0<number(a[ncols(a)]-a[1])) |
---|
[0c4bd7] | 1270 | { |
---|
[1418c4] | 1271 | dbprint(printlevel-voice+2,"// find next possible index"); |
---|
[8c4269a] | 1272 | b1=number(a[ncols(a)]-a[1]); |
---|
| 1273 | for(j=ncols(a);j>=1;j--) |
---|
[0c4bd7] | 1274 | { |
---|
[8c4269a] | 1275 | for(i=ncols(a);i>=1;i--) |
---|
[0c4bd7] | 1276 | { |
---|
[8c4269a] | 1277 | b2=number(a[i]-a[j]); |
---|
| 1278 | if(b2>b0&&b2<b1) |
---|
[0c4bd7] | 1279 | { |
---|
[8c4269a] | 1280 | b1=b2; |
---|
[0c4bd7] | 1281 | } |
---|
| 1282 | else |
---|
| 1283 | { |
---|
[8c4269a] | 1284 | if(b2<=b0) |
---|
[0c4bd7] | 1285 | { |
---|
| 1286 | i=0; |
---|
| 1287 | } |
---|
| 1288 | } |
---|
| 1289 | } |
---|
| 1290 | } |
---|
[8c4269a] | 1291 | b0=b1; |
---|
[0c4bd7] | 1292 | |
---|
[a25a6a] | 1293 | l=ideal(); |
---|
[0c4bd7] | 1294 | for(k=ncols(m);k>=2;k--) |
---|
| 1295 | { |
---|
| 1296 | l=l+list(ideal()); |
---|
| 1297 | } |
---|
| 1298 | |
---|
[61549b] | 1299 | dbprint(printlevel-voice+2,"// collect conditions for EV["+string(b0)+"]"); |
---|
[8c4269a] | 1300 | j=ncols(a); |
---|
[a23a7fd] | 1301 | j0=mu; |
---|
| 1302 | while(j>=1) |
---|
[0c4bd7] | 1303 | { |
---|
| 1304 | i0=1; |
---|
| 1305 | i=1; |
---|
[8c4269a] | 1306 | while(i<ncols(a)&&a[i]<a[j]+b0) |
---|
[0c4bd7] | 1307 | { |
---|
| 1308 | i0=i0+d[i]; |
---|
| 1309 | i++; |
---|
| 1310 | } |
---|
[8c4269a] | 1311 | if(a[i]<a[j]+b0) |
---|
[0c4bd7] | 1312 | { |
---|
| 1313 | i0=i0+d[i]; |
---|
| 1314 | i++; |
---|
| 1315 | } |
---|
| 1316 | for(k=1;k<=ncols(m);k++) |
---|
| 1317 | { |
---|
| 1318 | M0=M[k]; |
---|
| 1319 | if(i0>1) |
---|
| 1320 | { |
---|
[a23a7fd] | 1321 | l[k]=l[k],M0[1..i0-1,j0-d[j]+1..j0]; |
---|
[0c4bd7] | 1322 | } |
---|
| 1323 | } |
---|
| 1324 | j0=j0-d[j]; |
---|
[a23a7fd] | 1325 | j--; |
---|
[0c4bd7] | 1326 | } |
---|
| 1327 | |
---|
[1418c4] | 1328 | dbprint(printlevel-voice+2,"// compose condition matrix"); |
---|
[0c4bd7] | 1329 | L=transpose(module(l[1])); |
---|
| 1330 | for(k=2;k<=ncols(m);k++) |
---|
| 1331 | { |
---|
| 1332 | L=L,transpose(module(l[k])); |
---|
| 1333 | } |
---|
| 1334 | |
---|
[1418c4] | 1335 | dbprint(printlevel-voice+2,"// compute kernel of condition matrix"); |
---|
[0c4bd7] | 1336 | v0=v0+list(syz(L)); |
---|
[8c4269a] | 1337 | a0=a0,b0; |
---|
[0c4bd7] | 1338 | } |
---|
| 1339 | |
---|
[1418c4] | 1340 | dbprint(printlevel-voice+2,"// compute graded parts"); |
---|
[0c4bd7] | 1341 | option(redSB); |
---|
| 1342 | for(i=1;i<size(v0);i++) |
---|
| 1343 | { |
---|
| 1344 | v0[i+1]=std(v0[i+1]); |
---|
| 1345 | v0[i]=std(reduce(v0[i],v0[i+1])); |
---|
| 1346 | } |
---|
[17f79e9] | 1347 | option(noredSB); |
---|
[0c4bd7] | 1348 | |
---|
[1418c4] | 1349 | dbprint(printlevel-voice+2,"// remove trivial graded parts"); |
---|
[0c4bd7] | 1350 | i=1; |
---|
| 1351 | while(size(v0[i])==0) |
---|
| 1352 | { |
---|
| 1353 | i++; |
---|
| 1354 | } |
---|
| 1355 | list v1=v0[i]; |
---|
[d5c289] | 1356 | intvec d1=size(v0[i]); |
---|
[8c4269a] | 1357 | ideal a1=a0[i]; |
---|
[0c4bd7] | 1358 | i++; |
---|
| 1359 | while(i<=size(v0)) |
---|
| 1360 | { |
---|
| 1361 | if(size(v0[i])>0) |
---|
| 1362 | { |
---|
| 1363 | v1=v1+list(v0[i]); |
---|
[d5c289] | 1364 | d1=d1,size(v0[i]); |
---|
[8c4269a] | 1365 | a1=a1,a0[i]; |
---|
[0c4bd7] | 1366 | } |
---|
| 1367 | i++; |
---|
| 1368 | } |
---|
[61549b] | 1369 | return(list(a1,d1,v1,m,g)); |
---|
[0c4bd7] | 1370 | } |
---|
| 1371 | example |
---|
| 1372 | { "EXAMPLE:"; echo=2; |
---|
| 1373 | ring R=0,(x,y),ds; |
---|
[86c1f0] | 1374 | poly t=x5+x2y2+y5; |
---|
[61549b] | 1375 | endvfilt(vfilt(t)); |
---|
[34a9eb1] | 1376 | } |
---|
| 1377 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1378 | |
---|
[d70bc7] | 1379 | proc spprint(list sp) |
---|
| 1380 | "USAGE: spprint(sp); list sp |
---|
[275721f] | 1381 | RETURN: string s; spectrum sp |
---|
[e480544] | 1382 | EXAMPLE: example spprint; shows examples |
---|
[34a9eb1] | 1383 | " |
---|
| 1384 | { |
---|
[e480544] | 1385 | string s; |
---|
[d70bc7] | 1386 | for(int i=1;i<size(sp[2]);i++) |
---|
[34a9eb1] | 1387 | { |
---|
[d70bc7] | 1388 | s=s+"("+string(sp[1][i])+","+string(sp[2][i])+"),"; |
---|
[34a9eb1] | 1389 | } |
---|
[d70bc7] | 1390 | s=s+"("+string(sp[1][i])+","+string(sp[2][i])+")"; |
---|
[e480544] | 1391 | return(s); |
---|
[34a9eb1] | 1392 | } |
---|
| 1393 | example |
---|
| 1394 | { "EXAMPLE:"; echo=2; |
---|
| 1395 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1396 | 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)); |
---|
| 1397 | spprint(sp); |
---|
[34a9eb1] | 1398 | } |
---|
| 1399 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1400 | |
---|
[d70bc7] | 1401 | proc sppprint(list spp) |
---|
| 1402 | "USAGE: sppprint(spp); list spp |
---|
[275721f] | 1403 | RETURN: string s; spectral pairs spp |
---|
[e480544] | 1404 | EXAMPLE: example sppprint; shows examples |
---|
[8c4269a] | 1405 | " |
---|
| 1406 | { |
---|
| 1407 | string s; |
---|
[d70bc7] | 1408 | for(int i=1;i<size(spp[3]);i++) |
---|
[8c4269a] | 1409 | { |
---|
[d70bc7] | 1410 | s=s+"(("+string(spp[1][i])+","+string(spp[2][i])+"),"+string(spp[3][i])+"),"; |
---|
[8c4269a] | 1411 | } |
---|
[d70bc7] | 1412 | s=s+"(("+string(spp[1][i])+","+string(spp[2][i])+"),"+string(spp[3][i])+")"; |
---|
[8c4269a] | 1413 | return(s); |
---|
| 1414 | } |
---|
| 1415 | example |
---|
| 1416 | { "EXAMPLE:"; echo=2; |
---|
| 1417 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1418 | 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)); |
---|
| 1419 | sppprint(spp); |
---|
[8c4269a] | 1420 | } |
---|
| 1421 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1422 | |
---|
[d70bc7] | 1423 | proc spadd(list sp1,list sp2) |
---|
[275721f] | 1424 | "USAGE: spadd(sp1,sp2); list sp1, list sp2 |
---|
| 1425 | RETURN: list sp; sum of spectra sp1 and sp2 |
---|
[04b295] | 1426 | EXAMPLE: example spadd; shows examples |
---|
[8c4269a] | 1427 | " |
---|
| 1428 | { |
---|
| 1429 | ideal s; |
---|
| 1430 | intvec m; |
---|
| 1431 | int i,i1,i2=1,1,1; |
---|
[d70bc7] | 1432 | while(i1<=size(sp1[2])||i2<=size(sp2[2])) |
---|
[8c4269a] | 1433 | { |
---|
[d70bc7] | 1434 | if(i1<=size(sp1[2])) |
---|
[8c4269a] | 1435 | { |
---|
[d70bc7] | 1436 | if(i2<=size(sp2[2])) |
---|
[8c4269a] | 1437 | { |
---|
[d70bc7] | 1438 | if(number(sp1[1][i1])<number(sp2[1][i2])) |
---|
[8c4269a] | 1439 | { |
---|
[d70bc7] | 1440 | s[i]=sp1[1][i1]; |
---|
| 1441 | m[i]=sp1[2][i1]; |
---|
[8c4269a] | 1442 | i++; |
---|
| 1443 | i1++; |
---|
| 1444 | } |
---|
| 1445 | else |
---|
| 1446 | { |
---|
[d70bc7] | 1447 | if(number(sp1[1][i1])>number(sp2[1][i2])) |
---|
[8c4269a] | 1448 | { |
---|
[d70bc7] | 1449 | s[i]=sp2[1][i2]; |
---|
| 1450 | m[i]=sp2[2][i2]; |
---|
[8c4269a] | 1451 | i++; |
---|
| 1452 | i2++; |
---|
| 1453 | } |
---|
| 1454 | else |
---|
| 1455 | { |
---|
[d70bc7] | 1456 | if(sp1[2][i1]+sp2[2][i2]!=0) |
---|
[8c4269a] | 1457 | { |
---|
[d70bc7] | 1458 | s[i]=sp1[1][i1]; |
---|
| 1459 | m[i]=sp1[2][i1]+sp2[2][i2]; |
---|
[8c4269a] | 1460 | i++; |
---|
| 1461 | } |
---|
| 1462 | i1++; |
---|
| 1463 | i2++; |
---|
| 1464 | } |
---|
| 1465 | } |
---|
| 1466 | } |
---|
| 1467 | else |
---|
| 1468 | { |
---|
[d70bc7] | 1469 | s[i]=sp1[1][i1]; |
---|
| 1470 | m[i]=sp1[2][i1]; |
---|
[8c4269a] | 1471 | i++; |
---|
| 1472 | i1++; |
---|
| 1473 | } |
---|
| 1474 | } |
---|
| 1475 | else |
---|
| 1476 | { |
---|
[d70bc7] | 1477 | s[i]=sp2[1][i2]; |
---|
| 1478 | m[i]=sp2[2][i2]; |
---|
[8c4269a] | 1479 | i++; |
---|
| 1480 | i2++; |
---|
| 1481 | } |
---|
| 1482 | } |
---|
| 1483 | return(list(s,m)); |
---|
| 1484 | } |
---|
| 1485 | example |
---|
| 1486 | { "EXAMPLE:"; echo=2; |
---|
| 1487 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1488 | 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)); |
---|
| 1489 | spprint(sp1); |
---|
| 1490 | list sp2=list(ideal(-1/6,1/6),intvec(1,1)); |
---|
| 1491 | spprint(sp2); |
---|
| 1492 | spprint(spadd(sp1,sp2)); |
---|
[8c4269a] | 1493 | } |
---|
| 1494 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1495 | |
---|
[d70bc7] | 1496 | proc spsub(list sp1,list sp2) |
---|
[275721f] | 1497 | "USAGE: spsub(sp1,sp2); list sp1, list sp2 |
---|
| 1498 | RETURN: list sp; difference of spectra sp1 and sp2 |
---|
[04b295] | 1499 | EXAMPLE: example spsub; shows examples |
---|
[8c4269a] | 1500 | " |
---|
| 1501 | { |
---|
[d70bc7] | 1502 | return(spadd(sp1,spmul(sp2,-1))); |
---|
[8c4269a] | 1503 | } |
---|
| 1504 | example |
---|
| 1505 | { "EXAMPLE:"; echo=2; |
---|
| 1506 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1507 | 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)); |
---|
| 1508 | spprint(sp1); |
---|
| 1509 | list sp2=list(ideal(-1/6,1/6),intvec(1,1)); |
---|
| 1510 | spprint(sp2); |
---|
| 1511 | spprint(spsub(sp1,sp2)); |
---|
[8c4269a] | 1512 | } |
---|
| 1513 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1514 | |
---|
| 1515 | proc spmul(list #) |
---|
[275721f] | 1516 | "USAGE: spmul(sp0,k); list sp0, int[vec] k |
---|
| 1517 | RETURN: list sp; linear combination of spectra sp0 with coefficients k |
---|
[04b295] | 1518 | EXAMPLE: example spmul; shows examples |
---|
[8c4269a] | 1519 | " |
---|
| 1520 | { |
---|
| 1521 | if(size(#)==2) |
---|
| 1522 | { |
---|
| 1523 | if(typeof(#[1])=="list") |
---|
| 1524 | { |
---|
| 1525 | if(typeof(#[2])=="int") |
---|
| 1526 | { |
---|
| 1527 | return(list(#[1][1],#[1][2]*#[2])); |
---|
| 1528 | } |
---|
| 1529 | if(typeof(#[2])=="intvec") |
---|
| 1530 | { |
---|
[d70bc7] | 1531 | list sp0=list(ideal(),intvec(0)); |
---|
[8c4269a] | 1532 | for(int i=size(#[2]);i>=1;i--) |
---|
| 1533 | { |
---|
[d70bc7] | 1534 | sp0=spadd(sp0,spmul(#[1][i],#[2][i])); |
---|
[8c4269a] | 1535 | } |
---|
[d70bc7] | 1536 | return(sp0); |
---|
[8c4269a] | 1537 | } |
---|
| 1538 | } |
---|
| 1539 | } |
---|
| 1540 | return(list(ideal(),intvec(0))); |
---|
| 1541 | } |
---|
| 1542 | example |
---|
| 1543 | { "EXAMPLE:"; echo=2; |
---|
| 1544 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1545 | 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)); |
---|
| 1546 | spprint(sp); |
---|
| 1547 | spprint(spmul(sp,2)); |
---|
| 1548 | list sp1=list(ideal(-1/6,1/6),intvec(1,1)); |
---|
| 1549 | spprint(sp1); |
---|
| 1550 | list sp2=list(ideal(-1/3,0,1/3),intvec(1,2,1)); |
---|
| 1551 | spprint(sp2); |
---|
| 1552 | spprint(spmul(list(sp1,sp2),intvec(1,2))); |
---|
[8c4269a] | 1553 | } |
---|
| 1554 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1555 | |
---|
[d70bc7] | 1556 | proc spissemicont(list sp,list #) |
---|
[275721f] | 1557 | "USAGE: spissemicont(sp[,1]); list sp, int opt |
---|
[8c4269a] | 1558 | RETURN: |
---|
| 1559 | @format |
---|
| 1560 | int k= |
---|
[275721f] | 1561 | 1; if sum of sp is positive on all intervals [a,a+1) [and (a,a+1)] |
---|
| 1562 | 0; if sum of sp is negative on some interval [a,a+1) [or (a,a+1)] |
---|
[8c4269a] | 1563 | @end format |
---|
[04b295] | 1564 | EXAMPLE: example spissemicont; shows examples |
---|
[8c4269a] | 1565 | " |
---|
| 1566 | { |
---|
| 1567 | int opt=0; |
---|
| 1568 | if(size(#)>0) |
---|
| 1569 | { |
---|
| 1570 | if(typeof(#[1])=="int") |
---|
| 1571 | { |
---|
| 1572 | opt=1; |
---|
| 1573 | } |
---|
| 1574 | } |
---|
| 1575 | int i,j,k=1,1,0; |
---|
[d70bc7] | 1576 | while(j<=size(sp[2])) |
---|
[8c4269a] | 1577 | { |
---|
[d70bc7] | 1578 | while(j+1<=size(sp[2])&&sp[1][j]<sp[1][i]+1) |
---|
[8c4269a] | 1579 | { |
---|
[d70bc7] | 1580 | k=k+sp[2][j]; |
---|
[8c4269a] | 1581 | j++; |
---|
| 1582 | } |
---|
[d70bc7] | 1583 | if(j==size(sp[2])&&sp[1][j]<sp[1][i]+1) |
---|
[8c4269a] | 1584 | { |
---|
[d70bc7] | 1585 | k=k+sp[2][j]; |
---|
[8c4269a] | 1586 | j++; |
---|
| 1587 | } |
---|
| 1588 | if(k<0) |
---|
| 1589 | { |
---|
| 1590 | return(0); |
---|
| 1591 | } |
---|
[d70bc7] | 1592 | k=k-sp[2][i]; |
---|
[8c4269a] | 1593 | if(k<0&&opt==1) |
---|
| 1594 | { |
---|
| 1595 | return(0); |
---|
| 1596 | } |
---|
| 1597 | i++; |
---|
| 1598 | } |
---|
| 1599 | return(1); |
---|
| 1600 | } |
---|
| 1601 | example |
---|
| 1602 | { "EXAMPLE:"; echo=2; |
---|
| 1603 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1604 | 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)); |
---|
| 1605 | spprint(sp1); |
---|
| 1606 | list sp2=list(ideal(-1/6,1/6),intvec(1,1)); |
---|
| 1607 | spprint(sp2); |
---|
| 1608 | spissemicont(spsub(sp1,spmul(sp2,5))); |
---|
| 1609 | spissemicont(spsub(sp1,spmul(sp2,5)),1); |
---|
| 1610 | spissemicont(spsub(sp1,spmul(sp2,6))); |
---|
[8c4269a] | 1611 | } |
---|
| 1612 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1613 | |
---|
[d70bc7] | 1614 | proc spsemicont(list sp0,list sp,list #) |
---|
[275721f] | 1615 | "USAGE: spsemicont(sp0,sp,k[,1]); list sp0, list sp |
---|
| 1616 | RETURN: |
---|
| 1617 | @format |
---|
| 1618 | list l; |
---|
[a8cc0a] | 1619 | intvec l[i]; if the spectra sp0 occur with multiplicities k |
---|
| 1620 | in a deformation of a [quasihomogeneous] singularity |
---|
| 1621 | with spectrum sp then k<=l[i] |
---|
[275721f] | 1622 | @end format |
---|
[04b295] | 1623 | EXAMPLE: example spsemicont; shows examples |
---|
[8c4269a] | 1624 | " |
---|
| 1625 | { |
---|
| 1626 | list l,l0; |
---|
[38f6b33] | 1627 | int i,j,k; |
---|
[d70bc7] | 1628 | while(spissemicont(sp0,#)) |
---|
[8c4269a] | 1629 | { |
---|
[d70bc7] | 1630 | if(size(sp)>1) |
---|
[8c4269a] | 1631 | { |
---|
[d70bc7] | 1632 | l0=spsemicont(sp0,list(sp[1..size(sp)-1])); |
---|
[38f6b33] | 1633 | for(i=1;i<=size(l0);i++) |
---|
[8c4269a] | 1634 | { |
---|
[38f6b33] | 1635 | if(size(l)>0) |
---|
[ccf8d9] | 1636 | { |
---|
[38f6b33] | 1637 | j=1; |
---|
| 1638 | while(j<size(l)&&l[j]!=l0[i]) |
---|
[ccf8d9] | 1639 | { |
---|
[38f6b33] | 1640 | j++; |
---|
| 1641 | } |
---|
| 1642 | if(l[j]==l0[i]) |
---|
[ccf8d9] | 1643 | { |
---|
[d70bc7] | 1644 | l[j][size(sp)]=k; |
---|
[38f6b33] | 1645 | } |
---|
| 1646 | else |
---|
[ccf8d9] | 1647 | { |
---|
[d70bc7] | 1648 | l0[i][size(sp)]=k; |
---|
[38f6b33] | 1649 | l=l+list(l0[i]); |
---|
| 1650 | } |
---|
[ccf8d9] | 1651 | } |
---|
[38f6b33] | 1652 | else |
---|
[ccf8d9] | 1653 | { |
---|
[38f6b33] | 1654 | l=l0; |
---|
[ccf8d9] | 1655 | } |
---|
[8c4269a] | 1656 | } |
---|
| 1657 | } |
---|
[d70bc7] | 1658 | sp0=spsub(sp0,sp[size(sp)]); |
---|
[8c4269a] | 1659 | k++; |
---|
| 1660 | } |
---|
[d70bc7] | 1661 | if(size(sp)>1) |
---|
[8c4269a] | 1662 | { |
---|
| 1663 | return(l); |
---|
| 1664 | } |
---|
| 1665 | else |
---|
| 1666 | { |
---|
| 1667 | return(list(intvec(k-1))); |
---|
| 1668 | } |
---|
| 1669 | } |
---|
| 1670 | example |
---|
| 1671 | { "EXAMPLE:"; echo=2; |
---|
| 1672 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1673 | 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)); |
---|
| 1674 | spprint(sp0); |
---|
| 1675 | list sp1=list(ideal(-1/6,1/6),intvec(1,1)); |
---|
| 1676 | spprint(sp1); |
---|
| 1677 | list sp2=list(ideal(-1/3,0,1/3),intvec(1,2,1)); |
---|
| 1678 | spprint(sp2); |
---|
| 1679 | list sp=sp1,sp2; |
---|
| 1680 | list l=spsemicont(sp0,sp); |
---|
[8c4269a] | 1681 | l; |
---|
[d70bc7] | 1682 | spissemicont(spsub(sp0,spmul(sp,l[1]))); |
---|
| 1683 | spissemicont(spsub(sp0,spmul(sp,l[1]-1))); |
---|
| 1684 | spissemicont(spsub(sp0,spmul(sp,l[1]+1))); |
---|
[8c4269a] | 1685 | } |
---|
| 1686 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1687 | |
---|
[d70bc7] | 1688 | proc spmilnor(list sp) |
---|
| 1689 | "USAGE: spmilnor(sp); list sp |
---|
[275721f] | 1690 | RETURN: int mu; Milnor number of spectrum sp |
---|
[04b295] | 1691 | EXAMPLE: example spmilnor; shows examples |
---|
[8960ec] | 1692 | " |
---|
| 1693 | { |
---|
[d70bc7] | 1694 | return(sum(sp[2])); |
---|
[8960ec] | 1695 | } |
---|
| 1696 | example |
---|
| 1697 | { "EXAMPLE:"; echo=2; |
---|
| 1698 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1699 | 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)); |
---|
| 1700 | spprint(sp); |
---|
| 1701 | spmilnor(sp); |
---|
[8960ec] | 1702 | } |
---|
| 1703 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 1704 | |
---|
[d70bc7] | 1705 | proc spgeomgenus(list sp) |
---|
| 1706 | "USAGE: spgeomgenus(sp); list sp |
---|
[275721f] | 1707 | RETURN: int g; geometrical genus of spectrum sp |
---|
[04b295] | 1708 | EXAMPLE: example spgeomgenus; shows examples |
---|
[8c4269a] | 1709 | " |
---|
| 1710 | { |
---|
| 1711 | int g=0; |
---|
| 1712 | int i=1; |
---|
[d70bc7] | 1713 | while(i+1<=size(sp[2])&&number(sp[1][i])<=number(0)) |
---|
[8c4269a] | 1714 | { |
---|
[d70bc7] | 1715 | g=g+sp[2][i]; |
---|
[8c4269a] | 1716 | i++; |
---|
| 1717 | } |
---|
[d70bc7] | 1718 | if(i==size(sp[2])&&number(sp[1][i])<=number(0)) |
---|
[8c4269a] | 1719 | { |
---|
[d70bc7] | 1720 | g=g+sp[2][i]; |
---|
[8c4269a] | 1721 | } |
---|
| 1722 | return(g); |
---|
| 1723 | } |
---|
| 1724 | example |
---|
| 1725 | { "EXAMPLE:"; echo=2; |
---|
| 1726 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1727 | 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)); |
---|
| 1728 | spprint(sp); |
---|
| 1729 | spgeomgenus(sp); |
---|
[cc3a04] | 1730 | } |
---|
| 1731 | /////////////////////////////////////////////////////////////////////////////// |
---|
[8960ec] | 1732 | |
---|
[d70bc7] | 1733 | proc spgamma(list sp) |
---|
| 1734 | "USAGE: spgamma(sp); list sp |
---|
[275721f] | 1735 | RETURN: number gamma; gamma invariant of spectrum sp |
---|
[04b295] | 1736 | EXAMPLE: example spgamma; shows examples |
---|
[8960ec] | 1737 | " |
---|
| 1738 | { |
---|
| 1739 | int i,j; |
---|
| 1740 | number g=0; |
---|
[d70bc7] | 1741 | for(i=1;i<=ncols(sp[1]);i++) |
---|
[8960ec] | 1742 | { |
---|
[d70bc7] | 1743 | for(j=1;j<=sp[2][i];j++) |
---|
[8960ec] | 1744 | { |
---|
[d70bc7] | 1745 | g=g+(number(sp[1][i])-number(nvars(basering)-2)/2)^2; |
---|
[8960ec] | 1746 | } |
---|
| 1747 | } |
---|
[d70bc7] | 1748 | g=-g/4+sum(sp[2])*number(sp[1][ncols(sp[1])]-sp[1][1])/48; |
---|
[8960ec] | 1749 | return(g); |
---|
| 1750 | } |
---|
| 1751 | example |
---|
| 1752 | { "EXAMPLE:"; echo=2; |
---|
| 1753 | ring R=0,(x,y),ds; |
---|
[d70bc7] | 1754 | 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)); |
---|
| 1755 | spprint(sp); |
---|
| 1756 | spgamma(sp); |
---|
[8960ec] | 1757 | } |
---|
| 1758 | /////////////////////////////////////////////////////////////////////////////// |
---|