|
D.7.1.12 sortvars
Procedure from library presolve.lib (see presolve_lib).
- Usage:
sortvars(id[,n1,p1,n2,p2,...]);
id=poly/ideal/vector/module,
p1,p2,...= polynomials (product of vars),
n1,n2,...=integers
(default: p1=product of all vars, n1=0)
the last pi (containing the remaining vars) may be omitted
- Compute:
sort variables with respect to their complexity in id
- Return:
list of two elements, an ideal and a list:
- Note:
We define a variable x to be more complex than y (with respect to id)
if val(x) > val(y) lexicographically, where val(x) denotes the
valuation vector of x:
consider id as list of polynomials in x with coefficients in the
remaining variables. Then:
val(x) = (maximal occurring power of x, # of all monomials in leading
coefficient, # of all monomials in coefficient of next smaller power
of x,...).
Example:
LIB "presolve.lib";
ring s=0,(x,y,z,w),dp;
ideal i = x3+y2+yw2,xz+z2,xyz-w2;
sortvars(i,0,xy,1,zw);
→ [1]:
→ _[1]=y
→ _[2]=x
→ _[3]=w
→ _[4]=z
→ [2]:
→ [1]:
→ _[1]=y
→ _[2]=x
→ [2]:
→ 2,1
→ [3]:
→ 2,3,
→ 1,1,
→ 2,0,
→ 0,2
→ [4]:
→ 1,1
→ [5]:
→ _[1]=w
→ _[2]=z
→ [6]:
→ 2,1
→ [7]:
→ 2,2,
→ 2,1,
→ 0,2
→ [8]:
→ 1,1
|