Top
Back: buildtree
Forward: finalcases
FastBack:
FastForward:
Up: redcgs_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.9.9 buildtreetoMaple

Procedure from library redcgs.lib (see redcgs_lib).

Usage:
buildtreetoMaple(T, TM, writefile);
T: is the list provided by buildtree,
TM: is the name (string) of the table variable in Maple that will represent the output of buildtree,
writefile: is the name (string) of the file where to write the content.

Return:
writes the list provided by buildtree to a file
containing the table representing it in Maple.

Example:
 
LIB "redcgs.lib";
ring R=(0,a1,a2,a3,a4),(x1,x2,x3,x4),dp;
ideal F=x4-a4+a2,
x1+x2+x3+x4-a1-a3-a4,
x1*x3*x4-a1*a3*a4,
x1*x3+x1*x4+x2*x3+x3*x4-a1*a4-a1*a3-a3*a4;
def T=buildtree(F);
finalcases(T);
==> [1]:
==>    [1]:
==>       0,0
==>    [2]:
==>       1
==>    [3]:
==>       _[1]=x4
==>       _[2]=-x1-x2-x3+(a1+a3+a4)
==>       _[3]=x3^2+(-a1-a3-a4)*x3+(a1*a3+a1*a4+a3*a4)
==>    [4]:
==>       _[1]=(a2-a4)
==>       _[2]=(a1*a3*a4)
==>    [5]:
==>       _[1]=0
==>    [6]:
==>       [1]:
==>          _[1]=(a4)
==>          _[2]=(a2)
==>       [2]:
==>          _[1]=(a3)
==>          _[2]=(a2-a4)
==>       [3]:
==>          _[1]=(a2-a4)
==>          _[2]=(a1)
==>    [7]:
==>       _[1]=x4
==>       _[2]=x1
==>       _[3]=x3^2
==>    [8]:
==>       1
==> [2]:
==>    [1]:
==>       0,1
==>    [2]:
==>       1
==>    [3]:
==>       _[1]=1
==>    [4]:
==>       _[1]=(a2-a4)
==>    [5]:
==>       _[1]=(a1)
==>       _[2]=(a3)
==>       _[3]=(a4)
==>    [6]:
==>       [1]:
==>          _[1]=(a2-a4)
==>    [7]:
==>       _[1]=1
==>    [8]:
==>       1
==> [3]:
==>    [1]:
==>       1
==>    [2]:
==>       1
==>    [3]:
==>       _[1]=x4+(a2-a4)
==>       _[2]=-x1-x2-x3+(a1+a2+a3)
==>       _[3]=x3^2+(-a2+a4)*x2+(-a1-a2-a3)*x3+(a1*a2+a1*a3+a2^2+a2*a3-a2*a4)
==>       _[4]=(a2-a4)*x2*x3+(a2^2-2*a2*a4+a4^2)*x2+(-a1*a2^2-a1*a2*a3+a1*a2*\
   a4-a2^3-a2^2*a3+2*a2^2*a4+a2*a3*a4-a2*a4^2)
==>       _[5]=(a2^2-2*a2*a4+a4^2)*x2^2+(-2*a1*a2^2-a1*a2*a3+3*a1*a2*a4+a1*a3\
   *a4-a1*a4^2-3*a2^3-2*a2^2*a3+7*a2^2*a4+3*a2*a3*a4-5*a2*a4^2-a3*a4^2+a4^3)\
   *x2+(-a1*a2^2-a1*a2*a3+a1*a2*a4-a2^3-a2^2*a3+2*a2^2*a4+a2*a3*a4-a2*a4^2)*\
   x3+(a1^2*a2^2+a1^2*a2*a3-a1^2*a2*a4+3*a1*a2^3+4*a1*a2^2*a3-5*a1*a2^2*a4+a\
   1*a2*a3^2-3*a1*a2*a3*a4+2*a1*a2*a4^2+2*a2^4+3*a2^3*a3-5*a2^3*a4+a2^2*a3^2\
   -5*a2^2*a3*a4+4*a2^2*a4^2-a2*a3^2*a4+2*a2*a3*a4^2-a2*a4^3)
==>    [4]:
==>       _[1]=0
==>    [5]:
==>       _[1]=(a2-a4)
==>    [6]:
==>       [1]:
==>          _[1]=0
==>    [7]:
==>       _[1]=x4
==>       _[2]=x1
==>       _[3]=x3^2
==>       _[4]=x2*x3
==>       _[5]=x2^2
==>    [8]:
==>       1
buildtreetoMaple(T,"Tb","Tb.txt");


Top Back: buildtree Forward: finalcases FastBack: FastForward: Up: redcgs_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.2, 2023, generated by texi2html.