code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/algebra_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/algebra_lib.doc INSTEAD
@c library version: (1.9.2.3,2002/04/11)
@c library file: ../Singular/LIB/algebra.lib
@cindex algebra.lib
@cindex algebra_lib
@table @asis
@item @strong{Library:}
algebra.lib
@item @strong{Purpose:}
   Compute with Algebras and Algebra Maps
@item @strong{Authors:}
Gert-Martin Greuel, greuel@@mathematik.uni-kl.de,
@* Agnes Eileen Heydtmann, agnes@@math.uni-sb.de,
@* Gerhard Pfister, pfister@@mathematik.uni-kl.de

@end table

@strong{Procedures:}
@menu
* algebra_containment:: query of algebra containment
* module_containment:: query of module containment over a subalgebra
* inSubring:: test whether poly p is in subring generated by I
* algDependent:: computes algebraic relations between generators of I
* alg_kernel:: computes the kernel of the ring map phi
* is_injective:: test for injectivity of ring map phi
* is_surjective:: test for surjectivity of ring map phi
* is_bijective:: test for bijectivity of ring map phi
* noetherNormal:: noether normalization of ideal id
* mapIsFinite:: query for finiteness of map phi:R --> basering/I
* finitenessTest:: find variables which occur as pure power in lead(i)
@end menu
@c ---end content LibInfo---

@c ------------------- algebra_containment -------------
@node algebra_containment, module_containment,, algebra_lib
@subsubsection algebra_containment
@cindex algebra_containment
@c ---content algebra_containment---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
algebra_containment(p,A[,k]); p poly, A ideal, k integer.
@* A = A[1],...,A[m] generators of subalgebra of the basering

@item @strong{Return:}
@format
         - k=0 (or if k is not given) an integer:
           1  : if p is contained in the subalgebra K[A[1],...,A[m]]
           0  : if p is not contained in K[A[1],...,A[m]]
         - k=1 : a list, say l, of size 2, l[1] integer, l[2] ring, satisfying
           l[1]=1 if p is in the subalgebra K[A[1],...,A[m]] and then the ring
           l[2] contains poly check = h(y(1),...,y(m)) if p=h(A[1],...,A[m])
           l[1]=0 if p is in not the subalgebra K[A[1],...,A[m]] and then
           l[2] contains the poly check = h(x,y(1),...,y(m)) if p satisfies
           the nonlinear relation p = h(x,A[1],...,A[m]) where
           x = x(1),...,x(n) denote the variables of the basering
@end format

@item @strong{Display:}
if k=0 and printlevel >= voice+1 (default) display the poly check

@item @strong{Note:}
The proc inSubring uses a different algorithm which is sometimes
faster.

@item @strong{Theory:}
The ideal of algebraic relations of the algebra generators A[1],...,
A[m] is computed introducing new variables y(i) and the product
order with x(i) >> y(i).
@*p reduces to a polynomial only in the y(i) <=> p is contained in the
subring generated by the polynomials A[1],...,A[m].

@end table
@strong{Example:}
@smallexample
@c computed example algebra_containment d2t_singular/algebra_lib.doc:77
LIB "algebra.lib";
int p = printlevel; printlevel = 1;
ring R = 0,(x,y,z),dp;
ideal A=x2+y2,z2,x4+y4,1,x2z-1y2z,xyz,x3y-1xy3;
poly p1=z;
poly p2=
x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4;
algebra_containment(p1,A);
@expansion{} // x(3)
@expansion{} 0
algebra_containment(p2,A);
@expansion{} // y(1)*y(2)*y(5)^2+y(3)*y(5)^3+4*y(1)*y(2)*y(6)^2+4*y(6)^3*y(7)+2*y(2)*y\
   (5)*y(7)^2
@expansion{} 1
list L = algebra_containment(p2,A,1);
@expansion{}
@expansion{} // 'algebra_containment' created a ring as 2nd element of the list.
@expansion{} // The ring contains the poly check which defines the algebraic relation.
@expansion{} // To access to the ring and see check you must give the ring a name,
@expansion{} // e.g.:
@expansion{}                def S = l[2]; setring S; check;
@expansion{}
L[1];
@expansion{} 1
def S = L[2]; setring S;
check;
@expansion{} y(1)*y(2)*y(5)^2+y(3)*y(5)^3+4*y(1)*y(2)*y(6)^2+4*y(6)^3*y(7)+2*y(2)*y(5)\
   *y(7)^2
printlevel = p;
@c end example algebra_containment d2t_singular/algebra_lib.doc:77
@end smallexample
@c ---end content algebra_containment---

@c ------------------- module_containment -------------
@node module_containment, inSubring, algebra_containment, algebra_lib
@subsubsection module_containment
@cindex module_containment
@c ---content module_containment---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
module_containment(p,P,M[,k]); p poly, P ideal, M ideal, k int
@* P = P[1],...,P[n] generators of a subalgebra of the basering,
@* M = M[1],...,M[m] generators of a module over the subalgebra K[P]

@item @strong{Assume:}
ncols(P) = nvars(basering), the P[i] are algebraically independent

@item @strong{Return:}
@format
         - k=0 (or if k is not given), an integer:
           1    : if p is contained in the module <M[1],...,M[m]> over K[P]
           0    : if p is not contained in <M[1],...,M[m]>
         - k=1, a list, say l, of size 2, l[1] integer, l[2] ring:
           l[1]=1 : if p is in <M[1],...,M[m]> and then the ring l[2] contains
             the polynomial check = h(y(1),...,y(m),z(1),...,z(n)) if
             p = h(M[1],...,M[m],P[1],...,P[n])
           l[1]=0 : if p is in not in <M[1],...,M[m]>, then l[2] contains the
             poly check = h(x,y(1),...,y(m),z(1),...,z(n)) if p satisfies
             the nonlinear relation p = h(x,M[1],...,M[m],P[1],...,P[n]) where
             x = x(1),...,x(n) denote the variables of the basering
@end format

@item @strong{Display:}
the polynomial h(y(1),...,y(m),z(1),...,z(n)) if k=0, resp.
a comment how to access the relation check if k=1, provided
printlevel >= voice+1 (default).

@item @strong{Theory:}
The ideal of algebraic relations of all the generators p1,...,pn,
s1,...,st given by P and S is computed introducing new variables y(j),
z(i) and the product order: x^a*y^b*z^c > x^d*y^e*z^f if x^a > x^d
with respect to the lp ordering or else if z^c > z^f with respect to
the dp ordering or else if y^b > y^e with respect to the lp ordering
again. p reduces to a polynomial only in the y(j) and z(i), linear in
the z(i) <=> p is contained in the module.

@end table
@strong{Example:}
@smallexample
@c computed example module_containment d2t_singular/algebra_lib.doc:144
LIB "algebra.lib";
int p = printlevel; printlevel = 1;
ring R=0,(x,y,z),dp;
ideal P = x2+y2,z2,x4+y4;           //algebra generators
ideal M = 1,x2z-1y2z,xyz,x3y-1xy3;  //module generators
poly p1=
x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4;
module_containment(p1,P,M);
@expansion{} // y(2)*z(2)*z(3)^2+z(1)^3*z(2)^2
@expansion{} 1
poly p2=z;
list l = module_containment(p2,P,M,1);
@expansion{}
@expansion{} // 'module_containment' created a ring as 2nd element of the list. The
@expansion{} // ring contains the poly check which defines the algebraic relation
@expansion{} // for p. To access to the ring and see check you must give the ring
@expansion{} // a name, e.g.:
@expansion{}      def S = l[2]; setring S; check;
@expansion{}
l[1];
@expansion{} 0
def S = l[2]; setring S; check;
@expansion{} x(3)
printlevel=p;
@c end example module_containment d2t_singular/algebra_lib.doc:144
@end smallexample
@c ---end content module_containment---

@c ------------------- inSubring -------------
@node inSubring, algDependent, module_containment, algebra_lib
@subsubsection inSubring
@cindex inSubring
@c ---content inSubring---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
inSubring(p,i); p poly, i ideal

