code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/primdec_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/primdec_lib.doc INSTEAD
@c library version: (1.98.2.16,2003/06/23)
@c library file: ../Singular/LIB/primdec.lib
@cindex primdec.lib
@cindex primdec_lib
@table @asis
@item @strong{Library:}
primdec.lib
@item @strong{Purpose:}
   Primary Decomposition and Radical of Ideals
@item @strong{Authors:}
Gerhard Pfister, pfister@@mathematik.uni-kl.de (GTZ)
@* Wolfram Decker, decker@@math.uni-sb.de (SY)
@* Hans Schoenemann, hannes@@mathematik.uni-kl.de (SY)

@item @strong{Overview:}
Algorithms for primary decomposition based on the ideas of
Gianni, Trager and Zacharias (implementation by Gerhard Pfister),
respectively based on the ideas of Shimoyama and Yokoyama (implementation
by Wolfram Decker and Hans Schoenemann).
@* The procedures are implemented to be used in characteristic 0.
@* They also work in positive characteristic >> 0.
@* In small characteristic and for algebraic extensions, primdecGTZ
may not terminate.
@*Algorithms for the computation of the radical based on the ideas of
Krick, Logar and Kemper (implementation by Gerhard Pfister).

@end table

@strong{Procedures:}
@menu
* Ann:: annihilator of R^n/M, R=basering, M in R^n
* primdecGTZ:: complete primary decomposition via Gianni,Trager,Zacharias
* primdecSY:: complete primary decomposition via Shimoyama-Yokoyama
* minAssGTZ:: the minimal associated primes via Gianni,Trager,Zacharias
* minAssChar:: the minimal associated primes using characteristic sets
* testPrimary:: tests the result of the primary decomposition
* radical:: computes the radical of I via Krick/Logar and Kemper
* radicalEHV:: computes the radical of I via Eisenbud,Huneke,Vasconcelos
* equiRadical:: the radical of the equidimensional part of the ideal I
* prepareAss:: list of radicals of the equidimensional components of I
* equidim:: weak equidimensional decomposition of I
* equidimMax:: equidimensional locus of I
* equidimMaxEHV:: equidimensional locus of I via Eisenbud,Huneke,Vasconcelos
* zerodec:: zerodimensional decomposition via Monico
@end menu
@c ---end content LibInfo---

@c ------------------- Ann -------------
@node Ann, primdecGTZ,, primdec_lib
@subsubsection Ann
@cindex Ann
@c ---content Ann---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@end table
@c ---end content Ann---

@c ------------------- primdecGTZ -------------
@node primdecGTZ, primdecSY, Ann, primdec_lib
@subsubsection primdecGTZ
@cindex primdecGTZ
@c ---content primdecGTZ---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
primdecGTZ(i); i ideal

@item @strong{Return:}
a list pr of primary ideals and their associated primes:
@format
   pr[i][1]   the i-th primary component,
   pr[i][2]   the i-th prime component.
@end format

@item @strong{Note:}
Algorithm of Gianni/Trager/Zacharias.
@*Designed for characteristic 0, works also in char k > 0, if it
terminates (may result in an infinite loop in small characteristic!)

@end table
@strong{Example:}
@smallexample
@c reused example primdecGTZ d2t_singular/primdec_lib.doc:86
LIB "primdec.lib";
ring  r = 0,(x,y,z),lp;
poly  p = z2+1;
poly  q = z3+2;
ideal i = p*q^2,y-z2;
list pr = primdecGTZ(i);
pr;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=z6+4z3+4
@expansion{}       _[2]=y-z2
@expansion{}    [2]:
@expansion{}       _[1]=z3+2
@expansion{}       _[2]=y-z2
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=z2+1
@expansion{}       _[2]=y-z2
@expansion{}    [2]:
@expansion{}       _[1]=z2+1
@expansion{}       _[2]=y-z2
@c end example primdecGTZ d2t_singular/primdec_lib.doc:86
@end smallexample
@c ---end content primdecGTZ---

@c ------------------- primdecSY -------------
@node primdecSY, minAssGTZ, primdecGTZ, primdec_lib
@subsubsection primdecSY
@cindex primdecSY
@c ---content primdecSY---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
primdecSY(i); i ideal, c int

@item @strong{Return:}
a list pr of primary ideals and their associated primes:
@format
   pr[i][1]   the i-th primary component,
   pr[i][2]   the i-th prime component.
@end format

@item @strong{Note:}
Algorithm of Shimoyama/Yokoyama.
@format
   if c=0,  the given ordering of the variables is used,
   if c=1,  minAssChar tries to use an optimal ordering,
   if c=2,  minAssGTZ is used,
   if c=3,  minAssGTZ and facstd are used.
@end format

@end table
@strong{Example:}
@smallexample
@c reused example primdecSY d2t_singular/primdec_lib.doc:128
LIB "primdec.lib";
ring  r = 0,(x,y,z),lp;
poly  p = z2+1;
poly  q = z3+2;
ideal i = p*q^2,y-z2;
list pr = primdecSY(i);
pr;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=z6+4z3+4
@expansion{}       _[2]=y-z2
@expansion{}    [2]:
@expansion{}       _[1]=z3+2
@expansion{}       _[2]=y-z2
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=z2+1
@expansion{}       _[2]=y+1
@expansion{}    [2]:
@expansion{}       _[1]=z2+1
@expansion{}       _[2]=y+1
@c end example primdecSY d2t_singular/primdec_lib.doc:128
@end smallexample
@c ---end content primdecSY---

@c ------------------- minAssGTZ -------------
@node minAssGTZ, minAssChar, primdecSY, primdec_lib
@subsubsection minAssGTZ
@cindex minAssGTZ
@c ---content minAssGTZ---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
minAssGTZ(i); i ideal
@*minAssGTZ(i,1); i ideal does not use the factorizing Groebner

@item @strong{Return:}
a list, the minimal associated prime ideals of i.

@item @strong{Note:}
Designed for characteristic 0, works also in char k > 0 based
on an algorithm of Yokoyama

@end table
@strong{Example:}
@smallexample
@c reused example minAssGTZ d2t_singular/primdec_lib.doc:162
LIB "primdec.lib";
ring  r = 0,(x,y,z),dp;
poly  p = z2+1;
poly  q = z3+2;
ideal i = p*q^2,y-z2;
list pr = minAssGTZ(i);
pr;
@expansion{} [1]:
@expansion{}    _[1]=z2+1
@expansion{}    _[2]=-z2+y
@expansion{} [2]:
@expansion{}    _[1]=z3+2
@expansion{}    _[2]=-z2+y
@c end example minAssGTZ d2t_singular/primdec_lib.doc:162
@end smallexample
@c ---end content minAssGTZ---

@c ------------------- minAssChar -------------
@node minAssChar, testPrimary, minAssGTZ, primdec_lib
@subsubsection minAssChar
@cindex minAssChar
@c ---content minAssChar---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
minAssChar(i[,c]); i ideal, c int.

@item @strong{Return:}
list, the minimal associated prime ideals of i.

@item @strong{Note:}
If c=0, the given ordering of the variables is used. @*
Otherwise, the system tries to find an optimal ordering,
which in some cases may considerably speed up the algorithm. @*
Due to a bug in the factorization, the result may be not completely
decomposed in small characteristic.

@end table
@strong{Example:}
@smallexample
@c reused example minAssChar d2t_singular/primdec_lib.doc:198
LIB "primdec.lib";
ring  r = 0,(x,y,z),dp;
poly  p = z2+1;
poly  q = z3+2;
ideal i = p*q^2,y-z2;
list pr = minAssChar(i);
pr;
@expansion{} [1]:
@expansion{}    _[1]=y+1
@expansion{}    _[2]=z2+1
@expansion{} [2]:
@expansion{}    _[1]=z2-y
@expansion{}    _[2]=yz+2
@expansion{}    _[3]=y2+2z
@c end example minAssChar d2t_singular/primdec_lib.doc:198
@end smallexample
@c ---end content minAssChar---

@c ------------------- testPrimary -------------
@node testPrimary, radical, minAssChar, primdec_lib
@subsubsection testPrimary
@cindex testPrimary
@c ---content testPrimary---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
testPrimary(pr,k); pr a list, k an ideal.

@item @strong{Assume:}
pr is the result of primdecGTZ(k) or primdecSY(k).

@item @strong{Return:}
int, 1 if the intersection of the ideals in pr is k, 0 if not

@end table
@strong{Example:}
@smallexample
@c reused example testPrimary d2t_singular/primdec_lib.doc:230
LIB "primdec.lib";
ring  r = 32003,(x,y,z),dp;
poly  p = z2+1;
poly  q = z4+2;
ideal i = p^2*q^3,(y-z3)^3,(x-yz+z4)^4;
list pr = primdecGTZ(i);
testPrimary(pr,i);
@expansion{} 1
@c end example testPrimary d2t_singular/primdec_lib.doc:230
@end smallexample
@c ---end content testPrimary---

@c ------------------- radical -------------
@node radical, radicalEHV, testPrimary, primdec_lib
@subsubsection radical
@cindex radical
@c ---content radical---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
radical(i); i ideal.

@item @strong{Return:}
ideal, the radical of i.

@item @strong{Note:}
A combination of the algorithms of Krick/Logar and Kemper is used.
Works also in positive characteristic (Kempers algorithm).

@end table
@strong{Example:}
@smallexample
@c reused example radical d2t_singular/primdec_lib.doc:263
LIB "primdec.lib";
ring  r = 0,(x,y,z),dp;
poly  p = z2+1;
poly  q = z3+2;
ideal i = p*q^2,y-z2;
ideal pr= radical(i);
pr;
@expansion{} pr[1]=z2-y
@expansion{} pr[2]=y2z+yz+2y+2
@c end example radical d2t_singular/primdec_lib.doc:263
@end smallexample
@c ---end content radical---

@c ------------------- radicalEHV -------------
@node radicalEHV, equiRadical, radical, primdec_lib
@subsubsection radicalEHV
@cindex radicalEHV
@c ---content radicalEHV---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
radicalEHV(i); i ideal.

@item @strong{Return:}
ideal, the radical of i.

@item @strong{Note:}
Uses the algorithm of Eisenbud/Huneke/Vasconcelos, which
reduces the computation to the complete intersection case,
by taking, in the general case, a generic linear combination
of the input.
@*Works only in characteristic 0 or p large.

@end table
@strong{Example:}
@smallexample
@c reused example radicalEHV d2t_singular/primdec_lib.doc:299
LIB "primdec.lib";
ring  r = 0,(x,y,z),dp;
poly  p = z2+1;
poly  q = z3+2;
ideal i = p*q^2,y-z2;
ideal pr= radicalEHV(i);
pr;
@expansion{} pr[1]=z2-y
@expansion{} pr[2]=y2z+yz+2y+2
@expansion{} pr[3]=y3+y2+2yz+2z
@c end example radicalEHV d2t_singular/primdec_lib.doc:299
@end smallexample
@c ---end content radicalEHV---

@c ------------------- equiRadical -------------
@node equiRadical, prepareAss, radicalEHV, primdec_lib
@subsubsection equiRadical
@cindex equiRadical
@c ---content equiRadical---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
equiRadical(i); i ideal

@item @strong{Return:}
ideal, intersection of associated primes of i of maximal dimension.

@item @strong{Note:}
A combination of the algorithms of Krick/Logar and Kemper is used.
Works also in positive characteristic (Kempers algorithm).

@end table
@strong{Example:}
@smallexample
@c reused example equiRadical d2t_singular/primdec_lib.doc:332
LIB "primdec.lib";
ring  r = 0,(x,y,z),dp;
poly  p = z2+1;
poly  q = z3+2;
ideal i = p*q^2,y-z2;
ideal pr= equiRadical(i);
pr;
@expansion{} pr[1]=z2-y
@expansion{} pr[2]=y2z+yz+2y+2
@c end example equiRadical d2t_singular/primdec_lib.doc:332
@end smallexample
@c ---end content equiRadical---

@c ------------------- prepareAss -------------
@node prepareAss, equidim, equiRadical, primdec_lib
@subsubsection prepareAss
@cindex prepareAss
@c ---content prepareAss---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
prepareAss(i); i ideal

