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

D.2.9.8 buildtree

Procedure from library redcgs.lib (see redcgs_lib).

Usage:
buildtree(F);
F: ideal in K[a][x] (parameters and variables) to be discussed

Return:
Returns a list T describing a dichotomic discussion tree, whose content is the first discussion of the ideal F of K[a][x]. The first element of the list is the root, and contains [1] label: intvec(-1)
[2] number of children : int
[3] the ideal F
[4], [5], [6] the red-spec of the null and non-null conditions given (as option). ideal (0), ideal (0), list(ideal(0)) if no optional conditions are given.
[7] the set of lpp of ideal F
[8] condition that was taken to reach the vertex
(poly 1, for the root).
The remaining elements of the list represent vertices of the tree: with the same structure:
[1] label: intvec (1,0,0,1,...) gives its position in the tree: first branch condition is taken non-null, second null,... [2] number of children (0 if it is a terminal vertex) [3] the specialized ideal with the previous assumed conditions to reach the vertex
[4],[5],[6] the red-spec of the previous assumed conditions to reach the vertex
[7] the set of lpp of the specialized ideal at this stage [8] condition that was taken to reach the vertex from the father's vertex (that was taken non-null if the last
integer in the label is 1, and null if it is 0)
The terminal vertices form a disjoint partition of the parameter space whose bases specialize to the reduced Groebner basis of the specialized ideal on each point of the segment and preserve the lpp. So they form a disjoint reduced CGS.

Note:
The basering R, must be of the form K[a][x], a=parameters, x=variables, and should be defined previously. The ideal must be defined on R.
The disjoint and reduced CGS built by buildtree can be obtained from the output of buildtree by calling finalcases(T); this selects the terminal vertices.
The content of buildtree can be written in a file that is readable by Maple in order to plot its content using buildtreetoMaple; The file written by buildtreetoMaple when read in a Maple worksheet can be plotted using the dbgb routine tplot;

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: pnormalform Forward: buildtreetoMaple FastBack: FastForward: Up: redcgs_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.4.0, 2024, generated by texi2html.