@item @strong{Return:}
@format
         a list l of size 2, l[1] integer, l[2] string
         l[1]=1 iff p is in the subring generated by i=i[1],...,i[k],
                and then l[2] = y(0)-h(y(1),...,y(k)) if p = h(i[1],...,i[k])
         l[1]=0 iff p is in not the subring generated by i,
                and then l[2] = h(y(0),y(1),...,y(k) where p satisfies the
                nonlinear relation h(p,i[1],...,i[k])=0.
@end format

@item @strong{Note:}
the proc algebra_containment tests the same with a different
algorithm, which is often faster

@end table
@strong{Example:}
@smallexample
@c computed example inSubring d2t_singular/algebra_lib.doc:190
LIB "algebra.lib";
ring q=0,(x,y,z,u,v,w),dp;
poly p=xyzu2w-1yzu2w2+u4w2-1xu2vw+u2vw2+xyz-1yzw+2u2w-1xv+vw+2;
ideal I =x-w,u2w+1,yz-v;
inSubring(p,I);
@expansion{} [1]:
@expansion{}    1
@expansion{} [2]:
@expansion{}    y(1)*y(2)*y(3)+y(2)^2-y(0)+1
@c end example inSubring d2t_singular/algebra_lib.doc:190
@end smallexample
@c ---end content inSubring---

@c ------------------- algDependent -------------
@node algDependent, alg_kernel, inSubring, algebra_lib
@subsubsection algDependent
@cindex algDependent
@c ---content algDependent---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
algDependent(f[,c]); f ideal (say, f = f1,...,fm), c integer

@item @strong{Return:}
@format
         a list l  of size 2, l[1] integer, l[2] ring:
         - l[1] = 1 if f1,...,fm are algebraic dependent, 0 if not
         - l[2] is a ring with variables x(1),...,x(n),y(1),...,y(m) if the
           basering has n variables. It contains the ideal 'ker', depending
           only on the y(i) and generating the algebraic relations between the
           f[i], i.e. substituting y(i) by fi yields 0. Of course, ker is
           nothing but the kernel of the ring map
              K[y(1),...,y(m)] ---> basering,  y(i) --> fi.
@end format

@item @strong{Note:}
Three different algorithms are used depending on c = 1,2,3.
If c is not given or c=0, a heuristically best method is chosen.
The basering may be a quotient ring.
@*To access to the ring l[2] and see ker you must give the ring a name,
e.g. def S=l[2]; setring S; ker;

@item @strong{Display:}
The above comment is displayed if printlevel >= 0 (default).

@end table
@strong{Example:}
@smallexample
@c computed example algDependent d2t_singular/algebra_lib.doc:236
LIB "algebra.lib";
int p = printlevel; printlevel = 1;
ring R = 0,(x,y,z,u,v,w),dp;
ideal I = xyzu2w-1yzu2w2+u4w2-1xu2vw+u2vw2+xyz-1yzw+2u2w-1xv+vw+2,
x-w, u2w+1, yz-v;
list l = algDependent(I);
@expansion{}
@expansion{} // The 2nd element of the list l is a ring with variables x(1),...,x(n),
@expansion{} // and y(1),...,y(m) if the basering has n variables and if the ideal
@expansion{} // is f[1],...,f[m]. The ring contains the ideal ker which depends only
@expansion{} // on the y(i) and generates the relations between the f[i].
@expansion{} // I.e. substituting y(i) by f[i] yields 0.
@expansion{} // To access to the ring and see ker you must give the ring a name,
@expansion{} // e.g.:
@expansion{}              def S = l[2]; setring S; ker;
@expansion{}
l[1];
@expansion{} 1
def S = l[2]; setring S;
ker;
@expansion{} ker[1]=y(2)*y(3)*y(4)+y(3)^2-y(1)+1
printlevel = p;
@c end example algDependent d2t_singular/algebra_lib.doc:236
@end smallexample
@c ---end content algDependent---

@c ------------------- alg_kernel -------------
@node alg_kernel, is_injective, algDependent, algebra_lib
@subsubsection alg_kernel
@cindex alg_kernel
@c ---content alg_kernel---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
alg_kernel(phi,pr[,s,c]); phi map to basering, pr preimage ring,
s string (name of kernel in pr), c integer.

@item @strong{Return:}
a string, the kernel of phi as string.
@*If, moreover, a string s is given, the algorithm creates, in the
preimage ring pr the kernel of phi with name s.
@*Three different algorithms are used depending on c = 1,2,3.
If c is not given or c=0, a heuristically best method is chosen.
(algorithm 1 uses the preimage command)

@item @strong{Note:}
Since the kernel of phi lives in pr, it cannot be returned to the
basering. If s is given, the user has access to it in pr via s.
The basering may be a quotient ring.

@end table
@strong{Example:}
@smallexample
@c computed example alg_kernel d2t_singular/algebra_lib.doc:279
LIB "algebra.lib";
ring r = 0,(a,b,c),ds;
ring s = 0,(x,y,z,u,v,w),dp;
ideal I = x-w,u2w+1,yz-v;
map phi = r,I;                // a map from r to s:
alg_kernel(phi,r);            // a,b,c ---> x-w,u2w+1,yz-v
@expansion{} 0
ring S = 0,(a,b,c),ds;
ring R = 0,(x,y,z),dp;
qring Q = std(x-y);
ideal i = x, y, x2-y3;
map phi = S,i;                 // a map to a quotient ring
alg_kernel(phi,S,"ker",3);     // uses algorithm 3
@expansion{} a-b,b^3-b^2+c
setring S;                     // you have access to kernel in preimage
ker;
@expansion{} ker[1]=a-b
@expansion{} ker[2]=c-b2+b3
@c end example alg_kernel d2t_singular/algebra_lib.doc:279
@end smallexample
@c ---end content alg_kernel---

@c ------------------- is_injective -------------
@node is_injective, is_surjective, alg_kernel, algebra_lib
@subsubsection is_injective
@cindex is_injective
@c ---content is_injective---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
is_injective(phi,pr[,c,s]); phi map, pr preimage ring, c int, s string

@item @strong{Return:}
@format
         - 1 (type int) if phi is injective, 0 if not (if s is not given).
         - If s is given, return a list l of size 2, l[1] int, l[2] ring:
           l[1] is 1 if phi is injective, 0 if not
           l[2] is a ring with variables x(1),...,x(n),y(1),...,y(m) if the
           basering has n variables and the map m components, it contains the
           ideal 'ker', depending only on the y(i), the kernel of the given map
@end format

@item @strong{Note:}
Three different algorithms are used depending on c = 1,2,3.
If c is not given or c=0, a heuristically best method is chosen.
The basering may be a quotient ring. However, if the preimage ring is
a quotient ring, say pr = P/I, consider phi as a map from P and then
the algorithm returns 1 if the kernel of phi is 0 mod I.
To access to the ring l[2] and see ker you must give the ring a name,
e.g. def S=l[2]; setring S; ker;

@item @strong{Display:}
The above comment is displayed if printlevel >= 0 (default).

@end table
@strong{Example:}
@smallexample
@c computed example is_injective d2t_singular/algebra_lib.doc:334
LIB "algebra.lib";
int p = printlevel;
ring r = 0,(a,b,c),ds;
ring s = 0,(x,y,z,u,v,w),dp;
ideal I = x-w,u2w+1,yz-v;
map phi = r,I;                    // a map from r to s:
is_injective(phi,r);              // a,b,c ---> x-w,u2w+1,yz-v
@expansion{} 1
ring R = 0,(x,y,z),dp;
ideal i = x, y, x2-y3;
map phi = R,i;                    // a map from R to itself, z --> x2-y3
list l = is_injective(phi,R,"");
@expansion{}
@expansion{} // The 2nd element of the list is a ring with variables x(1),...,x(n),
@expansion{} // y(1),...,y(m) if the basering has n variables and the map is
@expansion{} // F[1],...,F[m].
@expansion{} // It contains the ideal ker, the kernel of the given map y(i) --> F[i].
@expansion{} // To access to the ring and see ker you must give the ring a name,
@expansion{} // e.g.:
@expansion{}      def S = l[2]; setring S; ker;
@expansion{}
l[1];
@expansion{} 0
def S = l[2]; setring S;
ker;
@expansion{} ker[1]=y(2)^3-y(1)^2+y(3)
@c end example is_injective d2t_singular/algebra_lib.doc:334
@end smallexample
@c ---end content is_injective---

@c ------------------- is_surjective -------------
@node is_surjective, is_bijective, is_injective, algebra_lib
@subsubsection is_surjective
@cindex is_surjective
@c ---content is_surjective---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
is_surjective(phi); phi map to basering, or ideal defining it

@item @strong{Return:}
an integer, 1 if phi is surjective, 0 if not

@item @strong{Note:}
The algorithm returns 1 iff all the variables of the basering are
contained in the polynomial subalgebra generated by the polynomials
defining phi. Hence, if the basering has local or mixed ordering
or if the preimage ring is a quotient ring (in which case the map
may not be well defined) then the return value 1 means
@*"surjectivity" in this sense.

@end table
@strong{Example:}
@smallexample
@c computed example is_surjective d2t_singular/algebra_lib.doc:378
LIB "algebra.lib";
ring R = 0,(x,y,z),dp;
ideal i = x, y, x2-y3;
map phi = R,i;                    // a map from R to itself, z->x2-y3
is_surjective(phi);
@expansion{} 0
qring Q = std(ideal(z-x37));
map psi = R, x,y,x2-y3;           // the same map to the quotient ring
is_surjective(psi);
@expansion{} 1
ring S = 0,(a,b,c),dp;
map psi = R,ideal(a,a+b,c-a2+b3); // a map from R to S,
is_surjective(psi);               // x->a, y->a+b, z->c-a2+b3
@expansion{} 1
@c end example is_surjective d2t_singular/algebra_lib.doc:378
@end smallexample
@c ---end content is_surjective---

@c ------------------- is_bijective -------------
@node is_bijective, noetherNormal, is_surjective, algebra_lib
@subsubsection is_bijective
@cindex is_bijective
@c ---content is_bijective---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
is_bijective(phi,pr); phi map to basering, pr preimage ring

@item @strong{Return:}
an integer, 1 if phi is bijective, 0 if not

@item @strong{Note:}
The algorithm checks first injectivity and then surjectivity
To interpret this for local/mixed orderings, or for quotient rings
type help is_surjective; and help is_injective;

@item @strong{Display:}
A comment if printlevel >= voice-1 (default)

@end table
@strong{Example:}
@smallexample
@c computed example is_bijective d2t_singular/algebra_lib.doc:419
LIB "algebra.lib";
int p = printlevel;  printlevel = 1;
ring R = 0,(x,y,z),dp;
ideal i = x, y, x2-y3;
map phi = R,i;                      // a map from R to itself, z->x2-y3
is_bijective(phi,R);
@expansion{} // map not injective
@expansion{} 0
qring Q = std(z-x2+y3);
is_bijective(ideal(x,y,x2-y3),Q);
@expansion{} 1
ring S = 0,(a,b,c,d),dp;
map psi = R,ideal(a,a+b,c-a2+b3,0); // a map from R to S,
is_bijective(psi,R);                // x->a, y->a+b, z->c-a2+b3
@expansion{} // map injective, but not surjective
@expansion{} 0
qring T = std(d,c-a2+b3);
@expansion{} // ** _ is no standardbasis
map chi = Q,a,b,a2-b3;              // amap between two quotient rings
is_bijective(chi,Q);
@expansion{} 1
printlevel = p;
@c end example is_bijective d2t_singular/algebra_lib.doc:419
@end smallexample
@c ---end content is_bijective---

@c ------------------- noetherNormal -------------
@node noetherNormal, mapIsFinite, is_bijective, algebra_lib
@subsubsection noetherNormal
@cindex noetherNormal
@c ---content noetherNormal---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
noetherNormal(id[,p]); id ideal, p integer

@item @strong{Return:}
@format
         a list l two ideals, say I,J:
         - I is generated by a subset of the variables with size(I) = dim(id)
         - J defines a map (coordinate change in the basering), such that:
           if we define  map phi=basering,J;
           then k[var(1),...,var(n)]/phi(id) is finite over k[I].
         If p is given, 0<=p<=100, a sparse coordinate change with p percent
         of the matrix entries being 0 (default: p=0 i.e. dense)
@end format

@item @strong{Note:}
Designed for characteristic 0.It works also in char k > 0 if it
terminates,but may result in an infinite loop in small characteristic

@end table
@strong{Example:}
@smallexample
@c computed example noetherNormal d2t_singular/algebra_lib.doc:468
LIB "algebra.lib";
ring r=0,(x,y,z),dp;
ideal i= xy,xz;
noetherNormal(i);
@expansion{} [1]:
@expansion{}    _[1]=x
@expansion{}    _[2]=2x+y
@expansion{}    _[3]=3x+4y+z
@expansion{} [2]:
@expansion{}    _[1]=y
@expansion{}    _[2]=z
@c end example noetherNormal d2t_singular/algebra_lib.doc:468
@end smallexample
@c ---end content noetherNormal---

@c ------------------- mapIsFinite -------------
@node mapIsFinite, finitenessTest, noetherNormal, algebra_lib
@subsubsection mapIsFinite
@cindex mapIsFinite
@c ---content mapIsFinite---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
mapIsFinite(phi,R[,J]); R a ring, phi: R ---> basering a map
J an ideal in the basering, J = 0 if not given

@item @strong{Return:}
1 if R ---> basering/J is finite and 0 else

@end table
@strong{Example:}
@smallexample
@c computed example mapIsFinite d2t_singular/algebra_lib.doc:495
LIB "algebra.lib";
ring r = 0,(a,b,c),dp;
ring s = 0,(x,y,z),dp;
ideal i= xy;
map phi= r,(xy)^3+x2+z,y2-1,z3;
mapIsFinite(phi,r,i);
@expansion{} 1
@c end example mapIsFinite d2t_singular/algebra_lib.doc:495
@end smallexample
@c ---end content mapIsFinite---

@c ------------------- finitenessTest -------------
@node finitenessTest,, mapIsFinite, algebra_lib
@subsubsection finitenessTest
@cindex finitenessTest
@c ---content finitenessTest---
Procedure from library @code{algebra.lib} (@pxref{algebra_lib}).

@table @asis
@item @strong{Usage:}
finitenessTest(J[,v]); J ideal, v intvec (say v1,...,vr with vi>0)

@item @strong{Return:}
@format
         a list l with l[1] integer, l[2], l[3], l[4] ideals
         - l[1] = 1 if var(v1),...,var(vr) are in l[2] and 0 else
         - l[2] (resp. l[3]) contains those variables which occur,
           (resp. occur not) as pure power in the leading term of one of the
           generators of J,
         - l[4] contains those J[i] for which the leading term is a pure power
           of a variable (which is then in l[2])
         (default: v = [1,2,..,nvars(basering)])
@end format

@item @strong{Theory:}
If J is a standard basis of an ideal generated by x_1 - f_1(y),...,
x_n - f_n with y_j ordered lexicographically and y_j >> x_i, then,
if y_i appears as pure power in the leading term of J[k]. J[k] defines
an integral relation for y_i over the y_(i+1),... and the f's.
Moreover, in this situation, if l[2] = y_1,...,y_r, then K[y_1,...y_r]
is finite over K[f_1..f_n]. If J contains furthermore polynomials
h_j(y), then K[y_1,...y_z]/<h_j> is finite over K[f_1..f_n].

@end table
@strong{Example:}
@smallexample
@c computed example finitenessTest d2t_singular/algebra_lib.doc:541
LIB "algebra.lib";
ring s = 0,(x,y,z,a,b,c),(lp(3),dp);
ideal i= a -(xy)^3+x2-z, b -y2-1, c -z3;
ideal j = a -(xy)^3+x2-z, b -y2-1, c -z3, xy;
finitenessTest(std(i),1..3);
@expansion{} [1]:
@expansion{}    0
@expansion{} [2]:
@expansion{}    _[1]=y
@expansion{}    _[2]=z
@expansion{} [3]:
@expansion{}    _[1]=x
@expansion{}    _[2]=a
@expansion{}    _[3]=b
@expansion{}    _[4]=c
@expansion{} [4]:
@expansion{}    _[1]=z3-c
@expansion{}    _[2]=y2-b+1
finitenessTest(std(j),1..3);
@expansion{} [1]:
@expansion{}    1
@expansion{} [2]:
@expansion{}    _[1]=x
@expansion{}    _[2]=y
@expansion{}    _[3]=z
@expansion{} [3]:
@expansion{}    _[1]=a
@expansion{}    _[2]=b
@expansion{}    _[3]=c
@expansion{} [4]:
@expansion{}    _[1]=z3-c
@expansion{}    _[2]=y2-b+1
@expansion{}    _[3]=x2-z+a
@c end example finitenessTest d2t_singular/algebra_lib.doc:541
@end smallexample
@c ---end content finitenessTest---


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/brnoeth_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/brnoeth_lib.doc INSTEAD
@c library version: (1.11.2.5,2002/10/18)
@c library file: ../Singular/LIB/brnoeth.lib
@cindex brnoeth.lib
@cindex brnoeth_lib
@table @asis
@item @strong{Library:}
brnoeth.lib
@item @strong{Purpose:}
  Brill-Noether Algorithm, Weierstrass-SG and AG-codes
@item @strong{Authors:}
Jose Ignacio Farran Martin, ignfar@@eis.uva.es
@*Christoph Lossen, lossen@@mathematik.uni-kl.de

@item @strong{Overview:}
Implementation of the Brill-Noether algorithm for solving the
Riemann-Roch problem and applications in Algebraic Geometry codes.
The computation of Weierstrass semigroups is also implemented.@*
The procedures are intended only for plane (singular) curves defined over
a prime field of positive characteristic.@*
For more information about the library see the end of the file brnoeth.lib.

@end table

@strong{Main procedures:}
@menu
* Adj_div:: computes the conductor of a curve
* NSplaces:: computes non-singular places with given degrees
* BrillNoether:: computes a vector space basis of the linear system L(D)
* Weierstrass:: computes the Weierstrass semigroup of C at P up to m
* extcurve:: extends the curve C to an extension of degree d
* AGcode_L:: computes the evaluation AG code with divisors G and D
* AGcode_Omega:: computes the residual AG code with divisors G and D
* prepSV:: preprocessing for the basic decoding algorithm
* decodeSV:: decoding of a word with the basic decoding algorithm
@end menu
@strong{Auxiliary procedures:}
@menu
* closed_points:: computes the zero-set of a zero-dim. ideal in 2 vars
* dual_code:: computes the dual code
* sys_code:: computes an equivalent systematic code
* permute_L:: applies a permutation to a list
@end menu
@cindex Weierstrass semigroup
@cindex Algebraic Geometry codes
@cindex Brill-Noether algorithm
@c inserted refs from d2t_singular/brnoeth_lib.doc:47
@ifinfo
@menu
See also:
* hnoether_lib::
* triang_lib::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{hnoether_lib};
@ref{triang_lib}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:47

@c ---end content LibInfo---

@c ------------------- Adj_div -------------
@node Adj_div, NSplaces,, brnoeth_lib
@subsubsection Adj_div
@cindex Adj_div
@c ---content Adj_div---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
Adj_div( f [,l] ); f a poly, [l a list]

@item @strong{Return:}
list L with the computed data:
  @format
  L[1] a list of rings: L[1][1]=aff_r (affine), L[1][2]=Proj_R (projective),
  L[2] an intvec with 2 entries (degree, genus),
  L[3] a list of intvec (closed places),
  L[4] an intvec (conductor),
  L[5] a list of lists:
     L[5][d][1] a (local) ring over an extension of degree d,
     L[5][d][2] an intvec (degrees of base points of places of degree d)
  @end format

@item @strong{Note:}
@code{Adj_div(f);} computes and stores the fundamental data of the
plane curve defined by f as needed for AG codes.
@*In the affine ring you can find the following data:
   @format
   poly CHI:  affine equation of the curve,
   ideal Aff_SLocus:  affine singular locus (std),
   list Inf_Points:  points at infinity
            Inf_Points[1]:  singular points
            Inf_Points[2]:  non-singular points,
   list Aff_SPoints:  affine singular points (if not empty).
   @end format
In the projective ring you can find the projective equation
CHI of the curve (poly).
@*In the local rings L[5][d][1] you find:
   @format
   list POINTS:  base points of the places of degree d,
   list LOC_EQS:  local equations of the curve at the base points,
   list BRANCHES:  Hamburger-Noether developments of the places,
   list PARAMETRIZATIONS:  local parametrizations of the places,
   @end format
Each entry of the list L[3] corresponds to one closed place (i.e.,
a place and all its conjugates) which is represented by an intvec
of size two, the first entry is the degree of the place (in
particular, it tells the local ring where to find the data
describing one representative of the closed place), and the
second one is the position of those data in the lists POINTS, etc.,
inside this local ring.@*
In the intvec L[4] (conductor) the i-th entry corresponds to the
i-th entry in the list of places L[3].

With no optional arguments, the conductor is computed by
local invariants of the singularities; otherwise it is computed
by the Dedekind formula. @*
An affine point is represented by a list P where P[1] is std
of a prime ideal and P[2] is an intvec containing the position
of the places above P in the list of closed places L[3]. @*
If the point is at infinity, P[1] is a homogeneous irreducible
polynomial in two variables.

If @code{printlevel>=0} additional comments are displayed (default:
@code{printlevel=0}).

@cindex Hamburger-Noether expansions
@cindex adjunction divisor
@end table
@strong{Example:}
@smallexample
@c computed example Adj_div d2t_singular/brnoeth_lib.doc:124
LIB "brnoeth.lib";
int plevel=printlevel;
printlevel=-1;
ring s=2,(x,y),lp;
list C=Adj_div(y9+y8+xy6+x2y3+y2+x3);
@expansion{} The genus of the curve is 3
def aff_R=C[1][1];      // the affine ring
setring aff_R;
listvar(aff_R);         // data in the affine ring
@expansion{} // aff_R                [0]  *ring
@expansion{} // Inf_Points           [0]  list, size: 2
@expansion{} // Aff_SPoints          [0]  list, size: 3
@expansion{} // Aff_SLocus           [0]  ideal (SB), 2 generator(s)
@expansion{} // CHI                  [0]  poly
CHI;                    // affine equation of the curve
@expansion{} x3+x2y3+xy6+y9+y8+y2
Aff_SLocus;             // ideal of the affine singular locus
@expansion{} Aff_SLocus[1]=y8+y2
@expansion{} Aff_SLocus[2]=x2+y6
Aff_SPoints[1];         // 1st affine singular point: (1:1:1), no.1
@expansion{} [1]:
@expansion{}    _[1]=y2+y+1
@expansion{}    _[2]=x+1
@expansion{} [2]:
@expansion{}    1
Inf_Points[1];          // singular point(s) at infinity: (1:0:0), no.4
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       y
@expansion{}    [2]:
@expansion{}       4
Inf_Points[2];          // list of non-singular points at infinity
@expansion{} empty list
//
def proj_R=C[1][2];     // the projective ring
setring proj_R;
CHI;                    // projective equation of the curve
@expansion{} x3z6+x2y3z4+xy6z2+y9+y8z+y2z7
C[2][1];                // degree of the curve
@expansion{} 9
C[2][2];                // genus of the curve
@expansion{} 3
C[3];                   // list of computed places
@expansion{} [1]:
@expansion{}    2,1
@expansion{} [2]:
@expansion{}    1,1
@expansion{} [3]:
@expansion{}    1,2
@expansion{} [4]:
@expansion{}    1,3
C[4];                   // adjunction divisor (all points are singular!)
@expansion{} 2,2,2,42
//
// we look at the place(s) of degree 2 by changing to the ring
C[5][2][1];
@expansion{} //   characteristic : 2
@expansion{} //   1 parameter    : a
@expansion{} //   minpoly        : ...
@expansion{} //   number of vars : 3
@expansion{} //        block   1 : ordering ls
@expansion{} //                  : names    x y t
@expansion{} //        block   2 : ordering C
def S(2)=C[5][2][1];
setring S(2);
POINTS;                // base point(s) of place(s) of degree 2: (1:a:1)
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       1
@expansion{}    [2]:
@expansion{}       (a)
@expansion{}    [3]:
@expansion{}       1
LOC_EQS;               // local equation(s)
@expansion{} [1]:
@expansion{}    y2+y3+(a+1)*y4+y6+(a+1)*y8+y9+(a)*xy2+(a+1)*xy4+xy6+(a+1)*x2y+(a)*x2y2\
   +x2y3+x3
PARAMETRIZATIONS;      // parametrization(s) and exactness
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=t2+(a+1)*t3
@expansion{}       _[2]=t3+(a+1)*t4
@expansion{}    [2]:
@expansion{}       3,4
BRANCHES;              // Hamburger-Noether development
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1,1]=0
@expansion{}       _[1,2]=x
@expansion{}       _[1,3]=0
@expansion{}       _[2,1]=0
@expansion{}       _[2,2]=1
@expansion{}       _[2,3]=(a+1)
@expansion{}    [2]:
@expansion{}       1,-4
@expansion{}    [3]:
@expansion{}       0
@expansion{}    [4]:
@expansion{}       y+(a+1)*xy+(a)*x2y+(a)*x2y2+(a+1)*x3+x3y+x3y3+(a)*x4+(a+1)*x4y2+(a+\
   1)*x4y3+x5+x5y2+(a)*x6+(a+1)*x6y2+x6y4+x6y5+x7y+(a+1)*x8+(a+1)*x8y+x8y4+(\
   a+1)*x8y6+x9+x9y7+(a+1)*x10+x11y6+(a+1)*x12y4+x13y5+x14+x14y+x15y4+x16+(a\
   +1)*x16y2+x17y3+x19y2+(a+1)*x20+x21y+x23