@item @strong{Return:}
list, the radicals of the maximal dimensional components of i.

@item @strong{Note:}
Uses algorithm of Eisenbud/Huneke/Vasconcelos.

@end table
@strong{Example:}
@smallexample
@c reused example prepareAss d2t_singular/primdec_lib.doc:364
LIB "primdec.lib";
ring  r = 0,(x,y,z),dp;
poly  p = z2+1;
poly  q = z3+2;
ideal i = p*q^2,y-z2;
list pr = prepareAss(i);
pr;
@expansion{} [1]:
@expansion{}    _[1]=z2-y
@expansion{}    _[2]=y2z+yz+2y+2
@c end example prepareAss d2t_singular/primdec_lib.doc:364
@end smallexample
@c ---end content prepareAss---

@c ------------------- equidim -------------
@node equidim, equidimMax, prepareAss, primdec_lib
@subsubsection equidim
@cindex equidim
@c ---content equidim---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
equidim(i) or equidim(i,1) ; i ideal

@item @strong{Return:}
list of equidimensional ideals a[1],...,a[s] with:
@*- a[s] the equidimensional locus of i, i.e. the intersection
of the primary ideals of dimension of i
@*- a[1],...,a[s-1] the lower dimensional equidimensional loci.

@item @strong{Note:}
An embedded component q (primary ideal) of i can be replaced in the
decomposition by a primary ideal q1 with the same radical as q. @*
@code{equidim(i,1)} uses the algorithm of Eisenbud/Huneke/Vasconcelos.

@end table
@strong{Example:}
@smallexample
@c reused example equidim d2t_singular/primdec_lib.doc:401
LIB "primdec.lib";
ring  r = 32003,(x,y,z),dp;
ideal i = intersect(ideal(z),ideal(x,y),ideal(x2,z2),ideal(x5,y5,z5));
equidim(i);
@expansion{} [1]:
@expansion{}    _[1]=z4
@expansion{}    _[2]=y5
@expansion{}    _[3]=x5
@expansion{}    _[4]=x3z3
@expansion{}    _[5]=x4y4
@expansion{} [2]:
@expansion{}    _[1]=yz
@expansion{}    _[2]=xz
@expansion{}    _[3]=x2
@expansion{} [3]:
@expansion{}    _[1]=z
@c end example equidim d2t_singular/primdec_lib.doc:401
@end smallexample
@c ---end content equidim---

@c ------------------- equidimMax -------------
@node equidimMax, equidimMaxEHV, equidim, primdec_lib
@subsubsection equidimMax
@cindex equidimMax
@c ---content equidimMax---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
equidimMax(i); i ideal

@item @strong{Return:}
ideal of equidimensional locus (of maximal dimension) of i.

@end table
@strong{Example:}
@smallexample
@c reused example equidimMax d2t_singular/primdec_lib.doc:427
LIB "primdec.lib";
ring  r = 32003,(x,y,z),dp;
ideal i = intersect(ideal(z),ideal(x,y),ideal(x2,z2),ideal(x5,y5,z5));
equidimMax(i);
@expansion{} _[1]=z
@c end example equidimMax d2t_singular/primdec_lib.doc:427
@end smallexample
@c ---end content equidimMax---

@c ------------------- equidimMaxEHV -------------
@node equidimMaxEHV, zerodec, equidimMax, primdec_lib
@subsubsection equidimMaxEHV
@cindex equidimMaxEHV
@c ---content equidimMaxEHV---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
equidimMaxEHV(i); i ideal

@item @strong{Return:}
ideal, the equidimensional component (of maximal dimension) of i.

@item @strong{Note:}
Uses algorithm of Eisenbud, Huneke and Vasconcelos.

@end table
@strong{Example:}
@smallexample
@c reused example equidimMaxEHV d2t_singular/primdec_lib.doc:456
LIB "primdec.lib";
ring  r = 0,(x,y,z),dp;
ideal i=intersect(ideal(z),ideal(x,y),ideal(x2,z2),ideal(x5,y5,z5));
equidimMaxEHV(i);
@expansion{} _[1]=z
@c end example equidimMaxEHV d2t_singular/primdec_lib.doc:456
@end smallexample
@c ---end content equidimMaxEHV---

@c ------------------- zerodec -------------
@node zerodec,, equidimMaxEHV, primdec_lib
@subsubsection zerodec
@cindex zerodec
@c ---content zerodec---
Procedure from library @code{primdec.lib} (@pxref{primdec_lib}).

@table @asis
@item @strong{Usage:}
zerodec(I); I ideal

@item @strong{Assume:}
I is zero-dimensional, the characteristic of the ground field is 0

@item @strong{Return:}
list of primary ideals, the zero-dimensional decomposition of I

@item @strong{Note:}
The algorithm (of Monico), works well only for a small total number
of solutions (@code{vdim(std(I))} should be < 100) and without
parameters. In practice, it works also in large characteristic p>0
but may fail for small p.
@* If printlevel > 0 (default = 0) additional information is displayed.

@end table
@strong{Example:}
@smallexample
@c reused example zerodec d2t_singular/primdec_lib.doc:492
LIB "primdec.lib";
ring r  = 0,(x,y),dp;
ideal i = x2-2,y2-2;
list pr = zerodec(i);
pr;
@expansion{} [1]:
@expansion{}    _[1]=y2-2
@expansion{}    _[2]=xy-2
@expansion{}    _[3]=x2-2
@expansion{} [2]:
@expansion{}    _[1]=y2-2
@expansion{}    _[2]=xy+2
@expansion{}    _[3]=x2-2
@c end example zerodec d2t_singular/primdec_lib.doc:492
@end smallexample
@c ---end content zerodec---


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/primitiv_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/primitiv_lib.doc INSTEAD
@c library version: (1.15,2001/02/05)
@c library file: ../Singular/LIB/primitiv.lib
@cindex primitiv.lib
@cindex primitiv_lib
@table @asis
@item @strong{Library:}
primitiv.lib
@item @strong{Purpose:}
    Computing a Primitive Element
@item @strong{Author:}
Martin Lamm, email: lamm@@mathematik.uni-kl.de

@end table

@strong{Procedures:}
@menu
* primitive:: find minimal polynomial for a primitive element
* primitive_extra:: find primitive element for two generators
* splitring:: define ring extension with name R and switch to it
@end menu
@c ---end content LibInfo---

@c ------------------- primitive -------------
@node primitive, primitive_extra,, primitiv_lib
@subsubsection primitive
@cindex primitive
@c ---content primitive---
Procedure from library @code{primitiv.lib} (@pxref{primitiv_lib}).

@table @asis
@item @strong{Usage:}
primitive(i); i ideal

@item @strong{Assume:}
i is given by generators m[1],...,m[n] such that for j=1,...,n @*
- m[j] is a polynomial in k[x(1),...,x(j)] @*
- m[j](a[1],...,a[j-1],x(j)) is the minimal polynomial for a[j] over
k(a[1],...,a[j-1]) @*
(k the ground field of the current basering and x(1),...,x(n)
the ring variables).

@item @strong{Return:}
ideal j in k[x(n)] with
@*- j[1] a minimal polynomial for a primitive element b of
k(a[1],...,a[n]) over k,
@*- j[2],...,j[n+1] polynomials in k[x(n)] such that j[i+1](b)=a[i]
for i=1,...,n.

@item @strong{Note:}
the number of variables in the basering has to be exactly n,
the number of given generators (i.e., minimal polynomials).@*
If the ground field k has only a few elements it may happen that no
linear combination of a[1],...,a[n] is a primitive element. In this
case @code{primitive(i)} returns the zero ideal, and one should use
@code{primitive_extra(i)} instead.

@cindex primitive element
@end table
@strong{Example:}
@smallexample
@c computed example primitive d2t_singular/primitiv_lib.doc:62
LIB "primitiv.lib";
ring exring=0,(x,y),dp;
ideal i=x2+1,y2-x;                  // compute Q(i,i^(1/2))=:L
ideal j=primitive(i);
j[1];                               // L=Q(a) with a=(-1)^(1/4)
@expansion{} y4+1
j[2];                               // i=a^2
@expansion{} y2
j[3];                               // i^(1/2)=a
@expansion{} y
// the 2nd element was already primitive!
j=primitive(ideal(x2-2,y2-3));      // compute Q(sqrt(2),sqrt(3))
j[1];
@expansion{} y4-10y2+1
j[2];
@expansion{} 1/2y3-9/2y
j[3];
@expansion{} -1/2y3+11/2y
// no element was primitive -- the calculation of primitive elements
// is based on a random choice.
@c end example primitive d2t_singular/primitiv_lib.doc:62
@end smallexample
@c inserted refs from d2t_singular/primitiv_lib.doc:79
@ifinfo
@menu
See also:
* primitive_extra::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{primitive_extra}.
@end iftex
@c end inserted refs from d2t_singular/primitiv_lib.doc:79

@c ---end content primitive---

@c ------------------- primitive_extra -------------
@node primitive_extra, splitring, primitive, primitiv_lib
@subsubsection primitive_extra
@cindex primitive_extra
@c ---content primitive_extra---
Procedure from library @code{primitiv.lib} (@pxref{primitiv_lib}).

@table @asis
@item @strong{Usage:}
primitive_extra(i); i ideal

@item @strong{Assume:}
The ground field of the basering is k=Q or k=Z/pZ and the ideal
i is given by 2 generators f,g with the following properties:
@format
   f is the minimal polynomial of a in k[x],
   g is a polynomial in k[x,y] s.th. g(a,y) is the minpoly of b in k(a)[y].
@end format
Here, x is the name of the first ring variable, y the name of the
second.

@item @strong{Return:}
ideal j in k[y] such that
@format
   j[1] is the minimal polynomial for a primitive element c of k(a,b) over k,
   j[2] is a polynomial s.th. j[2](c)=a.
@end format

@item @strong{Note:}
While @code{primitive(i)} may fail for finite fields,
@code{primitive_extra(i)} tries all elements of k(a,b) and, hence,
always finds a primitive element. @*
In order to do this (try all elements), field extensions like Z/pZ(a)
are not allowed for the ground field k. @*
@code{primitive_extra(i)} assumes that the second generator, g, is
monic as polynomial in (k[x])[y].

@end table
@strong{Example:}
@smallexample
@c computed example primitive_extra d2t_singular/primitiv_lib.doc:125
LIB "primitiv.lib";
ring exring=3,(x,y),dp;
ideal i=x2+1,y3+y2-1;
primitive_extra(i);
@expansion{} _[1]=y6-y5+y4-y3-y-1
@expansion{} _[2]=y5+y4+y2+y+1
ring extension=(3,y),x,dp;
minpoly=y6-y5+y4-y3-y-1;
number a=y5+y4+y2+y+1;
a^2;
@expansion{} -1
factorize(x2+1);
@expansion{} [1]:
@expansion{}    _[1]=1
@expansion{}    _[2]=x+(-y5-y4-y2-y-1)
@expansion{}    _[3]=x+(y5+y4+y2+y+1)
@expansion{} [2]:
@expansion{}    1,1,1
factorize(x3+x2-1);
@expansion{} [1]:
@expansion{}    _[1]=1
@expansion{}    _[2]=x+(-y5-y4-y3-y2-y-1)
@expansion{}    _[3]=x+(y5+y4+y2+1)
@expansion{}    _[4]=x+(y3+y+1)
@expansion{} [2]:
@expansion{}    1,1,1,1
@c end example primitive_extra d2t_singular/primitiv_lib.doc:125
@end smallexample
@c ---end content primitive_extra---

@c ------------------- splitring -------------
@node splitring,, primitive_extra, primitiv_lib
@subsubsection splitring
@cindex splitring
@c ---content splitring---
Procedure from library @code{primitiv.lib} (@pxref{primitiv_lib}).

@table @asis
@item @strong{Usage:}
splitring(f,R[,L]); f poly, R string, L list of polys and/or ideals
(optional)

@item @strong{Assume:}
f is univariate and irreducible over the active basering. @*
The active ring must allow an algebraic extension (e.g., it cannot
be a transcendent ring extension of Q or Z/p).

