source: git/Singular/LIB/KVequiv.lib @ 555add

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