D.7.1.11 sortandmap
...................
Procedure from library presolve.lib (see presolve_lib).

Usage:
sortandmap(id,s1,s2[,n1,p1,n2,p2...,o1,m1,o2,m2...]);

id=poly/ideal/vector/module,

s1,s2 = strings (names for new ring and mapped id),

p1,p2,...= polynomials (product of variables),

n1,n2,...= integers,

o1,o2,...= strings,

m1,m2,...= integers

(default: p1=product of all vars, n1=0, o1="dp",m1=0)

the last pi (containing the remaining vars) may be omitted

Create:
a new ring and map id into it, the new ring has same char as basering
but with new ordering and vars sorted in the following manner:
    - each block of vars occurring in pi is sorted w.r.t. its complexity in id,
  - ni controls the sorting in i-th block (= vars occurring in pi):
    ni=0 (resp.!=0) means that less (resp. more) complex vars come first
  - oi and mi define the monomial ordering of the i-th block:
    if mi =0, oi=ordstr(i-th block)
    if mi!=0, the ordering of the i-th block itself is a blockordering,
      each subblock having ordstr=oi, such that vars of same complexity are
      in one block
  
Note that only simple ordstrings oi are allowed:

"lp","dp","Dp","ls","ds","Ds".

Return:
nothing

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 = 32003,(x,y,z),dp;
ideal i=x3+y2,xz+z2;
sortandmap(i,"R_r","i");
// i is now an ideal in the new basering R_r
show(R_r);
==> // ring: (32003),(y,z,x),(dp(3),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> // i                    [0]  ideal, 2 generator(s)
kill R_r; setring s;
sortandmap(i,"R_r","i",1,xy,0,z,0,"ds",0,"lp",0);
show(R_r);
==> // ring: (32003),(x,y,z),(ds(2),lp(1),C);
==> // minpoly = 0
==> // objects belonging to this ring:
==> // i                    [0]  ideal, 2 generator(s)
kill R_r;

<font size="-1">
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; User manual for <a href="http://www.singular.uni-kl.de/"><i>Singular</i></a> version 2-0-4, October 2002,
generated by <a href="http://www.gnu.org/software/texinfo/"><i>texi2html</i></a>.
</font>

</body>
</html>