@item @strong{Create:}
a ring with name R, in which f is reducible, and CHANGE to it.

@item @strong{Return:}
list L mapped into the new ring R, if L is given; else nothing

@item @strong{Note:}
If the old ring has no parameter, the name @code{a} is chosen for the
parameter of R (if @code{a} is no ring variable; if it is, @code{b} is
chosen, etc.; if @code{a,b,c,o} are ring variables,
@code{splitring(f,R[,L])} produces an error message), otherwise the
name of the parameter is kept and only the minimal polynomial is
changed. @*
The names of the ring variables and the orderings are not affected. @*
It is also allowed to call @code{splitring} with R="".
Then the old basering will be REPLACED by the new ring (with the
same name as the old ring).

@cindex algebraic field extension
@cindex extension of rings
@end table
@strong{Example:}
@smallexample
@c computed example splitring d2t_singular/primitiv_lib.doc:180
LIB "primitiv.lib";
ring r=0,(x,y),dp;
splitring(x2-2,"r1");   // change to Q(sqrt(2))
// change to Q(sqrt(2),sqrt(sqrt(2)))=Q(a) and return the transformed
// old parameter:
splitring(x2-a,"r2",a);
@expansion{} // new minimal polynomial: a4-2
@expansion{} [1]:
@expansion{}    (a2)
// the result is (a)^2 = (sqrt(sqrt(2)))^2
nameof(basering);
@expansion{} r2
r2;
@expansion{} //   characteristic : 0
@expansion{} //   1 parameter    : a
@expansion{} //   minpoly        : (a4-2)
@expansion{} //   number of vars : 2
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x y
@expansion{} //        block   2 : ordering C
kill r1; kill r2;
@c end example splitring d2t_singular/primitiv_lib.doc:180
@end smallexample
@c ---end content splitring---

repo_name: mthl/texinfo

license: mit


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/qhmoduli_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/qhmoduli_lib.doc INSTEAD
@c library version: (1.0,2000/12/12)
@c library file: ../Singular/LIB/qhmoduli.lib
@cindex qhmoduli.lib
@cindex qhmoduli_lib
@table @asis
@item @strong{Library:}
qhmoduli.lib
@item @strong{Purpose:}
    Moduli Spaces of Semi-Quasihomogeneous Singularities
@item @strong{Author:}
Thomas Bayer, email: bayert@@in.tum.de

@end table

@strong{Procedures:}
@menu
* ArnoldAction:: Induced action of G_f on T_.
* ModEqn:: Equations of the moduli space for principal part f
* QuotientEquations:: Equations of Variety(I)/G w.r.t. action 'A'
* StabEqn:: Equations of the stabilizer of f.
* StabEqnId:: Equations of the stabilizer of the qhom. ideal I.
* StabOrder:: Order of the stabilizer of f.
* UpperMonomials:: Upper basis of the Milnor algebra of f.
* Max:: maximal integer contained in 'data'
* Min:: minimal integer contained in 'data'
* Table:: list, i-th entry is cmd(i), lb <= i <= ub
@end menu
@c ---end content LibInfo---

@c ------------------- ArnoldAction -------------
@node ArnoldAction, ModEqn,, qhmoduli_lib
@subsubsection ArnoldAction
@cindex ArnoldAction
@c ---content ArnoldAction---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
ArnoldAction(f, [Gf, B]); poly f; list Gf, B;
@*'Gf' is a list of two rings (coming from 'StabEqn')

@item @strong{Purpose:}
compute the induced action of the stabilizer G of f on T_, where
T_ is given by the upper monomials B of the Milnor algebra of f.

@item @strong{Assume:}
f is quasihomogeneous

@item @strong{Return:}
polynomial ring over the same ground field, containing the ideals
'actionid' and 'stabid'.
@*- 'actionid' is the ideal defining the induced action of Gf on T_ @*
- 'stabid' is the ideal of the stabilizer Gf in the new ring

@end table
@strong{Example:}
@smallexample
@c computed example ArnoldAction d2t_singular/qhmoduli_lib.doc:59
LIB "qhmoduli.lib";
ring B   = 0,(x,y,z), ls;
poly f = -z5+y5+x2z+x2y;
def R = ArnoldAction(f);
setring R;
actionid;
@expansion{} actionid[1]=-s(2)*t(1)+s(3)*t(1)
@expansion{} actionid[2]=-s(2)^2*t(2)+2*s(2)^2*t(3)^2+s(3)^2*t(2)
@expansion{} actionid[3]=s(2)*t(3)+s(3)*t(3)
stabid;
@expansion{} stabid[1]=s(2)*s(3)
@expansion{} stabid[2]=s(1)^2*s(2)+s(1)^2*s(3)-1
@expansion{} stabid[3]=s(1)^2*s(3)^2-s(3)
@expansion{} stabid[4]=s(1)^2+s(2)^4-s(3)^4
@expansion{} stabid[5]=s(1)^4+s(2)^3-s(3)^3
@expansion{} stabid[6]=-s(1)^2*s(3)+s(3)^5
@c end example ArnoldAction d2t_singular/qhmoduli_lib.doc:59
@end smallexample
@c ---end content ArnoldAction---

@c ------------------- ModEqn -------------
@node ModEqn, QuotientEquations, ArnoldAction, qhmoduli_lib
@subsubsection ModEqn
@cindex ModEqn
@c ---content ModEqn---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
ModEqn(f [, opt]); poly f; int opt;

@item @strong{Purpose:}
compute equations of the moduli space of semiquasihomogeneous hypersurface singularity with principal part f w.r.t. right equivalence

@item @strong{Assume:}
f quasihomogeneous polynomial with an isolated singularity at 0

@item @strong{Return:}
polynomial ring, possibly a simple extension of the ground field of
the basering, containing the ideal 'modid'
@*- 'modid' is the ideal of the moduli space if opt is even (> 0).
otherwise it contains generators of the coordinate ring R of the
moduli space (note : Spec(R) is the moduli space)

@item @strong{Options:}
1 compute equations of the mod. space,
@*2 use a primary decomposition
@*4 compute E_f0, i.e., the image of G_f0
@*To combine options, add their value, default: opt =7

@end table
@strong{Example:}
@smallexample
@c computed example ModEqn d2t_singular/qhmoduli_lib.doc:104
LIB "qhmoduli.lib";
ring B   = 0,(x,y), ls;
poly f = -x4 + xy5;
def R = ModEqn(f);
setring R;
modid;
@expansion{} modid[1]=Y(5)^2-Y(4)*Y(6)
@expansion{} modid[2]=Y(4)*Y(5)-Y(3)*Y(6)
@expansion{} modid[3]=Y(3)*Y(5)-Y(2)*Y(6)
@expansion{} modid[4]=Y(2)*Y(5)-Y(1)*Y(6)
@expansion{} modid[5]=Y(4)^2-Y(2)*Y(6)
@expansion{} modid[6]=Y(3)*Y(4)-Y(1)*Y(6)
@expansion{} modid[7]=Y(2)*Y(4)-Y(1)*Y(5)
@expansion{} modid[8]=Y(3)^2-Y(1)*Y(5)
@expansion{} modid[9]=Y(2)*Y(3)-Y(1)*Y(4)
@expansion{} modid[10]=Y(2)^2-Y(1)*Y(3)
@c end example ModEqn d2t_singular/qhmoduli_lib.doc:104
@end smallexample
@c ---end content ModEqn---

@c ------------------- QuotientEquations -------------
@node QuotientEquations, StabEqn, ModEqn, qhmoduli_lib
@subsubsection QuotientEquations
@cindex QuotientEquations
@c ---content QuotientEquations---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
QuotientEquations(G,action,emb [, opt]); ideal G,action,emb;int opt

@item @strong{Purpose:}
compute the quotient of the variety given by the parameterization
'emb' by the linear action 'action' of the algebraic group G.

@item @strong{Assume:}
'action' is linear, G must be finite if the Reynolds operator is
needed (i.e., NullCone(G,action) returns some non-invariant polys)

@item @strong{Return:}
polynomial ring over a simple extension of the ground field of the
basering, containing the ideals 'id' and 'embedid'.
@*- 'id' contains the equations of the quotient, if opt = 1;
if opt = 0, 2, 'id' contains generators of the coordinate ring R
of the quotient (Spec(R) is the quotient)
@*- 'embedid' = 0, if opt = 1;
@*if opt = 0, 2, it is the ideal defining the equivariant embedding

@item @strong{Options:}
1 compute equations of the quotient,
@*2 use a primary decomposition when computing the Reynolds operator @*
To combine options, add their value, default: opt =3.

@end table
@c ---end content QuotientEquations---

@c ------------------- StabEqn -------------
@node StabEqn, StabEqnId, QuotientEquations, qhmoduli_lib
@subsubsection StabEqn
@cindex StabEqn
@c ---content StabEqn---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
StabEqn(f); f polynomial

@item @strong{Purpose:}
compute the equations of the isometry group of f.

@item @strong{Assume:}
f semiquasihomogeneous polynomial with an isolated singularity at 0

@item @strong{Return:}
list of two ring 'S1', 'S2'
@*- 'S1' contains the equations of the stabilizer (ideal 'stabid') @*
- 'S2' contains the action of the stabilizer (ideal 'actionid')

@item @strong{Global:}
varSubsList, contains the index j s.t. x(i) -> x(i)t(j) ...

@end table
@strong{Example:}
@smallexample
@c computed example StabEqn d2t_singular/qhmoduli_lib.doc:179
LIB "qhmoduli.lib";
ring B = 0,(x,y,z), ls;
poly f = -z5+y5+x2z+x2y;
list stab = StabEqn(f);
def S1 = stab[1]; setring S1;  stabid;
@expansion{} stabid[1]=s(2)*s(3)
@expansion{} stabid[2]=s(1)^2*s(2)+s(1)^2*s(3)-1
@expansion{} stabid[3]=s(1)^2*s(3)^2-s(3)
@expansion{} stabid[4]=s(2)^4-s(3)^4+s(1)^2
@expansion{} stabid[5]=s(1)^4+s(2)^3-s(3)^3
@expansion{} stabid[6]=s(3)^5-s(1)^2*s(3)
def S2 = stab[2]; setring S2;  actionid;
@expansion{} actionid[1]=s(1)*x
@expansion{} actionid[2]=s(3)*y+s(2)*z
@expansion{} actionid[3]=s(2)*y+s(3)*z
@c end example StabEqn d2t_singular/qhmoduli_lib.doc:179
@end smallexample
@c ---end content StabEqn---

@c ------------------- StabEqnId -------------
@node StabEqnId, StabOrder, StabEqn, qhmoduli_lib
@subsubsection StabEqnId
@cindex StabEqnId
@c ---content StabEqnId---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
StabEqn(I, w); I ideal, w intvec

@item @strong{Purpose:}
compute the equations of the isometry group of the ideal I
each generator of I is fixed by the stabilizer.

@item @strong{Assume:}
I semiquasihomogeneous ideal wrt 'w' with an isolated singularity at 0

@item @strong{Return:}
list of two ring 'S1', 'S2'
@*- 'S1' contains the equations of the stabilizer (ideal 'stabid') @*
- 'S2' contains the action of the stabilizer (ideal 'actionid')

@item @strong{Global:}
varSubsList, contains the index j s.t. t(i) -> t(i)t(j) ...

@end table
@strong{Example:}
@smallexample
@c computed example StabEqnId d2t_singular/qhmoduli_lib.doc:219
LIB "qhmoduli.lib";
ring B   = 0,(x,y,z), ls;
ideal I = x2,y3,z6;
intvec w = 3,2,1;
list stab = StabEqnId(I, w);
@expansion{} // ** redefining d **
@expansion{} // ** redefining newcoMx **
@expansion{} // ** redefining coMx **
@expansion{} // ** redefining d **
@expansion{} // ** redefining newcoMx **
@expansion{} // ** redefining coMx **
def S1 = stab[1]; setring S1;  stabid;
@expansion{} stabid[1]=s(1)^2-1
@expansion{} stabid[2]=s(2)^3-1
@expansion{} stabid[3]=s(3)^6-1
def S2 = stab[2]; setring S2;  actionid;
@expansion{} actionid[1]=s(1)*x
@expansion{} actionid[2]=s(2)*y
@expansion{} actionid[3]=s(3)*z
@c end example StabEqnId d2t_singular/qhmoduli_lib.doc:219
@end smallexample
@c ---end content StabEqnId---

