source: git/Singular/LIB/mondromy.lib @ 917fb5

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