source: git/Singular/LIB/mondromy.lib @ 7d74df

spielwiese
Last change on this file since 7d74df was 7d74df, checked in by Mathias Schulze <mschulze@…>, 24 years ago
*** empty log message *** git-svn-id: file:///usr/local/Singular/svn/trunk@4489 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 27.5 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2
3version="$Id: mondromy.lib,v 1.15 2000-07-12 10:23:13 mschulze Exp $";
4info="
5LIBRARY:  mondromy.lib  PROCEDURES TO COMPUTE THE MONODROMY OF A SINGULARITY
6AUTHOR:   Mathias Schulze, email: mschulze@mathematik.uni-kl.de
7
8OVERVIEW:
9 A library to compute the monodromy of an isolated hypersurface singularity.
10 It uses an algorithm by Brieskorn (manuscipta math. 2 (1970), 103-161) to
11 compute a connection matrix of the meromorphic Gauss-Manin connection up to
12 arbitrarily high order, and an algorithm of Gerard and Levelt (Ann. Inst.
13 Fourier, Grenoble 23,1 (1973), pp. 157-195) to transform it to a simple pole.
14
15PROCEDURES:
16 invunit(u,n);         series inverse of polynomial u up to order n
17 detadj(U);            determinant and adjoint matrix of square matrix U
18 jacoblift(f);         lifts f^kappa in jacob(f) with minimal kappa
19 monodromy(f[,opt]);   monodromy of isolated hypersurface singularity f
20 H2basis(f);           basis of Brieskorn lattice H''
21";
22
23LIB "ring.lib";
24LIB "sing.lib";
25LIB "jordan.lib";
26
27///////////////////////////////////////////////////////////////////////////////
28
29static proc pcvladdl(list l1,list l2)
30{
31  return(system("pcvLAddL",l1,l2));
32}
33
34static proc pcvpmull(poly p,list l)
35{
36  return(system("pcvPMulL",p,l));
37}
38
39static proc pcvmindeg(list #)
40{
41  return(system("pcvMinDeg",#[1]));
42}
43
44static proc pcvp2cv(list l,int i0,int i1)
45{
46  return(system("pcvP2CV",l,i0,i1));
47}
48
49static proc pcvcv2p(list l,int i0,int i1)
50{
51  return(system("pcvCV2P",l,i0,i1));
52}
53
54static proc pcvdim(int i0,int i1)
55{
56  return(system("pcvDim",i0,i1));
57}
58
59static proc pcvbasis(int i0,int i1)
60{
61  return(system("pcvBasis",i0,i1));
62}
63
64static proc pcvinit()
65{
66  if(system("with","DynamicLoading"))
67  {
68    pcvladdl=Pcv::LAddL;
69    pcvpmull=Pcv::PMulL;
70    pcvmindeg=Pcv::MinDeg;
71    pcvp2cv=Pcv::P2CV;
72    pcvcv2p=Pcv::CV2P;
73    pcvdim=Pcv::Dim;
74    pcvbasis=Pcv::Basis;
75  }
76}
77///////////////////////////////////////////////////////////////////////////////
78
79static proc min(intvec v)
80{
81  int m=v[1];
82  int i;
83  for(i=2;i<=size(v);i++)
84  {
85    if(m>v[i])
86    {
87      m=v[i];
88    }
89  }
90  return(m);
91}
92///////////////////////////////////////////////////////////////////////////////
93
94static proc max(intvec v)
95{
96  int m=v[1];
97  int i;
98  for(i=2;i<=size(v);i++)
99  {
100    if(m<v[i])
101    {
102      m=v[i];
103    }
104  }
105  return(m);
106}
107///////////////////////////////////////////////////////////////////////////////
108
109static proc mdivp(matrix m,poly p)
110{
111  int i,j;
112  for(i=nrows(m);i>=1;i--)
113  {
114    for(j=ncols(m);j>=1;j--)
115    {
116      m[i,j]=m[i,j]/p;
117    }
118  }
119  return(m);
120}
121///////////////////////////////////////////////////////////////////////////////
122
123proc codimV(list V,int N)
124{
125  int codim=pcvdim(0,N);
126  if(size(V)>0)
127  {
128    dbprint(printlevel-voice+2,"//vector space dimension: "+string(codim));
129    dbprint(printlevel-voice+2,
130      "//number of subspace generators: "+string(size(V)));
131    int t=timer;
132    codim=codim-ncols(interred(module(V[1..size(V)])));
133    dbprint(printlevel-voice+2,"//codimension: "+string(codim));
134  }
135  return(codim);
136}
137///////////////////////////////////////////////////////////////////////////////
138
139proc quotV(list V,int N)
140{
141  module Q=freemodule(pcvdim(0,N));
142  if(size(V)>0)
143  {
144    dbprint(printlevel-voice+2,"//vector space dimension: "+string(nrows(Q)));
145    dbprint(printlevel-voice+2,
146      "//number of subspace generators: "+string(size(V)));
147    int t=timer;
148    Q=interred(reduce(std(Q),std(module(V[1..size(V)]))));
149  }
150  return(list(Q[1..size(Q)]));
151}
152///////////////////////////////////////////////////////////////////////////////
153proc invunit(poly u,int n)
154"USAGE:   invunit(u,n); u poly, n int
155ASSUME:  The polynomial u is a series unit.
156RETURN:  The procedure returns the series inverse of u up to order n
157         or a zero polynomial if u is no series unit.
158DISPLAY: The procedure displays comments if printlevel>=1.
159EXAMPLE: example invunit; shows an example.
160"
161{
162  if(pcvmindeg(u)==0)
163  {
164    dbprint(printlevel-voice+2,"//computing inverse...");
165    int t=timer;
166    poly u0=jet(u,0);
167    u=jet(1-u/u0,n);
168    poly ui=u;
169    poly v=1+u;
170    int i;
171    for(i=n div pcvmindeg(u);i>1;i--)
172    {
173      ui=jet(ui*u,n);
174      v=v+ui;
175    }
176    v=jet(v,n)/u0;   
177    dbprint(printlevel-voice+2,"//...inverse computed ["+string(timer-t)+
178      " secs, "+string((memory(1)+1023)/1024)+" K]");
179    return(v);
180  }
181  else
182  {
183    print("//no series unit");
184    return(poly(0));
185  }
186}
187example
188{ "EXAMPLE:"; echo=2;
189  ring R=0,(x,y),dp;
190  invunit(2+x3+xy4,10);
191}
192
193///////////////////////////////////////////////////////////////////////////////
194
195proc detadj(module U)
196"USAGE:   detadj(U); U matrix
197ASSUME:  U is a square matrix with non zero determinant.
198RETURN:  The procedure returns a list with at most 2 entries.
199         If U is not a sqaure matrix, the list is empty.
200         If U is a sqaure matrix, then the first entry is the determinant of U.
201         If U is a square matrix and the determinant of U not zero,
202         then the second entry is the adjoint matrix of U.
203DISPLAY: The procedure displays comments if printlevel>=1.
204EXAMPLE: example detadj; shows an example.
205"
206{
207  if(nrows(U)==ncols(U))
208  {
209    dbprint(printlevel-voice+2,"//computing determinant...");
210    int t=timer;
211    poly detU=det(U);
212    dbprint(printlevel-voice+2,"//...determinant computed ["+string(timer-t)+
213      " secs, "+string((memory(1)+1023)/1024)+" K]");
214
215    if(detU==0)
216    {
217      print("//determinant zero");
218      return(list(detU));
219    }
220    else
221    {
222      def br=basering;
223      changeord("pr","dp");
224      matrix U=fetch(br,U);
225      poly detU=fetch(br,detU);
226
227      dbprint(printlevel-voice+2,"//computing adjoint matrix...");
228      t=timer;
229      matrix adjU=lift(U,detU*freemodule(nrows(U)));
230      dbprint(printlevel-voice+2,"//...adjoint matrix computed ["
231        +string(timer-t)+" secs, "+string((memory(1)+1023)/1024)+" K]");
232
233      setring br;
234      matrix adjU=fetch(pr,adjU);
235      kill pr;
236    }
237  }
238  else
239  {
240    print("//no square matrix");
241    return(list());
242  }
243
244  return(list(detU,adjU));
245}
246example
247{ "EXAMPLE:"; echo=2;
248  ring R=0,x,dp;
249  matrix U[2][2]=1,1+x,1+x2,1+x3;
250  list daU=detadj(U);
251  daU[1];
252  print(daU[2]);
253}
254///////////////////////////////////////////////////////////////////////////////
255
256proc jacoblift(poly f)
257"USAGE:   jacoblift(f); f poly
258ASSUME:  The polynomial f in a series ring (local ordering) defines
259         an isolated hypersurface singularity.
260RETURN:  The procedure returns a list with entries kappa, xi, u of type
261         int, vector, poly such that kappa is minimal with f^kappa in jacob(f),
262         u is a unit, and u*f^kappa=(matrix(jacob(f))*xi)[1,1].
263DISPLAY: The procedure displays comments if printlevel>=1.
264EXAMPLE: example jacoblift; shows an example.
265"
266{
267  dbprint(printlevel-voice+2,"//computing kappa...");
268  int t=timer;
269  ideal jf=jacob(f);
270  ideal sjf=std(jf);
271  int kappa=1;
272  poly fkappa=f;
273  while(reduce(fkappa,sjf)!=0)
274  {
275    dbprint(printlevel-voice+2,"//kappa="+string(kappa));
276    kappa++;
277    fkappa=fkappa*f;
278  }
279  dbprint(printlevel-voice+2,"//kappa="+string(kappa));
280  dbprint(printlevel-voice+2,"//...kappa computed ["+string(timer-t)+" secs, "
281    +string((memory(1)+1023)/1024)+" K]");
282
283  dbprint(printlevel-voice+2,"//computing xi...");
284  t=timer;
285  vector xi=lift(jf,fkappa)[1];
286  dbprint(printlevel-voice+2,"//...xi computed ["+string(timer-t)+" secs, "
287    +string((memory(1)+1023)/1024)+" K]");
288
289  dbprint(printlevel-voice+2,"//computing u...");
290  t=timer;
291  poly u=(matrix(jf)*xi)[1,1]/fkappa;
292  dbprint(printlevel-voice+2,"//...u computed ["+string(timer-t)+" secs, "
293    +string((memory(1)+1023)/1024)+" K]");
294
295  return(list(kappa,xi,u));
296}
297example
298{ "EXAMPLE:"; echo=2;
299  ring R=0,(x,y),ds;
300  poly f=x2y2+x6+y6;
301  jacoblift(f);
302}
303///////////////////////////////////////////////////////////////////////////////
304
305static proc getdeltaP1(poly f,int K,int N,int dN)
306{
307  return(pcvpmull(f^K,pcvbasis(0,N+dN-K*pcvmindeg(f))));
308}
309///////////////////////////////////////////////////////////////////////////////
310
311static proc getdeltaP2(poly f,int N,int dN)
312{
313  def of,jf=pcvmindeg(f),jacob(f);
314  list b=pcvbasis(N-of+2,N+dN-of+2);
315  list P2;
316  P2[size(b)*((nvars(basering)-1)*nvars(basering))/2]=0;
317  int i,j,k,l;
318  intvec alpha;
319  for(k,l=1,1;k<=size(b);k++)
320  {
321    alpha=leadexp(b[k]);
322    for(i=nvars(basering)-1;i>=1;i--)
323    {
324      for(j=nvars(basering);j>i;j--)
325      {
326        P2[l]=alpha[i]*jf[j]*(b[k]/var(i))-alpha[j]*jf[i]*(b[k]/var(j));
327        l++;
328      }
329    }
330  }
331  return(P2);
332}
333///////////////////////////////////////////////////////////////////////////////
334
335static proc getdeltaPe(poly f,list e,int K,int dK)
336{
337  int k;
338  list Pe,fke;
339  for(k,fke=K,pcvpmull(f^K,e);k<K+dK;k,fke=k+1,pcvpmull(f,fke))
340  {
341    Pe=Pe+fke;
342  }
343  return(Pe);
344}
345///////////////////////////////////////////////////////////////////////////////
346
347static proc incK(poly f,int mu,int K,int deltaK,int N,
348  list e,list P1,list P2,list Pe,list V1,list V2,list Ve)
349{
350  int deltaN=deltaK*pcvmindeg(f);
351
352  list deltaP1;
353  P1=pcvpmull(f^deltaK,P1);
354  V1=pcvp2cv(P1,0,N+deltaN);
355
356  list deltaP2=getdeltaP2(f,N,deltaN);
357  V2=pcvladdl(V2,pcvp2cv(P2,N,N+deltaN))+pcvp2cv(deltaP2,0,N+deltaN);
358  P2=P2+deltaP2;
359
360  list deltaPe=getdeltaPe(f,e,K,deltaK);
361  Ve=pcvladdl(Ve,pcvp2cv(Pe,N,N+deltaN))+pcvp2cv(deltaPe,0,N+deltaN);
362  Pe=Pe+deltaPe;
363
364  K=K+deltaK;
365  dbprint(printlevel-voice+2,"//K="+string(K));
366
367  N=N+deltaN;
368  dbprint(printlevel-voice+2,"//N="+string(N));
369
370  deltaN=1;
371  dbprint(printlevel-voice+2,"//computing codimension of");
372  dbprint(printlevel-voice+2,"//df^dOmega^(n-1)+f^K*Omega^(n+1) in "
373    +"Omega^(n+1) mod m^N*Omega^(n+1)...");
374  int t=timer;
375  while(codimV(V1+V2,N)<K*mu)
376  {
377    dbprint(printlevel-voice+2,"//...codimension computed ["+string(timer-t)
378      +" secs, "+string((memory(1)+1023)/1024)+" K]");
379
380    deltaP1=getdeltaP1(f,K,N,deltaN);
381    V1=pcvladdl(V1,pcvp2cv(P1,N,N+deltaN))+pcvp2cv(deltaP1,0,N+deltaN);
382    P1=P1+deltaP1;
383
384    deltaP2=getdeltaP2(f,N,deltaN);
385    V2=pcvladdl(V2,pcvp2cv(P2,N,N+deltaN))+pcvp2cv(deltaP2,0,N+deltaN);
386    P2=P2+deltaP2;
387
388    Ve=pcvladdl(Ve,pcvp2cv(Pe,N,N+deltaN));
389
390    N=N+deltaN;
391    dbprint(printlevel-voice+2,"//N="+string(N));
392
393    dbprint(printlevel-voice+2,"//computing codimension of");
394    dbprint(printlevel-voice+2,"//df^dOmega^(n-1)+f^K*Omega^(n+1) in "
395      +"Omega^(n+1) mod m^N*Omega^(n+1)...");
396    t=timer;
397  }
398  dbprint(printlevel-voice+2,"//...codimension computed ["+string(timer-t)
399    +" secs, "+string((memory(1)+1023)/1024)+" K]");
400
401  return(K,N,P1,P2,Pe,V1,V2,Ve);
402}
403///////////////////////////////////////////////////////////////////////////////
404
405static proc nablaK(poly f,int kappa,vector xi,poly u,int N,int prevN,
406  list Vnablae,list e)
407{
408  xi=jet(xi,N);
409  u=invunit(u,N);
410  poly fkappa=kappa*f^(kappa-1);
411
412  poly p,q;
413  list nablae;
414  int i,j;
415  for(i=1;i<=size(e);i++)
416  {
417    for(j,p=nvars(basering),0;j>=1;j--)
418    {
419      q=jet(e[i]*xi[j],N);
420      if(q!=0)
421      {
422        p=p+diff(q*jet(u,N-pcvmindeg(q)),var(j));
423      }
424    }
425    nablae=nablae+list(p-jet(fkappa*e[i],N-1));
426  }
427
428  return(pcvladdl(Vnablae,pcvp2cv(nablae,prevN,N-prevN)));
429}
430///////////////////////////////////////////////////////////////////////////////
431
432static proc MK(poly f,int mu,int kappa,vector xi,poly u,
433  int K,int N,int prevN,list e,list V1,list V2,list Ve,list Vnablae)
434{
435  dbprint(printlevel-voice+2,"//computing nabla(e)...");
436  int t=timer;
437  Vnablae=nablaK(f,kappa,xi,u,N,prevN,Vnablae,e);
438  dbprint(printlevel-voice+2,"//...nabla(e) computed ["+string(timer-t)
439    +" secs, "+string((memory(1)+1023)/1024)+" K]");
440
441  dbprint(printlevel-voice+2,
442    "//lifting nabla(e) to C-basis of H''/t^KH''...");
443  list V=Ve+V1+V2;
444  module W=module(V[1..size(V)]);
445  dbprint(printlevel-voice+2,"//vector space dimension: "+string(nrows(W)));
446  dbprint(printlevel-voice+2,"//number of generators: "+string(ncols(W)));
447  t=timer;
448  matrix C=lift(W,module(Vnablae[1..size(Vnablae)]));
449  dbprint(printlevel-voice+2,"//...nabla(e) lifted ["+string(timer-t)
450    +" secs, "+string((memory(1)+1023)/1024)+" K]");
451
452  dbprint(printlevel-voice+2,"//computing e-lift of nabla(e)...");
453  t=timer;
454  int i1,i2,j,k;
455  matrix M[mu][mu];
456  for(j=1;j<=mu;j++)
457  {
458    for(k,i2=0,1;k<K;k++)
459    {
460      for(i1=1;i1<=mu;i1,i2=i1+1,i2+1)
461      {
462        M[i1,j]=M[i1,j]+C[i2,j]*var(1)^k;
463      }
464    }
465  }
466  dbprint(printlevel-voice+2,"//...e-lift of nabla(e) computed ["
467    +string(timer-t)+" secs, "+string((memory(1)+1023)/1024)+" K]");
468
469  return(M,N,Vnablae);
470}
471///////////////////////////////////////////////////////////////////////////////
472
473static proc mid(ideal l)
474{
475  int i,j,id;
476  int mid=0;
477  for(i=size(l);i>=1;i--)
478  {
479    for(j=i-1;j>=1;j--)
480    {
481      id=int(l[i]-l[j]);
482      id=max(intvec(id,-id));
483      mid=max(intvec(id,mid));
484    }
485  }
486  return(mid);
487}
488///////////////////////////////////////////////////////////////////////////////
489
490static proc decmide(matrix M,ideal eM0,list bM0)
491{
492  matrix M0=jet(M,0);
493
494  dbprint(printlevel-voice+2,
495    "//computing basis U of generalized eigenspaces of M0...");
496  int t=timer;
497  int i,j;
498  matrix U,M0e;
499  matrix E=freemodule(nrows(M));
500  for(i=ncols(eM0);i>=1;i--)
501  {
502    M0e=E;
503    for(j=max(bM0[i]);j>=1;j--)
504    {
505      M0e=M0e*(M0-eM0[i]*E);
506    }
507    U=syz(M0e)+U;
508  }
509  dbprint(printlevel-voice+2,"//...U computed ["+string(timer-t)+" secs, "
510    +string((memory(1)+1023)/1024)+" K]");
511
512  dbprint(printlevel-voice+2,"//transforming M to U...");
513  t=timer;
514  list daU=detadj(U);
515  daU[2]=(1/number(daU[1]))*daU[2];
516  M=daU[2]*M*U;
517  dbprint(printlevel-voice+2,"//...M transformed ["+string(timer-t)+" secs, "
518    +string((memory(1)+1023)/1024)+" K]");
519
520  dbprint(printlevel-voice+2,
521    "//computing integer differences of eigenvalues of M0...");
522  t=timer;
523  int k;
524  intvec ideM0;
525  ideM0[ncols(eM0)]=0;
526  for(i=ncols(eM0);i>=1;i--)
527  {
528    for(j=ncols(eM0);j>=1;j--)
529    {
530      k=int(eM0[i]-eM0[j]);
531      if(k)
532      {
533        if(k>0)
534        {
535          ideM0[i]=max(intvec(k,ideM0[i]));
536        }
537        else
538        {
539          ideM0[j]=max(intvec(-k,ideM0[j]));
540        }
541      }
542    }
543  }
544  for(i,k=size(bM0),nrows(M);i>=1;i--)
545  {
546    for(j=sum(bM0[i]);j>=1;j--)
547    {
548      ideM0[k]=ideM0[i];
549      k--;
550    }
551  }
552  dbprint(printlevel-voice+2,
553    "//...integer differences of eigenvalues of M0 computed ["+string(timer-t)
554    +" secs, "+string((memory(1)+1023)/1024)+" K]");
555
556  dbprint(printlevel-voice+2,"//transforming M...");
557  t=timer;
558  for(i=nrows(M);i>=1;i--)
559  {
560    if(!ideM0[i])
561    {
562      M[i,i]=M[i,i]+1;
563    }
564    for(j=ncols(M);j>=1;j--)
565    {
566      if(ideM0[i]&&!ideM0[j])
567      {
568        M[i,j]=M[i,j]*var(1);
569      }
570      else
571      {
572        if(!ideM0[i]&&ideM0[j])
573        {
574          M[i,j]=M[i,j]/var(1);
575        }
576      }
577    }
578  }
579  dbprint(printlevel-voice+2,"//...M transformed ["+string(timer-t)+" secs, "
580    +string((memory(1)+1023)/1024)+" K]");
581
582  return(M);
583}
584///////////////////////////////////////////////////////////////////////////////
585
586static proc nonqhmonodromy(poly f,int mu,int opt)
587{
588  pcvinit();
589
590  dbprint(printlevel-voice+2,"//computing kappa, xi and u with "+
591    "u*f^kappa=(matrix(jacob(f))*xi)[1,1]...");
592  list jl=jacoblift(f);
593  def kappa,xi,u=jl[1..3];
594  dbprint(printlevel-voice+2,"//...kappa, xi and u computed");
595  dbprint(printlevel-voice+2,"//kappa="+string(kappa));
596  if(kappa==1)
597  {
598    dbprint(printlevel-voice+2,
599      "//f quasihomogenous with respect to suitable coordinates");
600  }
601  else
602  {
603    dbprint(printlevel-voice+2,
604      "//f not quasihomogenous for any choice of coordinates");
605  }
606  dbprint(printlevel-voice+2,"//xi=");
607  dbprint(printlevel-voice+2,xi);
608  dbprint(printlevel-voice+2,"//u="+string(u));
609
610  int K,N,prevN;
611  list e,P1,P2,Pe,V1,V2,Ve,Vnablae;
612
613  dbprint(printlevel-voice+2,"//increasing K and N...");
614  K,N,P1,P2,Pe,V1,V2,Ve=incK(f,mu,K,1,N,e,P1,P2,Pe,V1,V2,Ve);
615  dbprint(printlevel-voice+2,"//...K and N increased");
616
617  dbprint(printlevel-voice+2,"//computing C{f}-basis e of Brieskorn lattice "
618    +"H''=Omega^(n+1)/df^dOmega^(n-1)...");
619  int t=timer;
620  e=pcvcv2p(quotV(V1+V2,N),0,N);
621  dbprint(printlevel-voice+2,"//...e computed ["+string(timer-t)+" secs, "
622    +string((memory(1)+1023)/1024)+" K]");
623
624  dbprint(printlevel-voice+2,"//e=");
625  dbprint(printlevel-voice+2,e);
626
627  Pe=e;
628  Ve=pcvp2cv(Pe,0,N);
629
630  if(kappa==1)
631  {
632    dbprint(printlevel-voice+2,
633      "//computing 0-jet M of e-matrix of t*nabla...");
634    matrix M=list(MK(f,mu,kappa,xi,u,K,N,prevN,e,V1,V2,Ve,Vnablae))[1];
635    dbprint(printlevel-voice+2,"//...M computed");
636  }
637  else
638  {
639    dbprint(printlevel-voice+2,
640      "//computing transformation matrix U to simple pole...");
641
642    dbprint(printlevel-voice+2,"//computing t*nabla-stable lattice...");
643    matrix M,prevU;
644    matrix U=freemodule(mu)*var(1)^((mu-1)*(kappa-1));
645    int i;
646    dbprint(printlevel-voice+2,"//comparing with previous lattice...");
647    t=timer;
648    for(i=mu-1;i>=1&&size(reduce(U,std(prevU)))>0;i--)
649    {
650      dbprint(printlevel-voice+2,"//...compared with previous lattice ["
651        +string(timer-t)+" secs, "+string((memory(1)+1023)/1024)+" K]");
652
653      dbprint(printlevel-voice+2,"//increasing K and N...");
654      K,N,P1,P2,Pe,V1,V2,Ve=incK(f,mu,K,kappa-1,N,e,P1,P2,Pe,V1,V2,Ve);
655      dbprint(printlevel-voice+2,"//...K and N increased");
656
657      dbprint(printlevel-voice+2,
658        "//computing (K-1)-jet M of e-matrix of t^kappa*nabla...");
659      M,prevN,Vnablae=MK(f,mu,kappa,xi,u,K,N,prevN,e,V1,V2,Ve,Vnablae);
660      dbprint(printlevel-voice+2,"//...M computed");
661
662      prevU=U;
663
664      dbprint(printlevel-voice+2,"//enlarging lattice...");
665      t=timer;
666      U=interred(jet(module(U)+module(var(1)*diff(U,var(1)))+
667        module(mdivp(M*U,var(1)^(kappa-1))),(kappa-1)*(mu-1)));
668      dbprint(printlevel-voice+2,"//...lattice enlarged ["+string(timer-t)
669        +" secs, "+string((memory(1)+1023)/1024)+" K]");
670
671      dbprint(printlevel-voice+2,"//comparing with previous lattice...");
672      t=timer;
673    }
674    dbprint(printlevel-voice+2,"//...compared with previous lattice ["
675      +string(timer-t)+" secs, "+string((memory(1)+1023)/1024)+" K]");
676    dbprint(printlevel-voice+2,"//...t*nabla-stable lattice computed");
677
678    if(ncols(U)>nrows(U))
679    {
680      dbprint(printlevel-voice+2,
681        "//computing C{f}-basis of t*nabla-stable lattice...");
682      t=timer;
683      U=minbase(U);
684      dbprint(printlevel-voice+2,
685        "//...C{f}-basis of t*nabla-stable lattice computed ["+string(timer-t)
686        +" secs, "+string((memory(1)+1023)/1024)+" K]");
687    }
688
689    U=mdivp(U,var(1)^pcvmindeg(U));
690
691    dbprint(printlevel-voice+2,"//...U computed");
692
693    dbprint(printlevel-voice+2,
694      "//computing determinant and adjoint matrix of U...");
695    list daU=detadj(U);
696    poly p=var(1)^min(intvec(pcvmindeg(daU[2]),pcvmindeg(daU[1])));
697    daU[1]=daU[1]/p;
698    daU[2]=mdivp(daU[2],p);
699    dbprint(printlevel-voice+2,
700      "//...determinant and adjoint matrix of U computed");
701
702    if(K<kappa+pcvmindeg(daU[1]))
703    {
704      dbprint(printlevel-voice+2,"//increasing K and N...");
705      K,N,P1,P2,Pe,V1,V2,Ve=
706        incK(f,mu,K,kappa+pcvmindeg(daU[1])-K,N,e,P1,P2,Pe,V1,V2,Ve);
707      dbprint(printlevel-voice+2,"//...K and N increased");
708
709      dbprint(printlevel-voice+2,"//computing M...");
710      M,prevN,Vnablae=MK(f,mu,kappa,xi,u,K,N,prevN,e,V1,V2,Ve,Vnablae);
711      dbprint(printlevel-voice+2,"//...M computed");
712    }
713
714    dbprint(printlevel-voice+2,"//transforming M/t^kappa to simple pole...");
715    t=timer;
716    M=mdivp(daU[2]*(var(1)^kappa*diff(U,var(1))+M*U),
717      leadcoef(daU[1])*var(1)^(kappa+pcvmindeg(daU[1])-1));
718    dbprint(printlevel-voice+2,"//...M/t^kappa transformed to simple pole ["
719      +string(timer-t)+" secs, "+string((memory(1)+1023)/1024)+" K]");
720  }
721
722  if(opt==0)
723  {
724    dbprint(printlevel-voice+2,
725      "//computing maximal integer difference delta of eigenvalues of M0...");
726    t=timer;
727    list jd=jordan(M);
728    def eM0,bM0=jd[1..2];
729    int delta=mid(eM0);
730    dbprint(printlevel-voice+2,"//...delta computed ["+string(timer-t)
731      +" secs, "+string((memory(1)+1023)/1024)+" K]");
732
733    dbprint(printlevel-voice+2,"//delta="+string(delta));
734
735    if(delta>0)
736    {
737      dbprint(printlevel-voice+2,"//increasing K and N...");
738      if(kappa==1)
739      {
740        K,N,P1,P2,Pe,V1,V2,Ve=incK(f,mu,K,1+delta-K,N,e,P1,P2,Pe,V1,V2,Ve);
741      }
742      else
743      {
744        K,N,P1,P2,Pe,V1,V2,Ve=
745          incK(f,mu,K,kappa+pcvmindeg(daU[1])+delta-K,N,e,P1,P2,Pe,V1,V2,Ve);
746      }
747      dbprint(printlevel-voice+2,"//...K and N increased");
748
749      dbprint(printlevel-voice+2,"//computing M...");
750      M,prevN,Vnablae=MK(f,mu,kappa,xi,u,K,N,prevN,e,V1,V2,Ve,Vnablae);
751      dbprint(printlevel-voice+2,"//...M computed");
752
753      if(kappa>1)
754      {
755        dbprint(printlevel-voice+2,
756          "//transforming M/t^kappa to simple pole...");
757        t=timer;
758        M=mdivp(invunit(daU[1]/var(1)^pcvmindeg(daU[1]),delta)*
759          daU[2]*(var(1)^kappa*diff(U,var(1))+M*U),
760          var(1)^(kappa+pcvmindeg(daU[1])-1));
761        dbprint(printlevel-voice+2,
762          "//...M/t^kappa transformed to simple pole ["+string(timer-t)
763          +" secs, "+string((memory(1)+1023)/1024)+" K]");
764      }
765
766      dbprint(printlevel-voice+2,"//decreasing delta...");
767      M=decmide(M,eM0,bM0);
768      delta--;
769      dbprint(printlevel-voice+2,"//delta="+string(delta));
770
771      while(delta>0)
772      {
773        jd=jordan(M);
774        eM0,bM0=jd[1..2];
775        M=decmide(M,eM0,bM0);
776        delta--;
777        dbprint(printlevel-voice+2,"//delta="+string(delta));
778      }
779      dbprint(printlevel-voice+2,"//...delta decreased");
780    }
781  }
782
783  dbprint(printlevel-voice+2,"//computing 0-jet M0 of M...");
784  matrix M0=jet(M,0);
785  dbprint(printlevel-voice+2,"//...M0 computed");
786
787  return(M0);
788}
789///////////////////////////////////////////////////////////////////////////////
790
791static proc qhmonodromy(poly f,intvec w)
792{
793  dbprint(printlevel-voice+2,"//computing basis e of Milnor algebra...");
794  int t=timer;
795  ideal e=kbase(std(jacob(f)));
796  dbprint(printlevel-voice+2,"//...e computed ["+string(timer-t)+" secs, "
797    +string((memory(1)+1023)/1024)+" K]");
798
799  dbprint(printlevel-voice+2,
800    "//computing Milnor number mu and quasihomogeneous degree d...");
801  int mu,d=size(e),(transpose(leadexp(f))*w)[1];
802  dbprint(printlevel-voice+2,"...mu and d computed");
803
804  dbprint(printlevel-voice+2,"//computing te-matrix M of t*nabla...");
805  matrix M[mu][mu];
806  int i;
807  for(i=mu;i>=1;i--)
808  {
809    M[i,i]=number((transpose(leadexp(e[i])+1)*w)[1])/d;
810  }
811  dbprint(printlevel-voice+2,"//...M computed");
812
813  return(M);
814}
815///////////////////////////////////////////////////////////////////////////////
816
817proc monodromy(poly f, list #)
818"USAGE:   monodromy(f[,opt]); f poly, opt int
819ASSUME:  The polynomial f in a series ring (local ordering) defines
820         an isolated hypersurface singularity.
821RETURN:  The procedure returns a residue matrix M of the meromorphic
822         Gauss-Manin connection of the singularity defined by f
823         or an empty matrix if the assumptions are not fulfilled.
824         If opt=0 (default), exp(2*pi*i*M) is a monodromy matrix of f,
825         else, only the characteristic polynomial of exp(2*pi*i*M) coincides
826         with the characteristic polynomial of the monodromy of f.
827DISPLAY: The procedure displays more comments for higher printlevel.
828EXAMPLE: example monodromy; shows an example.
829"
830{
831  int opt;
832  if(size(#)>0)
833  {
834    if(typeof(#[1])=="int")
835    {
836      opt=#[1];
837    }
838    else
839    {
840      print("\\second parameter no int");
841      return();
842    }
843
844  }
845
846  dbprint(printlevel-voice+2,"//basering="+string(basering));
847
848  int i;
849  for(i=nvars(basering);i>=1;i--)
850  {
851    if(1<var(i))
852    {
853      i=-1;
854    }
855  }
856
857  if(i<0)
858  {
859    print("//no series ring (local ordering)");
860
861    matrix M[1][0];
862    return(M);
863  }
864  else
865  {
866    dbprint(printlevel-voice+2,"//f="+string(f));
867
868    dbprint(printlevel-voice+2,"//computing milnor number mu of f...");
869    int t=timer;
870    int mu=milnor(f);
871    dbprint(printlevel-voice+2,"//...mu computed ["+string(timer-t)+" secs, "
872      +string((memory(1)+1023)/1024)+" K]");
873
874    dbprint(printlevel-voice+2,"//mu="+string(mu));
875
876    if(mu<=0)
877    {
878      if(mu==0)
879      {
880        print("//no singularity");
881      }
882      else
883      {
884        print("//non isolated singularity");
885      }
886
887      matrix M[1][0];
888      return(M);
889    }
890    else
891    {
892      dbprint(printlevel-voice+2,"//computing weight vector w...");
893      intvec w=qhweight(f);
894      dbprint(printlevel-voice+2,"//...w computed");
895
896      dbprint(printlevel-voice+2,"//w="+string(w));
897
898      if(w==0)
899      {
900        dbprint(printlevel-voice+2,
901          "//f not quasihomogeneous with respect to given coordinates");
902        return(nonqhmonodromy(f,mu,opt));
903      }
904      else
905      {
906        dbprint(printlevel-voice+2,
907          "//f quasihomogeneous with respect to given coordinates");
908        return(qhmonodromy(f,w));
909      }
910    }
911  }
912}
913example
914{ "EXAMPLE:"; echo=2;
915  ring R=0,(x,y),ds;
916  poly f=x2y2+x6+y6;
917  matrix M=monodromy(f);
918  print(M);
919}
920///////////////////////////////////////////////////////////////////////////////
921
922proc H2basis(poly f)
923"USAGE:   H2basis(f); f poly
924ASSUME:  The polynomial f in a series ring (local ordering) defines
925         an isolated hypersurface singularity.
926RETURN:  The procedure returns a list of representatives of a C{f}-basis of the
927         Brieskorn lattice H''=Omega^(n+1)/df^dOmega^(n-1).
928THEORY:  H'' is a free C{f}-module of rank milnor(f).
929DISPLAY: The procedure displays more comments for higher printlevel.
930EXAMPLE: example H2basis; shows an example.
931"
932{
933  pcvinit();
934
935  dbprint(printlevel-voice+2,"//basering="+string(basering));
936
937  int i;
938  for(i=nvars(basering);i>=1;i--)
939  {
940    if(1<var(i))
941    {
942      i=-1;
943    }
944  }
945
946  if(i<0)
947  {
948    print("//no series ring (local ordering)");
949
950    return(list());
951  }
952  else
953  {
954    dbprint(printlevel-voice+2,"//f="+string(f));
955
956    dbprint(printlevel-voice+2,"//computing milnor number mu of f...");
957    int t=timer;
958    int mu=milnor(f);
959    dbprint(printlevel-voice+2,"//...mu computed ["+string(timer-t)+" secs, "
960      +string((memory(1)+1023)/1024)+" K]");
961
962    dbprint(printlevel-voice+2,"//mu="+string(mu));
963
964    if(mu<=0)
965    {
966      if(mu==0)
967      {
968        print("//no singularity");
969      }
970      else
971      {
972        print("//non isolated singularity");
973      }
974
975      return(list());
976    }
977    else
978    {
979      dbprint(printlevel-voice+2,"//computing kappa, xi and u with "+
980        "u*f^kappa=(matrix(jacob(f))*xi)[1,1]...");
981      list jl=jacoblift(f);
982      def kappa,xi,u=jl[1..3];
983      dbprint(printlevel-voice+2,"//...kappa, xi and u computed");
984      dbprint(printlevel-voice+2,"//kappa="+string(kappa));
985      if(kappa==1)
986      {
987        dbprint(printlevel-voice+2,
988          "//f quasihomogenous with respect to suitable coordinates");
989      }
990      else
991      {
992        dbprint(printlevel-voice+2,
993          "//f not quasihomogenous for any choice of coordinates");
994      }
995      dbprint(printlevel-voice+2,"//xi=");
996      dbprint(printlevel-voice+2,xi);
997      dbprint(printlevel-voice+2,"//u="+string(u));
998
999      int K,N,prevN;
1000      list e,P1,P2,Pe,V1,V2,Ve,Vnablae;
1001
1002      dbprint(printlevel-voice+2,"//increasing K and N...");
1003      K,N,P1,P2,Pe,V1,V2,Ve=incK(f,mu,K,1,N,e,P1,P2,Pe,V1,V2,Ve);
1004      dbprint(printlevel-voice+2,"//...K and N increased");
1005
1006      dbprint(printlevel-voice+2,
1007        "//computing C{f}-basis e of Brieskorn lattice "
1008        +"H''=Omega^(n+1)/df^dOmega^(n-1)...");
1009      t=timer;
1010      e=pcvcv2p(quotV(V1+V2,N),0,N);
1011      dbprint(printlevel-voice+2,"//...e computed ["+string(timer-t)+" secs, "
1012        +string((memory(1)+1023)/1024)+" K]");
1013
1014      dbprint(printlevel-voice+2,"//e=");
1015      dbprint(printlevel-voice+2,e);
1016
1017      return(e);
1018    }
1019  }
1020}
1021example
1022{ "EXAMPLE:"; echo=2;
1023  ring R=0,(x,y),ds;
1024  poly f=x2y2+x6+y6;
1025  H2basis(f);
1026}
1027///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.