printlevel=plevel;
@c end example Adj_div d2t_singular/brnoeth_lib.doc:124
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:158
@ifinfo
@menu
See also:
* NSplaces::
* closed_points::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{NSplaces};
@ref{closed_points}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:158

@c ---end content Adj_div---

@c ------------------- NSplaces -------------
@node NSplaces, BrillNoether, Adj_div, brnoeth_lib
@subsubsection NSplaces
@cindex NSplaces
@c ---content NSplaces---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
NSplaces( h, CURVE ), where h is an intvec and CURVE is a list

@item @strong{Return:}
list L with updated data of CURVE after computing all non-singular
affine closed places whose degrees are in the intvec h: @*
   @format
   in L[1][1]: (affine ring) lists Aff_Points(d) with affine non-singular
               (closed) points of degree d (if non-empty),
   in L[3]:    the newly computed closed places are added,
   in L[5]:    local rings created/updated to store (repres. of) new places.
   @end format
See @ref{Adj_div} for a description of the entries in L.

@item @strong{Note:}
The list_expression should be the output of the procedure Adj_div.@*
If @code{printlevel>=0} additional comments are displayed (default:
@code{printlevel=0}).

@end table
@strong{Example:}
@smallexample
@c computed example NSplaces d2t_singular/brnoeth_lib.doc:194
LIB "brnoeth.lib";
int plevel=printlevel;
printlevel=-1;
ring s=2,(x,y),lp;
list C=Adj_div(x3y+y3+x);
@expansion{} The genus of the curve is 3
// The list of computed places:
C[3];
@expansion{} [1]:
@expansion{}    1,1
@expansion{} [2]:
@expansion{}    1,2
// create places up to degree 4
list L=NSplaces(1..4,C);
// The list of computed places is now:
L[3];
@expansion{} [1]:
@expansion{}    1,1
@expansion{} [2]:
@expansion{}    1,2
@expansion{} [3]:
@expansion{}    1,3
@expansion{} [4]:
@expansion{}    2,1
@expansion{} [5]:
@expansion{}    3,1
@expansion{} [6]:
@expansion{}    3,2
@expansion{} [7]:
@expansion{}    3,3
@expansion{} [8]:
@expansion{}    3,4
@expansion{} [9]:
@expansion{}    3,5
@expansion{} [10]:
@expansion{}    3,6
@expansion{} [11]:
@expansion{}    3,7
@expansion{} [12]:
@expansion{}    4,1
@expansion{} [13]:
@expansion{}    4,2
@expansion{} [14]:
@expansion{}    4,3
// e.g., affine non-singular points of degree 4 :
def aff_r=L[1][1];
setring aff_r;
Aff_Points(4);
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=y2+y+1
@expansion{}       _[2]=x2+xy+x+1
@expansion{}    [2]:
@expansion{}       12
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=y4+y3+y2+y+1
@expansion{}       _[2]=x+y2+y+1
@expansion{}    [2]:
@expansion{}       13
@expansion{} [3]:
@expansion{}    [1]:
@expansion{}       _[1]=y4+y3+1
@expansion{}       _[2]=x+y3+y
@expansion{}    [2]:
@expansion{}       14
// e.g., base point of the 1st place of degree 4 :
def S(4)=L[5][4][1];
setring S(4);
POINTS[1];
@expansion{} [1]:
@expansion{}    (a3)
@expansion{} [2]:
@expansion{}    (a2+a)
@expansion{} [3]:
@expansion{}    1
printlevel=plevel;
@c end example NSplaces d2t_singular/brnoeth_lib.doc:194
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:217
@ifinfo
@menu
See also:
* Adj_div::
* closed_points::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{Adj_div};
@ref{closed_points}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:217

@c ---end content NSplaces---