@c ------------------- StabOrder -------------
@node StabOrder, UpperMonomials, StabEqnId, qhmoduli_lib
@subsubsection StabOrder
@cindex StabOrder
@c ---content StabOrder---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
StabOrder(f); poly f;

@item @strong{Purpose:}
compute the order of the stabilizer group of f.

@item @strong{Assume:}
f quasihomogeneous polynomial with an isolated singularity at 0

@item @strong{Return:}
int

@item @strong{Global:}
varSubsList

@end table
@c ---end content StabOrder---

@c ------------------- UpperMonomials -------------
@node UpperMonomials, Max, StabOrder, qhmoduli_lib
@subsubsection UpperMonomials
@cindex UpperMonomials
@c ---content UpperMonomials---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
UpperMonomials(poly f, [intvec w])

@item @strong{Purpose:}
compute the upper monomials of the milnor algebra of f.

@item @strong{Assume:}
f is quasihomogeneous (w.r.t. w)

@item @strong{Return:}
ideal

@end table
@strong{Example:}
@smallexample
@c computed example UpperMonomials d2t_singular/qhmoduli_lib.doc:280
LIB "qhmoduli.lib";
ring B   = 0,(x,y,z), ls;
poly f = -z5+y5+x2z+x2y;
UpperMonomials(f);
@expansion{} _[1]=y3z3
@expansion{} _[2]=x2y3
@expansion{} _[3]=x2y2
@c end example UpperMonomials d2t_singular/qhmoduli_lib.doc:280
@end smallexample
@c ---end content UpperMonomials---

@c ------------------- Max -------------
@node Max, Min, UpperMonomials, qhmoduli_lib
@subsubsection Max
@cindex Max
@c ---content Max---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
Max(data); intvec/list of integers data

@item @strong{Purpose:}
find the maximal integer contained in 'data'

@item @strong{Return:}
list

@item @strong{Assume:}
'data' contains only integers and is not empty

@end table
@c ---end content Max---

@c ------------------- Min -------------
@node Min, Table, Max, qhmoduli_lib
@subsubsection Min
@cindex Min
@c ---content Min---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
Min(data); intvec/list of integers data

@item @strong{Purpose:}
find the minimal integer contained in 'data'

@item @strong{Return:}
list

@item @strong{Assume:}
'data' contains only integers and is not empty

@end table
@c ---end content Min---

@c ------------------- Table -------------
@node Table,, Min, qhmoduli_lib
@subsubsection Table
@cindex Table
@c ---content Table---
Procedure from library @code{qhmoduli.lib} (@pxref{qhmoduli_lib}).

@table @asis
@item @strong{Usage:}
Table(cmd,i, lb, ub); string cmd, i; int lb, ub

@item @strong{Purpose:}
generate a list of size ub - lb + 1 s.t. _[i] = cmd(i)

@item @strong{Return:}
list

@end table
@c ---end content Table---


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/random_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/random_lib.doc INSTEAD
@c library version: (1.16.2.1,2002/02/20)
@c library file: ../Singular/LIB/random.lib
@cindex random.lib
@cindex random_lib
@table @asis
@item @strong{Library:}
random.lib
@item @strong{Purpose:}
    Creating Random and Sparse Matrices, Ideals, Polys

@end table

@strong{Procedures:}
@menu
* genericid:: generic sparse linear combinations of generators of i
* randomid:: random linear combinations of generators of id
* randommat:: nxm matrix of random linear combinations of id
* sparseid:: ideal of k random sparse poly's of degree d [u<=d<=o]
* sparsematrix:: nxm sparse matrix of polynomials of degree<=o
* sparsemat:: nxm sparse integer matrix with random coefficients
* sparsepoly:: random sparse polynomial with terms of degree in [u,o]
* sparsetriag:: nxm sparse lower-triag intmat with random coefficients
* triagmatrix:: nxm sparse lower-triag matrix of poly's of degree<=o
* randomLast:: random transformation of the last variable
* randomBinomial:: binomial ideal, k random generators of degree >=u
@end menu
@c ---end content LibInfo---

@c ------------------- genericid -------------
@node genericid, randomid,, random_lib
@subsubsection genericid
@cindex genericid
@c ---content genericid---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
genericid(id,[,p,b]); id ideal/module, k,p,b integers

@item @strong{Return:}
system of generators of id which are generic, sparse, triagonal linear
combinations of given generators with coefficients in [1,b] and
sparseness p percent, bigger p being sparser (default: p=75, b=30000)

@item @strong{Note:}
For performance reasons try small bound b in characteristic 0

@end table
@strong{Example:}
@smallexample
@c computed example genericid d2t_singular/random_lib.doc:52
LIB "random.lib";
ring r=0,(t,x,y,z),ds;
ideal i= x3+y4,z4+yx,t+x+y+z;
genericid(i,0,10);
@expansion{} _[1]=3t+3x+3y+3z+2xy+x3+y4+2z4
@expansion{} _[2]=4t+4x+4y+4z+xy+z4
@expansion{} _[3]=t+x+y+z
module m=[x,0,0,0],[0,y2,0,0],[0,0,z3,0],[0,0,0,t4];
print(genericid(m));
@expansion{} x,      0,      0, 0,
@expansion{} 17904y2,y2,     0, 0,
@expansion{} 0,      24170z3,z3,0,
@expansion{} 0,      0,      0, t4
@c end example genericid d2t_singular/random_lib.doc:52
@end smallexample
@c ---end content genericid---

@c ------------------- randomid -------------
@node randomid, randommat, genericid, random_lib
@subsubsection randomid
@cindex randomid
@c ---content randomid---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
randomid(id,[k,b]); id ideal/module, b,k integers

@item @strong{Return:}
ideal/module having k generators which are random linear combinations
of generators of id with coefficients in the interval [-b,b]
(default: b=30000, k=size(id))

@item @strong{Note:}
For performance reasons try small bound b in characteristic 0

@end table
@strong{Example:}
@smallexample
@c computed example randomid d2t_singular/random_lib.doc:85
LIB "random.lib";
ring r=0,(x,y,z),dp;
randomid(maxideal(2),2,9);
@expansion{} _[1]=-5x2-9xy+6y2-8xz-8yz+4z2
@expansion{} _[2]=-9xy+2y2+xz+yz-z2
module m=[x,0,1],[0,y2,0],[y,0,z3];
show(randomid(m));
@expansion{} // module, 3 generator(s)
@expansion{} [1369x-11685y,-4481y2,-11685z3+1369]
@expansion{} [-642x-13756y,25342y2,-13756z3-642]
@expansion{} [2536x-6355y,8285y2,-6355z3+2536]
@c end example randomid d2t_singular/random_lib.doc:85
@end smallexample
@c ---end content randomid---

@c ------------------- randommat -------------
@node randommat, sparseid, randomid, random_lib
@subsubsection randommat
@cindex randommat
@c ---content randommat---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
randommat(n,m[,id,b]); n,m,b integers, id ideal

@item @strong{Return:}
nxm matrix, entries are random linear combinations of elements
of id and coefficients in [-b,b]
@*[default: (id,b) = (maxideal(1),30000)]

@item @strong{Note:}
For performance reasons try small bound b in char 0

@end table
@strong{Example:}
@smallexample
@c computed example randommat d2t_singular/random_lib.doc:117
LIB "random.lib";
ring r=0,(x,y,z),dp;
matrix A=randommat(3,3,maxideal(2),9);
print(A);
@expansion{} 9x2-2xy-8y2-9xz+yz+4z2, 9x2-4xy+y2-5xz+6yz-z2,   8x2+xy-9y2+2yz-8z2,
@expansion{} -x2+5xy-8y2-7xz+4yz-3z2,x2+xy-4y2-xz+5z2,        5x2-8xy+8y2+6xz+yz+7z2,
@expansion{} 4x2-5xy-6y2-4yz-5z2,    -4x2-6xy-4y2-8xz+3yz+5z2,2x2+3xy+y2+4xz-3yz+2z2
A=randommat(2,3);
print(A);
@expansion{} 15276x+9897y+7526z,  6495x-24178y+11295z,-5745x-14754y+15979z,
@expansion{} 20788x-28366y-20283z,24911x-10978y+3341z,12412x+11216y+15344z
@c end example randommat d2t_singular/random_lib.doc:117
@end smallexample
@c ---end content randommat---

@c ------------------- sparseid -------------
@node sparseid, sparsematrix, randommat, random_lib
@subsubsection sparseid
@cindex sparseid
@c ---content sparseid---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
sparseid(k,u[,o,p,b]); k,u,o,p,b integers

@item @strong{Return:}
ideal having k generators, each of degree d, u<=d<=o, p percent of
terms in degree d are 0, the remaining have random coefficients
in the interval [1,b], (default: o=u=d, p=75, b=30000)

@end table
@strong{Example:}
@smallexample
@c computed example sparseid d2t_singular/random_lib.doc:147
LIB "random.lib";
ring r = 0,(a,b,c,d),ds;
sparseid(2,3);"";
@expansion{} _[1]=12773a3+24263a2c+20030abc+17904b2c+26359c3
@expansion{} _[2]=24004a3+6204b2c+24170bc2+19505c2d+21962bd2
@expansion{}
sparseid(3,0,4,90,9);
@expansion{} _[1]=1+4a2+8b2c+3c3+4a3b+4a2b2+5abc2+3ac3
@expansion{} _[2]=a+a2+7ab2+6a2c+3c3+5a3b+9ab3+2c4+3c3d+8ad3
@expansion{} _[3]=5a+ab+2ac2+2b3c+8abcd
@c end example sparseid d2t_singular/random_lib.doc:147
@end smallexample
@c ---end content sparseid---

@c ------------------- sparsematrix -------------
@node sparsematrix, sparsemat, sparseid, random_lib
@subsubsection sparsematrix
@cindex sparsematrix
@c ---content sparsematrix---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
sparsematrix(n,m,o[,u,pe,pp,b]); n,m,o,u,pe,pp,b integers

@item @strong{Return:}
nxm matrix, about pe percent of the entries are 0, the remaining
are random polynomials of degree d, u<=d<=o, with pp percent of
the terms being 0, the remaining have random coefficients
in the interval [1,b] [default: (pe,u,pp,b) = (0,50,75,100)]

@end table
@strong{Example:}
@smallexample
@c computed example sparsematrix d2t_singular/random_lib.doc:176
LIB "random.lib";
ring r = 0,(a,b,c,d),dp;
// sparse matrix of sparse polys of degree <=2:
print(sparsematrix(3,4,2));"";
@expansion{} 14ab+20bc+79cd+30b,    32a2+97bc+5b,      0,             0,
@expansion{} 0,                     0,                 6c2+16b+64c+76,0,
@expansion{} 17a2+30ab+94bc+19b+45d,88a2+44bc+13d2+31a,59ac,          0
@expansion{}
// dense matrix of sparse linear forms:
print(sparsematrix(3,3,1,1,0,55,9));
@expansion{} 9b+7c+8d,9b+9d,5a,
@expansion{} 7c+d,    a+6b, 2b+2d,
@expansion{} 9a+5b+9c,2a+9d,2d
@c end example sparsematrix d2t_singular/random_lib.doc:176
@end smallexample
@c ---end content sparsematrix---

@c ------------------- sparsemat -------------
@node sparsemat, sparsepoly, sparsematrix, random_lib
@subsubsection sparsemat
@cindex sparsemat
@c ---content sparsemat---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
sparsemat(n,m[,p,b]); n,m,p,b integers

@item @strong{Return:}
nxm integer matrix, p percent of the entries are 0, the remaining
are random coefficients >=1 and <= b; [defaults: (p,b) = (75,1)]

