source: git/Singular/LIB/sing.lib @ 6f2edc

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