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

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