source: git/Singular/LIB/gaussman.lib @ a23a7fd

spielwiese
Last change on this file since a23a7fd was a23a7fd, checked in by Mathias Schulze <mschulze@…>, 23 years ago
Singular/LIB/gaussman.lib git-svn-id: file:///usr/local/Singular/svn/trunk@4824 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 20.4 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2
3version="$Id: gaussman.lib,v 1.14 2000-12-06 14:56:26 mschulze Exp $";
4info="
5LIBRARY:  gaussman.lib  GAUSS-MANIN CONNECTION OF A SINGULARITY
6
7AUTHOR:   Mathias Schulze, email: mschulze@mathematik.uni-kl.de
8
9PROCEDURES:
10 monomat   monodromy matrix
11 monospec  spectrum of monodromy
12 vfilt     V-filtration on H''/H'
13 singspec  singularity spectrum
14 vjacob    V-filtration on Jacobian algebra
15 gamma     Hertling's gamma invariant
16 gamma4    Hertling's gamma4 invariant
17";
18
19LIB "jordan.lib";
20
21///////////////////////////////////////////////////////////////////////////////
22
23static proc maxintdif(ideal e)
24{
25  dbprint(printlevel-voice+2,"//gaussman::maxintdif");
26  int i,j,id;
27  int mid=0;
28  for(i=ncols(e);i>=1;i--)
29  {
30    for(j=i-1;j>=1;j--)
31    {
32      id=int(e[i]-e[j]);
33      if(id<0)
34      {
35        id=-id;
36      }
37      if(id>mid)
38      {
39        mid=id;
40      }
41    }
42  }
43  return(mid);
44}
45///////////////////////////////////////////////////////////////////////////////
46
47static proc maxorddif(matrix H)
48{
49  dbprint(printlevel-voice+2,"//gaussman::maxorddif");
50  int i,j,d;
51  int d0,d1=-1,-1;
52  for(i=nrows(H);i>=1;i--)
53  {
54    for(j=ncols(H);j>=1;j--)
55    {
56      d=ord(H[i,j]);
57      if(d>=0)
58      {
59        if(d0<0||d<d0)
60        {
61          d0=d;
62        }
63        if(d1<0||d>d1)
64        {
65          d1=d;
66        }
67      }
68    }
69  }
70  return(d1-d0);
71}
72///////////////////////////////////////////////////////////////////////////////
73
74static proc invunit(poly u,int n)
75{
76  dbprint(printlevel-voice+2,"//gaussman::invunit");
77  if(ord(u)>0)
78  {
79    ERROR("no unit");
80  }
81  poly u0=jet(u,0);
82  u=jet(1-u/u0,n);
83  poly w=u;
84  poly v=1+u;
85  for(int i=n div ord(u);i>1;i--)
86  {
87    w=jet(w*u,n);
88    v=v+w;
89  }
90  v=jet(v,n)/u0;
91  return(v);
92}
93///////////////////////////////////////////////////////////////////////////////
94
95static proc expand(matrix M,matrix U,int n)
96{
97  dbprint(printlevel-voice+2,"//gaussman::expand");
98  for(int i=ncols(U);i>=1;i--)
99  {
100    U[i,i]=invunit(U[i,i],n-ord(M[i]));
101  }
102  return(jet(M*U,n));
103}
104///////////////////////////////////////////////////////////////////////////////
105
106static proc redNF(module M,module N,list #)
107{
108  matrix U=freemodule(ncols(M));
109  if(size(#)>0)
110  {
111    if(typeof(#[1])=="matrix")
112    {
113      U=#[1];
114    }
115  }
116
117  for(int i=ncols(M);i>=1;i--)
118  {
119    M[i]=M[i]/lead(U[i,i]);
120    U[i,i]=U[i,i]/lead(U[i,i]);
121  }
122  N=std(N);
123  module redNFM=matrix(0,nrows(M),ncols(M));
124  dbprint(printlevel-voice+2,"//gaussman::redNF: reduce");
125  module weakNFM=reduce(M,N);
126  while(size(weakNFM)>0)
127  {
128    redNFM=matrix(redNFM)+matrix(lead(weakNFM));
129    M=matrix(M)-matrix(lead(weakNFM))*U;
130    dbprint(printlevel-voice+2,"//gaussman::redNF: reduce");
131    weakNFM=reduce(M,N);
132  }
133  return(redNFM);
134}
135///////////////////////////////////////////////////////////////////////////////
136
137proc monomat(poly f,list #)
138"USAGE:   <matrix> M=monomat(<poly> f);
139ASSUME:  f isolated singularity
140RETURN:  exp(-2*pi*i*M) is a monodromy matrix
141EXAMPLE: example monomat; shows an example
142"
143{
144  int mide=-1;
145  if(size(#)>0)
146  {
147    mide=0;
148  }
149
150  int i,j;
151  int n=nvars(basering)-1;
152  for(i=n+1;i>=1;i--)
153  {
154    if(var(i)>1)
155    {
156      ERROR("basering not local");
157    }
158  }
159  ideal J=jacob(f);
160  ideal sJ=std(J);
161  if(vdim(sJ)<=0)
162  {
163    if(vdim(sJ)==0)
164    {
165      ERROR("singularity not singular");
166    }
167    else
168    {
169      ERROR("singularity not isolated");
170    }
171  }
172  ideal m=kbase(sJ);
173  int mu,modm=ncols(m),maxorddif(m);
174
175  ideal w=f*m;
176  matrix U=freemodule(mu);
177  matrix A0[mu][mu],A,C,D;
178  list l;
179  module H,dH=freemodule(mu),freemodule(mu);
180  module H0;
181  int sdH=1;
182  int k=-1;
183  int K,N;
184
185  while(k<K||sdH>0)
186  {
187    k++;
188    dbprint(printlevel-voice+2,"//gaussman::monomat: k="+string(k));
189
190    dbprint(printlevel-voice+2,"//gaussman::monomat: compute C");
191    C=coeffs(redNF(w,sJ,U),m);
192    A0=A0+C*var(1)^k;
193
194    if(sdH>0)
195    {
196      H0=H;
197      dbprint(printlevel-voice+2,"//gaussman::monomat: compute dH");
198      dH=jet(module(A0*dH+var(1)^2*diff(matrix(dH),var(1))),k);
199      H=H*var(1)+dH;
200
201      dbprint(printlevel-voice+2,"//gaussman::monomat: test dH==0");
202      sdH=size(reduce(H,std(H0*var(1))));
203      if(sdH>0)
204      {
205        A0=A0-var(1);
206      }
207      else
208      {
209        dbprint(printlevel-voice+2,
210          "//gaussman::monomat: compute basis of saturation");
211        H=minbase(H0);
212        int modH=maxorddif(H);
213        K=modH+1;
214      }
215    }
216
217    if(k==K&&sdH==0)
218    {
219      N=k-modH;
220      dbprint(printlevel-voice+2,
221        "//gaussman::monomat: compute A on saturation");
222      l=division(H*var(1),A0*H+var(1)^2*diff(matrix(H),var(1)));
223      A=expand(l[1],l[2],N-1);
224      if(mide<0)
225      {
226        dbprint(printlevel-voice+2,
227          "//gaussman::monomat: compute eigenvalues e of A");
228        ideal e=jordan(A,-1)[1];
229        dbprint(printlevel-voice+2,"//gaussman::monomat: e="+string(e));
230        mide=maxintdif(e);
231        K=K+mide;
232      }
233    }
234
235    if(k<K||sdH>0)
236    {
237      dbprint(printlevel-voice+2,"//gaussman::monomat: divide by J");
238      l=division(J,ideal(matrix(w)-matrix(m)*C*U));
239      D=l[1];
240
241      dbprint(printlevel-voice+2,"//gaussman::monomat: compute w/U");
242      for(j=mu;j>=1;j--)
243      {
244        if(l[2][j,j]!=0)
245        {
246          dbprint(printlevel-voice+2,
247            "//gaussman::monomat: compute U["+string(j)+"]");
248          U[j,j]=U[j,j]*l[2][j,j];
249        }
250        dbprint(printlevel-voice+2,
251          "//gaussman::monomat: compute w["+string(j)+"]");
252        w[j]=0;
253        for(i=n+1;i>=1;i--)
254        {
255          w[j]=w[j]+U[j,j]*diff(D[i,j],var(i))-diff(U[j,j],var(i))*D[i,j];
256        }
257      }
258      U=U*U;
259    }
260  }
261
262  while(mide>0)
263  {
264    dbprint(printlevel-voice+2,"//gaussman::monomat: mide="+string(mide));
265
266    intvec b;
267    U=0;
268    module dU;
269    A0=jet(A,0);
270    matrix A0e;
271    for(i=ncols(e);i>=1;i--)
272    {
273      A0e=freemodule(mu);
274      for(j=n;j>=0;j--) // Potenzen von Matrizen?
275      {
276        A0e=A0e*(A0-e[i]);
277      }
278      dU=syz(A0e);
279      U=dU+U;
280      b[i]=size(dU);
281    }
282    A=division(U,A*U)[1];
283
284    intvec ide;
285    ide[mu]=0;
286    for(i=ncols(e);i>=1;i--)
287    {
288      for(j=i-1;j>=1;j--)
289      {
290        k=int(e[j]-e[i]);
291        if(k>ide[i])
292        {
293          ide[i]=k;
294        }
295        if(-k>ide[j])
296        {
297          ide[j]=-k;
298        }
299      }
300    }
301    for(j,k=ncols(e),mu;j>=1;j--)
302    {
303      for(i=b[j];i>=1;i--)
304      {
305        ide[k]=ide[j];
306        k--;
307      }
308    }
309
310    for(i=mu;i>=1;i--)
311    {
312      if(ide[i]>0)
313      {
314        A[i,i]=A[i,i]+1;
315        e[i]=e[i]+1;
316      }
317      for(j=mu;j>=1;j--)
318      {
319        if(ide[i]==0&&ide[j]>0)
320        {
321          A[i,j]=A[i,j]*var(1);
322        }
323        else
324        {
325          if(ide[i]>0&&ide[j]==0)
326          {
327            A[i,j]=A[i,j]/var(1);
328          }
329        }
330      }
331    }
332    mide--;
333  }
334
335  return(jet(A,0));
336}
337example
338{ "EXAMPLE:"; echo=2;
339  ring R=0,(x,y),ds;
340  poly f=x5+x2y2+y5;
341  matrix M=monomat(f);
342  print(M);
343}
344///////////////////////////////////////////////////////////////////////////////
345
346proc monospec(poly f)
347"USAGE:   <matrix> M=monospec(<poly> f);
348ASSUME:  f isolated singularity
349RETURN:  the spectrum of exp(-2*pi*i*M) is the spectrum of monodromy
350EXAMPLE: example monospec; shows an example
351"
352{
353  return(monomat(f,0));
354}
355example
356{ "EXAMPLE:"; echo=2;
357  ring R=0,(x,y),ds;
358  poly f=x5+x2y2+y5;
359  matrix M=monospec(f);
360  print(M);
361}
362///////////////////////////////////////////////////////////////////////////////
363
364proc vfilt(poly f,list #)
365"USAGE:   <list> l=vfilt(<poly> f);
366ASSUME:  f isolated singularity
367RETURN:  <ideal> l[1] : spectral numbers in increasing order
368         <intvec> l[2] :
369           <int> l[2][i] : multiplicity of spectral number l[1][i]
370         <list> l[3] :
371           <module> l[3][i] : vector space basis of l[1][i]-th graded part
372                              of the V-filtration on H''/H' in terms of l[4]
373         <ideal> l[4] : monomial vector space basis of H''/H'
374         <ideal> l[5] : standard basis of Jacobian ideal
375EXAMPLE: example vfilt; shows an example
376"
377{
378  int i,j;
379  int n=nvars(basering)-1;
380  for(i=n+1;i>=1;i--)
381  {
382    if(var(i)>1)
383    {
384      ERROR("basering not local");
385    }
386  }
387  ideal J=jacob(f);
388  ideal sJ=std(J);
389  if(vdim(sJ)<=0)
390  {
391    if(vdim(sJ)==0)
392    {
393      ERROR("singularity not singular");
394    }
395    else
396    {
397      ERROR("singularity not isolated");
398    }
399  }
400  ideal m=kbase(sJ);
401  int mu,modm=ncols(m),maxorddif(m);
402
403  ideal w=f*m;
404  matrix U=freemodule(mu);
405  matrix A[mu][mu],C,D;
406  list l;
407  module H,dH=freemodule(mu),freemodule(mu);
408  module H0;
409  int sdH=1;
410  int k=-1;
411  int K;
412
413  while(k<K||sdH>0)
414  {
415    k++;
416    dbprint(printlevel-voice+2,"//gaussman::vfilt: k="+string(k));
417
418    dbprint(printlevel-voice+2,"//gaussman::vfilt: compute C");
419    C=coeffs(redNF(w,sJ,U),m);
420    A=A+C*var(1)^k;
421
422    if(sdH>0)
423    {
424      H0=H;
425      dbprint(printlevel-voice+2,"//gaussman::vfilt: compute dH");
426      dH=jet(module(A*dH+var(1)^2*diff(matrix(dH),var(1))),k);
427      H=H*var(1)+dH;
428
429      dbprint(printlevel-voice+2,"//gaussman::vfilt: test dH==0");
430      sdH=size(reduce(H,std(H0*var(1))));
431      if(sdH>0)
432      {
433        A=A-var(1);
434      }
435      else
436      {
437        dbprint(printlevel-voice+2,
438          "//gaussman::vfilt: compute basis of saturation");
439        H=minbase(H0);
440        int modH=maxorddif(H);
441        if(k<n)
442        {
443          K=modH+n+1;
444        }
445        else
446        {
447          K=modH+k+1;
448        }
449        H0=freemodule(mu)*var(1)^k;
450      }
451    }
452
453    if(k<K||sdH>0)
454    {
455      dbprint(printlevel-voice+2,"//gaussman::vfilt: divide by J");
456      l=division(J,ideal(matrix(w)-matrix(m)*C*U));
457      D=l[1];
458
459      dbprint(printlevel-voice+2,"//gaussman::monomat: compute w/U");
460      for(j=mu;j>=1;j--)
461      {
462        if(l[2][j,j]!=0)
463        {
464          dbprint(printlevel-voice+2,
465            "//gaussman::monomat: compute U["+string(j)+"]");
466          U[j,j]=U[j,j]*l[2][j,j];
467        }
468        dbprint(printlevel-voice+2,
469          "//gaussman::monomat: compute w["+string(j)+"]");
470        w[j]=0;
471        for(i=n+1;i>=1;i--)
472        {
473          w[j]=w[j]+U[j,j]*diff(D[i,j],var(i))-diff(U[j,j],var(i))*D[i,j];
474        }
475      }
476      U=U*U;
477    }
478  }
479  int N=k-modH;
480
481  dbprint(printlevel-voice+2,"//gaussman::vfilt: transform H0 to saturation");
482  l=division(H,H0);
483  H0=expand(l[1],l[2],N-1);
484
485  dbprint(printlevel-voice+2,
486    "//gaussman::vfilt: compute H0 as vector space V0");
487  dbprint(printlevel-voice+2,
488    "//gaussman::vfilt: compute H1 as vector space V1");
489  poly p;
490  int i0,j0,i1,j1;
491  matrix V0[mu*N][mu*N];
492  matrix V1[mu*N][mu*(N-1)];
493  for(i0=mu;i0>=1;i0--)
494  {
495    for(i1=mu;i1>=1;i1--)
496    {
497      p=H0[i1,i0];
498      while(p!=0)
499      {
500        j1=leadexp(p)[1];
501        for(j0=N-j1-1;j0>=0;j0--)
502        {
503          V0[i1+(j1+j0)*mu,i0+j0*mu]=V0[i1+(j1+j0)*mu,i0+j0*mu]+leadcoef(p);
504          if(j1+j0+1<N)
505          {
506            V1[i1+(j1+j0+1)*mu,i0+j0*mu]=
507            V1[i1+(j1+j0+1)*mu,i0+j0*mu]+leadcoef(p);
508          }
509        }
510        p=p-lead(p);
511      }
512    }
513  }
514
515  dbprint(printlevel-voice+2,"//gaussman::vfilt: compute A on saturation");
516  l=division(H*var(1),A*H+var(1)^2*diff(matrix(H),var(1)));
517  A=expand(l[1],l[2],N-1);
518
519  dbprint(printlevel-voice+2,"//gaussman::vfilt: compute matrix M of A");
520  matrix M[mu*N][mu*N];
521  for(i0=mu;i0>=1;i0--)
522  {
523    for(i1=mu;i1>=1;i1--)
524    {
525      p=A[i1,i0];
526      while(p!=0)
527      {
528        j1=leadexp(p)[1];
529        for(j0=N-j1-1;j0>=0;j0--)
530        {
531          M[i1+(j0+j1)*mu,i0+j0*mu]=leadcoef(p);
532        }
533        p=p-lead(p);
534      }
535    }
536  }
537  for(i0=mu;i0>=1;i0--)
538  {
539    for(j0=N-1;j0>=0;j0--)
540    {
541      M[i0+j0*mu,i0+j0*mu]=M[i0+j0*mu,i0+j0*mu]+j0;
542    }
543  }
544
545  dbprint(printlevel-voice+2,"//gaussman::vfilt: compute eigenvalues eA of A");
546  ideal eA=jordan(A,-1)[1];
547  dbprint(printlevel-voice+2,"//gaussman::vfilt: eA="+string(eA));
548
549  dbprint(printlevel-voice+2,"//gaussman::vfilt: compute eigenvalues eM of M");
550  ideal eM;
551  k=0;
552  intvec u;
553  for(i=N;i>=1;i--)
554  {
555    u[i]=1;
556  }
557  i0=1;
558  while(u[N]<=ncols(eA))
559  {
560    for(i,i1=i0+1,i0;i<=N;i++)
561    {
562      if(eA[u[i]]+i<eA[u[i1]]+i1)
563      {
564        i1=i;
565      }
566    }
567    k++;
568    eM[k]=eA[u[i1]]+i1-1;
569    u[i1]=u[i1]+1;
570    if(u[i1]>ncols(eA))
571    {
572      i0=i1+1;
573    }
574  }
575  dbprint(printlevel-voice+2,"//gaussman::vfilt: eM="+string(eM));
576
577  dbprint(printlevel-voice+2,
578    "//gaussman::vfilt: compute V-filtration on H0/H1");
579  ideal s;
580  k=0;
581  list V;
582  matrix Me;
583  V[ncols(eM)+1]=std(V1);
584  intvec d;
585  if(size(#)>0)
586  {
587    for(i=ncols(eM);number(eM[i])-1>number(n-1)/2;i--)
588    {
589      Me=freemodule(mu*N);
590      for(i0=n;i0>=0;i0--) // Potenzen von Matrizen?
591      {
592        Me=Me*(M-eM[i]);
593      }
594
595      dbprint(printlevel-voice+2,
596        "//gaussman::vfilt: compute V["+string(i)+"]");
597      V1=module(V1)+syz(Me);
598      V[i]=std(intersect(V1,V0));
599
600      if(size(V[i])>size(V[i+1]))
601      {
602        k++;
603        s[k]=eM[i]-1;
604        d[k]=size(V[i])-size(V[i+1]);
605      }
606    }
607
608    dbprint(printlevel-voice+2,"//gaussman::vfilt: symmetry index found");
609    j=k;
610    if(number(eM[i])-1==number(n-1)/2)
611    {
612      Me=freemodule(mu*N);
613      for(i0=n;i0>=0;i0--) // Potenzen von Matrizen?
614      {
615        Me=Me*(M-eM[i]);
616      }
617
618      dbprint(printlevel-voice+2,
619        "//gaussman::vfilt: compute V["+string(i)+"]");
620      V1=module(V1)+syz(Me);
621      V[i]=std(intersect(V1,V0));
622
623      if(size(V[i])>size(V[i+1]))
624      {
625        k++;
626        s[k]=eM[i]-1;
627        d[k]=size(V[i])-size(V[i+1]);
628      }
629    }
630
631    dbprint(printlevel-voice+2,"//gaussman::vfilt: apply symmetry");
632    while(j>=1)
633    {
634      k++;
635      s[k]=s[j];
636      s[j]=n-1-s[k];
637      d[k]=d[j];
638      j--;
639    }
640
641    return(list(s,d));
642  }
643  else
644  {
645    list v;
646    j=-1;
647    for(i=ncols(eM);i>=1;i--)
648    {
649      Me=freemodule(mu*N);
650      for(i0=n;i0>=0;i0--) // Potenzen von Matrizen?
651      {
652        Me=Me*(M-eM[i]);
653      }
654
655      dbprint(printlevel-voice+2,
656        "//gaussman::vfilt: compute V["+string(i)+"]");
657      V1=module(V1)+syz(Me);
658      V[i]=std(intersect(V1,V0));
659
660      if(size(V[i])>size(V[i+1]))
661      {
662        if(number(eM[i]-1)>=number(n-1)/2)
663        {
664          k++;
665          s[k]=eM[i]-1;
666          dbprint(printlevel-voice+2,"//gaussman::vfilt: transform to V0");
667          v[k]=matrix(freemodule(ncols(V[i])),mu,mu*N)*division(V0,V[i])[1];
668        }
669        else
670        {
671          if(j<0)
672          {
673            if(s[k]==number(n-1)/2)
674            {
675              j=k-1;
676            }
677            else
678            {
679              j=k;
680            }
681          }
682          k++;
683          s[k]=s[j];
684          s[j]=eM[i]-1;
685          v[k]=v[j];
686          dbprint(printlevel-voice+2,"//gaussman::vfilt: transform to V0");
687          v[j]=matrix(freemodule(ncols(V[i])),mu,mu*N)*division(V0,V[i])[1];
688          j--;
689        }
690      }
691    }
692
693    dbprint(printlevel-voice+2,"//gaussman::vfilt: compute graded parts");
694    option(redSB);
695    for(k=1;k<size(v);k++)
696    {
697      v[k]=std(reduce(v[k],std(v[k+1])));
698      d[k]=size(v[k]);
699    }
700    v[k]=std(v[k]);
701    d[k]=size(v[k]);
702
703    return(list(s,d,v,m,sJ));
704  }
705}
706example
707{ "EXAMPLE:"; echo=2;
708  ring R=0,(x,y),ds;
709  poly f=x5+x2y2+y5;
710  list l=vfilt(f);
711  print(l);
712}
713///////////////////////////////////////////////////////////////////////////////
714
715proc singspec(poly f)
716"USAGE:   <list> l=singspec(<poly> f);
717ASSUME:  f isolated singularity
718RETURN:  <ideal> l[1] : spectral numbers in increasing order
719         <intvec> l[2] :
720           <int> l[2][i] : multiplicity of spectral number l[1][i]
721EXAMPLE: example singspec; shows an example
722"
723{
724  return(vfilt(f,0));
725}
726example
727{ "EXAMPLE:"; echo=2;
728  ring R=0,(x,y),ds;
729  poly f=x5+x2y2+y5;
730  list l=singspec(f);
731  print(l);
732}
733///////////////////////////////////////////////////////////////////////////////
734
735proc gamma(list l)
736"USAGE:   <number> g=gamma(singspec(<poly> f));
737ASSUME:  f isolated singularity
738RETURN:  Hertling's gamma invariant
739EXAMPLE: example gamma; shows an example
740"
741{
742  ideal s=l[1];
743  intvec d=l[2];
744  int n=nvars(basering)-1;
745  number g=0;
746  int i,j;
747  for(i=1;i<=ncols(s);i++)
748  {
749    for(j=1;j<=d[i];j++)
750    {
751      g=g+(number(s[i])-number(n-1)/2)^2;
752    }
753  }
754  g=-g/4+sum(d)*number(s[ncols(s)]-s[1])/48;
755  return(g);
756}
757example
758{ "EXAMPLE:"; echo=2;
759  ring R=0,(x,y),ds;
760  poly f=x5+x2y2+y5;
761  gamma(singspec(f));
762}
763///////////////////////////////////////////////////////////////////////////////
764
765proc gamma4(list l)
766"USAGE:   <number> g4=gamma4(singspec(<poly> f));
767ASSUME:  f isolated singularity
768RETURN:  Hertling's gamma4 invariant
769EXAMPLE: example gamma4; shows an example
770"
771{
772  ideal s=l[1];
773  intvec d=l[2];
774  int n=nvars(basering)-1;
775  number g4=0;
776  int i,j;
777  for(i=1;i<=ncols(s);i++)
778  {
779    for(j=1;j<=d[i];j++)
780    {
781      g4=g4+(number(s[i])-number(n-1)/2)^4;
782    }
783  }
784  g4=g4-(number(s[ncols(s)]-s[1])/12-1/30)*
785    (sum(d)*number(s[ncols(s)]-s[1])/4-24*gamma(l));
786 return(g4);
787}
788example
789{ "EXAMPLE:"; echo=2;
790  ring R=0,(x,y),ds;
791  poly f=x5+x2y2+y5;
792  gamma4(singspec(f));
793}
794///////////////////////////////////////////////////////////////////////////////
795
796proc vjacob(list l)
797"USAGE:   <list> l=vjacob(vfilt(<poly> f));
798ASSUME:  f isolated singularity
799RETURN:  <ideal> l[1] : spectral numbers of the V-filtration on the
800                        Jacobian algebra in increasing order
801         <intvec> l[2] :
802           <int> l[2][i] : multiplicity of spectral number l[1][i]
803         <list> l[3] :
804           <module> l[3][i] : vector space basis of l[1][i]-th graded part
805                              of the V-filtration on the Jaconian algebra
806                              in terms of l[4]
807         <ideal> l[4] : monomial vector space basis of the Jacobian algebra
808         <ideal> l[5] : standard basis of Jacobian ideal
809EXAMPLE: example vjacob; shows an example
810"
811{
812  def s,d,v,m,sJ=l[1..5];
813  int mu=ncols(m);
814
815  int i,j,k;
816  module V=v[1];
817  for(i=2;i<=size(v);i++)
818  {
819    V=V,v[i];
820  }
821
822  dbprint(printlevel-voice+2,
823    "//gaussman::vjacob: compute multiplication of Jacobian algebra");
824  list M;
825  for(i=ncols(m);i>=1;i--)
826  {
827    M[i]=lift(V,coeffs(redNF(m[i]*m,sJ),m)*V);
828  }
829
830  int i0,j0,i1,j1;
831  number r0=number(s[1]-s[ncols(s)]);
832  number r1,r2;
833  matrix M0;
834  module L;
835  list v0=freemodule(ncols(m));
836  ideal s0=r0;
837
838  while(r0<number(s[ncols(s)]-s[1]))
839  {
840    dbprint(printlevel-voice+2,
841      "//gaussman::vjacob: compute next difference r0 of spectral numbers");
842    r1=number(s[ncols(s)]-s[1]);
843    for(j=ncols(s);j>=1;j--)
844    {
845      for(i=ncols(s);i>=1;i--)
846      {
847        r2=number(s[i]-s[j]);
848        if(r2>r0&&r2<r1)
849        {
850          r1=r2;
851        }
852        else
853        {
854          if(r2<=r0)
855          {
856            i=0;
857          }
858        }
859      }
860    }
861    r0=r1;
862    dbprint(printlevel-voice+2,"//gaussman::vjacob: r0="+string(r1));
863
864    l=ideal();
865    for(k=ncols(m);k>=2;k--)
866    {
867      l=l+list(ideal());
868    }
869
870    dbprint(printlevel-voice+2,"//gaussman::vjacob: compute conditions");
871    j=ncols(s);
872    j0=mu;
873    while(j>=1)
874    {
875      i0=1;
876      i=1;
877      while(i<ncols(s)&&s[i]<s[j]+r0)
878      {
879        i0=i0+d[i];
880        i++;
881      }
882      if(s[i]<s[j]+r0)
883      {
884        i0=i0+d[i];
885        i++;
886      }
887      for(k=1;k<=ncols(m);k++)
888      {
889        M0=M[k];
890        if(i0>1)
891        {
892          l[k]=l[k],M0[1..i0-1,j0-d[j]+1..j0];
893        }
894      }
895      j0=j0-d[j];
896      j--;
897    }
898
899    dbprint(printlevel-voice+2,"//gaussman::vjacob: compute condition matrix");
900    L=transpose(module(l[1]));
901    for(k=2;k<=ncols(m);k++)
902    {
903      L=L,transpose(module(l[k]));
904    }
905
906    dbprint(printlevel-voice+2,
907      "//gaussman::vjacob: compute kernel of condition matrix");
908    v0=v0+list(syz(L));
909    s0=s0,r0;
910  }
911
912  dbprint(printlevel-voice+2,"//gaussman::vjacob: compute graded parts");
913  option(redSB);
914  for(i=1;i<size(v0);i++)
915  {
916    v0[i+1]=std(v0[i+1]);
917    v0[i]=std(reduce(v0[i],v0[i+1]));
918  }
919
920  dbprint(printlevel-voice+2,
921    "//gaussman::vjacob: remove trivial graded parts");
922  i=1;
923  while(size(v0[i])==0)
924  {
925    i++;
926  }
927  list v1=v0[i];
928  intvec d1=size(v0[i]);
929  ideal s1=s0[i];
930  i++;
931  while(i<=size(v0))
932  {
933    if(size(v0[i])>0)
934    {
935      v1=v1+list(v0[i]);
936      d1=d1,size(v0[i]);
937      s1=s1,s0[i];
938    }
939    i++;
940  }
941  return(list(s1,d1,v1,m));
942}
943example
944{ "EXAMPLE:"; echo=2;
945  ring R=0,(x,y),ds;
946  poly f=x5+x2y2+y5;
947  vjacob(vfilt(f));
948}
949///////////////////////////////////////////////////////////////////////////////
950
951proc tst_gaussm(poly f)
952{
953  echo=2;
954  basering;
955  f;
956  print(monomat(f));
957  print(monospec(f));
958  list l=vfilt(f);
959  l;
960  vjacob(l);
961  l=singspec(f);
962  l;
963  gamma(l);
964  gamma4(l);
965}
966///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.