@end table
@strong{Example:}
@smallexample
@c computed example sparsemat d2t_singular/random_lib.doc:205
LIB "random.lib";
sparsemat(5,5);"";
@expansion{} 0,0,0,0,0,
@expansion{} 0,1,0,0,1,
@expansion{} 0,0,0,1,0,
@expansion{} 0,1,0,0,0,
@expansion{} 0,1,0,1,1
@expansion{}
sparsemat(5,5,95);"";
@expansion{} 1,0,0,0,0,
@expansion{} 0,0,0,0,0,
@expansion{} 0,0,0,0,0,
@expansion{} 0,0,0,0,0,
@expansion{} 0,0,0,1,0
@expansion{}
sparsemat(5,5,5);"";
@expansion{} 1,1,1,1,1,
@expansion{} 1,1,1,1,1,
@expansion{} 1,1,1,1,1,
@expansion{} 1,0,1,1,1,
@expansion{} 1,1,1,1,0
@expansion{}
sparsemat(5,5,50,100);
@expansion{} 0,17,24,80,0,
@expansion{} 0,13,30,45,0,
@expansion{} 19,0,0,0,0,
@expansion{} 93,0,23,0,69,
@expansion{} 0,88,44,31,0
@c end example sparsemat d2t_singular/random_lib.doc:205
@end smallexample
@c ---end content sparsemat---

@c ------------------- sparsepoly -------------
@node sparsepoly, sparsetriag, sparsemat, random_lib
@subsubsection sparsepoly
@cindex sparsepoly
@c ---content sparsepoly---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
sparsepoly(u[,o,p,b]); u,o,p,b integers

@item @strong{Return:}
poly having only terms in degree d, u<=d<=o, p percent of the terms
in degree d are 0, the remaining have random coefficients in [1,b),
(defaults: o=u=d, p=75, b=30000)

@end table
@strong{Example:}
@smallexample
@c computed example sparsepoly d2t_singular/random_lib.doc:234
LIB "random.lib";
ring r=0,(x,y,z),dp;
sparsepoly(5);"";
@expansion{} 24263xy4+24170x4z+21962x3yz+26642xy3z+5664xy2z2+17904xz4
@expansion{}
sparsepoly(3,5,90,9);
@expansion{} 8x3z2+2y3z2+3xyz3+2xy3+yz3+xy2
@c end example sparsepoly d2t_singular/random_lib.doc:234
@end smallexample
@c ---end content sparsepoly---

@c ------------------- sparsetriag -------------
@node sparsetriag, triagmatrix, sparsepoly, random_lib
@subsubsection sparsetriag
@cindex sparsetriag
@c ---content sparsetriag---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
sparsetriag(n,m[,p,b]); n,m,p,b integers

@item @strong{Return:}
nxm lower triagonal integer matrix, diagonal entries equal to 1, about
p percent of lower diagonal entries are 0, the remaining are random
integers >=1 and <= b; [defaults: (p,b) = (75,1)]

@end table
@strong{Example:}
@smallexample
@c computed example sparsetriag d2t_singular/random_lib.doc:262
LIB "random.lib";
sparsetriag(5,7);"";
@expansion{} 1,0,0,0,0,0,0,
@expansion{} 0,1,0,0,0,0,0,
@expansion{} 0,1,1,0,0,0,0,
@expansion{} 0,0,0,1,0,0,0,
@expansion{} 1,1,0,0,1,0,0
@expansion{}
sparsetriag(7,5,90);"";
@expansion{} 1,0,0,0,0,
@expansion{} 0,1,0,0,0,
@expansion{} 0,1,1,0,0,
@expansion{} 0,0,0,1,0,
@expansion{} 0,0,0,0,1,
@expansion{} 0,0,0,1,0,
@expansion{} 0,1,0,0,0
@expansion{}
sparsetriag(5,5,0);"";
@expansion{} 1,0,0,0,0,
@expansion{} 1,1,0,0,0,
@expansion{} 1,1,1,0,0,
@expansion{} 1,1,1,1,0,
@expansion{} 1,1,1,1,1
@expansion{}
sparsetriag(5,5,50,100);
@expansion{} 1,0,0,0,0,
@expansion{} 73,1,0,0,0,
@expansion{} 0,79,1,0,0,
@expansion{} 14,0,0,1,0,
@expansion{} 0,48,23,0,1
@c end example sparsetriag d2t_singular/random_lib.doc:262
@end smallexample
@c ---end content sparsetriag---

@c ------------------- triagmatrix -------------
@node triagmatrix, randomLast, sparsetriag, random_lib
@subsubsection triagmatrix
@cindex triagmatrix
@c ---content triagmatrix---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
triagmatrix(n,m,o[,u,pe,pp,b]); n,m,o,u,pe,pp,b integers

@item @strong{Return:}
nxm lower triagonal matrix, diagonal entries equal to 1, about
p percent of lower diagonal entries are 0, the remaining
are random polynomials of degree d, u<=d<=o, with pp percent of
the terms being 0, the remaining have random coefficients
in the interval [1,b] [default: (pe,u,pp,b) = (0,50,75,100)]

@end table
@strong{Example:}
@smallexample
@c computed example triagmatrix d2t_singular/random_lib.doc:293
LIB "random.lib";
ring r = 0,(a,b,c,d),dp;
// sparse triagonal matrix of sparse polys of degree <=2:
print(triagmatrix(3,4,2));"";
@expansion{} 1,                                 0,0,0,
@expansion{} 52ac+54cd+14c,                     1,0,0,
@expansion{} 17a2+19b2+45ac+94bc+50b+87c+54d+21,0,1,0
@expansion{}
// dense triagonal matrix of sparse linear forms:
print(triagmatrix(3,3,1,1,0,55,9));
@expansion{} 1,       0,    0,
@expansion{} 7a+8d,   1,    0,
@expansion{} 9b+7c+4d,7b+9d,1
@c end example triagmatrix d2t_singular/random_lib.doc:293
@end smallexample
@c ---end content triagmatrix---

@c ------------------- randomLast -------------
@node randomLast, randomBinomial, triagmatrix, random_lib
@subsubsection randomLast
@cindex randomLast
@c ---content randomLast---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
randomLast(b); b int

@item @strong{Return:}
ideal = maxideal(1), but the last variable is exchanged by a random
linear combination of all variables, with coefficients in the
interval [-b,b].

@end table
@strong{Example:}
@smallexample
@c computed example randomLast d2t_singular/random_lib.doc:323
LIB "random.lib";
ring  r = 0,(x,y,z),lp;
ideal i = randomLast(10);
i;
@expansion{} i[1]=x
@expansion{} i[2]=y
@expansion{} i[3]=-x+z
@c end example randomLast d2t_singular/random_lib.doc:323
@end smallexample
@c ---end content randomLast---

@c ------------------- randomBinomial -------------
@node randomBinomial,, randomLast, random_lib
@subsubsection randomBinomial
@cindex randomBinomial
@c ---content randomBinomial---
Procedure from library @code{random.lib} (@pxref{random_lib}).

@table @asis
@item @strong{Usage:}
randomBinomial(k,u[,o,b]); k,u,o,b integers

@item @strong{Return:}
binomial ideal, k homogeneous generators of degree d, u<=d<=o, with
randomly chosen monomials and coefficients in the interval [-b,b]
(default: u=o, b=10).

@end table
@strong{Example:}
@smallexample
@c computed example randomBinomial d2t_singular/random_lib.doc:351
LIB "random.lib";
ring  r = 0,(x,y,z),lp;
ideal i = randomBinomial(4,5,6);
i;
@expansion{} i[1]=-x4z-xz4
@expansion{} i[2]=8x2y3+8xy3z
@expansion{} i[3]=-4x2y2z2-4xy5
@expansion{} i[4]=5x3yz2+5xz5
@c end example randomBinomial d2t_singular/random_lib.doc:351
@end smallexample
@c ---end content randomBinomial---


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/reesclos_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/reesclos_lib.doc INSTEAD
@c library version: (1.50,2001/08/06)
@c library file: ../Singular/LIB/reesclos.lib
@cindex reesclos.lib
@cindex reesclos_lib
@table @asis
@item @strong{Library:}
reesclos.lib
@item @strong{Purpose:}
     procedures to compute the int. closure of an ideal
@item @strong{Author:}
Tobias Hirsch, email: hirsch@@math.tu-cottbus.de

@item @strong{Overview:}
A library to compute the integral closure of an ideal I in a polynomial ring
R=K[x(1),...,x(n)] using the Rees Algebra R[It] of I. It computes the integral
closure of R[It] (in the same manner as done in the library 'normal.lib'),
which is a graded subalgebra of R[t]. The degree-k-component is the integral
closure of the k-th power of I.
@*These procedures can also be used to compute the integral closure R^ of an
integral domain R=k[x(1),...,x(n)]/ker, ker a prime ideal, in its quotient
field K=Q(R), as an affine ring R^=k[T(1),...,T(s)]]/J and to get
representations of elements of R^ as fractions of elements of R.

@end table

@strong{Procedures:}
@menu
* ReesAlgebra:: computes the Rees Algebra of an ideal I
* normalI:: computes the integral closure of an ideal I using R[It]
* primeClosure:: computes the integral closure of the int. domain R
* closureRingtower:: defines the rings in the list L as global objects R(i)
* closureFrac:: computes fractions representing elements of R^=L[n]
@end menu
@c ---end content LibInfo---

@c ------------------- ReesAlgebra -------------
@node ReesAlgebra, normalI,, reesclos_lib
@subsubsection ReesAlgebra
@cindex ReesAlgebra
@c ---content ReesAlgebra---
Procedure from library @code{reesclos.lib} (@pxref{reesclos_lib}).

@table @asis
@item @strong{Usage:}
ReesAlgebra (I); I = ideal

@item @strong{Return:}
The Rees algebra R[It] as an affine ring, where I is an ideal in R.
The procedure returns a list containing two rings:
@*[1]: a ring, say RR; in the ring an ideal ker such that R[It]=RR/ker

[2]: a ring, say Kxt; the basering with additional variable t
containing an ideal mapI that defines the map RR-->Kxt

@end table
@strong{Example:}
@smallexample
@c computed example ReesAlgebra d2t_singular/reesclos_lib.doc:59
LIB "reesclos.lib";
ring R = 0,(x,y),dp;
ideal I = x2,xy4,y5;
list L = ReesAlgebra(I);
def Rees = L[1];       // defines the ring Rees, containing the ideal ker
setring Rees;          // passes to the ring Rees
Rees;
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 5
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x y U(1) U(2) U(3)
@expansion{} //        block   2 : ordering C
ker;                   // R[It] is isomorphic to Rees/ker
@expansion{} ker[1]=y*U(2)-x*U(3)
@expansion{} ker[2]=y^3*U(1)*U(3)-U(2)^2
@expansion{} ker[3]=y^4*U(1)-x*U(2)
@expansion{} ker[4]=x*y^2*U(1)*U(3)^2-U(2)^3
@expansion{} ker[5]=x^2*y*U(1)*U(3)^3-U(2)^4
@expansion{} ker[6]=x^3*U(1)*U(3)^4-U(2)^5
@c end example ReesAlgebra d2t_singular/reesclos_lib.doc:59
@end smallexample
@c ---end content ReesAlgebra---

@c ------------------- normalI -------------
@node normalI, primeClosure, ReesAlgebra, reesclos_lib
@subsubsection normalI
@cindex normalI
@c ---content normalI---
Procedure from library @code{reesclos.lib} (@pxref{reesclos_lib}).

@table @asis
@item @strong{Usage:}
normalI(I [,p[,c]]); I an ideal, p and c optional integers

@item @strong{Return:}
the integral closure of I,...,I^p. If p is not given, or p==0,
compute the closure of all powers up to the maximum degree in t
occurring in the generators of the closure of R[It] (so this is the
last one that is not just the sum/product of the above ones).
c is transferred to the procedure primeClosure and toggles its
behavior in computing the integral closure of R[It].
@*The result is a list containing the closure of the desired powers of
I as ideals of the basering.

@end table
@strong{Example:}
@smallexample
@c computed example normalI d2t_singular/reesclos_lib.doc:96
LIB "reesclos.lib";
ring R=0,(x,y),dp;
ideal I = x2,xy4,y5;
list J = normalI(I);
I;
@expansion{} I[1]=x2
@expansion{} I[2]=xy4
@expansion{} I[3]=y5
J;                             // J[1] is the integral closure of I
@expansion{} [1]:
@expansion{}    _[1]=x2
@expansion{}    _[2]=y5
@expansion{}    _[3]=-xy3
@c end example normalI d2t_singular/reesclos_lib.doc:96
@end smallexample
@c ---end content normalI---