@c ------------------- BrillNoether -------------
@node BrillNoether, Weierstrass, NSplaces, brnoeth_lib
@subsubsection BrillNoether
@cindex BrillNoether
@c ---content BrillNoether---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
BrillNoether(G,CURVE); G an intvec, CURVE a list

@item @strong{Return:}
list of ideals (each of them with two homogeneous generators,
which represent the numerator, resp. denominator, of a rational
function).@*
The corresponding rational functions form a vector basis of the
linear system L(G), G a rational divisor over a non-singular curve.

@item @strong{Note:}
The procedure must be called from the ring CURVE[1][2], where
CURVE is the output of the procedure @code{NSplaces}. @*
The intvec G represents a rational divisor supported on the closed
places of CURVE[3] (e.g. @code{G=2,0,-1;} means 2 times the closed
place 1 minus 1 times the closed place 3).

@end table
@strong{Example:}
@smallexample
@c computed example BrillNoether d2t_singular/brnoeth_lib.doc:251
LIB "brnoeth.lib";
int plevel=printlevel;
printlevel=-1;
ring s=2,(x,y),lp;
list C=Adj_div(x3y+y3+x);
@expansion{} The genus of the curve is 3
C=NSplaces(1..4,C);
// the first 3 Places in C[3] are of degree 1.
// we define the rational divisor G = 4*C[3][1]+4*C[3][3] (of degree 8):
intvec G=4,0,4;
def R=C[1][2];
setring R;
list LG=BrillNoether(G,C);
@expansion{} Vector basis successfully computed
// here is the vector basis of L(G):
LG;
@expansion{} [1]:
@expansion{}    _[1]=1
@expansion{}    _[2]=1
@expansion{} [2]:
@expansion{}    _[1]=y
@expansion{}    _[2]=x
@expansion{} [3]:
@expansion{}    _[1]=z
@expansion{}    _[2]=x
@expansion{} [4]:
@expansion{}    _[1]=y2
@expansion{}    _[2]=x2
@expansion{} [5]:
@expansion{}    _[1]=xz2+y3
@expansion{}    _[2]=x3
@expansion{} [6]:
@expansion{}    _[1]=xyz2+y4
@expansion{}    _[2]=x4
printlevel=plevel;
@c end example BrillNoether d2t_singular/brnoeth_lib.doc:251
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:269
@ifinfo
@menu
See also:
* Adj_div::
* NSplaces::
* Weierstrass::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{Adj_div};
@ref{NSplaces};
@ref{Weierstrass}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:269

@c ---end content BrillNoether---

@c ------------------- Weierstrass -------------
@node Weierstrass, extcurve, BrillNoether, brnoeth_lib
@subsubsection Weierstrass
@cindex Weierstrass
@c ---content Weierstrass---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
Weierstrass( i, m, CURVE ); i,m integers and CURVE a list

@item @strong{Return:}
list WS of two lists:
  @format
  WS[1] list of integers (Weierstr. semigroup of the curve at place i up to m)
  WS[2] list of ideals (the associated rational functions)
  @end format

@item @strong{Note:}
The procedure must be called from the ring CURVE[1][2],
where CURVE is the output of the procedure @code{NSplaces}.
@* i represents the place CURVE[3][i].
@* Rational functions are represented by numerator/denominator
in form of ideals with two homogeneous generators.

@item @strong{Warning:}
The place must be rational, i.e., necessarily CURVE[3][i][1]=1. @*

@end table
@strong{Example:}
@smallexample
@c computed example Weierstrass d2t_singular/brnoeth_lib.doc:306
LIB "brnoeth.lib";
int plevel=printlevel;
printlevel=-1;
ring s=2,(x,y),lp;
list C=Adj_div(x3y+y3+x);
@expansion{} The genus of the curve is 3
C=NSplaces(1..4,C);
def R=C[1][2];
setring R;
// Place C[3][1] has degree 1 (i.e it is rational);
list WS=Weierstrass(1,7,C);
@expansion{} Vector basis successfully computed
// the first part of the list is the Weierstrass semigroup up to 7 :
WS[1];
@expansion{} [1]:
@expansion{}    0
@expansion{} [2]:
@expansion{}    3
@expansion{} [3]:
@expansion{}    5
@expansion{} [4]:
@expansion{}    6
@expansion{} [5]:
@expansion{}    7
// and the second part are the corresponding functions :
WS[2];
@expansion{} [1]:
@expansion{}    _[1]=1
@expansion{}    _[2]=1
@expansion{} [2]:
@expansion{}    _[1]=y
@expansion{}    _[2]=z
@expansion{} [3]:
@expansion{}    _[1]=xy
@expansion{}    _[2]=z2
@expansion{} [4]:
@expansion{}    _[1]=y2
@expansion{}    _[2]=z2
@expansion{} [5]:
@expansion{}    _[1]=y3
@expansion{}    _[2]=xz2
printlevel=plevel;
@c end example Weierstrass d2t_singular/brnoeth_lib.doc:306
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:324
@ifinfo
@menu
See also:
* Adj_div::
* BrillNoether::
* NSplaces::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{Adj_div};
@ref{BrillNoether};
@ref{NSplaces}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:324

@c ---end content Weierstrass---

@c ------------------- extcurve -------------
@node extcurve, AGcode_L, Weierstrass, brnoeth_lib
@subsubsection extcurve
@cindex extcurve
@c ---content extcurve---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
extcurve( d, CURVE ); d an integer, CURVE a list

@item @strong{Return:}
list L which is the update of the list CURVE with additional entries
   @format
   L[1][3]: ring (p,a),(x,y),lp (affine),
   L[1][4]: ring (p,a),(x,y,z),lp (projective),
   L[1][5]: ring (p,a),(x,y,t),ls (local),
   L[2][3]: int  (the number of rational places),
   @end format
the rings being defined over a field extension of degree d. @*
If d<2 then @code{extcurve(d,CURVE);} creates a list L which
is the update of the list CURVE with additional entries
   @format
   L[1][5]: ring p,(x,y,t),ls,
   L[2][3]: int  (the number of computed places over the base field).
   @end format
In both cases, in the ring L[1][5] lists with the data for all the
computed rational places (after a field extension of degree d) are
created (see @ref{Adj_div}):
   @format
   lists POINTS, LOC_EQS, BRANCHES, PARAMETRIZATIONS.
   @end format

@item @strong{Note:}
The list CURVE should be the output of @code{NSplaces},
and must contain (at least) one place of degree d. @*
You actually need all the places with degree dividing d.
Otherwise, not all the places are computed, but only part of them. @*
This procedure must be executed before constructing AG codes,
even if no extension is needed. The ring L[1][4] must be active
when constructing codes over the field extension.@*

@end table
@strong{Example:}
@smallexample
@c computed example extcurve d2t_singular/brnoeth_lib.doc:375
LIB "brnoeth.lib";
int plevel=printlevel;
printlevel=-1;
ring s=2,(x,y),lp;
list C=Adj_div(x5+y2+y);
@expansion{} The genus of the curve is 2
C=NSplaces(1..4,C);
// since we have all points up to degree 4, we can extend the curve
// to that extension, in order to get rational points over F_16;
C=extcurve(4,C);
@expansion{} Total number of rational places : NrRatPl = 33
// e.g., display the basepoint of place no. 32:
def R=C[1][5];
setring R;
POINTS[32];
@expansion{} [1]:
@expansion{}    (a3+a2+a+1)
@expansion{} [2]:
@expansion{}    (a2+a)
@expansion{} [3]:
@expansion{}    1
printlevel=plevel;
@c end example extcurve d2t_singular/brnoeth_lib.doc:375
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:392
@ifinfo
@menu
See also:
* AGcode_L::
* AGcode_Omega::
* Adj_div::
* NSplaces::
* closed_points::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{AGcode_L};
@ref{AGcode_Omega};
@ref{Adj_div};
@ref{NSplaces};
@ref{closed_points}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:392

@c ---end content extcurve---

@c ------------------- AGcode_L -------------
@node AGcode_L, AGcode_Omega, extcurve, brnoeth_lib
@subsubsection AGcode_L
@cindex AGcode_L
@c ---content AGcode_L---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
AGcode_L( G, D, EC ); G,D intvec, EC a list

@item @strong{Return:}
a generator matrix for the evaluation AG code defined by the
divisors G and D.

@item @strong{Note:}
The procedure must be called within the ring EC[1][4],
where EC is the output of @code{extcurve(d)} (or within
the ring EC[1][2] if d=1). @*
The entry i in the intvec D refers to the i-th rational
place in EC[1][5] (i.e., to POINTS[i], etc., see @ref{extcurve}).@*
The intvec G represents a rational divisor (see @ref{BrillNoether}
for more details).@*
The code evaluates the vector basis of L(G) at the rational
places given by D.

@item @strong{Warnings:}
G should satisfy
@ifinfo
@math{ 2*genus-2 < deg(G) < size(D) }
@end ifinfo
@tex
$ 2*genus-2 < deg(G) < size(D) $
@end tex
, which is
not checked by the algorithm.
@*G and D should have disjoint supports (checked by the algorithm).

@end table
@strong{Example:}
@smallexample
@c computed example AGcode_L d2t_singular/brnoeth_lib.doc:432
LIB "brnoeth.lib";
int plevel=printlevel;
printlevel=-1;
ring s=2,(x,y),lp;
list HC=Adj_div(x3+y2+y);
@expansion{} The genus of the curve is 1
HC=NSplaces(1..2,HC);
HC=extcurve(2,HC);
@expansion{} Total number of rational places : NrRatPl = 9
def ER=HC[1][4];
setring ER;
intvec G=5;      // the rational divisor G = 5*HC[3][1]
intvec D=2..9;   // D = sum of the rational places no. 2..9 over F_4
// let us construct the corresponding evaluation AG code :
matrix C=AGcode_L(G,D,HC);
@expansion{} Vector basis successfully computed
// here is a linear code of type [8,5,>=3] over F_4
print(C);
@expansion{} 0,0,(a),  (a+1),1,  1,    (a+1),(a),
@expansion{} 1,0,(a),  (a+1),(a),(a+1),(a),  (a+1),
@expansion{} 1,1,1,    1,    1,  1,    1,    1,
@expansion{} 0,0,(a+1),(a),  1,  1,    (a),  (a+1),
@expansion{} 0,0,(a+1),(a),  (a),(a+1),1,    1
printlevel=plevel;
@c end example AGcode_L d2t_singular/brnoeth_lib.doc:432
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:451
@ifinfo
@menu
See also:
* AGcode_Omega::
* Adj_div::
* BrillNoether::
* extcurve::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{AGcode_Omega};
@ref{Adj_div};
@ref{BrillNoether};
@ref{extcurve}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:451

@c ---end content AGcode_L---

@c ------------------- AGcode_Omega -------------
@node AGcode_Omega, prepSV, AGcode_L, brnoeth_lib
@subsubsection AGcode_Omega
@cindex AGcode_Omega
@c ---content AGcode_Omega---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
AGcode_Omega( G, D, EC ); G,D intvec, EC a list

@item @strong{Return:}
a generator matrix for the residual AG code defined by the
divisors G and D.

@item @strong{Note:}
The procedure must be called within the ring EC[1][4],
where EC is the output of @code{extcurve(d)} (or within
the ring EC[1][2] if d=1). @*
The entry i in the intvec D refers to the i-th rational
place in EC[1][5] (i.e., to POINTS[i], etc., see @ref{extcurve}).@*
The intvec G represents a rational divisor (see @ref{BrillNoether}
for more details).@*
The code computes the residues of a vector space basis of

@ifinfo
@math{\Omega(G-D)}
@end ifinfo
@tex
$\Omega(G-D)$
@end tex
 at the rational places given by D.

@item @strong{Warnings:}
G should satisfy
@ifinfo
@math{ 2*genus-2 < deg(G) < size(D) }
@end ifinfo
@tex
$ 2*genus-2 < deg(G) < size(D) $
@end tex
, which is
not checked by the algorithm.
@*G and D should have disjoint supports (checked by the algorithm).

