source: git/Singular/LIB/sing.lib @ 3d124a7

spielwiese
Last change on this file since 3d124a7 was 3d124a7, checked in by Olaf Bachmann <obachman@…>, 27 years ago
This commit was generated by cvs2svn to compensate for changes in r191, which included commits to RCS files with non-trunk default branches. git-svn-id: file:///usr/local/Singular/svn/trunk@192 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 23.2 KB
Line 
1// $Id: sing.lib,v 1.1.1.1 1997-04-25 15:13:27 obachman Exp $
2//system("random",787422842);
3//(GMG+BM)
4///////////////////////////////////////////////////////////////////////////////
5
6LIBRARY:  sing.lib      PROCEDURES FOR SINGULARITIES         
7
8 deform(i);             infinitesimal deformations of ideal i
9 dim_slocus(i);         dimension of singular locus of ideal i
10 is_active(f,id);       is poly f an active element mod id? (id ideal/module)
11 is_ci(i);              is ideal i a complete intersection?
12 is_is(i);              is ideal i an isolated singularity?
13 is_reg(f,id);          is poly f a regular element mod id? (id ideal/module)
14 is_regs(i[,id]);       are gen's of ideal i regular sequence modulo id?
15 milnor(i);             milnor number of ideal i; (assume i is ICIS in nf)
16 nf_icis(i);            generic combinations of generators; get ICIS in nf
17 slocus(i);             ideal of singular locus of ideal i
18 Tjurina(i);            SB of Tjurina module of ideal i (assume i is ICIS)
19 tjurina(i);            Tjurina number of ideal i (assume i is ICIS)
20 T1(i);                 T1-module of ideal i
21 T2((i);                T2-module of ideal i
22 T12(i);                T1- and T2-module of ideal i
23
24LIB "inout.lib";
25LIB "random.lib";
26///////////////////////////////////////////////////////////////////////////////
27
28proc deform (ideal id)
29USAGE:   deform(id);  id = ideal or poly
30RETURN:  matrix, columns are kbase of infinitesimal deformations
31EXAMPLE: example deform; shows an example
32{
33   list L=T1(id,"");
34   return(L[2]*kbase(std(L[1])));
35}
36example
37{ "EXAMPLE:"; echo = 2;
38   ring r=32003,(x,y,z),ds;
39   ideal i=xy,xz,yz;
40   matrix T=deform(i);print(T);
41   print(deform(x3+y5+z2));
42}
43///////////////////////////////////////////////////////////////////////////////
44
45proc dim_slocus (ideal i)
46USAGE:   dim_slocus(i);  i ideal or poly
47RETURN:  dimension of singular locus of i
48EXAMPLE: example dim_slocus; shows an example
49{
50   return(dim(std(slocus(i))));
51}
52example
53{ "EXAMPLE:"; echo = 2;
54   ring r=32003,(x,y,z),ds;
55   ideal i= x5+y6+z6,x2+2y2+3z2;
56   dim_slocus(i);
57}
58///////////////////////////////////////////////////////////////////////////////
59
60proc is_active (poly f, id)
61USAGE:   is_active(f,id); f poly, id ideal or module
62RETURN:  1 if f is an active element modulo id (i.e. dim(id)=dim(id+f*R^n)+1,
63         if id is a submodule of R^n) resp. 0 if f is not active.
64         The basering may be a quotient ring
65NOTE:    regular parameters are active but not vice versa (id may have embedded
66         components). proc is_reg tests whether f is a regular parameter
67EXAMPLE: example is_active; shows an example
68{
69   if( size(id)==0 ) { return(1); }
70   if( typeof(id)=="ideal" ) { ideal m=f; }
71   if( typeof(id)=="module" ) { module m=f*freemodule(rank(id)); }
72   return(dim(std(id))-dim(std(id+m)));
73}
74example
75{ "EXAMPLE:"; echo = 2;
76   ring r=32003,(x,y,z),ds;
77   ideal i=yx3+y,yz3+y3z;
78   poly f=x;
79   is_active(f,i);
80   qring q = std(x4y5);
81   poly f=x;
82   module m=[yx3+x,yx3+y3x];
83   is_active(f,m);
84}
85///////////////////////////////////////////////////////////////////////////////
86
87proc is_ci (ideal i)
88USAGE:   is_ci(i); i ideal
89RETURN:  intvec = sequence of dimensions of ideals (j[1],...,j[k]), for
90         k=1,...,size(j), where j is minimal base of i. i is a complete
91         intersection if last number equals nvars-size(i) 
92NOTE:    dim(0-ideal) = -1. You may first apply simplify(i,10); in order to
93         delete zeroes and multiples from set of generators
94EXAMPLE: example is_ci; shows an example
95{
96   int n; intvec dimvec; ideal id;
97   i=minbase(i);
98   int s = ncols(i);
99//--------------------------- compute dimensions ------------------------------
100   for( n=1; n<=s; n++ )
101   {
102      id = i[1..n];
103      dimvec[n] = dim(std(id));
104   }
105   n = dimvec[s];
106//--------------------------- output ------------------------------------------     
107   if( defined(printlevel) )
108   {
109      if( n+s !=nvars(basering) )
110      { dbprint(printlevel,"// no complete intersection"); }
111      if( n+s ==nvars(basering) )
112      { dbprint(printlevel,"// complete intersection of dim "+string(n)); }
113      dbprint(printlevel,"// dim-sequence:");
114   }
115   if( voice==2 )
116   {
117      if( n+s !=nvars(basering)) {"// no complete intersection"; }
118      if( n+s ==nvars(basering)) {"// complete intersection of dim",n;}
119      "// dim-sequence:";
120   }
121   return(dimvec);
122}
123example
124{ "EXAMPLE:";   echo = 2; 
125   int printlevel=2;                // this forces the proc to display comments
126   export printlevel;             
127   ring r=32003,(x,y,z),ds;
128   ideal i=x4+y5+z6,xyz,yx2+xz2+zy7;
129   is_ci(i);
130   i=xy,yz;
131   is_ci(i);
132   kill printlevel;
133}
134///////////////////////////////////////////////////////////////////////////////
135
136proc is_is (ideal i)
137USAGE:   is_is(id);  id ideal or poly
138RETURN:  intvec = sequence of dimensions of singular loci of ideals
139         generated by id[1]..id[i], k = 1..size(id); dim(0-ideal) = -1;
140         id defines an isolated singularity if last number is 0
141EXAMPLE: example is_is; shows an example
142{
143  int l; intvec dims; ideal j;
144//--------------------------- compute dimensions ------------------------------
145   for( l=1; l<=ncols(i); l++ )
146   {
147     j = i[1..l];
148     dims[l] = dim(std(slocus(j)));
149   }
150   if( voice==2 ) {"// dim of singular locus =",dims[size(dims)],"dim-sequence:";
151                   "// isolated singularity if last number is 0"; }
152   return(dims);
153}
154example
155{ "EXAMPLE:"; echo = 2;
156   ring r=32003,(x,y,z),ds;
157   ideal i=x2y,x4+y5+z6,yx2+xz2+zy7;
158   is_is(i);
159// isolated singularity if last number is 0
160   poly f=xy+yz;
161   is_is(f);
162// isolated singularity if last number is 0
163}
164///////////////////////////////////////////////////////////////////////////////
165
166proc is_reg (poly f, id)
167USAGE:   is_reg(f,id); f poly, id ideal or module
168RETURN:  1 if multiplication with f is injective modulo id, 0 otherwise
169NOTE:    let R be the basering and id a submodule of R^n. The procedure checks
170         injectivity of multiplication with f on R^n/id. The basering may be a
171         //**quotient ring
172EXAMPLE: example is_reg; shows an example
173{
174   if( f==0 ) { return(0); }
175   int d,ii;
176   def q = quotient(id,ideal(f));
177   id=std(id);
178   d=size(q);
179   for( ii=1; ii<=d; ii++ )
180   {
181      if( reduce(q[ii],id)!=0 )
182      { return(0); }
183   }
184   return(1);
185}
186example
187{ "EXAMPLE:"; echo = 2;
188   ring r=32003,(x,y),ds;
189   ideal i=x8,y8;ideal j=(x+y)^4;
190   i=intersect(i,j); poly f=xy;
191   is_reg(f,i);
192}
193///////////////////////////////////////////////////////////////////////////////
194
195proc is_regs (ideal i, list #)
196USAGE:   is_regs(i[,id]); i poly, id ideal or module (default: id=0)
197RETURN:  1 if generators of i are a regular sequence modulo id, 0 otherwise
198NOTE:    let R be the basering and id a submodule of R^n. The procedure checks
199         injectivity of multiplication with i[k] on R^n/id+i[1..k-1].
200         The basering may be a quotient ring
201EXAMPLE: example is_regs; shows an example
202{
203   if( size(#)==0 ) { ideal id; }
204   else { def id=#[1]; }
205   if( size(i)==0 ) { return(0); }
206   int d,ii,r;
207   d=size(i);
208   if( typeof(id)=="ideal" ) { ideal m=1; }
209   if( typeof(id)=="module" ) { module m=freemodule(rank(id)); }
210   for( ii=1; ii<=d; ii++ )
211   { 
212      if( voice==2 )
213      { "// checking whether element",ii,"is regular mod 1 ..",ii-1; }
214      if( is_reg(i[ii],id)==0 )
215      {
216         if( voice==2 )
217         {
218            "// elements 1 ..",ii-1,"are regular,",
219            ii,"is not regular mod 1 ..",ii-1;
220         }
221         return(0);
222      }
223      id=id+i[ii]*m;
224   }
225   if( voice==2 ) { "// elements are a regular sequence of length",d; }
226   return(1);
227}
228example
229{ "EXAMPLE:"; echo = 2;
230   ring r1=32003,(x,y,z),ds;
231   ideal i=x8,y8,(x+y)^4;
232   is_regs(i);
233   module m=[x,0,y];
234   i=x8,(x+z)^4;;
235   is_regs(i,m);
236}
237///////////////////////////////////////////////////////////////////////////////
238
239proc milnor (ideal i)
240USAGE:   milnor(i); i ideal or poly
241RETURN:  Milnor number of i, if i is ICIS (isolated complete intersection
242         singularity) in generic form, resp. -1 if not
243NOTE:    use proc nf_icis to put generators in generic form
244EXAMPLE: example milnor; shows an example
245{
246  i = simplify(i,10);     //delete zeroes and multiples from set of generators     
247  int n = size(i);
248  int l,q,m_nr;  ideal t;  intvec disc;
249//---------------------------- hypersurface case ------------------------------   
250  if( n==1 )     
251  {
252     i = std(jacob(i[1]));
253     m_nr = vdim(i);       
254     if( m_nr<0 and voice==2 ) { "// no isolated singularity"; }
255     return(m_nr); 
256  }
257//------------ isolated complete intersection singularity (ICIS) --------------
258  for( l=n; l>0; l=l-1)
259  {
260      t      = minor(jacob(i),l);
261      i[l]   = 0;
262      q      = vdim(std(i+t));
263      disc[l]= q;
264      if( q ==-1 )
265      {
266         if( voice==2 )
267            {  "// not in generic form or no ICIS; use proc nf_icis to put";
268            "// generators in generic form and then try milnor again!";  }
269         return(q);
270      }
271      m_nr = q-m_nr;
272  }
273//---------------------------- change sign ------------------------------------     
274  if (m_nr < 0) { m_nr=-m_nr; }
275  if( voice==2 ) { "//sequence of discriminant numbers:",disc; }
276  return(m_nr);
277}
278example
279{ "EXAMPLE:"; echo = 2;
280   ring r=32003,(x,y,z),ds;
281   ideal j=x5+y6+z6,x2+2y2+3z2,xyz+yx;
282   milnor(j);
283   poly f=x7+y7+(x-y)^2*x2y2+z2;
284   milnor(f);
285}
286///////////////////////////////////////////////////////////////////////////////
287
288proc nf_icis (ideal i)
289USAGE:   nf_icis(i); i ideal
290RETURN:  ideal = generic linear combination of generators of i if i is an ICIS
291         (isolated complete intersection singularity), return i if not
292NOTE:    this proc is useful in connection with proc milnor
293EXAMPLE: example nf_icis; shows an example
294{
295   i = simplify(i,10);  //delete zeroes and multiples from set of generators
296   int p,b = 100,0;
297   int n = size(i);
298   matrix mat=freemodule(n);
299//---------------------------- test: complete intersection? -------------------     
300   intvec sl = is_ci(i);
301   if( n+sl[n] != nvars(basering) ) 
302   {
303    if( voice==2 ) { "// no complete intersection"; }
304    return(i);
305   }
306//--------------- test: isolated singularity in generic form? -----------------     
307   sl = is_is(i);
308   if ( sl[n] != 0 )
309   {
310      if( voice==2 ) { "// no isolated singularity"; }
311      return(i);
312   }
313//------------ produce generic linear combinations of generators --------------   
314   int prob;
315   while ( sum(sl) != 0 ) 
316   {  prob=prob+1;
317      p=p-25; b=b+10;
318      i = genericid(i,p,b);          // proc genericid from random.lib
319      sl = is_is(i);
320   }
321   if( voice==2 ) { "// ICIS in generic form after",prob,"genericity loop(s)";}
322   return(i);   
323}
324example
325{ "EXAMPLE:"; echo = 2;
326   ring r=32003,(x,y,z),ds;
327   ideal i=x3+y4,z4+yx;   
328   nf_icis(i);     
329   ideal j=x3+y4,xy,yz;
330   nf_icis(j);
331}
332///////////////////////////////////////////////////////////////////////////////
333
334proc slocus (ideal i)
335USAGE:   slocus(i);  i dieal
336RETURN:  ideal of singular locus of i
337NOTE:    this proc considers lower dimensional components as singular
338EXAMPLE: example slocus; shows an example
339{
340  int cod  = nvars(basering)-dim(std(i));
341  i        = i+minor(jacob(i),cod);
342  return(i);   
343}
344example
345{ "EXAMPLE:"; echo = 2;
346   ring r=32003,(x,y,z),ds;
347   ideal i= x5+y6+z6,x2+2y2+3z2;
348   dim(std(slocus(i)));
349}
350///////////////////////////////////////////////////////////////////////////////
351
352proc Tjurina (id, list #)
353USAGE:   Tjurina(id[,<any>]);  id ideal or poly (assume: id=ICIS)
354RETURN:  Tjurina(id): standard basis of Tjurina-module of id, displays Tjurina
355         number
356         Tjurina(id,...): If a second argument is present (of any type) return
357         a list of 4 objects: [1]=Tjurina number (int), [2]=basis of miniversal
358         deformation (module), [3]=SB of Tjurina module (module), [4]=Tjurina
359         module (module)
360NOTE:    if id is a poly the output will be of type ideal rather than module
361EXAMPLE: example Tjurina; shows an example
362{
363//---------------------------- initialisation ---------------------------------
364  def i = simplify(id,10);         
365  int tau,n = 0,size(i);
366  if( size(ideal(i))==1 ) { def m=i; }  // hypersurface case
367  else { def m=i*freemodule(n); }       // complete intersection case
368//--------------- compute Tjurina module, Tjurina number etc ------------------
369  def t1 = jacob(i)+m;                  // Tjurina module/ideal
370  def st1 = std(t1);                    // SB of Tjurina module/ideal
371  tau = vdim(st1);                      // Tjurina number
372  def kB = kbase(st1);                  // basis of miniversal deformation
373  if( voice==2 )  { "// Tjurina number =",tau; }
374  if( size(#)>0 ) { return(tau,kB,st1,t1); }
375  return(st1);
376}
377example
378{ "EXAMPLE:"; echo = 2;
379   ring r=0,(x,y,z),ds;
380   poly f = x5+y6+z7+xyz;        // singularity T[5,6,7]
381   list T = Tjurina(f,"");
382   show(T[1]);                   // Tjurina number, should be 16
383   show(T[2]);                   // basis of miniversal deformation
384   show(T[3]);                   // SB of Tjurina ideal
385   show(T[4]); "";               // Tjurina ideal
386   ideal j=x2+y2+z2,x2+2y2+3z2;
387   show(kbase(Tjurina(j)));      // basis of miniversal deformation
388   hilb(Tjurina(j));             // Hilbert series of Tjurina module
389}
390///////////////////////////////////////////////////////////////////////////////
391
392proc tjurina (ideal i)
393USAGE:   tjurina(id);  id ideal or poly (assume: id=ICIS)
394RETURN:  int = Tjurina number of id
395EXAMPLE: example tjurina; shows an example
396{
397   return(vdim(Tjurina(i)));
398}
399example
400{ "EXAMPLE:"; echo = 2;
401   ring r=32003,(x,y,z),(c,ds);
402   ideal j=x2+y2+z2,x2+2y2+3z2;
403   tjurina(j);
404}
405///////////////////////////////////////////////////////////////////////////////
406
407proc T1 (ideal id, list #)
408USAGE:   T1(id[,<any>]);  id = ideal or poly
409RETURN:  T1(id): T1-module of id or T1-ideal if id is a poly. This is a
410         presentation of 1st order deformations of P/id, if P is the basering.
411         T1(id,...): If a second argument is present (of any type) return a
412         list of 3 modules:
413            [1]= presentation of infinitesimal deformations of id (=T1(id))
414            [2]= generators of normal bundle of id, lifted to P
415            [3]= module of relations of [2], lifted to P ([2]*[3]=0 mod id)
416         The list contains all non-easy objects which must be computed anyway
417         to get T1(id).
418         The situation is described in detail in the procedure T1_expl
419         from library explain.lib
420NOTE:    T1(id) itself is usually of minor importance, nevertheless, from it
421         all relevant information can be obtained. Since no standard basis is
422         computed, the user has first to compute a standard basis before
423         applying vdim or hilb etc.. For example, matrix([2])*(kbase(std([1])))
424         represents a basis of 1st order semiuniversal deformation of id
425         (use proc 'deform', to get this in a direct and convenient way).
426         If the input is weighted homogeneous with weights w1,...,wn, use
427         ordering wp(w1..wn), even in the local case, which is equivalent but
428         faster than ws(w1..wn).
429         For a complete intersection the proc Tjurina is faster
430EXAMPLE: example T1; shows an example
431{
432   ideal J=simplify(id,10);
433//--------------------------- hypersurface case -------------------------------
434  if( size(J)<2 )
435  {
436     ideal t1=J[1],jacob(J[1]); module nb=[1]; module pnb;
437     if( size(#)>0 ) { return(t1*gen(1),nb,pnb); }
438     return(t1);
439  }
440//--------------------------- presentation of J -------------------------------
441   int rk;
442  def P=basering;
443   module jac, t1;
444   jac=jacob(J);                 // jacobian matrix of J converted to module
445   res(J,2,A);                   // compute presentation of J
446   t1=transpose(A(2));           // transposed 1st syzygy module of J
447//---------- go to quotient ring mod J and compute normal bundle --------------
448  qring  R=std(J);
449   module jac=fetch(P,jac);
450   module t1=fetch(P,t1);       
451   res(t1,3,B);                  // resolve t1, B(2)=(J/J^2)*=normal_bdl
452   t1=lift(B(2),jac)+B(3);       // pres. of normal_bdl/trivial_deformations
453   rk=rank(t1);
454//-------------------------- pull back to basering ----------------------------
455  setring P;
456   t1 = fetch(R,t1)+J*freemodule(rk);  // T1-module, presentation of T1
457   if( size(#)>0 )
458   {
459      module B2 = fetch(R,B(2));        // (generators of) normal bundle
460      module B3 = fetch(R,B(3));        // presentation of normal bundle
461      return(t1,B2,B3);
462   }
463   return(t1); 
464}
465example
466{ "EXAMPLE:"; echo = 2;
467   ring r=32003,(x,y,z),(c,ds);
468   ideal i=xy,xz,yz;
469   module T=T1(i);
470   vdim(std(T));                 // Tjurina number = dim_K(T1), should be 3
471   list L=T1(i,"");
472   module kB = kbase(std(L[1]));
473   print(L[2]*kB);               // basis of 1st order miniversal deformation
474   size(L[1]);                   // number of generators of T1-module
475   show(L[2]);                   // (generators of) normal bundle
476   print(L[3]);                  // relation matrix of normal bundle (mod i)
477   print(L[2]*L[3]);             // should be 0 (mod i)
478}
479///////////////////////////////////////////////////////////////////////////////
480
481proc T2 (ideal id, list #)
482USAGE:   T2(id[,<any>]);  id = ideal
483RETURN:  T2(id): T2-module of id . This is a presentation of the module of
484            obstructions of R=P/id, if P is the basering.
485         T2(id,...): If a second argument is present (of any type) return a
486         list of 6 modules and 1 ideal:
487            [1]= presentation of module of obstructions (=T2(id))
488            [2]= standard basis of id (ideal)
489            [3]= module of relations of id (=1st syzygy module of id)
490            [4]= presentation of [3] (=2nd syzygy module of id)
491            [5]= lifting of Koszul relations kos, kos=module([3]*matrix([5]))
492            [6]= generators of Hom_P([3]/kos,R), lifted to P
493            [7]= relations of Hom_P([3]/kos,R), lifted to P
494         The list contains all non-easy objects which must be computed anyway
495         to get T2(id). The situation is described in detail in the procedure
496         T2_expl from library explain.lib
497NOTE:    Since no standard basis is computed, the user has first to compute a
498         standard basis before applying vdim or hilb etc.. 
499         If the input is weighted homogeneous with weights w1,...,wn, use
500         ordering wp(w1..wn), even in the local case, which is equivalent but
501         faster than ws(w1..wn).
502         Use proc miniversal to get equations of miniversal deformation;
503EXAMPLE: example T2; shows an example
504{
505//--------------------------- initialisation ----------------------------------
506  def P = basering;
507   ideal J = simplify(id,10);
508   module kos,L0,t2;
509   int n,rk;
510//------------------- presentation of non-trivial syzygies -------------------- 
511   res(J,3,A);                            // resolve J, A(2)=syz
512   kos  = koszul(2,J);                    // module of Koszul relations
513   L0 = lift(A(2),kos);                   // lift Koszul relations to syz
514   t2   = L0+A(3);                        // presentation of syz/kos
515   ideal J0 = std(J);                     // standard basis of J
516//*** sollte bei der Berechnung von res mit anfallen, zu aendern!!
517//---------------------- fetch to quotient ring mod J -------------------------
518  qring R = J0;                           // make P/J the basering
519   module A2' = transpose(fetch(P,A(2))); // dual of syz 
520   module t2  = transpose(fetch(P,t2));   // dual of syz/kos
521   res(t2,3,B);                           // resolve t2   
522   t2 = lift(B(2),A2')+B(3);              // presentation of T2
523   rk = rank(t2);
524//---------------------  fetch back to basering -------------------------------
525  setring P;
526   t2 = fetch(R,t2)+J*freemodule(rk);
527   if( size(#)>0 )
528   {
529      module B2 = fetch(R,B(2));        // generators of Hom_P(syz/kos,R)
530      module B3 = fetch(R,B(3));        // relations of Hom_P(syz/kos,R)
531      return(t2,J0,A(2),A(3),L0,B2,B3);
532   }
533   return(t2); 
534}
535example
536{ "EXAMPLE:"; echo = 2;
537   ring  r = 32003,(x,y),(c,dp);
538   ideal j = x6-y4,x6y6,x2y4-x5y2;
539   module T= std(T2(j));
540   vdim(T);hilb(T);
541   ring r1=0,(x,y,z),dp;
542   ideal id=xy,xz,yz;
543   list L=T2(id,"");
544   vdim(std(L[1]));                      // vdim of T2
545   L[4];                                 // 2nd syzygy module of ideal
546}
547///////////////////////////////////////////////////////////////////////////////
548
549proc T12 (ideal i, list #)
550USAGE:   T12(i[,any]);  i = ideal
551DISPLAY: dim T1 and dim T2  of i
552RETURN:  T12(i): list of 2 modules:
553             presentation of T1-module =T1(i) , 1st order deformations 
554             presentation of T2-module =T2(i) , obstructions of R=P/i
555         T12(i,...): If a second argument is present (of any type) return
556         a list of 9 modules, matrices, integers:
557             [1]= presentation of T1 (module)
558             [2]= presentation of T2 (module)
559             [3]= matrix, whose cols present infinitesimal deformations
560             [4]= matrix, whose cols are generators of relations of i     
561             [5]= matrix, presenting Hom_P([4]/kos,R), lifted to P
562             [6]= standard basis of T1-module
563             [7]= standard basis of T2-module
564             [8]= vdim of T1
565             [9]= vdim of T2
566NOTE:    Use proc miniversal from deform.lib to get miniversal deformation of i,
567         the list contains all objects used by proc miniversal
568EXAMPLE: example T12; shows an example
569{
570//--------------------------- initialisation ----------------------------------
571   int  n,r1,r2,d1,d2;
572  def P = basering;
573   i = simplify(i,10);
574   if (size(i)<2)
575   {
576     "// hypersurface, use proc 'Tjurina'";
577     //return([1]);
578   }
579   module jac,t1,t2,kos,sbt1,sbt2;
580   matrix L3,L4,L5;
581   ideal  i0 = std(i);
582//-------------------- presentation of non-trivial syzygies -------------------
583   list I= res(i,3);                            // resolve i
584   L4  = matrix(I[2]);                          // syz(i)
585   jac = jacob(i);                              // jacobi ideal
586   t1  = transpose(I[2]);                       // dual of syzygies
587   kos = koszul(2,i);                           // koszul-relations
588   t2  = lift(I[2],kos)+I[3];                   // presentation of syz/kos
589//--------------------- fetch to quotient ring  mod i -------------------------
590  qring   Ox  = i0;                             // make P/i the basering
591   module jac = fetch(P,jac);
592   module t1  = fetch(P,t1);                    // Hom(syz,R)
593   module t2  = transpose(fetch(P,t2));         // Hom(syz/kos,R)
594   list resS  = res(t1,3);
595   list resR  = res(t2,3);
596   t2 = lift(resR[2],t1)+resR[3];               // presentation of T2
597   r2 = rank(t2);
598   t1 = lift(resS[2],jac)+resS[3];              // presentation of T1
599   r1 = rank(t1);
600   matrix L3  = resS[2];
601   matrix L5  = resR[2];
602//------------------------ pull back to basering ------------------------------
603  setring P;
604   t1   = fetch(Ox,t1)+i*freemodule(r1);
605   t2   = fetch(Ox,t2)+i*freemodule(r2);
606   sbt1 = std(t1);
607   d1   = vdim(sbt1);
608   sbt2=std(t2);
609   d2   = vdim(sbt2);
610   "// dim T1  = ",d1;
611   "// dim T2  = ",d2;
612   if  ( size(#)>0)
613   {
614     L3 = fetch(Ox,L3)*kbase(sbt1);
615     L5 = fetch(Ox,L5);
616     return(t1,t2,L3,L4,L5,sbt1,sbt2,d1,d2);
617   }
618   return(t1,t2);
619}
620example
621{ "EXAMPLE:"; echo = 2;
622   ring r=200,(x,y,z,u,v),(c,ws(4,3,2,3,4));
623   ideal i=xz-y2,yz2-xu,xv-yzu,yu-z3,z2u-yv,zv-u2;
624   //a cyclic quotient singularity
625   list L = T12(i,1);
626   print(L[3]);
627}
628///////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.