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

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