@c ------------------- primeClosure -------------
@node primeClosure, closureRingtower, normalI, reesclos_lib
@subsubsection primeClosure
@cindex primeClosure
@c ---content primeClosure---
Procedure from library @code{reesclos.lib} (@pxref{reesclos_lib}).

@table @asis
@item @strong{Usage:}
primeClosure(L [,c]); L a list of a ring containing a prime ideal
ker, c an optional integer

@item @strong{Return:}
a list L consisting of rings L[1],...,L[n] such that
@*- L[1] is a copy of (not a reference to!) the input ring L[1]
- all rings L[i] contain ideals ker, L[2],...,L[n] contain ideals phi
such that
@*L[1]/ker --> ... --> L[n]/ker
@*are injections given by the corresponding ideals phi, and L[n]/ker
is the integral closure of L[1]/ker in its quotient field.
- all rings L[i] contain a polynomial nzd such that elements of
L[i]/ker are quotients of elements of L[i-1]/ker with denominator
nzd via the injection phi.

@item @strong{Note:}
- L is constructed by recursive calls of primeClosure itself.
- c determines the choice of nzd:
@*- c not given or equal to 0: first generator of the ideal SL,
the singular locus of Spec(L[i]/ker)
@*- c<>0: the generator of SL with least number of monomials.

@end table
@strong{Example:}
@smallexample
@c computed example primeClosure d2t_singular/reesclos_lib.doc:141
LIB "reesclos.lib";
ring R=0,(x,y),dp;
ideal I=x4,y4;
def K=ReesAlgebra(I)[1];        // K contains ker such that K/ker=R[It]
list L=primeClosure(K);
def R(1)=L[1];                  // L[4] contains ker, L[4]/ker is the
def R(4)=L[4];                  // integral closure of L[1]/ker
setring R(1);
R(1);
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 4
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x y U(1) U(2)
@expansion{} //        block   2 : ordering C
ker;
@expansion{} ker[1]=y^4*U(1)-x^4*U(2)
setring R(4);
R(4);
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 7
@expansion{} //        block   1 : ordering a
@expansion{} //                  : names    T(1) T(2) T(3) T(4) T(5) T(6) T(7)
@expansion{} //                  : weights     1    1    1    1    1    1    1
@expansion{} //        block   2 : ordering dp
@expansion{} //                  : names    T(1) T(2) T(3) T(4) T(5) T(6) T(7)
@expansion{} //        block   3 : ordering C
ker;
@expansion{} ker[1]=T(2)*T(5)-T(1)*T(7)
@expansion{} ker[2]=T(1)*T(5)-T(2)*T(6)
@expansion{} ker[3]=T(5)*T(6)-T(3)*T(7)
@expansion{} ker[4]=T(4)*T(6)-T(5)*T(7)
@expansion{} ker[5]=T(5)^2-T(6)*T(7)
@expansion{} ker[6]=T(4)*T(5)-T(7)^2
@expansion{} ker[7]=T(3)*T(5)-T(6)^2
@expansion{} ker[8]=T(2)^2*T(6)-T(1)^2*T(7)
@expansion{} ker[9]=T(3)*T(4)-T(6)*T(7)
@expansion{} ker[10]=T(1)*T(4)-T(2)*T(7)
@expansion{} ker[11]=T(2)*T(3)-T(1)*T(6)
@expansion{} ker[12]=T(2)^2*T(6)^2-T(1)^2*T(6)*T(7)
@c end example primeClosure d2t_singular/reesclos_lib.doc:141
@end smallexample
@c ---end content primeClosure---

@c ------------------- closureRingtower -------------
@node closureRingtower, closureFrac, primeClosure, reesclos_lib
@subsubsection closureRingtower
@cindex closureRingtower
@c ---content closureRingtower---
Procedure from library @code{reesclos.lib} (@pxref{reesclos_lib}).

@table @asis
@item @strong{Usage:}
closureRingtower(list L); L a list of rings

@item @strong{Create:}
rings R(1),...,R(n) such that R(i)=L[i] for all i

@end table
@strong{Example:}
@smallexample
@c computed example closureRingtower d2t_singular/reesclos_lib.doc:176
LIB "reesclos.lib";
ring R=0,(x,y),dp;
ideal I=x4,y4;
list L=primeClosure(ReesAlgebra(I)[1]);
closureRingtower(L);
R(1);
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 4
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x y U(1) U(2)
@expansion{} //        block   2 : ordering C
R(4);
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 7
@expansion{} //        block   1 : ordering a
@expansion{} //                  : names    T(1) T(2) T(3) T(4) T(5) T(6) T(7)
@expansion{} //                  : weights     1    1    1    1    1    1    1
@expansion{} //        block   2 : ordering dp
@expansion{} //                  : names    T(1) T(2) T(3) T(4) T(5) T(6) T(7)
@expansion{} //        block   3 : ordering C
@c end example closureRingtower d2t_singular/reesclos_lib.doc:176
@end smallexample
@c ---end content closureRingtower---

@c ------------------- closureFrac -------------
@node closureFrac,, closureRingtower, reesclos_lib
@subsubsection closureFrac
@cindex closureFrac
@c ---content closureFrac---
Procedure from library @code{reesclos.lib} (@pxref{reesclos_lib}).

@table @asis
@item @strong{Create:}
a list fraction of two elements of L[1], such that
@*f=fraction[1]/fraction[2] via the injections phi L[i]-->L[i+1].

@end table
@strong{Example:}
@smallexample
@c computed example closureFrac d2t_singular/reesclos_lib.doc:203
LIB "reesclos.lib";
ring R=0,(x,y),dp;
ideal ker=x2+y2;
export R;
@expansion{} // ** `R` is already global
list L=primeClosure(R);          // We normalize R/ker
closureRingtower(L);             // Now R/ker=R(1) with normalization R(2)
setring R(2);
kill(R);
phi;                             // The map R(1)-->R(2)
@expansion{} phi[1]=T(1)*T(2)
@expansion{} phi[2]=T(1)
poly f=T(1)*T(2);                // We will get a representation of f
export R(2);
@expansion{} // ** `R(2)` is already global
closureFrac(L);
setring R(1);
kill (R(2));
fraction;                        // f=fraction[1]/fraction[2] via phi
@expansion{} [1]:
@expansion{}    xy
@expansion{} [2]:
@expansion{}    y
@c end example closureFrac d2t_singular/reesclos_lib.doc:203
@end smallexample
@c ---end content closureFrac---


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/ring_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/ring_lib.doc INSTEAD
@c library version: (1.17.2.1,2002/02/20)
@c library file: ../Singular/LIB/ring.lib
@cindex ring.lib
@cindex ring_lib
@table @asis
@item @strong{Library:}
ring.lib
@item @strong{Purpose:}
      Manipulating Rings and Maps

@end table

@strong{Procedures:}
@menu
* changechar:: make a copy R of basering [ring r] with new char c
* changeord:: make a copy R of basering [ring r] with new ord o
* changevar:: make a copy R of basering [ring r] with new vars v
* defring:: define a ring R in specified char c, n vars v, ord o
* defrings:: define ring Sn in n vars, char 32003 [p], ord ds
* defringp:: define ring Pn in n vars, char 32003 [p], ord dp
* extendring:: extend given ring by n vars v, ord o and name it R
* fetchall:: fetch all objects of ring R to basering
* imapall:: imap all objects of ring R to basering
* mapall:: map all objects of ring R via ideal i to basering
* ord_test:: test whether ordering of R is global, local or mixed
* ringtensor:: create ring R, tensor product of rings s,t,...
* ringweights:: intvec of weights of ring variables of ring r
@end menu
@c ---end content LibInfo---

@c ------------------- changechar -------------
@node changechar, changeord,, ring_lib
@subsubsection changechar
@cindex changechar
@c ---content changechar---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
changechar(newr,c[,r]); newr,c=strings, r=ring

@item @strong{Create:}
create a new ring with name `newr` and make it the basering if r is
an existing ring [default: r=basering].
@*The new ring differs from the old ring only in the characteristic.
If, say, (newr,c) = ("R","0,A") and the ring r exists, the new
basering will have name R, characteristic 0 and one parameter A.

@item @strong{Return:}
No return value

@item @strong{Note:}
Works for qrings if map from old_char to new_char is implemented
This proc uses 'execute' or calls a procedure using 'execute'.
If you use it in your own proc, let the local names of your proc
start with @@.

@end table
@strong{Example:}
@smallexample
@c computed example changechar d2t_singular/ring_lib.doc:62
LIB "ring.lib";
ring r=0,(x,y,u,v),(dp(2),ds);
changechar("R","2,A"); R;"";
@expansion{} // basering is now R
@expansion{} //   characteristic : 2
@expansion{} //   1 parameter    : A
@expansion{} //   minpoly        : 0
@expansion{} //   number of vars : 4
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x y
@expansion{} //        block   2 : ordering ds
@expansion{} //                  : names    u v
@expansion{} //        block   3 : ordering C
@expansion{}
changechar("R1","32003",R); R1;
@expansion{} // basering is now R1
@expansion{} //   characteristic : 32003
@expansion{} //   number of vars : 4
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x y
@expansion{} //        block   2 : ordering ds
@expansion{} //                  : names    u v
@expansion{} //        block   3 : ordering C
kill R,R1;
if(system("with","Namespaces")) @{
if( nameof(Current) == "Ring" ) @{
kill Top::R,Top::R1;
@} else @{
kill Ring::R,Ring::R1;
@}
@}
@c end example changechar d2t_singular/ring_lib.doc:62
@end smallexample
@c ---end content changechar---

@c ------------------- changeord -------------
@node changeord, changevar, changechar, ring_lib
@subsubsection changeord
@cindex changeord
@c ---content changeord---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
changeord(newr,o[,r]); newr,o=strings, r=ring/qring

@item @strong{Create:}
create a new ring with name `newr` and make it the basering if r is
an existing ring/qring [default: r=basering].
@*The new ring differs from the old ring only in the ordering. If, say,
(newr,o) = ("R","wp(2,3),dp") and the ring r exists and has >=3
variables, the new basering will have name R and ordering wp(2,3),dp.

@item @strong{Return:}
No return value

@item @strong{Note:}
This proc uses 'execute' or calls a procedure using 'execute'.
If you use it in your own proc, let the local names of your proc
start with @@.

@end table
@strong{Example:}
@smallexample
@c computed example changeord d2t_singular/ring_lib.doc:108
LIB "ring.lib";
ring r=0,(x,y,u,v),(dp(2),ds);
changeord("R","wp(2,3),dp"); R; "";
@expansion{} // basering is now R
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 4
@expansion{} //        block   1 : ordering wp
@expansion{} //                  : names    x y
@expansion{} //                  : weights  2 3
@expansion{} //        block   2 : ordering dp
@expansion{} //                  : names    u v
@expansion{} //        block   3 : ordering C
@expansion{}
ideal i = x^2,y^2-u^3,v;
qring Q = std(i);
changeord("Q'","lp",Q); Q';
@expansion{} // basering is now Q'
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 4
@expansion{} //        block   1 : ordering lp
@expansion{} //                  : names    x y u v
@expansion{} //        block   2 : ordering C
@expansion{} // quotient ring from ideal
@expansion{} _[1]=v
@expansion{} _[2]=x2
@expansion{} _[3]=y2-u3
kill R,Q,Q';
if(system("with","Namespaces")) @{
if( nameof(Current) == "Ring" ) @{
kill Top::R,Top::Q';
@} else @{
kill Ring::R,Ring::Q';
@}
@}
@c end example changeord d2t_singular/ring_lib.doc:108
@end smallexample
@c ---end content changeord---

@c ------------------- changevar -------------
@node changevar, defring, changeord, ring_lib
@subsubsection changevar
@cindex changevar
@c ---content changevar---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
changevar(newr,vars[,r]); newr,vars=strings, r=ring/qring

