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