@end table
@strong{Example:}
@smallexample
@c computed example AGcode_Omega d2t_singular/brnoeth_lib.doc:491
LIB "brnoeth.lib";
int plevel=printlevel;
printlevel=-1;
ring s=2,(x,y),lp;
list HC=Adj_div(x3+y2+y);
@expansion{} The genus of the curve is 1
HC=NSplaces(1..2,HC);
HC=extcurve(2,HC);
@expansion{} Total number of rational places : NrRatPl = 9
def ER=HC[1][4];
setring ER;
intvec G=5;      // the rational divisor G = 5*HC[3][1]
intvec D=2..9;   // D = sum of the rational places no. 2..9 over F_4
// let us construct the corresponding residual AG code :
matrix C=AGcode_Omega(G,D,HC);
@expansion{} Vector basis successfully computed
// here is a linear code of type [8,3,>=5] over F_4
print(C);
@expansion{} 0,    (a),(a),(a),  (a+1),1,0,  0,
@expansion{} (a+1),1,  (a),0,    (a),  0,(a),0,
@expansion{} (a+1),0,  (a),(a+1),(a+1),0,0,  1
printlevel=plevel;
@c end example AGcode_Omega d2t_singular/brnoeth_lib.doc:491
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:510
@ifinfo
@menu
See also:
* AGcode_L::
* Adj_div::
* BrillNoether::
* extcurve::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{AGcode_L};
@ref{Adj_div};
@ref{BrillNoether};
@ref{extcurve}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:510

@c ---end content AGcode_Omega---

@c ------------------- prepSV -------------
@node prepSV, decodeSV, AGcode_Omega, brnoeth_lib
@subsubsection prepSV
@cindex prepSV
@c ---content prepSV---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
prepSV( G, D, F, EC ); G,D,F intvecs and EC a list

@item @strong{Return:}
list E of size n+3, where n=size(D). All its entries but E[n+3]
are matrices:
   @format
   E[1]:  parity check matrix for the current AG code
   E[2] ... E[n+2]:  matrices used in the procedure decodeSV
   E[n+3]:  intvec with
       E[n+3][1]: correction capacity
@ifinfo
@math{epsilon}
@end ifinfo
@tex
$epsilon$
@end tex
 of the algorithm
       E[n+3][2]: designed Goppa distance
@ifinfo
@math{delta}
@end ifinfo
@tex
$delta$
@end tex
 of the current AG code
   @end format

@item @strong{Note:}
Computes the preprocessing for the basic (Skorobogatov-Vladut)
decoding algorithm.@*
The procedure must be called within the ring EC[1][4], where EC is
the output of @code{extcurve(d)} (or in the ring EC[1][2] if d=1) @*
The intvec G and F represent rational divisors (see
@ref{BrillNoether} for more details).@*
The intvec D refers to rational places (see @ref{AGcode_Omega}
for more details.).
The current AG code is @code{AGcode_Omega(G,D,EC)}.@*
If you know the exact minimum distance d and you want to use it in
@code{decodeSV} instead of
@ifinfo
@math{delta}
@end ifinfo
@tex
$delta$
@end tex
, you can change the value
of E[n+3][2] to d before applying decodeSV.
@*If you have a systematic encoding for the current code and want to
keep it during the decoding, you must previously permute D (using
@code{permute_L(D,P);}), e.g., according to the permutation
P=L[3], L being the output of @code{sys_code}.

@item @strong{Warnings:}
F must be a divisor with support disjoint from the support of D and
with degree
@ifinfo
@math{epsilon + genus}
@end ifinfo
@tex
$epsilon + genus$
@end tex
, where

@ifinfo
@math{epsilon:=[(deg(G)-3*genus+1)/2]}
@end ifinfo
@tex
$epsilon:=[(deg(G)-3*genus+1)/2]$
@end tex
.@*
G should satisfy
@ifinfo
@math{ 2*genus-2 < deg(G) < size(D) }
@end ifinfo
@tex
$ 2*genus-2 < deg(G) < size(D) $
@end tex
, which is
not checked by the algorithm.
@*G and D should also have disjoint supports (checked by the
algorithm).

@cindex SV-decoding algorithm, preprocessing
@end table
@strong{Example:}
@smallexample
@c computed example prepSV d2t_singular/brnoeth_lib.doc:569
LIB "brnoeth.lib";
int plevel=printlevel;
printlevel=-1;
ring s=2,(x,y),lp;
list HC=Adj_div(x3+y2+y);
@expansion{} The genus of the curve is 1
HC=NSplaces(1..2,HC);
HC=extcurve(2,HC);
@expansion{} Total number of rational places : NrRatPl = 9
def ER=HC[1][4];
setring ER;
intvec G=5;      // the rational divisor G = 5*HC[3][1]
intvec D=2..9;   // D = sum of the rational places no. 2..9 over F_4
// construct the corresp. residual AG code of type [8,3,>=5] over F_4:
matrix C=AGcode_Omega(G,D,HC);
@expansion{} Vector basis successfully computed
// we can correct 1 error and the genus is 1, thus F must have degree 2
// and support disjoint from that of D;
intvec F=2;
list SV=prepSV(G,D,F,HC);
@expansion{} Vector basis successfully computed
@expansion{} Vector basis successfully computed
@expansion{} Vector basis successfully computed
// now everything is prepared to decode with the basic algorithm;
// for example, here is a parity check matrix to compute the syndrome :
print(SV[1]);
@expansion{} 0,0,(a),  (a+1),1,  1,    (a+1),(a),
@expansion{} 1,0,(a),  (a+1),(a),(a+1),(a),  (a+1),
@expansion{} 1,1,1,    1,    1,  1,    1,    1,
@expansion{} 0,0,(a+1),(a),  1,  1,    (a),  (a+1),
@expansion{} 0,0,(a+1),(a),  (a),(a+1),1,    1
// and here you have the correction capacity of the algorithm :
int epsilon=SV[size(D)+3][1];
epsilon;
@expansion{} 1
printlevel=plevel;
@c end example prepSV d2t_singular/brnoeth_lib.doc:569
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:596
@ifinfo
@menu
See also:
* AGcode_Omega::
* decodeSV::
* extcurve::
* permute_L::
* sys_code::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{AGcode_Omega};
@ref{decodeSV};
@ref{extcurve};
@ref{permute_L};
@ref{sys_code}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:596

@c ---end content prepSV---

@c ------------------- decodeSV -------------
@node decodeSV, closed_points, prepSV, brnoeth_lib
@subsubsection decodeSV
@cindex decodeSV
@c ---content decodeSV---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
decodeSV( y, K ); y a row-matrix and K a list

@item @strong{Return:}
a codeword (row-matrix) if possible, resp. the 0-matrix (of size
1) if decoding is impossible.
@*For decoding the basic (Skorobogatov-Vladut) decoding algorithm
is applied.

@item @strong{Note:}
The list_expression should be the output K of the procedure
@code{prepSV}.@*
The matrix_expression should be a (1 x n)-matrix, where
n = ncols(K[1]).@*
The decoding may fail if the number of errors is greater than
the correction capacity of the algorithm.

@cindex SV-decoding algorithm
@end table
@strong{Example:}
@smallexample
@c computed example decodeSV d2t_singular/brnoeth_lib.doc:631
LIB "brnoeth.lib";
int plevel=printlevel;
printlevel=-1;
ring s=2,(x,y),lp;
list HC=Adj_div(x3+y2+y);
@expansion{} The genus of the curve is 1
HC=NSplaces(1..2,HC);
HC=extcurve(2,HC);
@expansion{} Total number of rational places : NrRatPl = 9
def ER=HC[1][4];
setring ER;
intvec G=5;      // the rational divisor G = 5*HC[3][1]
intvec D=2..9;   // D = sum of the rational places no. 2..9 over F_4
// construct the corresp. residual AG code of type [8,3,>=5] over F_4:
matrix C=AGcode_Omega(G,D,HC);
@expansion{} Vector basis successfully computed
// we can correct 1 error and the genus is 1, thus F must have degree 2
// and support disjoint from that of D
intvec F=2;
list SV=prepSV(G,D,F,HC);
@expansion{} Vector basis successfully computed
@expansion{} Vector basis successfully computed
@expansion{} Vector basis successfully computed
// now we produce 1 error on the zero-codeword :
matrix y[1][8];
y[1,3]=a;
// and then we decode :
print(decodeSV(y,SV));
@expansion{} 0,0,0,0,0,0,0,0
printlevel=plevel;
@c end example decodeSV d2t_singular/brnoeth_lib.doc:631
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:657
@ifinfo
@menu
See also:
* AGcode_Omega::
* extcurve::
* prepSV::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{AGcode_Omega};
@ref{extcurve};
@ref{prepSV}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:657

@c ---end content decodeSV---

@c ------------------- closed_points -------------
@node closed_points, dual_code, decodeSV, brnoeth_lib
@subsubsection closed_points
@cindex closed_points
@c ---content closed_points---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

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

@item @strong{Return:}
list of prime ideals (each a Groebner basis), corresponding to
the (distinct affine closed) points of V(I)

@item @strong{Note:}
The ideal must have dimension 0, the basering must have 2
variables, the ordering must be lp, and the base field must
be finite and prime.@*
It might be convenient to set the option(redSB) in advance.

@end table
@strong{Example:}
@smallexample
@c computed example closed_points d2t_singular/brnoeth_lib.doc:687
LIB "brnoeth.lib";
ring s=2,(x,y),lp;
// this is just the affine plane over F_4 :
ideal I=x4+x,y4+y;
list L=closed_points(I);
// and here you have all the points :
L;
@expansion{} [1]:
@expansion{}    _[1]=y2+y+1
@expansion{}    _[2]=x+y
@expansion{} [2]:
@expansion{}    _[1]=y2+y+1
@expansion{}    _[2]=x+1
@expansion{} [3]:
@expansion{}    _[1]=y2+y+1
@expansion{}    _[2]=x+y+1
@expansion{} [4]:
@expansion{}    _[1]=y2+y+1
@expansion{}    _[2]=x
@expansion{} [5]:
@expansion{}    _[1]=y+1
@expansion{}    _[2]=x2+x+1
@expansion{} [6]:
@expansion{}    _[1]=y+1
@expansion{}    _[2]=x+1
@expansion{} [7]:
@expansion{}    _[1]=y+1
@expansion{}    _[2]=x
@expansion{} [8]:
@expansion{}    _[1]=y
@expansion{}    _[2]=x2+x+1
@expansion{} [9]:
@expansion{}    _[1]=y
@expansion{}    _[2]=x+1
@expansion{} [10]:
@expansion{}    _[1]=y
@expansion{}    _[2]=x
@c end example closed_points d2t_singular/brnoeth_lib.doc:687
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:697
@ifinfo
@menu
See also:
* triang_lib::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{triang_lib}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:697

@c ---end content closed_points---

@c ------------------- dual_code -------------
@node dual_code, sys_code, closed_points, brnoeth_lib
@subsubsection dual_code
@cindex dual_code
@c ---content dual_code---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
dual_code(G); G a matrix of numbers

@item @strong{Return:}
a generator matrix of the dual code generated by G

@item @strong{Note:}
The input should be a matrix G of numbers. @*
The output is also a parity check matrix for the code defined by G

@cindex linear code, dual
@end table
@strong{Example:}
@smallexample
@c computed example dual_code d2t_singular/brnoeth_lib.doc:725
LIB "brnoeth.lib";
ring s=2,T,lp;
// here is the Hamming code of length 7 and dimension 3
matrix G[3][7]=1,0,1,0,1,0,1,0,1,1,0,0,1,1,0,0,0,1,1,1,1;
print(G);
@expansion{} 1,0,1,0,1,0,1,
@expansion{} 0,1,1,0,0,1,1,
@expansion{} 0,0,0,1,1,1,1
matrix H=dual_code(G);
print(H);
@expansion{} 1,1,1,0,0,0,0,
@expansion{} 1,0,0,1,1,0,0,
@expansion{} 0,1,0,1,0,1,0,
@expansion{} 1,1,0,1,0,0,1
@c end example dual_code d2t_singular/brnoeth_lib.doc:725
@end smallexample
@c ---end content dual_code---

@c ------------------- sys_code -------------
@node sys_code, permute_L, dual_code, brnoeth_lib
@subsubsection sys_code
@cindex sys_code
@c ---content sys_code---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
sys_code(C); C is a matrix of constants

@item @strong{Return:}
list L with:
   @format
   L[1] is the generator matrix in standard form of an equivalent code,
   L[2] is the parity check matrix in standard form of such code,
   L[3] is an intvec which represents the needed permutation.
   @end format

@item @strong{Note:}
Computes a systematic code which is equivalent to the given one.@*
The input should be a matrix of numbers.@*
The output has to be interpreted as follows: if the input was
the generator matrix of an AG code then one should apply the
permutation L[3] to the divisor D of rational points by means
of @code{permute_L(D,L[3]);} before continuing to work with the
code (for instance, if you want to use the systematic encoding
together with a decoding algorithm).

