source: git/Singular/LIB/surfacesignature.lib @ 2e7410

spielwiese
Last change on this file since 2e7410 was 2e7410, checked in by Stefan Steidel <steidel@…>, 13 years ago
new libs git-svn-id: file:///usr/local/Singular/svn/trunk@13273 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 11.8 KB
Line 
1version="$Id$";
2category="Singularities";
3info="
4LIBRARY:  signaturesurfsing.lib       signature of surface singularity
5
6AUTHORS:  Gerhard Pfister             pfister@mathematik.uni-kl.de
7@*        Muhammad Ahsan Banyamin     ahsanbanyamin@gmail.com
8@*        Stefan Steidel              steidel@mathematik.uni-kl.de
9
10OVERVIEW:
11
12  A library for computing the signature of irreducible surface singularity.
13  The signature of a surface singularity is defined in [Durfee, A.: The
14  Signature of Smoothings of Complex Surface Singularities, Math. Ann., 232,
15  85-98 (1978)]. The algorithm we use has been proposed in [Nemethi, A.: The
16  signature of f(x,y)+z^N, Proceedings of Singularity Conference (C.T.C. Wall's
17  60th birthday meeting), Liverpool 1996, London Math.Soc. LN 263(1999),
18  131-149].
19
20PROCEDURES:
21 brieskornSign(a1,a2,a3);  signature of Brieskorn singularity x^a1+y^a2+z^a3
22 signature(N,f);           signature of singularity z^N+f(x,y)=0, f irreducible
23";
24
25LIB "hnoether.lib";
26LIB "alexpoly.lib";
27LIB "gmssing.lib";
28
29///////////////////////////////////////////////////////////////////////////////
30//------- sigma(z^N + f) in terms of Puiseux pairs of f for f irreducible ----
31
32static proc exponentSequence(poly f)
33//=== computes the sequence a_1,...,a_s of exponents as described in [Nemethi]
34//=== using the Puiseux pairs (m_1, n_1),...,(m_s, n_s) of f:
35//===  - a_1 = m_1,
36//===  - a_i = m_i - n_i * (m_[i-1] - n_[i-1] * a_[i-1]).
37//===
38//=== Return: list of two intvecs:
39//===         1st entry: A = (a_1,...,a_s)
40//===         2nd entry: N = (n_1,...,n_s)
41{
42   def R = basering;
43   ring S = 0,(x,y),dp;
44   poly f = fetch(R,f);
45   list puiseuxPairs = invariants(f);
46   setring R;
47   
48   intvec M = puiseuxPairs[1][3];
49   intvec N = puiseuxPairs[1][4];
50   
51   int i;
52   int a = M[1];
53   intvec A = a;
54   for(i = 2; i <= size(M); i++)
55   {
56      a = M[i] - N[i] * (M[i-1] - N[i-1] * a);
57      A[size(A)+1] = a;
58   }
59 
60   return(list(A,N));
61}
62example
63{ "EXAMPLE:"; echo = 2;
64   ring r = 0,(x,y),dp;
65   exponentSequence(y4+2x3y2+x6+x5y);
66}
67
68///////////////////////////////////////////////////////////////////////////////
69
70proc brieskornSign(a1,a2,a3)
71"USAGE:  brieskornSign(a1,a2,a3); a1,a2,a3 = integers
72RETURN:  signature of Brieskorn singularity x^a1+y^a2+z^a3
73EXAMPLE: example brieskornSign; shows an example
74"
75{
76   int a_temp, t, k1, k2, k3, s_t, sigma;
77   number s;
78   
79   if(a1 > a2) { a_temp = a1; a1 = a2; a2 = a_temp; }
80   if(a2 > a3) { a_temp = a2; a2 = a3; a3 = a_temp; }
81   if(a1 > a2) { a_temp = a1; a1 = a2; a2 = a_temp; }
82   
83   for(t = 0; t <= 2; t++)
84   {
85      s_t = 0;
86      for(k1 = 1; k1 <= a1-1; k1++)
87      {
88         for(k2 = 1; k2 <= a2-1; k2++)
89         {
90            for(k3 = 1; k3 <= a3-1; k3++)
91            {
92               s = number(k1)/a1 + number(k2)/a2 + number(k3)/a3;
93               if(t < s)
94               {
95                  if(s < t+1)
96                  {
97                     s_t = s_t + 1;
98                  }
99                  else
100                  {
101                     break;
102                  }
103               }
104            }
105            if(k3 == 1) { break; }
106         }
107         if(k2 == 1) { break; }
108      }
109      sigma = sigma + (-1)^t * s_t;
110   }
111   return(sigma);
112}
113example
114{ "EXAMPLE:"; echo = 2;
115   ring R = 0,x,dp;
116   brieskornSign(11,3,5);
117}
118
119///////////////////////////////////////////////////////////////////////////////
120
121static proc signatureP(int N,poly f)
122"USAGE:  signatureP(N,f); N = integer, f = irreducible poly in 2 variables
123RETURN:  signature of surface singularity defined by z^N + f(x,y) = 0
124EXAMPLE: example signatureP; shows an example
125"
126{
127   int i, d, prod, sigma;
128   list L = exponentSequence(f);
129   int s = size(L[2]);
130   
131   if(s == 1)
132   {
133      return(brieskornSign(L[1][1], L[2][1], N));
134   }
135   
136   prod = 1;
137   sigma = brieskornSign(L[1][s], L[2][s], N);
138   for(i = s - 1; i >= 1; i--)
139   {
140      prod = prod * L[2][i+1];
141      d = gcd(N, prod);
142      sigma = sigma + d * brieskornSign(L[1][i], L[2][i], N/d);
143   }
144   
145   return(sigma);
146}
147example
148{ "EXAMPLE:"; echo = 2;
149   ring r = 0,(x,y),dp;
150   int N  = 3;
151   poly f = x15-21x14+8x13y-6x13-16x12y+20x11y2-x12+8x11y-36x10y2
152            +24x9y3+4x9y2-16x8y3+26x7y4-6x6y4+8x5y5+4x3y6-y8;
153   signatureP(N,f);
154}
155
156///////////////////////////////////////////////////////////////////////////////
157//------- sigma(z^N + f) in terms of the imbedded resolution graph of f -------
158
159static proc dedekindSum(number b, number c, int a)
160{
161   number s,d,e;
162   int k;
163   for(k=1;k<=a-1;k++)
164   {
165      d=k*b mod a;
166      e=k*c mod a;
167      if(d*e!=0)
168      {
169         s=s+(d/a-1/2)*(e/a-1/2);
170      }
171   }
172   return(s);
173}
174
175///////////////////////////////////////////////////////////////////////////////
176
177static proc isRupture(intvec v)
178//=== decides whether the exceptional divisor given by the row v in the
179//=== incidence matrix of the resolution graph intersects at least 3 other divisors
180{
181   int i,j;
182   for(i=1;i<=size(v);i++)
183   {
184       if(v[i]<0){return(0);}
185       if(v[i]!=0){j++;}
186   }
187   return(j>=4);
188}
189
190///////////////////////////////////////////////////////////////////////////////
191
192static proc sumExcepDiv(intmat N, list M, int K, int n)
193//=== computes part of the formulae for eta(g,K), g defining an
194//=== isolated curve singularity
195//=== N the incidence matrix of the resolution graph of g
196//=== M list of total multiplicities
197//=== n = nrows(N)
198{
199   int i,j,m,d;
200   for(i=1;i<=n;i++)
201   {
202      if(N[i,i]>0)
203      {
204         m=gcd(K,M[i]);
205         for(j=1;j<=n;j++)
206         {
207            if((i!=j)&&(N[i,j]!=0))
208            {
209               if(m==1){break;}
210               m=gcd(m,M[j]);
211            }
212         }
213         d=d+m-1;
214      }
215   }
216   return(d);
217}
218
219///////////////////////////////////////////////////////////////////////////////
220
221static proc sumEdges(intmat N, list M, int K, int n)
222//=== computes part of the formulae for eta(g,K), g defining an
223//=== isolated curve singularity
224//=== N the incidence matrix of the resolution graph of g
225//=== M list of total multiplicities
226//=== n = nrows(N)
227{
228   int i,j,d;
229   for(i=1;i<=n-1;i++)
230   {
231      for(j=i+1;j<=n;j++)
232      {
233         if(N[i,j]==1)
234         {
235            d=d+gcd(K,gcd(M[i],M[j]))-1;
236         }
237      }
238   }
239   return(d);
240}
241
242///////////////////////////////////////////////////////////////////////////////
243
244static proc etaRes(list L, int K)
245//=== L total multiplicities
246//=== eta-invariant in terms of the imbedded resolution graph of f
247{
248   int i,j,d;
249   intvec v;
250   number e;
251   intmat N = L[1];         // incidence matrix of the resolution graph
252   int n = ncols(L[1]);     // number of vertices in the resolution graph
253   int a = ncols(L[2]);     // number of branches
254   list M;                  // total multiplicities
255   for(i=1;i<=n;i++)
256   {
257      d=L[2][i,1];
258      for(j=2;j<=a;j++)
259      {
260         d=d+L[2][i,j];
261      }
262      if(d==0){d=1;}
263      M[i]=d;
264   }
265   for(i=1;i<=n;i++)
266   {
267      v=N[i,1..n];
268      if(isRupture(v))    // the divisor intersects more then two others
269      {
270         for(j=1;j<=n;j++)
271         {
272            if((i!=j)&&(v[j]!=0))
273            {
274               e=e+dedekindSum(M[j],K,M[i]);
275            }
276         }
277      }   
278   }
279   if(a==1)
280   {
281      //the irreducible case
282      return(4*e);
283   }
284   return(a-1+4*e+sumEdges(N,M,K,n)-sumExcepDiv(N,M,K,n));
285}
286
287///////////////////////////////////////////////////////////////////////////////
288//------------ sigma(z^N + f) in terms of the spectral pairs of f -------------
289
290static proc fracPart(number n)
291//=== computes the fractional part n2 of n
292//=== i.e. n2 is not in Z but n-n2 is in Z
293{
294   number a,b;
295   int r;
296   a = numerator(n);
297   b = denominator(n);
298   int z = int(number(a));
299   int y = int(number(b));
300   r = z mod y;
301   int q = (z-r) div y;
302   number n1 = q;
303   number n2 = n-n1;
304   return(n2);
305}
306
307///////////////////////////////////////////////////////////////////////////////
308
309static proc etaSpec(list L, int N)
310//=== L spectral numbers
311//=== eta-invariant in terms of the spectral pairs of f
312{
313   int i;
314   number e, h;
315   
316   int n = ncols(L[1]);
317   
318   if((n mod 2) == 0)               
319   // 0 is not a spectral number, thus f is irreducible
320   {
321      for(i = n/2+1; i <= n; i++)
322      {
323         e = e + (1 - 2 * fracPart(N * number(L[1][i]))) * L[3][i];
324      }
325      return(2*e);
326   }
327   else
328   // 0 is a spectral number, thus f is reducible
329   {
330      // sum of Hodge numbers in eta function
331      for(i = 1; i <= n; i++)                   
332      {
333         if((L[2][i] == 2)&&((denominator(leadcoef(N*L[1][i]))==1)||(denominator(leadcoef(N*L[1][i]))==-1)))
334         {
335            h = h + L[3][i];
336         }
337      }
338     
339      // summand coming from spectral number 0 in eta function
340      h = h + L[3][(n+1)/2];
341     
342      // sum coming from non-zero spectral numbers in eta function
343      for(i = (n+3)/2; i <= n; i++)
344      {
345         if(!((denominator(leadcoef(N*L[1][i]))==1)||(denominator(leadcoef(N*L[1][i]))==-1)))
346         {
347            e = e + (1 - 2 * fracPart(N * number(L[1][i]))) * L[3][i];
348         }
349      }   
350      return(h + 2*e);
351   }
352}
353
354///////////////////////////////////////////////////////////////////////////////
355//---------------- Consolidation of the three former variants -----------------
356
357proc signature(int N, poly f, list #)
358"USAGE:  signature(N,f); N = integer, f = reduced poly in 2 variables, # empty or 1,2,3
359@*       - if # is empty or #[1] = 2 then resolution of singularities is used
360@*       - if #[1] = 1 then f has to be analytically irreducible and Puiseux expansions are used
361@*       - if #[1] = 3 then spectral pairs are used
362RETURN:  signature of surface singularity defined by z^N + f(x,y) = 0
363EXAMPLE: example signature; shows an example
364"
365{
366   if(size(#) == 0)
367   {
368      list L = totalmultiplicities(f);
369      return(etaRes(L,N) - N*etaRes(L,1));
370   }
371   
372   if(#[1] == 1)
373   {
374      return(signatureP(N,f));
375   }
376   
377   if(#[1] == 2)
378   {
379      list L = totalmultiplicities(f);
380      return(etaRes(L,N) - N*etaRes(L,1));
381   }
382   
383   if(#[1] == 3)
384   {
385      def R = basering;
386      def Rds = changeord("ds");
387      setring Rds;
388      poly f = imap(R,f);
389      list L = sppairs(f);
390      setring R;
391      list L = imap(Rds,L);
392      return(etaSpec(L,N) - N*etaSpec(L,1));
393   }
394}
395example
396{ "EXAMPLE:"; echo = 2;
397   ring r = 0,(x,y),dp;
398   int N  = 3;
399   poly f = x15-21x14+8x13y-6x13-16x12y+20x11y2-x12+8x11y-36x10y2
400            +24x9y3+4x9y2-16x8y3+26x7y4-6x6y4+8x5y5+4x3y6-y8;
401   signature(N,f,1);
402   signature(N,f,2);
403}
404
405///////////////////////////////////////////////////////////////////////////////
406
407/*
408Further examples
409
410ring r = 0,(x,y),dp;
411int N;
412poly f,g,g1,g2,g3;
413
414
415// irreducible polynomials
416
417N = 5;
418f = x15-21x14+8x13y-6x13-16x12y+20x11y2-x12+8x11y-36x10y2   
419    +24x9y3+4x9y2-16x8y3+26x7y4-6x6y4+8x5y5+4x3y6-y8;     
420g = f^3 + x17y17;                                               
421
422N = 6;
423f = y4+2x3y2+x6+x5y;                                             
424g1 = f^2 + x5y5;
425g2 = f^3 + x11y11;
426g3 = f^3 + x17y17;
427
428N = 7;
429f = x5+y11;
430g1 = f^3 + x11y11;
431g2 = f^3 + x17y17;
432
433N = 6;     
434// k0 = 30, k1 = 35, k2 = 71
435f = x71+6x65+15x59-630x52y6+20x53+6230x46y6+910x39y12+15x47
436    -7530x40y6+14955x33y12-285x26y18+6x41+1230x34y6+4680x27y12
437    +1830x20y18+30x13y24+x35-5x28y6+10x21y12-10x14y18+5x7y24-y30;
438
439// k0 = 16, k1 = 24, k2 = 28, k3 = 30, k4 = 31
440f = x31-781x30+16x29y-3010x29-2464x28y+104x27y2-2805x28-7024x27y
441    -5352x26y2+368x25y3+366x27-7136x26y-984x25y2-8000x24y3
442    +836x23y4+34x26-320x25y-6464x24y2+6560x23y3-8812x22y4+1392x21y5
443    -12x25+256x24y-1296x23y2-1536x22y3+4416x21y4-8864x20y5+1752x19y6
444    -x24+16x23y-88x22y2-16x21y3-404x20y4+3056x19y5-6872x18y6+1648x17y7
445    +8x21y2-96x20y3+524x19y4-1472x18y5+3464x17y6-3808x16y7+1290x15y8
446    -28x18y4+240x17y5-976x16y6+2208x15y7-2494x14y8+816x13y9+56x15y6
447    -320x14y7+844x13y8-1216x12y9+440x11y10-70x12y8+240x11y9-344x10y10
448    +240x9y11+56x9y10-96x8y11+52x7y12-28x6y12+16x5y13+8x3y14-y16;
449
450
451// reducible polynomials
452
453N = 12;
454f = ((y2-x3)^2 - 4x5y - x7)*(x2-y3);
455
456f = 2x3y3-2y5+x4-xy2;
457
458f = -x3y3+x6y+xy6-x4y4;
459*/
Note: See TracBrowser for help on using the repository browser.