@item @strong{Create:}
creates a new ring with name `newr` and makes it the basering if r
is an existing ring/qring [default: r=basering].
@*The new ring differs from the old ring only in the variables. If,
say, (newr,vars) = ("R","t()") and the ring r exists and has n
variables, the new basering will have name R and variables
t(1),...,t(n).
@*If vars = "a,b,c,d", the new ring will have the variables a,b,c,d.

@item @strong{Return:}
No return value

@item @strong{Note:}
This procedure is useful in connection with the procedure ringtensor,
when a conflict between variable names must be avoided.
This proc uses 'execute' or calls a procedure using 'execute'.
If you use it in your own proc, let the local names of your proc
start with @@.

@end table
@strong{Example:}
@smallexample
@c computed example changevar d2t_singular/ring_lib.doc:160
LIB "ring.lib";
ring r=0,(x,y,u,v),(dp(2),ds);
ideal i = x^2,y^2-u^3,v;
qring Q = std(i);
setring(r);
changevar("R","A()"); R; "";
@expansion{} // basering is now R
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 4
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    A(1) A(2)
@expansion{} //        block   2 : ordering ds
@expansion{} //                  : names    A(3) A(4)
@expansion{} //        block   3 : ordering C
@expansion{}
changevar("Q'","a,b,c,d",Q); Q';
@expansion{} // basering is now Q'
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 4
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    a b
@expansion{} //        block   2 : ordering ds
@expansion{} //                  : names    c d
@expansion{} //        block   3 : ordering C
@expansion{} // quotient ring from ideal
@expansion{} _[1]=d
@expansion{} _[2]=a2
@expansion{} _[3]=b2-c3
kill R,Q,Q';
if(system("with","Namespaces")) @{
if( nameof(Current) == "Ring" ) @{
kill Top::R,Top::Q';
@} else @{
kill Ring::R,Ring::Q';
@}
@}
@c end example changevar d2t_singular/ring_lib.doc:160
@end smallexample
@c ---end content changevar---

@c ------------------- defring -------------
@node defring, defrings, changevar, ring_lib
@subsubsection defring
@cindex defring
@c ---content defring---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
defring(s1,s2,n,s3,s4); s1..s4=strings, n=integer

@item @strong{Create:}
Define a ring with name 's1', characteristic 's2', ordering 's4' and
n variables with names derived from s3 and make it the basering.
If s3 is a single letter, say s3="a", and if n<=26 then a and the
following n-1 letters from the alphabet (cyclic order) are taken as
variables. If n>26 or if s3 is a single letter followed by (, say
s3="T(", the variables are T(1),...,T(n).

@item @strong{Return:}
No return value

@item @strong{Note:}
This proc is useful for defining a ring in a procedure.
This proc uses 'execute' or calls a procedure using 'execute'.
If you use it in your own proc, let the local names of your proc
start with @@.

@end table
@strong{Example:}
@smallexample
@c computed example defring d2t_singular/ring_lib.doc:211
LIB "ring.lib";
defring("r","0",5,"u","ls"); r; "";
@expansion{} // basering is now: r
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 5
@expansion{} //        block   1 : ordering ls
@expansion{} //                  : names    u v w x y
@expansion{} //        block   2 : ordering C
@expansion{}
defring("R","2,A",10,"x(","dp(3),ws(1,2,3),ds"); R;
@expansion{} // basering is now: R
@expansion{} //   characteristic : 2
@expansion{} //   1 parameter    : A
@expansion{} //   minpoly        : 0
@expansion{} //   number of vars : 10
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x(1) x(2) x(3)
@expansion{} //        block   2 : ordering ws
@expansion{} //                  : names    x(4) x(5) x(6)
@expansion{} //                  : weights     1    2    3
@expansion{} //        block   3 : ordering ds
@expansion{} //                  : names    x(7) x(8) x(9) x(10)
@expansion{} //        block   4 : ordering C
kill r,R;
if(system("with","Namespaces")) @{
if( nameof(Current) == "Ring" ) @{
kill Top::r,Top::R;
@} else @{
kill Ring::r,Ring::R;
@}
@}
@c end example defring d2t_singular/ring_lib.doc:211
@end smallexample
@c ---end content defring---

@c ------------------- defrings -------------
@node defrings, defringp, defring, ring_lib
@subsubsection defrings
@cindex defrings
@c ---content defrings---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
defrings(n,[p]); n,p integers

@item @strong{Create:}
Defines a ring with name Sn, characteristic p, ordering ds and n
variables x,y,z,a,b,...if n<=26 (resp. x(1..n) if n>26) and makes it
the basering (default: p=32003)

@item @strong{Return:}
No return value

@end table
@strong{Example:}
@smallexample
@c computed example defrings d2t_singular/ring_lib.doc:249
LIB "ring.lib";
defrings(5,0); S5; "";
@expansion{} // basering is now: ring S5=0,(x,y,z,a,b),ds;
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 5
@expansion{} //        block   1 : ordering ds
@expansion{} //                  : names    x y z a b
@expansion{} //        block   2 : ordering C
@expansion{}
defrings(30); S30;
@expansion{} // basering is now: ring S30=32003,x(1..30),ds;
@expansion{} //   characteristic : 32003
@expansion{} //   number of vars : 30
@expansion{} //        block   1 : ordering ds
@expansion{} //                  : names    x(1) x(2) x(3) x(4) x(5) x(6) x(7) x(8) x(\
   9) x(10) x(11) x(12) x(13) x(14) x(15) x(16) x(17) x(18) x(19) x(20) x(21\
   ) x(22) x(23) x(24) x(25) x(26) x(27) x(28) x(29) x(30)
@expansion{} //        block   2 : ordering C
kill S5, S30;
if(system("with","Namespaces")) @{
if( nameof(Current) == "Ring" ) @{
kill Top::S5,Top::S30;
@} else @{
kill Ring::S5,Ring::S30;
@}
@}
@c end example defrings d2t_singular/ring_lib.doc:249
@end smallexample
@c ---end content defrings---

@c ------------------- defringp -------------
@node defringp, extendring, defrings, ring_lib
@subsubsection defringp
@cindex defringp
@c ---content defringp---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
defringp(n,[p]); n,p=integers

@item @strong{Create:}
defines a ring with name Pn, characteristic p, ordering dp and n
variables x,y,z,a,b,...if n<=26 (resp. x(1..n) if n>26) and makes it
the basering (default: p=32003)

@item @strong{Return:}
No return value

@end table
@strong{Example:}
@smallexample
@c computed example defringp d2t_singular/ring_lib.doc:287
LIB "ring.lib";
defringp(5,0); P5; "";
@expansion{} // basering is now: ring P5=0,(x,y,z,a,b),dp;
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 5
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x y z a b
@expansion{} //        block   2 : ordering C
@expansion{}
defringp(30); P30;
@expansion{} // basering is now: ring P30=32003,x(1..30),dp;
@expansion{} //   characteristic : 32003
@expansion{} //   number of vars : 30
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x(1) x(2) x(3) x(4) x(5) x(6) x(7) x(8) x(\
   9) x(10) x(11) x(12) x(13) x(14) x(15) x(16) x(17) x(18) x(19) x(20) x(21\
   ) x(22) x(23) x(24) x(25) x(26) x(27) x(28) x(29) x(30)
@expansion{} //        block   2 : ordering C
kill P5, P30;
if(system("with","Namespaces")) @{
if( nameof(Current) == "Ring" ) @{
kill Top::P5,Top::P30;
@} else @{
kill Ring::P5,Ring::P30;
@}
@}
@c end example defringp d2t_singular/ring_lib.doc:287
@end smallexample
@c ---end content defringp---

@c ------------------- extendring -------------
@node extendring, fetchall, defringp, ring_lib
@subsubsection extendring
@cindex extendring
@c ---content extendring---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
extendring(na,n,va,o[iv,i,r]); na,va,o=strings,
@*n,i=integers, r=ring, iv=intvec of positive integers or iv=0

@item @strong{Create:}
Define a ring with name `na` which extends the ring r by adding n new
variables in front of [after, if i!=0] the old variables and make it
the basering [default: (i,r)=(0,basering)].
@* -- The characteristic is the characteristic of r.
@* -- The new vars are derived from va. If va is a single letter, say
va="T", and if n<=26 then T and the following n-1 letters from
T..Z..T (resp. T(1..n) if n>26) are taken as additional variables.
If va is a single letter followed by (, say va="x(", the new
variables are x(1),...,x(n).
@* -- The ordering is the product ordering between the ordering of r and
an ordering derived from `o` [and iv].
@* - If o contains a 'c' or a 'C' in front resp. at the end this is
taken for the whole ordering in front resp. at the end. If o does
not contain a 'c' or a 'C' the same rule applies to ordstr(r).
@* - If no intvec iv is given, or if iv=0, o may be any allowed ordstr,
like "ds" or "dp(2),wp(1,2,3),Ds(2)" or "ds(a),dp(b),ls" if
a and b are globally (!) defined integers and if a+b+1<=n.
If, however, a and b are local to a proc calling extendring, the
intvec iv must be used to let extendring know the values of a and b
@* - If an intvec iv !=0 is given, iv[1],iv[2],... is taken for the
1st, 2nd,... block of o, if o contains no substring "w" or "W"
i.e. no weighted ordering (in the above case o="ds,dp,ls"
and iv=a,b).
@*If o contains a weighted ordering (only one (!) weighted block is
allowed) iv[1] is taken as size for the weight-vector, the next
iv[1] values of iv are taken as weights and the remaining values of
iv as block-size for the remaining non-weighted blocks.
e.g. o="dp,ws,Dp,ds", iv=3,2,3,4,2,5 creates the ordering
dp(2),ws(2,3,4),Dp(5),ds

@item @strong{Return:}
No return value

@item @strong{Note:}
This proc is useful for adding deformation parameters.
@*This proc uses 'execute' or calls a procedure using 'execute'.
If you use it in your own proc, let the local names of your proc
start with @@ (see the file HelpForProc)

@end table
@strong{Example:}
@smallexample
@c computed example extendring d2t_singular/ring_lib.doc:358
LIB "ring.lib";
ring r=0,(x,y,z),ds;
show(r);"";
@expansion{} // ring: (0),(x,y,z),(ds(3),C);
@expansion{} // minpoly = 0
@expansion{} // objects belonging to this ring:
@expansion{}
//blocksize is derived from no of vars:
int t=5;
extendring("R1",t,"a","dp");         //t global: "dp" -> "dp(5)"
@expansion{} // basering is now R1
show(R1); "";
@expansion{} // ring: (0),(a,b,c,d,e,x,y,z),(dp(5),ds(3),C);
@expansion{} // minpoly = 0
@expansion{} // objects belonging to this ring:
@expansion{}
extendring("R2",4,"T(","c,dp",1,r);    //"dp" -> "c,..,dp(4)"
@expansion{} // basering is now R2
show(R2);"";
@expansion{} // ring: (0),(x,y,z,T(1),T(2),T(3),T(4)),(c,ds(3),dp(4));
@expansion{} // minpoly = 0
@expansion{} // objects belonging to this ring:
@expansion{}
//no intvec given, blocksize given: given blocksize is used:
extendring("R3",4,"T(","dp(2)",0,r);   // "dp(2)" -> "dp(2)"
@expansion{} // basering is now R3
show(R3);"";
@expansion{} // ring: (0),(T(1),T(2),T(3),T(4),x,y,z),(dp(2),ds(5),C);
@expansion{} // minpoly = 0
@expansion{} // objects belonging to this ring:
@expansion{}
//intvec given: weights and blocksize is derived from given intvec
//(no specification of a blocksize in the given ordstr is allowed!)
//if intvec does not cover all given blocks, the last block is used
//for the remaining variables, if intvec has too many components,
//the last ones are ignored
intvec v=3,2,3,4,1,3;
extendring("R4",10,"A","ds,ws,Dp,dp",v,0,r);
@expansion{} // basering is now R4
//v covers 3 blocks: v[1] (=3) : no of components of ws
//next v[1] values (=v[2..4]) give weights
//remaining components of v are used for the remaining blocks
show(R4);
@expansion{} // ring: (0),(A,B,C,D,E,F,G,H,I,J,x,y,z),(ds(1),ws(2,3,4),Dp(3),dp(3),ds(\
   3),C);