@cindex linear code, systematic
@end table
@strong{Example:}
@smallexample
@c computed example sys_code d2t_singular/brnoeth_lib.doc:770
LIB "brnoeth.lib";
ring s=3,T,lp;
matrix C[2][5]=0,1,0,1,1,0,1,0,0,1;
print(C);
@expansion{} 0,1,0,1,1,
@expansion{} 0,1,0,0,1
list L=sys_code(C);
L[3];
@expansion{} 2,4,3,1,5
// here is the generator matrix in standard form
print(L[1]);
@expansion{} 1,0,0,0,1,
@expansion{} 0,1,0,0,0
// here is the control matrix in standard form
print(L[2]);
@expansion{} 0, 0,1,0,0,
@expansion{} 0, 0,0,1,0,
@expansion{} -1,0,0,0,1
// we can check that both codes are dual to each other
print(L[1]*transpose(L[2]));
@expansion{} 0,0,0,
@expansion{} 0,0,0
@c end example sys_code d2t_singular/brnoeth_lib.doc:770
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:785
@ifinfo
@menu
See also:
* AGcode_Omega::
* permute_L::
* prepSV::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{AGcode_Omega};
@ref{permute_L};
@ref{prepSV}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:785

@c ---end content sys_code---

@c ------------------- permute_L -------------
@node permute_L,, sys_code, brnoeth_lib
@subsubsection permute_L
@cindex permute_L
@c ---content permute_L---
Procedure from library @code{brnoeth.lib} (@pxref{brnoeth_lib}).

@table @asis
@item @strong{Usage:}
permute_L( L, P ); L,P either intvecs or lists

@item @strong{Return:}
list obtained from L by applying the permutation given by P.

@item @strong{Note:}
If P is a list, all entries must be integers.

@end table
@strong{Example:}
@smallexample
@c computed example permute_L d2t_singular/brnoeth_lib.doc:811
LIB "brnoeth.lib";
list L=list();
L[1]="a";
L[2]="b";
L[3]="c";
L[4]="d";
intvec P=1,3,4,2;
// the list L is permuted according to P :
permute_L(L,P);
@expansion{} [1]:
@expansion{}    a
@expansion{} [2]:
@expansion{}    c
@expansion{} [3]:
@expansion{}    d
@expansion{} [4]:
@expansion{}    b
@c end example permute_L d2t_singular/brnoeth_lib.doc:811
@end smallexample
@c inserted refs from d2t_singular/brnoeth_lib.doc:823
@ifinfo
@menu
See also:
* AGcode_Omega::
* prepSV::
* sys_code::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{AGcode_Omega};
@ref{prepSV};
@ref{sys_code}.
@end iftex
@c end inserted refs from d2t_singular/brnoeth_lib.doc:823

@c ---end content permute_L---

repo_name: mthl/texinfo

license: mit


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/classify_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/classify_lib.doc INSTEAD
@c library version: (1.48.2.4,2002/04/11)
@c library file: ../Singular/LIB/classify.lib
@cindex classify.lib
@cindex classify_lib
@table @asis
@item @strong{Library:}
classify.lib
@item @strong{Purpose:}
  Arnold Classifier of Singularities
@item @strong{Authors:}
Kai Krueger, krueger@@mathematik.uni-kl.de
@*Corina Baciu, baciu@@mathematik.uni-kl.de

@item @strong{Overview:}
A library for classifying isolated hypersurface singularities w.r.t. right
equivalence, based on the determinator of singularities by V.I. Arnold.

@end table

@strong{Procedures:}
@menu
* basicinvariants:: computes Milnor number, determinacy-bound and corank of
* classify:: normal form of poly f determined with Arnold's method
* corank:: computes the corank of f (i.e. of the Hessian of f)
* Hcode:: coding of intvec v according to the number repetitions
* init_debug:: print trace and debugging information depending on int n
* internalfunctions:: display names of internal procedures of this library
* milnorcode:: Hilbert poly of [e-th] Milnor algebra coded with Hcode
* morsesplit:: residual part of f after applying the splitting lemma
* quickclass:: normal form of f determined by invariants (milnorcode)
* singularity:: normal form of singularity given by its name s and index
* swap:: returns b,a
* A_L:: shortcut for quickclass(f) or normalform(s)
* normalform:: normal form of singularity given by its name s
* debug_log:: print trace and debugging information w.r.t level>@@DeBug
@end menu
@c ---end content LibInfo---

@c ------------------- basicinvariants -------------
@node basicinvariants, classify,, classify_lib
@subsubsection basicinvariants
@cindex basicinvariants
@c ---content basicinvariants---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

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

@item @strong{Compute:}
Compute basic invariants of f: an upper bound d for the
determinacy, the milnor number mu and the corank c of f

@item @strong{Return:}
intvec: d, mu, c

@end table
@strong{Example:}
@smallexample
@c computed example basicinvariants d2t_singular/classify_lib.doc:61
LIB "classify.lib";
ring r=0,(x,y,z),ds;
basicinvariants((x2+3y-2z)^2+xyz-(x-y3+x2*z3)^3);
@expansion{} 5,4,2
@c end example basicinvariants d2t_singular/classify_lib.doc:61
@end smallexample
@c ---end content basicinvariants---

@c ------------------- classify -------------
@node classify, corank, basicinvariants, classify_lib
@subsubsection classify
@cindex classify
@c ---content classify---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

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

@item @strong{Compute:}
normal form and singularity type of f with respect to right
equivalence, as given in the book "Singularities of differentiable
maps, Volume I" by V.I. Arnold, S.M. Gusein-Zade, A.N. Varchenko

@item @strong{Return:}
normal form of f, of type poly

@item @strong{Remark:}
This version of classify is only beta. Please send bugs and
comments to: "Kai Krueger" <krueger@@mathematik.uni-kl.de> @*
Be sure to have at least Singular version 1.0.1. Updates can be
found at: @*
URL=http://www.mathematik.uni-kl.de/~krueger/Singular/

@item @strong{Note:}
type init_debug(n); (0 <= n <= 10) in order to get intermediate
information, higher values of n give more information.
@*The proc creates several global objects with names all starting
with @@, hence there should be no name conflicts

@end table
@strong{Example:}
@smallexample
@c computed example classify d2t_singular/classify_lib.doc:104
LIB "classify.lib";
ring r=0,(x,y,z),ds;
poly f=(x2+3y-2z)^2+xyz-(x-y3+x2*z3)^3;
classify(f);
@expansion{} About the singularity :
@expansion{}           Milnor number(f)   = 4
@expansion{}           Corank(f)          = 2
@expansion{}           Determinacy       <= 5
@expansion{} Guessing type via Milnorcode:   D[k]=D[4]
@expansion{}
@expansion{} Computing normal form ...
@expansion{} I have to apply the splitting lemma. This will take some time....:-)
@expansion{}    Arnold step number 4
@expansion{} The singularity
@expansion{}    -x3+3/2xy2+1/2x3y-1/16x2y2+3x2y3
@expansion{} is R-equivalent to D[4].
@expansion{}    Milnor number = 4
@expansion{}    modality      = 0
@expansion{} 2z2+x2y+y3
init_debug(3);
@expansion{} Debugging level change from  0  to  3
classify(f);
@expansion{} Computing Basicinvariants of f ...
@expansion{} About the singularity :
@expansion{}           Milnor number(f)   = 4
@expansion{}           Corank(f)          = 2
@expansion{}           Determinacy       <= 5
@expansion{} Hcode: 1,2,1,0,0
@expansion{} Milnor code :  1,1,1
@expansion{} Debug:(2):  entering HKclass3_teil_1 1,1,1
@expansion{} Debug:(2):  finishing HKclass3_teil_1
@expansion{} Guessing type via Milnorcode:   D[k]=D[4]
@expansion{}
@expansion{} Computing normal form ...
@expansion{} I have to apply the splitting lemma. This will take some time....:-)
@expansion{} Debug:(3):  Split the polynomial below using determinacy:  5
@expansion{} Debug:(3):  9y2-12yz+4z2-x3+6x2y-4x2z+xyz+x4+3x2y3
@expansion{} Debug:(2):  Permutations: 3,2,1
@expansion{} Debug:(2):  Permutations: 3,2,1
@expansion{} Debug:(2):  rank determined with Morse rg= 1
@expansion{} Residual singularity f= -x3+3/2xy2+1/2x3y-1/16x2y2+3x2y3
@expansion{} Step 3
@expansion{}    Arnold step number 4
@expansion{} The singularity
@expansion{}    -x3+3/2xy2+1/2x3y-1/16x2y2+3x2y3
@expansion{} is R-equivalent to D[4].
@expansion{}    Milnor number = 4
@expansion{}    modality      = 0
@expansion{} Debug:(2):  Decode:
@expansion{} Debug:(2):  S_in= D[4]   s_in= D[4]
@expansion{} Debug:(2):  Looking for Normalform of  D[k] with (k,r,s) = ( 4 , 0 , 0 )
@expansion{} Debug:(2):  Opening Singalarity-database:
@expansion{}  DBM: NFlist
@expansion{} Debug:(2):  DBMread( D[k] )= x2y+y^(k-1) .
@expansion{} Debug:(2):  S= f = x2y+y^(k-1);  Tp= x2y+y^(k-1) Key= I_D[k]
@expansion{} Polynom f= x2y+y3   crk= 2   Mu= 4  MlnCd= 1,1,1
@expansion{} Debug:(2):  Info= x2y+y3
@expansion{} Debug:(2):  Normal form NF(f)= 2*x(3)^2+x(1)^2*x(2)+x(2)^3
@expansion{} 2z2+x2y+y3
@c end example classify d2t_singular/classify_lib.doc:104
@end smallexample
@c ---end content classify---

@c ------------------- corank -------------
@node corank, Hcode, classify, classify_lib
@subsubsection corank
@cindex corank
@c ---content corank---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

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

@item @strong{Return:}
the corank of the Hessian matrix of f, of type int

@item @strong{Remark:}
corank(f) is the number of variables occurring in the residual
singularity after applying 'morsesplit' to f

@end table
@strong{Example:}
@smallexample
@c computed example corank d2t_singular/classify_lib.doc:136
LIB "classify.lib";
ring r=0,(x,y,z),ds;
poly f=(x2+3y-2z)^2+xyz-(x-y3+x2*z3)^3;
corank(f);
@expansion{} 2
@c end example corank d2t_singular/classify_lib.doc:136
@end smallexample
@c ---end content corank---

@c ------------------- Hcode -------------
@node Hcode, init_debug, corank, classify_lib
@subsubsection Hcode
@cindex Hcode
@c ---content Hcode---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

@table @asis
@item @strong{Usage:}
Hcode(v); v=intvec

@item @strong{Return:}
intvec, coding v according to the number of successive
repetitions of an entry

@end table
@strong{Example:}
@smallexample
@c computed example Hcode d2t_singular/classify_lib.doc:163
LIB "classify.lib";
intvec v1 = 1,3,5,5,2;
Hcode(v1);
@expansion{} 1,0,1,0,2,0,0,1,0
intvec v2 = 1,2,3,4,4,4,4,4,4,4,3,2,1;
Hcode(v2);
@expansion{} 1,1,1,7,1,1,1
@c end example Hcode d2t_singular/classify_lib.doc:163
@end smallexample
@c ---end content Hcode---

@c ------------------- init_debug -------------
@node init_debug, internalfunctions, Hcode, classify_lib
@subsubsection init_debug
@cindex init_debug
@c ---content init_debug---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

@table @asis
@item @strong{Usage:}
init_debug([level]); level=int

@item @strong{Compute:}
Set the global variable @@DeBug to level. The variable @@DeBug is
used by the function debug_log(level, list of strings) to know
when to print the list of strings. init_debug() reports only
changes of @@DeBug.

@item @strong{Note:}
The procedure init_debug(n); is useful as trace-mode. n may
range from 0 to 10, higher values of n give more information.

@end table
@strong{Example:}
@smallexample
@c computed example init_debug d2t_singular/classify_lib.doc:197
LIB "classify.lib";
init_debug();
debug_log(1,"no trace information printed");
init_debug(1);
@expansion{} Debugging level change from  0  to  1
debug_log(1,"some trace information");
@expansion{} some trace information
init_debug(2);
@expansion{} Debugging level change from  1  to  2
debug_log(2,"nice for debugging scripts");
@expansion{} Debug:(2):  nice for debugging scripts
init_debug(0);
@expansion{} Debugging switched off.
@c end example init_debug d2t_singular/classify_lib.doc:197
@end smallexample
@c ---end content init_debug---

@c ------------------- internalfunctions -------------
@node internalfunctions, milnorcode, init_debug, classify_lib
@subsubsection internalfunctions
@cindex internalfunctions
@c ---content internalfunctions---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

