source: git/Singular/LIB/mondromy.lib @ fd3fb7

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