source: git/Singular/LIB/gmspoly.lib @ 20f2239

fieker-DuValspielwiese
Last change on this file since 20f2239 was fb82ec6, checked in by Sachin <sachinkm308@…>, 5 years ago
replacing execute with create_ring(9)
  • Property mode set to 100644
File size: 12.5 KB
Line 
1//////////////////////////////////////////////////////////////////////////////
2version="version gmspoly.lib 4.1.2.0 Feb_2019 "; // $Id$
3category="Singularities";
4
5info="
6LIBRARY:  gmspoly.lib  Gauss-Manin System of Tame Polynomials
7
8AUTHOR:   Mathias Schulze, mschulze at mathematik.uni-kl.de
9
10OVERVIEW:
11A library for computing the Gauss-Manin system of a cohomologically tame
12polynomial f. Schulze's algorithm [Sch05], based on Sabbah's theory [Sab98],
13is used to compute a good basis of (the Brieskorn lattice of) the Gauss-Manin system and the differential operation of f in terms of this basis.
14In addition, there is a test for tameness in the sense of Broughton.
15Tame polynomials can be considered as an affine algebraic analogue of local
16analytic isolated hypersurface singularities. They have only finitely many
17citical points, and those at infinity do not give rise to atypical values
18in a sense depending on the precise notion of tameness considered. Well-known
19notions of tameness like tameness, M-tameness, Malgrange-tameness, and
20cohomological tameness, and their relations, are reviewed in [Sab98,8].
21For ordinary tameness, see Broughton [Bro88,3].
22Sabbah [Sab98] showed that the Gauss-Manin system, the D-module direct image
23of the structure sheaf, of a cohomologically tame polynomial carries a
24similar structure as in the isolated singularity case, coming from a Mixed
25Hodge structure on the cohomology of the Milnor (typical) fibre (see
26gmssing.lib). The data computed by this library encodes the differential structure of the Gauss-Manin system, and the Mixed Hodge structure of the Milnor fibre over the complex numbers. As a consequence, it yields the Hodge numbers, spectral pairs, and monodromy at infinity.
27
28REFERENCES:
29[Bro88] S. Broughton: Milnor numbers and the topology of polynomial
30        hypersurfaces. Inv. Math. 92 (1988) 217-241.
31[Sab98] C. Sabbah: Hypergeometric periods for a tame polynomial.
32        arXiv.org math.AG/9805077.
33[Sch05] M. Schulze: Good bases for tame polynomials.
34        J. Symb. Comp. 39,1 (2005), 103-126.
35
36PROCEDURES:
37  isTame(f);     test whether the polynomial f is tame
38  goodBasis(f);  good basis of Brieskorn lattice of cohom. tame polynomial f
39
40SEE ALSO: gmssing_lib
41
42KEYWORDS: tame polynomial; Gauss-Manin system; Brieskorn lattice;
43          mixed Hodge structure; V-filtration; weight filtration;
44          monodromy; spectrum; spectral pairs; good basis
45";
46
47LIB "linalg.lib";
48LIB "ring.lib";
49
50///////////////////////////////////////////////////////////////////////////////
51
52static proc mindegree(matrix A)
53{
54  int d=0;
55
56  while(A/var(1)^(d+1)*var(1)^(d+1)==A)
57  {
58    d++;
59  }
60
61  return(d);
62}
63///////////////////////////////////////////////////////////////////////////////
64
65static proc maxdegree(matrix A)
66{
67  int d=0;
68  matrix N[nrows(A)][ncols(A)];
69
70  while(A/var(1)^(d+1)!=N)
71  {
72    d++;
73  }
74
75  return(d);
76}
77///////////////////////////////////////////////////////////////////////////////
78
79proc isTame(poly f)
80"USAGE:    isTame(f); poly f
81ASSUME:   basering has no variables named w(1),w(2),...
82RETURN:
83@format
84int k=
85  1;  if f is tame in the sense of Broughton [Bro88,3]
86  0;  if f is not tame
87@end format
88REMARKS:  procedure implements Proposition 3.1 in [Bro88]
89KEYWORDS: tame polynomial
90EXAMPLE:  example isTame; shows examples
91"
92{
93  int d=vdim(std(jacob(f)));
94  def @X=basering;
95  int n=nvars(@X);
96  ring ext_ring=0,(w(1..n)),dp;
97  setring @X;
98  def @WX=changechar(ringlist(ext_ring));
99  setring @WX;
100  kill ext_ring;
101  ideal J=jacob(imap(@X,f));
102  int i;
103  for(i=1;i<=n;i++)
104  {
105    J[i]=J[i]+w(i);
106  }
107  int D=vdim(std(J));
108
109  setring(@X);
110  kill @WX;
111
112  return(d>0&&d==D);
113}
114example
115{ "EXAMPLE:"; echo=2;
116  ring R=0,(x,y),dp;
117  isTame(x2y+x);
118  isTame(x3+y3+xy);
119}
120///////////////////////////////////////////////////////////////////////////////
121
122static proc chart(matrix A)
123{
124  A=ideal(homog(transpose(ideal(A)),var(2)));
125  def r=basering;
126  map h=r,1,var(1);
127  return(h(A));
128}
129///////////////////////////////////////////////////////////////////////////////
130
131static proc pidbasis(module M0,module M)
132{
133  int m=nrows(M);
134  int n=ncols(M);
135
136  module L,N;
137  module T=freemodule(m);
138  while(matrix(L)!=matrix(M))
139  {
140    L=M;
141
142    M=T,M;
143    N=transpose(std(transpose(M)));
144    T=N[1..m];
145    M=N[m+1..ncols(N)];
146
147    M=freemodule(n),transpose(M);
148    N=std(transpose(M));
149    N=transpose(simplify(N,1));
150    M=N[n+1..ncols(N)];
151    M=transpose(M);
152  }
153
154  if(maxdegree(M)>0)
155  {
156    print("   ? module not free");
157    return(module());
158  }
159
160  attrib(M,"isSB",1);
161  N=lift(T,simplify(reduce(M0,M),2));
162
163  return(N);
164}
165///////////////////////////////////////////////////////////////////////////////
166
167static proc vfiltmat(matrix B,int d)
168{
169  int mu=ncols(B);
170
171  module V=freemodule(mu);
172  module V0=var(1)^(d-1)*freemodule(mu);
173  attrib(V0,"isSB",1);
174  module V1=B;
175  option(redSB);
176  while(size(reduce(V1,V0,5))>0)
177  {
178    V=std(V0+V1);
179    V0=var(1)^(d-1)*V;
180    attrib(V0,"isSB",1);
181    V1=B*matrix(V1)-var(1)^d*diff(matrix(V1),var(1));
182  }
183  option("noredSB");
184
185  B=lift(V0,B*matrix(V)-var(1)^d*diff(matrix(V),var(1)));
186  list l=eigenvals(B);
187  def e0,s0=l[1..2];
188
189  module U;
190  int i,j,i0,j0,i1,j1,k;
191  for(k=int(e0[ncols(e0)]-e0[1]);k>=1;k--)
192  {
193    U=0;
194    for(i=1;i<=ncols(e0);i++)
195    {
196      U=U+syz(power(jet(B,0)-e0[i],s0[i]));
197    }
198    B=lift(U,B*U);
199    V=matrix(V)*matrix(U);
200
201    for(i0,i=1,1;i0<=ncols(e0);i0++)
202    {
203      for(i1=1;i1<=s0[i0];i1,i=i1+1,i+1)
204      {
205        for(j0,j=1,1;j0<=ncols(e0);j0++)
206        {
207          for(j1=1;j1<=s0[j0];j1,j=j1+1,j+1)
208          {
209            if(leadcoef(e0[i0]-e0[1])>=1&&leadcoef(e0[j0]-e0[1])<1)
210            {
211              B[i,j]=B[i,j]/var(1);
212            }
213            if(leadcoef(e0[i0]-e0[1])<1&&leadcoef(e0[j0]-e0[1])>=1)
214            {
215              B[i,j]=B[i,j]*var(1);
216            }
217          }
218        }
219      }
220    }
221
222    for(i0,i=1,1;i0<=ncols(e0);i0++)
223    {
224      if(leadcoef(e0[i0]-e0[1])>=1)
225      {
226        for(i1=1;i1<=s0[i0];i1,i=i1+1,i+1)
227        {
228          B[i,i]=B[i,i]-1;
229          V[i]=V[i]*var(1);
230        }
231        e0[i0]=e0[i0]-1;
232      }
233      else
234      {
235        i=i+s0[i0];
236      }
237    }
238
239    l=spnf(list(e0,s0));
240    e0,s0=l[1..2];
241  }
242
243  U=0;
244  for(i=1;i<=ncols(e0);i++)
245  {
246    U=U+syz(power(jet(B,0)-e0[i],s0[i]));
247  }
248  B=lift(U,B*U);
249  V=matrix(V)*matrix(U);
250
251  d=mindegree(V);
252  V=V/var(1)^d;
253  B=B+d*matrix(freemodule(mu));
254  for(i=ncols(e0);i>=1;i--)
255  {
256    e0[i]=e0[i]+d;
257  }
258
259  return(e0,s0,V,B);
260}
261///////////////////////////////////////////////////////////////////////////////
262
263static proc spec(ideal e0,intvec s0,module V,matrix B)
264{
265  int mu=ncols(B);
266
267  int i,j,k;
268
269  int d=maxdegree(V);
270  int d0=d;
271  V=chart(V);
272  module U=std(V);
273  while(size(reduce(var(1)^d*freemodule(mu),U,5))>0)
274  {
275    d++;
276  }
277  if(d>d0)
278  {
279    k=d-d0;
280    B=B-k*freemodule(mu);
281    for(i=1;i<=ncols(e0);i++)
282    {
283      e0[i]=e0[i]-k;
284    }
285  }
286  module G=lift(V,var(1)^d*freemodule(mu));
287  G=std(G);
288  G=simplify(G,1);
289
290  ideal e;
291  intvec s;
292  e[mu]=0;
293  for(j,k=1,1;j<=ncols(e0);j++)
294  {
295    for(i=s0[j];i>=1;i,k=i-1,k+1)
296    {
297      e[k]=e0[j];
298      s[k]=j;
299    }
300  }
301
302  ideal a;
303  a[mu]=0;
304  for(i=1;i<=mu;i++)
305  {
306    a[i]=leadcoef(e[leadexp(G[i])[nvars(basering)+1]])+leadexp(G[i])[1];
307  }
308
309  return(a,e0,e,s,V,B,G);
310}
311///////////////////////////////////////////////////////////////////////////////
312
313static proc fsplit(ideal e0,ideal e,intvec s,module V,matrix B,module G)
314{
315  int mu=ncols(e);
316
317  int i,j,k;
318
319  number n,n0;
320  vector v,v0;
321  list F;
322  for(i=ncols(e0);i>=1;i--)
323  {
324    F[i]=module(matrix(0,mu,1));
325  }
326  for(i=mu;i>=1;i--)
327  {
328    v=G[i];
329    v0=lead(v);
330    n0=leadcoef(e[leadexp(v0)[nvars(basering)+1]])+leadexp(v0)[1];
331    v=v-lead(v);
332    while(v!=0)
333    {
334      n=leadcoef(e[leadexp(v)[nvars(basering)+1]])+leadexp(v)[1];
335      if(n==n0)
336      {
337        v0=v0+lead(v);
338        v=v-lead(v);
339      }
340      else
341      {
342        v=0;
343      }
344    }
345    j=s[leadexp(v0)[nvars(basering)+1]];
346    F[j]=F[j]+v0;
347  }
348
349  matrix B0=jet(B,0);
350  module U,U0,U1,U2;
351  matrix N;
352  for(i=size(F);i>=1;i--)
353  {
354    N=B0-e0[i];
355    U0=0;
356    while(size(F[i])>0)
357    {
358      k=0;
359      U1=jet(F[i],0);
360      while(size(U1)>0)
361      {
362        for(j=ncols(U1);j>=1;j--)
363        {
364          if(size(reduce(U1[j],std(U0),5))>0)
365          {
366            U0=U1[j]+U0;
367          }
368        }
369        U1=N*U1;
370        k++;
371      }
372      F[i]=module(F[i]/var(1));
373    }
374    U=U0+U;
375  }
376
377  V=matrix(V)*matrix(U);
378  G=lift(U,G);
379  B=lift(U,B*U);
380
381  return(e,V,B,G);
382}
383///////////////////////////////////////////////////////////////////////////////
384
385static proc glift(ideal e,module V,matrix B,module G)
386{
387  int mu=ncols(e);
388
389  int d=maxdegree(B);
390  B=chart(B);
391  G=std(G);
392  G=simplify(G,1);
393
394  int i,j,k;
395
396  ideal v;
397  for(i=mu;i>=1;i--)
398  {
399    v[i]=e[leadexp(G[i])[nvars(basering)+1]]+leadexp(G[i])[1];
400  }
401
402  number c;
403  matrix g[mu][1];
404  matrix m[mu][1];
405  matrix a[mu][1];
406  matrix A[mu][mu];
407  module M=var(1)^d*G;
408  module N=var(1)*B*matrix(G)+var(1)^(d+2)*diff(matrix(G),var(1));
409  while(size(N)>0)
410  {
411    j=mu;
412    for(k=mu-1;k>=1;k--)
413    {
414      if(N[k]>N[j])
415      {
416        j=k;
417      }
418    }
419
420    i=mu;
421    while(leadexp(M[i])[nvars(basering)+1]!=leadexp(N[j])[nvars(basering)+1])
422    {
423      i--;
424    }
425
426    k=leadexp(N[j])[1]-leadexp(M[i])[1];
427    if(k==0||i==j)
428    {
429      c=leadcoef(N[j])/leadcoef(M[i]);
430      A[i,j]=A[i,j]+c*var(1)^k;
431      N[j]=N[j]-c*var(1)^k*M[i];
432    }
433    else
434    {
435      c=leadcoef(N[j])/leadcoef(M[i])/(1-k-leadcoef(v[i])+leadcoef(v[j]));
436      G[j]=G[j]+c*var(1)^(k-1)*G[i];
437      M[j]=M[j]+c*var(1)^(k-1)*M[i];
438      g=c*var(1)^(k-1)*G[i];
439      N[j]=N[j]+(var(1)*B*g+var(1)^(d+2)*diff(g,var(1)))[1];
440      m=M[i];
441      a=transpose(A)[j];
442      N=N-c*var(1)^(k-1)*m*transpose(a);
443    }
444  }
445
446  G=matrix(V)*matrix(G);
447  G=G/var(1)^mindegree(G);
448
449  return(G,A);
450}
451///////////////////////////////////////////////////////////////////////////////
452
453proc goodBasis(poly f)
454"USAGE:    goodBasis(f); poly f
455ASSUME:   f is cohomologically tame in the sense of Sabbah [Sab98,8]
456RETURN:
457@format
458ring R;  basering with new variable s
459  ideal b;  [matrix(b)] is a good basis of the Brieskorn lattice
460  matrix A;  A(s)=A0+s*A1 and t[matrix(b)]=[matrix(b)](A(s)+s^2*(d/ds))
461@end format
462REMARKS:  procedure implements Algorithm 6 in [Sch05]
463KEYWORDS: tame polynomial; Gauss-Manin system; Brieskorn lattice;
464          mixed Hodge structure; V-filtration; weight filtration;
465          monodromy; spectrum; spectral pairs; good basis
466SEE ALSO: gmssing_lib
467EXAMPLE:  example goodBasis; shows examples
468"
469{
470  def @X=basering;
471  int n=nvars(@X);
472  ideal J=jacob(f);
473
474  if(vdim(std(J))<=0)
475  {
476    ERROR("input is not cohomologically tame");
477  }
478
479  int i,j,k,l;
480
481  ideal X=maxideal(1);
482  ring @XS = create_ring(0, "(s,"+varstr(@X)+")", "(C,dp(1),dp("+string(n)+"))");
483  poly f=imap(@X,f);
484  ideal J=imap(@X,J);
485  ideal JS=std(J+var(1));
486  ideal b0=kbase(JS);
487  int mu=ncols(b0);
488  ideal X=imap(@X,X);
489
490  ideal b;
491  matrix A;
492  module B,B0;
493  ideal K,L,M=1,J,1;
494  ideal K0,L0,M0=X,X,X;
495  module K1,L1,K2,L2;
496  module LL1;
497  for(i=1;i<=deg(f)-1;i++)
498  {
499    M=M,M0;
500    M0=M0*X;
501  }
502
503  ring @S=0,(s,t),(dp,C);
504  number a0;
505  ideal a;
506  int d;
507  ideal e,e0;
508  intvec s,s0;
509  matrix A,B;
510  module V,G;
511
512  while(2*a0!=mu*n)
513  {
514    setring(@XS);
515
516    B=0;
517    while(size(B)<mu||size(B0)<mu||maxdegree(b)+deg(f)>k)
518    {
519      k++;
520      K=K,K0;
521      K0=K0*X;
522
523      B=0;
524      while(size(B)==0||size(B)>mu)
525      {
526        l++;
527        for(i=1;i<=size(L0);i++)
528        {
529          for(j=1;j<=n;j++)
530          {
531            L=L,J[j]*L0[i]-var(1)*diff(L0[i],var(j+1));
532          }
533        }
534        L0=L0*X;
535        M=M,M0;
536        M0=M0*X;
537
538        K1=coeffs(K,K,product(X));
539        L1=std(coeffs(L,M,product(X)));
540        LL1=jet(lead(L1),0);
541        attrib(LL1,"isSB",1);
542        K2=simplify(reduce(K1,LL1),2);
543        L2=intersect(K2,L1);
544
545        B=pidbasis(K2,L2);
546      }
547      B0=std(coeffs(reduce(matrix(K,nrows(module(K)),nrows(B))*B,JS),b0));
548
549      b=matrix(K,nrows(module(K)),nrows(B))*B;
550    }
551
552    A=lift(B,reduce(coeffs(f*b+var(1)^2*diff(b,var(1)),M,product(X)),L1));
553    d=maxdegree(A);
554    A=chart(A);
555
556    setring(@S);
557
558    e0,s0,V,B=vfiltmat(imap(@XS,A),d);
559    a,e0,e,s,V,B,G=spec(e0,s0,V,B);
560
561    a0=leadcoef(a[1]);
562    for(i=2;i<=mu;i++)
563    {
564      a0=a0+leadcoef(a[i]);
565    }
566  }
567
568  G,A=glift(fsplit(e0,e,s,V,B,G));
569
570  setring(@XS);
571  b=matrix(b)*imap(@S,G);
572  A=imap(@S,A);
573  export(b,A);
574  kill @S;
575
576  setring(@X);
577  return(@XS);
578}
579example
580{ "EXAMPLE:"; echo=2;
581  ring R=0,(x,y,z),dp;
582  poly f=x+y+z+x2y2z2;
583  def Rs=goodBasis(f);
584  setring(Rs);
585  b;
586  print(jet(A,0));
587  print(jet(A/var(1),0));
588}
589///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.