@table @asis
@item @strong{Usage:}
internalfunctions();

@item @strong{Return:}
nothing, display names of internal procedures of classify.lib

@end table
@strong{Example:}
@smallexample
@c computed example internalfunctions d2t_singular/classify_lib.doc:227
LIB "classify.lib";
internalfunctions();
@expansion{}    Internal functions for the classification using Arnold's method,
@expansion{}    the function numbers correspond to numbers in Arnold's classifier:
@expansion{} Klassifiziere(poly f);      //determine the type of the singularity f
@expansion{}   Funktion1bis (poly f, list cstn)
@expansion{}   Funktion3 (poly f, list cstn)
@expansion{}   Funktion6 (poly f, list cstn)
@expansion{}   Funktion13 (poly f, list cstn)
@expansion{}   Funktion17 (poly f, list cstn)
@expansion{}   Funktion25 (poly f, list cstn)
@expansion{}   Funktion40 (poly f, list cstn, int k)
@expansion{}   Funktion47 (poly f, list cstn)
@expansion{}   Funktion50 (poly f, list cstn)
@expansion{}   Funktion58 (poly fin, list cstn)
@expansion{}   Funktion59 (poly f, list cstn)
@expansion{}   Funktion66 (poly f, list cstn)
@expansion{}   Funktion82 (poly f, list cstn)
@expansion{}   Funktion83 (poly f, list cstn)
@expansion{}   Funktion91 (poly f, list cstn, int k)
@expansion{}   Funktion92 (poly f, list cstn, int k)
@expansion{}   Funktion93 (poly f, list cstn, int k)
@expansion{}   Funktion94 (poly f, list cstn, int k)
@expansion{}   Funktion95 (poly f, list cstn, int k)
@expansion{}   Funktion96 (poly f, list cstn, int k)
@expansion{}   Funktion97 (poly f, list cstn)
@expansion{}   Isomorphie_s82_x (poly f, poly fk, int k)
@expansion{}   Isomorphie_s82_z (poly f, poly fk, int k)
@expansion{}   Isomorphie_s17 (poly f, poly fk, int k, int ct)
@expansion{}   printresult (string f,string typ,int Mu,int m,int corank,int K)
@expansion{}
@expansion{}    Internal functions for the classifcation by invariants:
@expansion{}   Cubic (poly f)
@expansion{}   parity (int e)             //return the parity of e
@expansion{}   HKclass (intvec i)
@expansion{}   HKclass3( intvec i, string SG_Typ, int cnt)
@expansion{}   HKclass3_teil_1 (intvec i, string SG_Typ, int cnt)
@expansion{}   HKclass5 (intvec i, string SG_Typ, int cnt)
@expansion{}   HKclass5_teil_1 (intvec i, string SG_Typ, int cnt)
@expansion{}   HKclass5_teil_2 (intvec i, string SG_Typ, int cnt)
@expansion{}   HKclass7 (intvec i, string SG_Typ, int cnt)
@expansion{}   HKclass7_teil_1 (intvec i, string SG_Typ, int cnt)
@expansion{}
@expansion{}    Internal functions for the Morse-splitting lemma:
@expansion{}   Morse(poly fi, int K, int corank)  //splitting lemma itself
@expansion{}   Coeffs (list #)
@expansion{}   Coeff
@expansion{}
@expansion{}    Internal functions providing tools:
@expansion{}   ReOrder(poly f)
@expansion{}   Singularitaet(string typ,int k,int r,int s,poly a,poly b,poly c,poly d)
@expansion{}   RandomPolyK
@expansion{}   Faktorisiere(poly f, poly g, int p, int k)   compute g = (ax+by^k)^p
@expansion{}   Teile(poly f, poly g);             //divides f by g
@expansion{}   GetRf(poly f, int n);
@expansion{}   Show(poly f);
@expansion{}   checkring();
@expansion{}   DecodeNormalFormString(string s);
@expansion{}   Setring(int n, string ringname);
@expansion{}
@c end example internalfunctions d2t_singular/classify_lib.doc:227
@end smallexample
@c ---end content internalfunctions---

@c ------------------- milnorcode -------------
@node milnorcode, morsesplit, internalfunctions, classify_lib
@subsubsection milnorcode
@cindex milnorcode
@c ---content milnorcode---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

@table @asis
@item @strong{Usage:}
milnorcode(f[,e]); f=poly, e=int

@item @strong{Return:}
intvec, coding the Hilbert function of the e-th Milnor algebra
of f, i.e. of basering/(jacob(f)^e) (default e=1), according
to proc Hcode

@end table
@strong{Example:}
@smallexample
@c computed example milnorcode d2t_singular/classify_lib.doc:253
LIB "classify.lib";
ring r=0,(x,y,z),ds;
poly f=x2y+y3+z2;
milnorcode(f);
@expansion{} 1,1,1
milnorcode(f,2);  // a big second argument may result in memory overflow
@expansion{} 1,0,1,0,2,0,0,1,0
@c end example milnorcode d2t_singular/classify_lib.doc:253
@end smallexample
@c ---end content milnorcode---

@c ------------------- morsesplit -------------
@node morsesplit, quickclass, milnorcode, classify_lib
@subsubsection morsesplit
@cindex morsesplit
@c ---content morsesplit---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

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

@item @strong{Return:}
Normal form of f in M^3 after application of the splitting lemma

@item @strong{Compute:}
apply the splitting lemma (generalized Morse lemma) to f

@end table
@strong{Example:}
@smallexample
@c computed example morsesplit d2t_singular/classify_lib.doc:283
LIB "classify.lib";
ring r=0,(x,y,z),ds;
export r;
@expansion{} // ** `r` is already global
init_debug(1);
@expansion{} Debugging level is set to  1
poly f=(x2+3y-2z)^2+xyz-(x-y3+x2*z3)^3;
poly g=morsesplit(f);
@expansion{} Residual singularity f= -x3+3/2xy2+1/2x3y-1/16x2y2+3x2y3
g;
@expansion{} -x3+3/2xy2+1/2x3y-1/16x2y2+3x2y3
@c end example morsesplit d2t_singular/classify_lib.doc:283
@end smallexample
@c ---end content morsesplit---

@c ------------------- quickclass -------------
@node quickclass, singularity, morsesplit, classify_lib
@subsubsection quickclass
@cindex quickclass
@c ---content quickclass---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

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

@item @strong{Return:}
Normal form of f in Arnold's list

@item @strong{Remark:}
try to determine the normal form of f by invariants, mainly by
computing the Hilbert function of the Milnor algebra,
no coordinate change is needed (see also proc 'milnorcode').

@end table
@strong{Example:}
@smallexample
@c computed example quickclass d2t_singular/classify_lib.doc:317
LIB "classify.lib";
ring r=0,(x,y,z),ds;
poly f=(x2+3y-2z)^2+xyz-(x-y3+x2*z3)^3;
quickclass(f);
@expansion{} Singularity R-equivalent to :  D[k]=D[4]
@expansion{} normal form : z2+x2y+y3
@expansion{} z2+x2y+y3
@c end example quickclass d2t_singular/classify_lib.doc:317
@end smallexample
@c ---end content quickclass---

@c ------------------- singularity -------------
@node singularity, swap, quickclass, classify_lib
@subsubsection singularity
@cindex singularity
@c ---content singularity---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

@table @asis
@item @strong{Usage:}
singularity(t, l); t=string (name of singularity),
@*l=list of integers/polynomials (indices/parameters of singularity)

@item @strong{Compute:}
get the singularity named by type t from the database.
list l is as follows: @*
l= k [,r [,s [,a [,b [,c [,d]..]: k,r,s=int a,b,c,d=poly. @*
The name of the dbm-database file is: NFlist.[dir,pag].
The file is found in the current directory. If it does not
exist, please run the script MakeDBM first.

@item @strong{Return:}
Normal form and corank of the singularity named by type t and its
index (indices) l.

@end table
@strong{Example:}
@smallexample
@c computed example singularity d2t_singular/classify_lib.doc:353
LIB "classify.lib";
ring r=0,(x,y,z),(c,ds);
init_debug(0);
singularity("E[6k]",6);
@expansion{} [1]:
@expansion{}    x3+xy13+y19
@expansion{} [2]:
@expansion{}    2
singularity("T[k,r,s]", 3, 7, 5);
@expansion{} [1]:
@expansion{}    x3+xyz+z5+y7
@expansion{} [2]:
@expansion{}    3
poly f=y;
singularity("J[k,r]", 4, 0, 0, f);
@expansion{} [1]:
@expansion{}    x3+x2y4+y13
@expansion{} [2]:
@expansion{}    2
@c end example singularity d2t_singular/classify_lib.doc:353
@end smallexample
@c ---end content singularity---

@c ------------------- swap -------------
@node swap, A_L, singularity, classify_lib
@subsubsection swap
@cindex swap
@c ---content swap---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

@table @asis
@item @strong{Usage:}
swap(a,b);

@item @strong{Return:}
b,a if b,a is the input (any type)

@end table
@strong{Example:}
@smallexample
@c computed example swap d2t_singular/classify_lib.doc:382
LIB "classify.lib";
swap("variable1","variable2");
@expansion{} variable2 variable1
@c end example swap d2t_singular/classify_lib.doc:382
@end smallexample
@c ---end content swap---

@c ------------------- A_L -------------
@node A_L, normalform, swap, classify_lib
@subsubsection A_L
@cindex A_L
@c ---content A_L---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

@table @asis
@item @strong{Usage:}
A_L(f); f poly
@*A_L(s); s string, the name of the singularity

@item @strong{Compute:}
the normal form of f in Arnold's list of singularities in case 1,
in case 2 nothing has to be computed.

@item @strong{Return:}
A_L(f): compute via 'milnorcode' the class of f and return the normal
form of f found in the database.
@*A_L("name"): get the normal form from the database for the
singularity given by its name.

@end table
@strong{Example:}
@smallexample
@c computed example A_L d2t_singular/classify_lib.doc:414
LIB "classify.lib";
ring r=0,(a,b,c),ds;
poly f=A_L("E[13]");
f;
@expansion{} c2+a3+ab5+b8
A_L(f);
@expansion{} Singularity R-equivalent to :  E[6k+1]=E[13]
@expansion{} normal form : c2+a3+ab5+b8
@expansion{} c2+a3+ab5+b8
@c end example A_L d2t_singular/classify_lib.doc:414
@end smallexample
@c ---end content A_L---

@c ------------------- normalform -------------
@node normalform, debug_log, A_L, classify_lib
@subsubsection normalform
@cindex normalform
@c ---content normalform---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

@table @asis
@item @strong{Usage:}
normalform(s); s=string

@item @strong{Return:}
Arnold's normal form of singularity with name s

@end table
@strong{Example:}
@smallexample
@c computed example normalform d2t_singular/classify_lib.doc:441
LIB "classify.lib";
ring r=0,(a,b,c),ds;
normalform("E[13]");
@expansion{} c2+a3+ab5+b8
@c end example normalform d2t_singular/classify_lib.doc:441
@end smallexample
@c ---end content normalform---

@c ------------------- debug_log -------------
@node debug_log,, normalform, classify_lib
@subsubsection debug_log
@cindex debug_log
@c ---content debug_log---
Procedure from library @code{classify.lib} (@pxref{classify_lib}).

@table @asis
@item @strong{Usage:}
debug_log(level,li); level=int, li=comma separated "message" list

@item @strong{Compute:}
print "messages" if level>=@@DeBug.
@*useful for user-defined trace messages.

@end table
@strong{Example:}
@smallexample
@c computed example debug_log d2t_singular/classify_lib.doc:467
LIB "classify.lib";
example init_debug;
@expansion{} // proc init_debug from lib classify.lib
@expansion{} EXAMPLE:
@expansion{}   init_debug();
@expansion{}   debug_log(1,"no trace information printed");
@expansion{}   init_debug(1);
@expansion{} Debugging level change from  0  to  1
@expansion{}   debug_log(1,"some trace information");
@expansion{} some trace information
@expansion{}   init_debug(2);
@expansion{} Debugging level change from  1  to  2
@expansion{}   debug_log(2,"nice for debugging scripts");
@expansion{} Debug:(2):  nice for debugging scripts
@expansion{}   init_debug(0);
@expansion{} Debugging switched off.
@expansion{}
@c end example debug_log d2t_singular/classify_lib.doc:467
@end smallexample
@c inserted refs from d2t_singular/classify_lib.doc:472
@ifinfo
@menu
See also:
* init_debug::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{init_debug}.
@end iftex
@c end inserted refs from d2t_singular/classify_lib.doc:472

@c ---end content debug_log---


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/deform_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/deform_lib.doc INSTEAD
@c library version: (1.25.2.2,2003/02/24)
@c library file: ../Singular/LIB/deform.lib
@cindex deform.lib
@cindex deform_lib
@table @asis
@item @strong{Library:}
deform.lib
@item @strong{Purpose:}
    Miniversal Deformation of Singularities and Modules
@item @strong{Author:}
Bernd Martin, email: martin@@math.tu-cottbus.de

@end table

@strong{Procedures:}
@menu
* versal:: miniversal deformation of isolated singularity Fo
* mod_versal:: miniversal deformation of module Mo modulo ideal I
* lift_kbase:: lifting N into standard kbase of M
* lift_rel_kb:: relative lifting N into a kbase of M
* kill_rings:: kills the exported rings from above
@end menu
@c ---end content LibInfo---

@c ------------------- versal -------------
@node versal, mod_versal,, deform_lib
@subsubsection versal
@cindex versal
@c ---content versal---
Procedure from library @code{deform.lib} (@pxref{deform_lib}).

@table @asis
@item @strong{Usage:}
versal(Fo[,d,any]); Fo=ideal, d=int, any=list

@item @strong{Compute:}
miniversal deformation of Fo up to degree d (default d=100),

@item @strong{Create:}
Rings (exported):
@*'my'Px = extending the basering Po by new variables given by
"A,B,.." (deformation parameters), returns as basering; the
new variables precede the old ones, the ordering is the
product between "ls" and "ord(Po)"
@*'my'Qx = Px/Fo extending Qo=Po/Fo,
@*'my'So = the embedding-ring of the versal base space,
@*'my'Ox = Px/Js extending So/Js. (default my="")

Matrices (in Px, exported):
@*Js = giving the versal base space (obstructions),
@*Fs = giving the versal family of Fo,
@*Rs = giving the lifting of Ro=syz(Fo).

If d is defined (!=0), it computes up to degree d.
@*If 'any' is defined and any[1] is no string, interactive version.
@*Otherwise 'any' gives predefined strings: "my","param","order","out"
("my" prefix-string, "param" is a letter (e.g. "A") for the name of
first parameter or (e.g. "A(") for index parameter variables, "order"
ordering string for ring extension), "out" name of output-file).

@item @strong{Note:}
printlevel < 0 no output at all,
@*printlevel >=0,1,2,.. informs you, what is going on;
@*this proc uses 'execute'.

@end table
@strong{Example:}
@smallexample
@c computed example versal d2t_singular/deform_lib.doc:70
LIB "deform.lib";
int p          = printlevel;
printlevel     = 0;
ring r1        = 0,(x,y,z,u,v),ds;
matrix m[2][4] = x,y,z,u,y,z,u,v;
ideal Fo       = minor(m,2);
// cone over rational normal curve of degree 4
versal(Fo);
@expansion{} // ready: T_1 and T_2
@expansion{} // start computation in degree 2.
@expansion{}
@expansion{} // Result belongs to ring Px.
@expansion{} // Equations of total space of miniversal deformation are
@expansion{} // given by Fs, equations of miniversal base space by Js.
@expansion{} // Make Px the basering and list objects defined in Px by typing:
@expansion{}    setring Px; show(Px);
@expansion{}    listvar(matrix);
@expansion{} // NOTE: rings Qx, Px, So are alive!
@expansion{} // (use 'kill_rings("");' to remove)
setring Px;
// ___ Equations of miniversal base space ___:
Js;"";
@expansion{} Js[1,1]=BD
@expansion{} Js[1,2]=-AD+D2
@expansion{} Js[1,3]=-CD
@expansion{}
// ___ Equations of miniversal total space ___:
Fs;"";
@expansion{} Fs[1,1]=-u2+zv+Bu+Dv
@expansion{} Fs[1,2]=-zu+yv-Au+Du
@expansion{} Fs[1,3]=-yu+xv+Cu+Dz
@expansion{} Fs[1,4]=z2-yu+Az+By
@expansion{} Fs[1,5]=yz-xu+Bx-Cz
@expansion{} Fs[1,6]=-y2+xz+Ax+Cy
@expansion{}
@c end example versal d2t_singular/deform_lib.doc:70
@end smallexample
@c ---end content versal---

@c ------------------- mod_versal -------------
@node mod_versal, lift_kbase, versal, deform_lib
@subsubsection mod_versal
@cindex mod_versal
@c ---content mod_versal---
Procedure from library @code{deform.lib} (@pxref{deform_lib}).

@table @asis
@item @strong{Usage:}
mod_versal(Mo,I[,d,any]); I=ideal, M=module, d=int, any =list

@item @strong{Compute:}
miniversal deformation of coker(Mo) over Qo=Po/Io, Po=basering;

@item @strong{Create:}
Ringsr (exported):
@*'my'Px = extending the basering by new variables (deformation
parameters), the new variables precede the old ones,
@*the ordering is the product between "my_ord"
@*and "ord(Po)"
@*'my'Qx = Px/Io extending Qo (returns as basering),
@*'my'Ox = Px/(Io+Js) ring of the versal deformation of coker(Ms),
@*'my'So = embedding-ring of the versal base space. (default 'my'="")

Matrices (in Qx, exported):
@*Js = giving the versal base space (obstructions),
@*Ms = giving the versal family of Mo,
@*Ls = giving the lifting of syzygies Lo=syz(Mo),

If d is defined (!=0), it computes up to degree d.
@*If 'any' is defined and any[1] is no string, interactive version.
@*Otherwise 'any' gives predefined strings:"my","param","order","out"
("my" prefix-string, "param" is a letter (e.g. "A") for the name of
first parameter or (e.g. "A(") for index parameter variables, "ord"
ordering string for ring extension), "out" name of output-file).

@item @strong{Note:}
printlevel < 0 no output at all,
@*printlevel >=0,1,2,.. informs you, what is going on,
@*this proc uses 'execute'.

@end table
@strong{Example:}
@smallexample
@c computed example mod_versal d2t_singular/deform_lib.doc:132
LIB "deform.lib";
int p = printlevel;
printlevel = 1;
ring  Ro = 0,(x,y),wp(3,4);
ideal Io = x4+y3;
matrix Mo[2][2] = x2,y,-y2,x2;
mod_versal(Mo,Io);
@expansion{} // vdim (Ext^2) = 4
@expansion{} // vdim (Ext^1) = 4
@expansion{} // ready: Ext1 and Ext2
@expansion{} // Ext1 is quasi-homogeneous represented: 3,6,1,4
@expansion{} // infinitesimal extension
@expansion{} x2-Ax-B,   y+Cx+D,
@expansion{} -y2+Cxy+Dy,x2+Ax+B
@expansion{} // start deg = 2
@expansion{} // start deg = 3
@expansion{} // start deg = 4
@expansion{} // start deg = 5
@expansion{} // finished in degree
@expansion{} 5
@expansion{} // quasi-homogeneous weights of miniversal base
@expansion{} 3,6,1,4
@expansion{} // Result belongs to qring Qx
@expansion{} // Equations of total space of miniversal deformation are in Js
@expansion{} -2AB+A3+3CD2-BC3-3AC2D+A2C3,
@expansion{} -B2+A2B+D3-3BC2D+ABC3
@expansion{} // Matrix of the deformed module is Ms and lifted syzygies are Ls.
@expansion{} // Make Qx the basering and list objects defined in Qx by typing:
@expansion{}    listvar(ring);setring Qx; show(Qx);listvar(ideal);listvar(matrix);
@expansion{} // NOTE: rings Qx, Ox, So are still alive!
@expansion{} // (use: 'kill_rings();' to remove them)
printlevel = p;
if(system("with","Namespaces")) @{
if(nameof(Current) == "Ring" ) @{
kill Top::Px,Top::Qx,Top::So;
@} else @{
kill Ring::Px,Ring::So;
@}
@}
kill Px,Qx,So;
@c end example mod_versal d2t_singular/deform_lib.doc:132
@end smallexample
@c ---end content mod_versal---

@c ------------------- lift_kbase -------------
@node lift_kbase, lift_rel_kb, mod_versal, deform_lib
@subsubsection lift_kbase
@cindex lift_kbase
@c ---content lift_kbase---
Procedure from library @code{deform.lib} (@pxref{deform_lib}).

@table @asis
@item @strong{Usage:}
lift_kbase(N,M); N,M=poly/ideal/vector/module

@item @strong{Return:}
matrix A, coefficient matrix expressing N as linear combination of
k-basis of M. Let the k-basis have k elements and size(N)=c columns.
Then A satisfies:
@*matrix(reduce(N,std(M)),k,c) = matrix(kbase(std(M)))*A

@item @strong{Assume:}
dim(M)=0 and the monomial ordering is a well ordering or the last
block of the ordering is c or C

@end table
@strong{Example:}
@smallexample
@c computed example lift_kbase d2t_singular/deform_lib.doc:177
LIB "deform.lib";
ring R=0,(x,y),ds;
module M=[x2,xy],[y2,xy],[0,xx],[0,yy];
module N=[x3+xy,x],[x,x+y2];
print(M);
@expansion{} x2,y2,0, 0,
@expansion{} xy,xy,x2,y2
module kb=kbase(std(M));
print(kb);
@expansion{} y2,xy,y,x,1,0,0,0,
@expansion{} 0, 0, 0,0,0,y,x,1
print(N);
@expansion{} xy+x3,x,
@expansion{} x,    x+y2
matrix A=lift_kbase(N,M);
print(A);
@expansion{} 0,0,
@expansion{} 1,0,
@expansion{} 0,0,
@expansion{} 0,1,
@expansion{} 0,0,
@expansion{} 0,0,
@expansion{} 1,1,
@expansion{} 0,0
matrix(reduce(N,std(M)),nrows(kb),ncols(A)) - matrix(kbase(std(M)))*A;
@expansion{} _[1,1]=0
@expansion{} _[1,2]=0
@expansion{} _[2,1]=0
@expansion{} _[2,2]=0
@c end example lift_kbase d2t_singular/deform_lib.doc:177
@end smallexample
@c ---end content lift_kbase---

@c ------------------- lift_rel_kb -------------
@node lift_rel_kb, kill_rings, lift_kbase, deform_lib
@subsubsection lift_rel_kb
@cindex lift_rel_kb
@c ---content lift_rel_kb---
Procedure from library @code{deform.lib} (@pxref{deform_lib}).

@table @asis
@item @strong{Usage:}
lift_rel_kb(N,M[,kbaseM,p]);

@item @strong{Assume:}
[p a monomial ] or the product of all variables
@*N, M modules of same rank, M depending only on variables not in p
and vdim(M) is finite in this ring,
@*[ kbaseM the kbase of M in the subring given by variables not in p ] @*
warning: these assumptions are not checked by the procedure

@item @strong{Return:}
matrix A, whose j-th columns present the coeff's of N[j] in kbaseM,
i.e. kbaseM*A = reduce(N,std(M))

@end table
@strong{Example:}
@smallexample
@c computed example lift_rel_kb d2t_singular/deform_lib.doc:218
LIB "deform.lib";
ring r=0,(A,B,x,y),dp;
module M      = [x2,xy],[xy,y3],[y2],[0,x];
module kbaseM = [1],[x],[xy],[y],[0,1],[0,y],[0,y2];
poly f=xy;
module N = [AB,BBy],[A3xy+x4,AB*(1+y2)];
matrix A = lift_rel_kb(N,M,kbaseM,f);
print(A);
@expansion{} AB,0,
@expansion{} 0, 0,
@expansion{} 0, A3,
@expansion{} 0, 0,
@expansion{} 0, AB,
@expansion{} B2,0,
@expansion{} 0, AB
"TEST:";
@expansion{} TEST:
print(matrix(kbaseM)*A-matrix(reduce(N,std(M))));
@expansion{} 0,0,
@expansion{} 0,0
@c end example lift_rel_kb d2t_singular/deform_lib.doc:218
@end smallexample
@c ---end content lift_rel_kb---

@c ------------------- kill_rings -------------
@node kill_rings,, lift_rel_kb, deform_lib
@subsubsection kill_rings
@cindex kill_rings
@c ---content kill_rings---
Procedure from library @code{deform.lib} (@pxref{deform_lib}).

@table @asis
@item @strong{Usage:}
kill_rings([string]);

@item @strong{Return:}
nothing, but kills exported rings generated by procedures
'versal' and 'mod_versal' with optional prefix 'string'

@end table
@c ---end content kill_rings---