source: git/Singular/LIB/mondromy.lib @ 1eb7af

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