@expansion{} // minpoly = 0
@expansion{} // objects belonging to this ring:
kill r,R1,R2,R3,R4;
if(system("with","Namespaces")) @{
if( nameof(Current) == "Ring" ) @{
kill Top::R1,Top::R2,Top::R3,Top::R4;
@} else @{
kill Ring::R1,Ring::R2,Ring::R3,Ring::R4;
@}
@}
@c end example extendring d2t_singular/ring_lib.doc:358
@end smallexample
@c ---end content extendring---

@c ------------------- fetchall -------------
@node fetchall, imapall, extendring, ring_lib
@subsubsection fetchall
@cindex fetchall
@c ---content fetchall---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
fetchall(R[,s]); R=ring/qring, s=string

@item @strong{Create:}
fetch all objects of ring R (of type poly/ideal/vector/module/number/
matrix) into the basering.
@*If no 3rd argument is present, the names are the same as in R. If,
say, f is a poly in R and the 3rd argument is the string "R", then f
is mapped to f_R etc.

@item @strong{Return:}
no return value

@item @strong{Note:}
As fetch, this procedure maps the 1st, 2nd, ... variable of R to the
1st, 2nd, ... variable of the basering.
@*The 3rd argument is useful in order to avoid conflicts of names, the
empty string is allowed

@item @strong{Caution:}
fetchall does not work inside a procedure.
@*It does not work if R contains a map.

@end table
@strong{Example:}
@smallexample
@c computed example fetchall d2t_singular/ring_lib.doc:428
LIB "ring.lib";
// The example is not shown since fetchall does not work in a procedure;
// (and hence not in the example procedure). Try the following commands:
//   ring R=0,(x,y,z),dp;
//   ideal j=x,y2,z2;
//   matrix M[2][3]=1,2,3,x,y,z;
//   j; print(M);
//   ring S=0,(a,b,c),ds;
//   fetchall(R);       //map from R to S: x->a, y->b, z->c;
//   names(S);
//   j; print(M);
//   fetchall(S,"1");   //identity map of S: copy objects, change names
//   names(S);
//   kill R,S;
@c end example fetchall d2t_singular/ring_lib.doc:428
@end smallexample
@c ---end content fetchall---

@c ------------------- imapall -------------
@node imapall, mapall, fetchall, ring_lib
@subsubsection imapall
@cindex imapall
@c ---content imapall---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
imapall(R[,s]); R=ring/qring, s=string

@item @strong{Create:}
map all objects of ring R (of type poly/ideal/vector/module/number/
matrix) into the basering, by applying imap to all objects of R.
If no 3rd argument is present, the names are the same as in R. If,
say, f is a poly in R and the 3rd argument is the string "R", then f
is mapped to f_R etc.

@item @strong{Return:}
no return value

@item @strong{Note:}
As imap, this procedure maps the variables of R to the variables with
the same name in the basering, the other variables are mapped to 0.
The 3rd argument is useful in order to avoid conflicts of names, the
empty string is allowed

@item @strong{Caution:}
imapall does not work inside a procedure
@*It does not work if R contains a map

@end table
@strong{Example:}
@smallexample
@c computed example imapall d2t_singular/ring_lib.doc:481
LIB "ring.lib";
// The example is not shown since imapall does not work in a procedure
// (and hence not in the example procedure). Try the following commands:
//   ring R=0,(x,y,z,u),dp;
//   ideal j=x,y,z,u2+ux+z;
//   matrix M[2][3]=1,2,3,x,y,uz;
//   j; print(M);
//   ring S=0,(a,b,c,x,z,y),ds;
//   imapall(R);         //map from R to S: x->x, y->y, z->z, u->0
//   names(S);
//   j; print(M);
//   imapall(S,"1");     //identity map of S: copy objects, change names
//   names(S);
//   kill R,S;
@c end example imapall d2t_singular/ring_lib.doc:481
@end smallexample
@c ---end content imapall---

@c ------------------- mapall -------------
@node mapall, ord_test, imapall, ring_lib
@subsubsection mapall
@cindex mapall
@c ---content mapall---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
mapall(R,i[,s]); R=ring/qring, i=ideal of basering, s=string

@item @strong{Create:}
map all objects of ring R (of type poly/ideal/vector/module/number/
matrix, map) into the basering, by mapping the j-th variable of R to
the j-th generator of the ideal i. If no 3rd argument is present, the
names are the same as in R. If, say, f is a poly in R and the 3rd
argument is the string "R", then f is mapped to f_R etc.

@item @strong{Return:}
no return value.

@item @strong{Note:}
This procedure has the same effect as defining a map, say psi, by
map psi=R,i; and then applying psi to all objects of R. In particular,
maps from R to some ring S are composed with psi, creating thus a map
from the basering to S.
@*mapall may be combined with copyring to change vars for all objects.
The 3rd argument is useful in order to avoid conflicts of names, the
empty string is allowed.

@item @strong{Caution:}
mapall does not work inside a procedure.

@end table
@strong{Example:}
@smallexample
@c computed example mapall d2t_singular/ring_lib.doc:536
LIB "ring.lib";
// The example is not shown since mapall does not work in a procedure
// (and hence not in the example procedure). Try the following commands:
//   ring R=0,(x,y,z),dp;
//   ideal j=x,y,z;
//   matrix M[2][3]=1,2,3,x,y,z;
//   map phi=R,x2,y2,z2;
//   ring S=0,(a,b,c),ds;
//   ideal i=c,a,b;
//   mapall(R,i);         //map from R to S: x->c, y->a, z->b
//   names(S);
//   j; print(M); phi;    //phi maps R to S: x->c2, y->a2, z->b2
//   ideal i1=a2,a+b,1;
//   mapall(R,i1,"");   //map from R to S: x->a2, y->a+b, z->1
//   names(S);
//   j_; print(M_); phi_;
//   changevar("T","x()",R);  //change vars in R and call result T
//   mapall(R,maxideal(1));       //identity map from R to T
//   names(T);
//   j; print(M); phi;
//   kill R,S,T;
@c end example mapall d2t_singular/ring_lib.doc:536
@end smallexample
@c ---end content mapall---

@c ------------------- ord_test -------------
@node ord_test, ringtensor, mapall, ring_lib
@subsubsection ord_test
@cindex ord_test
@c ---content ord_test---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
ord_test(r); r ring

@item @strong{Return:}
int 1 (resp. -1, resp. 0) if ordering of r is global (resp. local,
resp. mixed)

@end table
@strong{Example:}
@smallexample
@c computed example ord_test d2t_singular/ring_lib.doc:580
LIB "ring.lib";
ring R = 0,(x,y),dp;
ring S = 0,(u,v),ls;
ord_test(R);
@expansion{} 1
ord_test(S);
@expansion{} -1
ord_test(R+S);
@expansion{} 0
@c end example ord_test d2t_singular/ring_lib.doc:580
@end smallexample
@c ---end content ord_test---

@c ------------------- ringtensor -------------
@node ringtensor, ringweights, ord_test, ring_lib
@subsubsection ringtensor
@cindex ringtensor
@c ---content ringtensor---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
ringtensor(s,r1,r2,...); s=string, r1,r2,...=rings

@item @strong{Create:}
A new base ring with name `s` if r1,r2,... are existing rings.
If, say, s = "R" and the rings r1,r2,... exist, the new ring will
have name R, variables from all rings r1,r2,... and as monomial
ordering the block (product) ordering of r1,r2,... . Hence, R
is the tensor product of the rings r1,r2,... with ordering matrix
equal to the direct sum of the ordering matrices of r1,r2,...

@item @strong{Return:}
no return value

@item @strong{Note:}
The characteristic of the new ring will be that of r1. The names of
variables in the rings r1,r2,... should differ (if a name, say x,
occurs in r1 and r2, then, in the new ring r, x always refers to the
variable with name x in r1, there is no access to x in r2).
The procedure works also for quotient rings ri, if the characteristic
of ri is compatible with the characteristic of r1 (i.e. if imap from
ri to r1 is implemented)
@*This proc uses 'execute' or calls a procedure using 'execute'.
If you use it in your own proc, let the local names of your proc
start with @@ (see the file HelpForProc)

@end table
@strong{Example:}
@smallexample
@c computed example ringtensor d2t_singular/ring_lib.doc:628
LIB "ring.lib";
ring r=32003,(x,y,u,v),dp;
ring s=0,(a,b,c),wp(1,2,3);
ring t=0,x(1..5),(c,ls);
ringtensor("R",r,s,t);
@expansion{} // basering is now R
type R;
@expansion{} // R                    [0]  *ring
@expansion{} //   characteristic : 32003
@expansion{} //   number of vars : 12
@expansion{} //        block   1 : ordering dp
@expansion{} //                  : names    x y u v
@expansion{} //        block   2 : ordering wp
@expansion{} //                  : names    a b c
@expansion{} //                  : weights  1 2 3
@expansion{} //        block   3 : ordering ls
@expansion{} //                  : names    x(1) x(2) x(3) x(4) x(5)
@expansion{} //        block   4 : ordering C
setring s;
ideal i = a2+b3+c5;
changevar("S","x,y,z");       //change vars of sand make S the basering
@expansion{} // basering is now S
qring qS =std(fetch(s,i));    //create qring of S mod i (mapped to S)
changevar("T","d,e,f,g,h",t); //change vars of t and make T the basering
@expansion{} // basering is now T
qring qT=std(d2+e2-f3);       //create qring of T mod d2+e2-f3
ringtensor("Q",s,qS,t,qT);
@expansion{} // basering is now Q
type Q;
@expansion{} // Q                    [0]  *qring
@expansion{} //   characteristic : 0
@expansion{} //   number of vars : 16
@expansion{} //        block   1 : ordering wp
@expansion{} //                  : names    a b c
@expansion{} //                  : weights  1 2 3
@expansion{} //        block   2 : ordering wp
@expansion{} //                  : names    x y z
@expansion{} //                  : weights  1 2 3
@expansion{} //        block   3 : ordering ls
@expansion{} //                  : names    x(1) x(2) x(3) x(4) x(5)
@expansion{} //        block   4 : ordering ls
@expansion{} //                  : names    d e f g h
@expansion{} //        block   5 : ordering C
@expansion{} // quotient ring from ideal
@expansion{} _[1]=f3-e2-d2
@expansion{} _[2]=z5+y3+x2
kill R,Q,S,T;
if(system("with","Namespaces")) @{
if( nameof(Current) == "Ring" ) @{
kill Top::R,Top::Q,Top::S,Top::T;
@} else @{
kill Ring::R,Ring::Q,Ring::S,Ring::T;
@}
@}
@c end example ringtensor d2t_singular/ring_lib.doc:628
@end smallexample
@c ---end content ringtensor---

@c ------------------- ringweights -------------
@node ringweights,, ringtensor, ring_lib
@subsubsection ringweights
@cindex ringweights
@c ---content ringweights---
Procedure from library @code{ring.lib} (@pxref{ring_lib}).

@table @asis
@item @strong{Usage:}
ringweights(P); P=name of an existing ring (true name, not a string)

@item @strong{Return:}
intvec consisting of the weights of the variables of P, as they
appear when typing P;.

@item @strong{Note:}
This is useful when enlarging P but keeping the weights of the old
variables.

@end table
@strong{Example:}
@smallexample
@c computed example ringweights d2t_singular/ring_lib.doc:677
LIB "ring.lib";
ring r0 = 0,(x,y,z),dp;
ringweights(r0);
@expansion{} 1,1,1
ring r1 = 0,x(1..5),(ds(3),wp(2,3));
ringweights(r1);"";
@expansion{} 1,1,1,2,3
@expansion{}
// an example for enlarging the ring, keeping the first weights:
intvec v = ringweights(r1),6,2,3,4,5;
ring R = 0,x(1..10),(a(v),dp);
ordstr(R);
@expansion{} a(1,1,1,2,3,6,2,3,4,5),dp(10),C
@c end example ringweights d2t_singular/ring_lib.doc:677
@end smallexample
@c ---end content ringweights---