source: git/Singular/LIB/KVequiv.lib @ 33b509

spielwiese
Last change on this file since 33b509 was 27d4bb, checked in by Hans Schoenemann <hannes@…>, 14 years ago
format git-svn-id: file:///usr/local/Singular/svn/trunk@13536 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 22.4 KB
Line 
1/////////////////////////////////////////////////////////////////////////////
2
3version="$Id$";
4info="
5LIBRARY:  KVequiv.lib    PROCEDURES RELATED TO K_V-EQUIVALENCE
6AUTHOR:   Anne Fruehbis-Krueger, anne@mathematik.uni-kl.de
7
8OVERVIEW:
9 Let (V,0) be a complete intersection singularity in (C^p,0) and
10 f_0:(C^n,0) --> (C^p,0) an analytic map germ, which is viewed as a
11 section ov V so that the singularity V_0=f_0^-1(V) is a pullback.
12 K_V equivalence is then given by the group
13     K_V={g | g(C^n x V) (subset) C^n x V} (subset) K,
14 where K is the contact group of Mather. This library provides
15 functionality for computing K_V tangent space, K_V normal space
16 and liftable vector fields.
17 A more detailed introduction to K_V equivalence can e.g. be found
18 in [Damon,J.: On the legacy of free divisors, Amer.J.Math. 120,453-492]
19
20PROCEDURES:
21 derlogV(iV);                   derlog(V(iV))
22 KVtangent(I,rname,dername,k)   K_V tangent space to given singularity
23 KVversal(KVtan,I,rname,idname) K_V versal family
24 KVvermap(KVtan,I)              section inducing K_V versal family
25 lft_vf(I,rname,idname)         liftable vector fields
26
27REMARKS:
28 * monomial ordering should be of type (c,...)
29 * monomial ordering should be local on the original (2) rings
30
31SEE ALSO: sing_lib, deform_lib, spcurve_lib
32";
33////////////////////////////////////////////////////////////////////////////
34// REQUIRED LIBRARIES
35////////////////////////////////////////////////////////////////////////////
36
37// first the ones written in Singular
38LIB "poly.lib";
39
40// then the ones written in C/C++
41LIB("loctriv.so");
42
43////////////////////////////////////////////////////////////////////////////
44// PROCEDURES
45////////////////////////////////////////////////////////////////////////////
46
47proc derlogV(ideal iV)
48"USAGE:  @code{derlogV(iV)};   @code{iV} ideal
49RETURN:  matrix whose columns generate derlog(V(iV)),
50         i.e. the module of vector fields on (C^p,0) tangent to V
51EXAMPLE: @code{example derlogV}; shows an example
52"
53{
54//--------------------------------------------------------------------------
55// Compute jacobian matrix of iV and add all iV[i]*gen(j) as extra columns
56//--------------------------------------------------------------------------
57  int j;
58  def jiV=jacob(iV);
59  module mmV=jiV;
60  for(int i=1;i<=size(iV);i++)
61  {
62    for(j=1;j<=size(iV);j++)
63    {
64      mmV=mmV,iV[i]*gen(j);
65    }
66  }
67//--------------------------------------------------------------------------
68// The generators of derlog(V) are given by the part of the syzygy matrix
69// of mmV which deals with the jacobian matrix
70//--------------------------------------------------------------------------
71  def smmV=syz(mmV);
72  matrix smaV=matrix(smmV);
73  matrix smV[nvars(basering)][ncols(smaV)]=
74                     smaV[1..nvars(basering),1..ncols(smaV)];
75  return(smV);
76}
77example
78{ "EXAMPLE:";echo=2;
79  ring r=0,(a,b,c,d,e,f),ds;
80  ideal i=ad-bc,af-be,cf-de;
81  def dV=derlogV(i);
82  print(dV);
83}
84////////////////////////////////////////////////////////////////////////////
85
86proc KVtangent(ideal mapi,string rname,string dername,list #)
87"USAGE:   @code{KVtangent(I,rname,dername[,k])}; @code{I} ideal
88                                                 @code{rname,dername} strings
89                                                 @code{[k]} int
90RETURN:   K_V tangent space to a singularity given as a section of a
91          model singularity
92NOTE:     The model singularity lives in the ring given by rname and
93          its derlog(V) is given by dername in that ring. The section is
94          specified by the generators of mapi. If k is given, the first k
95          variables are used as variables, the remaining ones as parameters
96EXAMPLE:  @code{example KVtangent}; shows an example
97"
98{
99//--------------------------------------------------------------------------
100// Sanity Checks
101//--------------------------------------------------------------------------
102  if(size(#)==0)
103  {
104    int k=nvars(basering);
105  }
106  else
107  {
108    if(typeof(#[1])=="int")
109    {
110      int k=#[1];
111    }
112    else
113    {
114      int k=nvars(basering);
115    }
116  }
117  def baser=basering;
118  string teststr="setring " + rname + ";";
119  execute(teststr);
120  if(nameof(basering)!=rname)
121  {
122    ERROR("rname not name of a ring");
123  }
124  teststr="string typeder=typeof(" + dername + ");";
125  execute(teststr);
126  if((typeder!="matrix")&&(typeder!="module"))
127  {
128    ERROR("dername not name of a matrix or module in rname");
129  }
130  setring(baser);
131  if((k > nvars(basering))||(k < 1))
132  {
133    ERROR("k should be between 1 and the number of variables");
134  }
135//--------------------------------------------------------------------------
136// Define the map giving the section and use it for substituting the
137// variables of the ring rname by the entries of mapi in the matrix
138// given by dername
139//--------------------------------------------------------------------------
140  setring baser;
141  string mapstr="map f0=" + rname + ",";
142  for(int i=1;i<ncols(mapi);i++)
143  {
144    mapstr=mapstr + string(mapi[i]) + ",";
145  }
146  mapstr=mapstr + string(mapi[ncols(mapi)]) + ";";
147  execute(mapstr);
148  string derstr="def derim=f0(" + dername + ");";
149  execute(derstr);
150//---------------------------------------------------------------------------
151// Form the derivatives of mapi by the first k variables
152//---------------------------------------------------------------------------
153  matrix jmapi[ncols(mapi)][k];
154  for(i=1;i<=k;i++)
155  {
156    jmapi[1..nrows(jmapi),i]=diff(mapi,var(i));
157  }
158//---------------------------------------------------------------------------
159// Put everything together to get the tangent space
160//---------------------------------------------------------------------------
161  string nvstr="int nvmodel=nvars(" + rname + ");";
162  execute(nvstr);
163  matrix M[nrows(derim)][ncols(derim)+k];
164  M[1..nrows(M),1..ncols(derim)]=derim[1..nrows(derim),1..ncols(derim)];
165  M[1..nrows(M),(ncols(derim)+1)..ncols(M)]=
166            jmapi[1..nrows(M),1..k];
167  return(M);
168}
169example
170{ "EXAMPLE:";echo=2;
171  ring ry=0,(a,b,c,d),ds;
172  ideal idy=ab,cd;
173  def dV=derlogV(idy);
174  echo=1; export ry; export dV; echo=2;
175  ring rx=0,(x,y,z),ds;
176  ideal mi=x-z+2y,x+y-z,y-x-z,x+2z-3y;
177  def M=KVtangent(mi,"ry","dV");
178  print(M);
179  M[1,5];
180  echo=1; kill ry;
181}
182/////////////////////////////////////////////////////////////////////////////
183
184proc KVversal(matrix KVtan, ideal mapi, string rname, string idname)
185"USAGE:   @code{KVversal(KVtan,I,rname,idname)};  @code{KVtan} matrix
186                                                  @code{I} ideal
187                                                  @code{rname,idname} strings
188RETURN:   list; The first entry of the list is the new ring in which the
189          K_V versal family lives, the second is the name of the ideal
190          describing a K_V versal family of a singularity given as section
191          of a model singularity (which was specified as idname in rname)
192NOTE:     The section is given by the generators of I, KVtan is the matrix
193          describing the K_V tangent space to the singularity (as returned
194          by KVtangent). rname denotes the ring in which the model
195          singularity lives, and idname is the name of the ideal in this ring
196          defining the singularity.
197EXAMPLE:  @code{example KVversal}; shows an example
198"
199{
200//---------------------------------------------------------------------------
201// Sanity checks
202//---------------------------------------------------------------------------
203  def baser=basering;
204  string teststr="setring " + rname + ";";
205  execute(teststr);
206  if(nameof(basering)!=rname)
207  {
208    ERROR("rname not name of a ring");
209  }
210  teststr="string typeid=typeof(" + idname + ");";
211  execute(teststr);
212  if(typeid!="ideal")
213  {
214    ERROR("idname not name of an ideal in rname");
215  }
216  setring baser;
217//---------------------------------------------------------------------------
218// Find a monomial basis of the K_V normal space
219// and check whether we can define new variables A(i)
220//---------------------------------------------------------------------------
221  module KVt=KVtan;
222  module KVts=std(KVt);
223  module kbKVt=kbase(KVts);
224  for(int i=1; i<=size(kbKVt); i++)
225  {
226    if(rvar(A(i)))
227    {
228      int jj=-1;
229      break;
230    }
231  }
232  if (defined(jj)>1)
233  {
234    if (jj==-1)
235    {
236      ERROR("Your ring contains a variable A(i)!");
237    }
238  }
239//---------------------------------------------------------------------------
240// Extend our current ring by adjoining the correct number of variables
241// A(i) for the parameters and copy our objects to this ring
242//---------------------------------------------------------------------------
243  def rbas=basering;
244  ring rtemp=0,(A(1..size(kbKVt))),(c,dp);
245  def rpert=rbas + rtemp;
246  setring rpert;
247  def mapi=imap(rbas,mapi);
248  def kbKVt=imap(rbas,kbKVt);
249  matrix mapv[ncols(mapi)][1]=mapi;   // I hate the conversion from ideal
250  vector mapV=mapv[1];                // to vector
251//---------------------------------------------------------------------------
252// Build up the map of the perturbed section and apply it to the ideal
253// idname
254//---------------------------------------------------------------------------
255  for(i=1;i<=size(kbKVt);i++)
256  {
257    mapV=mapV+A(i)*kbKVt[i];
258  }
259
260  string mapstr="map fpert=" + rname + ",";
261  for(int i=1;i<size(mapV);i++)
262  {
263    mapstr=mapstr + string(mapV[i]) + ",";
264  }
265  mapstr=mapstr + string(mapV[size(mapV)]) + ";";
266  execute(mapstr);
267  string idstr="ideal Ipert=fpert(" + idname + ");";
268  execute(idstr);
269//---------------------------------------------------------------------------
270// Return our new ring and the name of the perturbed ideal
271//---------------------------------------------------------------------------
272  export Ipert;
273  list retlist=rpert,"Ipert";
274  return(retlist);
275}
276example
277{ "EXAMPLE:";echo=2;
278  ring ry=0,(a,b,c,d),ds;
279  ideal idy=ab,cd;
280  def dV=derlogV(idy);
281  echo=1;
282  export ry; export dV; export idy; echo=2;
283  ring rx=0,(x,y,z),ds;
284  ideal mi=x-z+2y,x+y-z,y-x-z,x+2z-3y;
285  def M=KVtangent(mi,"ry","dV");
286  list li=KVversal(M,mi,"ry","idy");
287  def rnew=li[1];
288  setring rnew;
289  `li[2]`;
290  echo=1;
291  setring ry; kill idy; kill dV; setring rx; kill ry;
292}
293/////////////////////////////////////////////////////////////////////////////
294
295proc KVvermap(matrix KVtan, ideal mapi)
296"USAGE:   @code{KVvermap(KVtan,I)};  @code{KVtan} matrix, @code{I} ideal
297RETURN:   list; The first entry of the list is the new ring in which the
298          versal object lives, the second specifies a map describing the
299          section which yields a K_V versal family of the original
300          singularity which was given as section of a model singularity
301NOTE:     The section is given by the generators of I, KVtan is the matrix
302          describing the K_V tangent space to the singularity (as returned
303          by KVtangent).
304EXAMPLE:  @code{example KVvermap}; shows an example
305"
306{
307//---------------------------------------------------------------------------
308// Find a monomial basis of the K_V normal space
309// and check whether we can define new variables A(i)
310//---------------------------------------------------------------------------
311  module KVt=KVtan;
312  module KVts=std(KVt);
313  module kbKVt=kbase(KVts);
314  for(int i=1; i<=size(kbKVt); i++)
315  {
316    if(rvar(A(i)))
317    {
318      int jj=-1;
319      break;
320    }
321  }
322  if (defined(jj)>1)
323  {
324    if (jj==-1)
325    {
326      ERROR("Your ring contains a variable A(i)!");
327    }
328  }
329//---------------------------------------------------------------------------
330// Extend our current ring by adjoining the correct number of variables
331// A(i) for the parameters and copy our objects to this ring
332//---------------------------------------------------------------------------
333  def rbas=basering;
334  ring rtemp=0,(A(1..size(kbKVt))),(c,dp);
335  def rpert=rbas + rtemp;
336  setring rpert;
337  def mapi=imap(rbas,mapi);
338  def kbKVt=imap(rbas,kbKVt);
339  matrix mapv[ncols(mapi)][1]=mapi;
340  vector mapV=mapv[1];
341//---------------------------------------------------------------------------
342// Build up the map of the perturbed section
343//---------------------------------------------------------------------------
344  for(i=1;i<=size(kbKVt);i++)
345  {
346    mapV=mapV+A(i)*kbKVt[i];
347  }
348  ideal mappert=mapV[1..size(mapV)];
349//---------------------------------------------------------------------------
350// Return the new ring and the name of an ideal describing the perturbed map
351//---------------------------------------------------------------------------
352  export mappert;
353  list retlist=basering,"mappert";
354  return(retlist);
355}
356example
357{ "EXAMPLE:";echo=2;
358  ring ry=0,(a,b,c,d),ds;
359  ideal idy=ab,cd;
360  def dV=derlogV(idy);
361  echo=1;
362  export ry; export dV; export idy; echo=2;
363  ring rx=0,(x,y,z),ds;
364  ideal mi=x-z+2y,x+y-z,y-x-z,x+2z-3y;
365  def M=KVtangent(mi,"ry","dV");
366  list li=KVvermap(M,mi);
367  def rnew=li[1];
368  setring rnew;
369  `li[2]`;
370  echo=1;
371  setring ry; kill idy; kill dV; setring rx; kill ry;
372}
373/////////////////////////////////////////////////////////////////////////////
374
375proc lft_vf(ideal mapi, string rname, string idname, intvec wv, int b, list #)
376"USAGE: @code{lft_vf(I,rname,iname,wv,b[,any])}
377                                       @code{I} ideal
378                                       @code{wv} intvec
379                                       @code{b} int
380                                       @code{rname,iname} strings
381                                       @code{[any]} def
382RETURN: list
383        [1]: ring in which objects specified by the strings [2] and [3] live
384        [2]: name of ideal describing the liftable vector fields -
385             computed up to order b in the parameters
386        [3]: name of basis of the K_V-normal space of the original singularity
387        [4]: (if 6th argument is given)
388             ring in which the reduction of the liftable vector fields has
389             taken place.
390        [5]: name of liftable vector fields in ring [4]
391        [6]: name of ideal we are using for reduction of [5] in [4]
392ASSUME: input is assumed to be quasihomogeneous in the following sense:
393        there are weights for the variables in the current basering
394        such that, after plugging in mapi[i] for the i-th variable of the
395        ring rname in the ideal idname, the resulting expression is
396        quasihomogeneous; wv specifies the weight vector of the ring rname.
397        b is the degree bound up in the perturbation parameters up to which
398        computations are performed.
399NOTE:   the original ring should not contain any variables of name
400        A(i) or e(j)
401EXAMPLE:@code{example lft_vf;} gives an example
402"
403{
404//---------------------------------------------------------------------------
405// Sanity checks
406//---------------------------------------------------------------------------
407  def baser=basering;
408  def qid=maxideal(1);
409  string teststr="setring " + rname + ";";
410  execute(teststr);
411  if(nameof(basering)!=rname)
412  {
413    ERROR("rname not name of a ring");
414  }
415  def ry=basering;
416  teststr="string typeid=typeof(" + idname + ");";
417  execute(teststr);
418  if(typeid!="ideal")
419  {
420    ERROR("idname not name of an ideal in rname");
421  }
422  setring baser;
423  for(int i=1; i<=ncols(mapi); i++)
424  {
425    if(rvar(e(i)))
426    {
427      int jj=-1;
428      break;
429    }
430  }
431  if (defined(jj)>1)
432  {
433    if (jj==-1)
434    {
435      ERROR("Your ring contains a variable e(j)!");
436    }
437  }
438  setring ry;
439//---------------------------------------------------------------------------
440// first prepare derlog(V) for the model singularity
441// and set the correct weights
442//---------------------------------------------------------------------------
443  def @dV=derlogV(`idname`);
444  export(@dV);
445  setring baser;
446  map maptemp=`rname`,mapi;
447  def tempid=maptemp(`idname`);
448  intvec ivm=qhweight(tempid);
449  string ringstr="ring baserw=" + charstr(baser) + ",(" + varstr(baser) +
450                 "),(c,ws(" + string(ivm) + "));";
451  execute(ringstr);
452  def mapi=imap(baser,mapi);
453//---------------------------------------------------------------------------
454// compute the unperturbed K_V tangent space
455// and check K_V codimension
456//---------------------------------------------------------------------------
457  def KVt=KVtangent(mapi,rname,"@dV",nvars(basering));
458  def sKVt=std(KVt);
459  if(dim(sKVt)>0)
460  {
461    ERROR("K_V-codimension not finite");
462  }
463//---------------------------------------------------------------------------
464// Construction of the versal family
465//---------------------------------------------------------------------------
466  list lilit=KVvermap(KVt,mapi);
467  def rpert=lilit[1];
468  setring rpert;
469  def mapipert=`lilit[2]`;
470  def KVt=imap(baserw,KVt);
471  def mapi=imap(baserw,mapi);
472  def KVtpert=KVtangent(mapipert,rname,"@dV",nvars(baser));
473//---------------------------------------------------------------------------
474// put the unperturbed and the perturbed tangent space into a module
475// (1st component unperturbed) and run a groebner basis computation
476// which only considers spolys with non-vanishing first component
477//---------------------------------------------------------------------------
478  def rxa=basering;
479  string rchange="ring rexa=" + charstr(basering) + ",(e(1.." +
480                 string(ncols(mapi)) + ")," + varstr(basering) +
481                 "),(c,ws(" + string((-1)*wv) + "," + string(ivm) + "),dp);";
482  execute(rchange);
483  def mapi=imap(rxa,mapi);
484  ideal eid=e(1..ncols(mapi));            // for later use
485  def KVt=imap(rxa,KVt);
486  def KVtpert=imap(rxa,KVtpert);
487  intvec iv=1..ncols(mapi);
488  ideal KVti=mod2id(KVt,iv);
489//----------------------------------------------------------------------------
490// small intermezzo (here because we did not have all input any earlier)
491// get kbase of KVti for later use and determine an
492// integer l such that m_x^l*(e_1,\dots,e_r) lies in KVt
493//----------------------------------------------------------------------------
494  ideal sKVti=std(KVti);
495  ideal lsKVti=lead(sKVti);
496  module tmpmo=id2mod(lsKVti,iv);
497  setring baser;
498  def tmpmo=imap(rexa,tmpmo);
499  attrib(tmpmo,"isSB",1);
500  module kbKVt=kbase(tmpmo);
501  setring rexa;
502  def kbKVt=imap(baser,kbKVt);
503  ideal kbKVti=mod2id(kbKVt,iv);
504  def qid=imap(baser,qid);
505  intvec qiv;
506  for(i=1;i<=ncols(qid);i++)
507  {
508    qiv[rvar(qid[i])]=1;
509  }
510  int counter=1;
511  while(size(reduce(lsKVti,std(jet(lsKVti,i,qiv))))!=0)
512  {
513    counter++;
514  }
515//----------------------------------------------------------------------------
516// end of intermezzo
517// proceed to the previously announced Groebner basis computation
518//----------------------------------------------------------------------------
519  ideal KVtpi=mod2id(KVtpert,iv);
520  export(KVtpi);
521  matrix Eing[2][ncols(KVti)]=KVti,KVtpi;
522  module EinMo=Eing;
523  EinMo=EinMo,eid^2*gen(1),eid^2*gen(2);
524  module Ausg=Loctriv::kstd(EinMo,1);
525//---------------------------------------------------------------------------
526// * collect those elements of Ausg for which the first component is non-zero
527//   into mx and the others into mt
528// * cut off the first component
529// * find appropriate weights for the reduction
530//---------------------------------------------------------------------------
531  intvec eiv;
532  for(i=1;i<=ncols(eid);i++)
533  {
534    eiv[rvar(eid[i])]=1;
535  }
536  if(size(reduce(var(nvars(basering)),std(eid)))!=0)
537  {
538    eiv[nvars(basering)]=0;
539  }
540  module Aus2=jet(Ausg,1,eiv);
541  Aus2=simplify(Aus2,2);
542  ideal mx;
543  ideal mt;
544  int ordmax,ordmin;
545  int ordtemp;
546  for (i=1;i<=size(Aus2);i++)
547  {
548    if(Aus2[1,i]!=0)
549    {
550      mx=mx,Aus2[2,i];
551      ordtemp=ord(lead(Aus2[1,i]));
552      if(ordtemp>ordmax)
553      {
554        ordmax=ordtemp;
555      }
556      else
557      {
558        if(ordtemp<ordmin)
559        {
560          ordmin=ordtemp;
561        }
562      }
563    }
564    else
565    {
566      mt=mt,Aus2[2,i];
567    }
568  }
569//---------------------------------------------------------------------------
570// * change weights of the A(i) such that Aus2[1,i] and Aus2[2,i] have the
571//   same leading term, if the first one is non-zero
572// * reduce mt by mx
573// * find l such that (x_1,...,x_n)^l * eid can be used instead of noether
574//   which we have to avoid because we are playing with the weights
575//---------------------------------------------------------------------------
576  intvec oiv;
577  for(i=1;i<=(nvars(basering)-nvars(baser)-size(eid));i++)
578  {
579    oiv[i]=2*(abs(ordmax)+abs(ordmin));
580  }
581  mx=jet(mx,counter*(b+1),qiv);
582  rchange="ring rexaw=" + charstr(basering) + ",(" + varstr(basering) +
583                      "),(c,ws(" + string((-1)*wv) + "," + string(ivm) +
584                      "," + string(oiv) + "));";
585  execute(rchange);
586  ideal qid=imap(rexa,qid);
587  def eid=imap(rexa,eid);
588  def mx=imap(rexa,mx);
589  attrib(mx,"isSB",1);
590  def mto=imap(rexa,mt);
591  ideal Aid=A(1..size(oiv));
592  intvec Aiv;
593  for(i=1;i<=ncols(Aid);i++)
594  {
595    Aiv[rvar(Aid[i])]=1;
596  }
597  intvec riv=(b+1)*qiv+(b+2)*counter*Aiv;
598  def mt=mto;
599  for(i=1;i<=counter+1;i++)
600  {
601    mt=mt,mto*qid^i;
602  }
603  mt=jet(mt,(b+1)*(b+2)*counter,riv);
604  mt=jet(mt,1,eiv);
605  mt=simplify(mt,10);
606  module mmx=module(mx);
607  attrib(mmx,"isSB",1);
608  for(i=1;i<=ncols(mt);i++)
609  {
610    if(defined(watchProgress))
611    {
612      "reducing mt[i], i="+string(i);
613    }
614   mt[i]=system("locNF",vector(mt[i]),mmx,
615                        (b+1)*(b+2)*counter,riv)[1][1,1];
616  }
617  mt=simplify(mt,10);
618//----------------------------------------------------------------------------
619// return the results by returning the ring and the names of the desired
620// modules in the ring
621// (if the list # is not empty, then we want to return this ring as well)
622//----------------------------------------------------------------------------
623  if(size(#)!=0)
624  {
625    export mt;
626    export mx;
627  }
628  setring rexa;
629  def mtout=imap(rexaw,mt);
630  kbKVti=jet(kbKVti,1,eiv);
631  kbKVti=simplify(kbKVti,2);
632  intvec rediv;
633  int j=1;
634  for(i=1;i<=size(qiv);i++)
635  {
636    if(qiv[i]!=0)
637    {
638      rediv[j]=i;
639      j++;
640    }
641  }
642  list templi=subrInterred(kbKVti,mtout,rediv);
643  mtout=jet(templi[3],b+1,Aiv);
644  export mtout;
645  export kbKVti;
646  list result;
647  result[1]=rexa;
648  result[2]="mtout";
649  result[3]="kbKVti";
650  if(size(#)!=0)
651  {
652    result[4]=rexaw;
653    result[5]="mt";
654    result[6]="mx";
655  }
656  export rexa;
657  keepring rexa;
658  return(result);
659}
660example
661{ "EXAMPLE:";echo=2;
662  ring ry=0,(a,b,c,d),ds;
663  ideal idy=ab,cd;
664  def dV=derlogV(idy);
665  echo=1;
666  export ry; export dV; export idy; echo=2;
667  ring rx=0,(x,y,z),ds;
668  ideal mi=x-z+2y,x+y-z,y-x-z,x+2z-3y;
669  intvec wv=1,1,1,1;
670  def M=KVtangent(mi,"ry","dV");
671  list li=lft_vf(mi,"ry","idy",wv,5);
672  def rr=li[1];
673  setring rr;
674  `li[2]`;
675  `li[3]`;
676  echo=1;
677  setring ry; kill idy; kill dV; setring rx; kill ry;
678}
679//////////////////////////////////////////////////////////////////////////////
680// STATIC PROCEDURES
681//////////////////////////////////////////////////////////////////////////////
682static
683proc abs(int c)
684"absolute value
685"
686{
687  if(c>=0){ return(c);}
688  else{ return(-c);}
689}
690////////////////////////////////////////////////////////////////////////////
Note: See TracBrowser for help on using the repository browser.