code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/linalg_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/linalg_lib.doc INSTEAD
@c library version: (1.10.2.15,2003/04/04)
@c library file: ../Singular/LIB/linalg.lib
@cindex linalg.lib
@cindex linalg_lib
@table @asis
@item @strong{Library:}
linalg.lib
@item @strong{Purpose:}
  Algorithmic Linear Algebra
@item @strong{Authors:}
Ivor Saynisch (ivs@@math.tu-cottbus.de)
@* Mathias Schulze (mschulze@@mathematik.uni-kl.de)

@end table

@strong{Procedures:}
@menu
* inverse:: matrix, the inverse of A
* inverse_B:: list(matrix Inv,poly p),Inv*A=p*En ( using busadj(A) )
* inverse_L:: list(matrix Inv,poly p),Inv*A=p*En ( using lift )
* sym_gauss:: symmetric gaussian algorithm
* orthogonalize:: Gram-Schmidt orthogonalization
* diag_test:: test whether A can be diagonalized
* busadj:: coefficients of Adj(E*t-A) and coefficients of det(E*t-A)
* charpoly:: characteristic polynomial of A ( using busadj(A) )
* adjoint:: adjoint of A ( using busadj(A) )
* det_B:: determinant of A ( using busadj(A) )
* gaussred:: gaussian reduction: P*A=U*S, S a row reduced form of A
* gaussred_pivot:: gaussian reduction: P*A=U*S, uses row pivoting
* gauss_nf:: gaussian normal form of A
* mat_rk:: rank of constant matrix A
* U_D_O:: P*A=U*D*O, P,D,U,O=permutation,diag,lower-,upper-triang
* pos_def:: test symmetric matrix for positive definiteness
* hessenberg:: Hessenberg form of M
* evnf:: eigenvalues normal form of (e[,m])
* eigenvals:: eigenvalues with multiplicities of M
* minipoly:: minimal polynomial of M
* jordan:: Jordan data of M
* jordanbasis:: Jordan basis and weight filtration of M
* jordanmatrix:: Jordan matrix with Jordan data (e,s,m)
* jordannf:: Jordan normal form of M
@end menu
@c ---end content LibInfo---

@c ------------------- inverse -------------
@node inverse, inverse_B,, linalg_lib
@subsubsection inverse
@cindex inverse
@c ---content inverse---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
inverse(A [,opt]); A a square matrix, opt integer

@item @strong{Return:}
@format
          a matrix:
          - the inverse matrix of A, if A is invertible;
          - the 1x1 0-matrix if A is not invertible (in the polynomial ring!).
          There are the following options:
          - opt=0 or not given: heuristically best option from below
          - opt=1 : apply std to (transpose(E,A)), ordering (C,dp).
          - opt=2 : apply interred (transpose(E,A)), ordering (C,dp).
          - opt=3 : apply lift(A,E), ordering (C,dp).
@end format

@item @strong{Note:}
parameters and minpoly are allowed; opt=2 is only correct for
matrices with entries in a field

@end table
@strong{Example:}
@smallexample
@c skipped computation of example inverse d2t_singular/linalg_lib.doc:76
LIB "linalg.lib";
ring r=0,(x,y,z),lp;
matrix A[3][3]=
1,4,3,
1,5,7,
0,4,17;
print(inverse(A));"";
matrix B[3][3]=
y+1,  x+y,    y,
z,    z+1,    z,
y+z+2,x+y+z+2,y+z+1;
print(inverse(B));
print(B*inverse(B));
@end smallexample
@c inserted refs from d2t_singular/linalg_lib.doc:92
@ifinfo
@menu
See also:
* inverse_B::
* inverse_L::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{inverse_B};
@ref{inverse_L}.
@end iftex
@c end inserted refs from d2t_singular/linalg_lib.doc:92

@c ---end content inverse---

@c ------------------- inverse_B -------------
@node inverse_B, inverse_L, inverse, linalg_lib
@subsubsection inverse_B
@cindex inverse_B
@c ---content inverse_B---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
inverse_B(A); A = square matrix

@item @strong{Return:}
list Inv with
@*- Inv[1] = matrix I and
@*- Inv[2] = poly p
@*such that I*A = unitmat(n)*p;

@item @strong{Note:}
p=1 if 1/det(A) is computable and p=det(A) if not;
@*the computation uses busadj.

@end table
@strong{Example:}
@smallexample
@c skipped computation of example inverse_B d2t_singular/linalg_lib.doc:122
LIB "linalg.lib";
ring r=0,(x,y),lp;
matrix A[3][3]=x,y,1,1,x2,y,x,6,0;
print(A);
list Inv=inverse_B(A);
print(Inv[1]);
print(Inv[2]);
print(Inv[1]*A);
@end smallexample
@c inserted refs from d2t_singular/linalg_lib.doc:133
@ifinfo
@menu
See also:
* inverse::
* inverse_L::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{inverse};
@ref{inverse_L}.
@end iftex
@c end inserted refs from d2t_singular/linalg_lib.doc:133

@c ---end content inverse_B---

@c ------------------- inverse_L -------------
@node inverse_L, sym_gauss, inverse_B, linalg_lib
@subsubsection inverse_L
@cindex inverse_L
@c ---content inverse_L---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
inverse_L(A); A = square matrix

@item @strong{Return:}
list Inv representing a left inverse of A, i.e
@*- Inv[1] = matrix I and
@*- Inv[2] = poly p
@*such that I*A = unitmat(n)*p;

@item @strong{Note:}
p=1 if 1/det(A) is computable and p=det(A) if not;
@*the computation computes first det(A) and then uses lift

@end table
@strong{Example:}
@smallexample
@c skipped computation of example inverse_L d2t_singular/linalg_lib.doc:163
LIB "linalg.lib";
ring r=0,(x,y),lp;
matrix A[3][3]=x,y,1,1,x2,y,x,6,0;
print(A);
list Inv=inverse_L(A);
print(Inv[1]);
print(Inv[2]);
print(Inv[1]*A);
@end smallexample
@c inserted refs from d2t_singular/linalg_lib.doc:174
@ifinfo
@menu
See also:
* inverse::
* inverse_B::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{inverse};
@ref{inverse_B}.
@end iftex
@c end inserted refs from d2t_singular/linalg_lib.doc:174

@c ---end content inverse_L---

@c ------------------- sym_gauss -------------
@node sym_gauss, orthogonalize, inverse_L, linalg_lib
@subsubsection sym_gauss
@cindex sym_gauss
@c ---content sym_gauss---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
sym_gauss(A); A = symmetric matrix

@item @strong{Return:}
matrix, diagonalisation with symmetric gauss algorithm

@end table
@strong{Example:}
@smallexample
@c skipped computation of example sym_gauss d2t_singular/linalg_lib.doc:197
LIB "linalg.lib";
ring r=0,(x),lp;
matrix A[2][2]=1,4,4,15;
print(A);
print(sym_gauss(A));
@end smallexample
@c ---end content sym_gauss---

@c ------------------- orthogonalize -------------
@node orthogonalize, diag_test, sym_gauss, linalg_lib
@subsubsection orthogonalize
@cindex orthogonalize
@c ---content orthogonalize---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
orthogonalize(A); A = constant matrix

@item @strong{Return:}
matrix, orthogonal basis of the column space of A

@end table
@strong{Example:}
@smallexample
@c skipped computation of example orthogonalize d2t_singular/linalg_lib.doc:224
LIB "linalg.lib";
ring r=0,(x),lp;
matrix A[4][4]=5,6,12,4,7,3,2,6,12,1,1,2,6,4,2,10;
print(A);
print(orthogonalize(A));
@end smallexample
@c ---end content orthogonalize---

@c ------------------- diag_test -------------
@node diag_test, busadj, orthogonalize, linalg_lib
@subsubsection diag_test
@cindex diag_test
@c ---content diag_test---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
diag_test(A); A = const square matrix

@item @strong{Return:}
int, 1 if A is diagonalisable, 0 if not
@*-1 no statement is possible, since A does not split.

@item @strong{Note:}
The test works only for split matrices, i.e if eigenvalues of A
are in the ground field.
@*Does not work with parameters (uses factorize,gcd).

@end table
@strong{Example:}
@smallexample
@c skipped computation of example diag_test d2t_singular/linalg_lib.doc:257
LIB "linalg.lib";
ring r=0,(x),dp;
matrix A[4][4]=6,0,0,0,0,0,6,0,0,6,0,0,0,0,0,6;
print(A);
diag_test(A);
@end smallexample
@c ---end content diag_test---

@c ------------------- busadj -------------
@node busadj, charpoly, diag_test, linalg_lib
@subsubsection busadj
@cindex busadj
@c ---content busadj---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
busadj(A); A = square matrix (of size nxn)

@item @strong{Return:}
list L:
@format
         L[1] contains the (n+1) coefficients of the characteristic
              polynomial X of A, i.e.
              X = L[1][1]+..+L[1][k]*t^(k-1)+..+(L[1][n+1])*t^n
         L[2] contains the n (nxn)-matrices Hk which are the coefficients of
              the busadjoint bA = adjoint(E*t-A) of A, i.e.
              bA = (Hn-1)*t^(n-1)+...+Hk*t^k+...+H0,  ( Hk=L[2][k+1] )
@end format

@end table
@strong{Example:}
@smallexample
@c skipped computation of example busadj d2t_singular/linalg_lib.doc:292
LIB "linalg.lib";
ring r = 0,(t,x),lp;
matrix A[2][2] = 1,x2,x,x2+3x;
print(A);
list L = busadj(A);
poly X = L[1][1]+L[1][2]*t+L[1][3]*t2; X;
matrix bA[2][2] = L[2][1]+L[2][2]*t;
print(bA);               //the busadjoint of A;
print(bA*(t*unitmat(2)-A));
@end smallexample
@c ---end content busadj---

@c ------------------- charpoly -------------
@node charpoly, adjoint, busadj, linalg_lib
@subsubsection charpoly
@cindex charpoly
@c ---content charpoly---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
charpoly(A[,v]); A square matrix, v string, name of a variable

@item @strong{Return:}
poly, the characteristic polynomial det(E*v-A)
@*(default: v=name of last variable)

@item @strong{Note:}
A must be independent of the variable v. The computation uses det.
If printlevel>0, det(E*v-A) is diplayed recursively.

@end table
@strong{Example:}
@smallexample
@c skipped computation of example charpoly d2t_singular/linalg_lib.doc:328
LIB "linalg.lib";
ring r=0,(x,t),dp;
matrix A[3][3]=1,x2,x,x2,6,4,x,4,1;
print(A);
charpoly(A,"t");
@end smallexample
@c ---end content charpoly---

@c ------------------- adjoint -------------
@node adjoint, det_B, charpoly, linalg_lib
@subsubsection adjoint
@cindex adjoint
@c ---content adjoint---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
adjoint(A); A = square matrix

@item @strong{Return:}
adjoint matrix of A, i.e. Adj*A=det(A)*E

@item @strong{Note:}
computation uses busadj(A)

@end table
@strong{Example:}
@smallexample
@c skipped computation of example adjoint d2t_singular/linalg_lib.doc:358
LIB "linalg.lib";
ring r=0,(t,x),lp;
matrix A[2][2]=1,x2,x,x2+3x;
print(A);
matrix Adj[2][2]=adjoint(A);
print(Adj);                    //Adj*A=det(A)*E
print(Adj*A);
@end smallexample
@c ---end content adjoint---

@c ------------------- det_B -------------
@node det_B, gaussred, adjoint, linalg_lib
@subsubsection det_B
@cindex det_B
@c ---content det_B---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
det_B(A); A any matrix

@item @strong{Return:}
returns the determinant of A

@item @strong{Note:}
the computation uses the busadj algorithm

@end table
@strong{Example:}
@smallexample
@c skipped computation of example det_B d2t_singular/linalg_lib.doc:390
LIB "linalg.lib";
ring r=0,(x),dp;
matrix A[10][10]=random(2,10,10)+unitmat(10)*x;
print(A);
det_B(A);
@end smallexample
@c ---end content det_B---

@c ------------------- gaussred -------------
@node gaussred, gaussred_pivot, det_B, linalg_lib
@subsubsection gaussred
@cindex gaussred
@c ---content gaussred---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
gaussred(A); A any constant matrix

@item @strong{Return:}
list Z: Z[1]=P , Z[2]=U , Z[3]=S , Z[4]=rank(A)
@*gives a row reduced matrix S, a permutation matrix P and a
normalized lower triangular matrix U, with P*A=U*S

@item @strong{Note:}
This procedure is designed for teaching purposes mainly.
The straight forward implementation in the interpreted library
is not very efficient (no standard basis computation).

@end table
@strong{Example:}
@smallexample
@c skipped computation of example gaussred d2t_singular/linalg_lib.doc:424
LIB "linalg.lib";
ring r=0,(x),dp;
matrix A[5][4]=1,3,-1,4,2,5,-1,3,1,3,-1,4,0,4,-3,1,-3,1,-5,-2;
print(A);
list Z=gaussred(A);   //construct P,U,S s.t. P*A=U*S
print(Z[1]);          //P
print(Z[2]);          //U
print(Z[3]);          //S
print(Z[4]);          //rank
print(Z[1]*A);        //P*A
print(Z[2]*Z[3]);     //U*S
@end smallexample
@c ---end content gaussred---

@c ------------------- gaussred_pivot -------------
@node gaussred_pivot, gauss_nf, gaussred, linalg_lib
@subsubsection gaussred_pivot
@cindex gaussred_pivot
@c ---content gaussred_pivot---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
gaussred_pivot(A); A any constant matrix

@item @strong{Return:}
list Z: Z[1]=P , Z[2]=U , Z[3]=S , Z[4]=rank(A)
@*gives n row reduced matrix S, a permutation matrix P and a
normalized lower triangular matrix U, with P*A=U*S

@item @strong{Note:}
with row pivoting

@end table
@strong{Example:}
@smallexample
@c skipped computation of example gaussred_pivot d2t_singular/linalg_lib.doc:462
LIB "linalg.lib";
ring r=0,(x),dp;
matrix A[5][4] = 1, 3,-1,4,
2, 5,-1,3,
1, 3,-1,4,
0, 4,-3,1,
-3,1,-5,-2;
list Z=gaussred_pivot(A);  //construct P,U,S s.t. P*A=U*S
print(Z[1]);               //P
print(Z[2]);               //U
print(Z[3]);               //S
print(Z[4]);               //rank
print(Z[1]*A);             //P*A
print(Z[2]*Z[3]);          //U*S
@end smallexample
@c ---end content gaussred_pivot---

@c ------------------- gauss_nf -------------
@node gauss_nf, mat_rk, gaussred_pivot, linalg_lib
@subsubsection gauss_nf
@cindex gauss_nf
@c ---content gauss_nf---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
gauss_nf(A); A any constant matrix

@item @strong{Return:}
matrix; gauss normal form of A (uses gaussred)

@end table
@strong{Example:}
@smallexample
@c skipped computation of example gauss_nf d2t_singular/linalg_lib.doc:498
LIB "linalg.lib";
ring r = 0,(x),dp;
matrix A[4][4] = 1,4,4,7,2,5,5,4,4,1,1,3,0,2,2,7;
print(gauss_nf(A));
@end smallexample
@c ---end content gauss_nf---

@c ------------------- mat_rk -------------
@node mat_rk, U_D_O, gauss_nf, linalg_lib
@subsubsection mat_rk
@cindex mat_rk
@c ---content mat_rk---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
mat_rk(A); A any constant matrix

@item @strong{Return:}
int, rank of A

@end table
@strong{Example:}
@smallexample
@c skipped computation of example mat_rk d2t_singular/linalg_lib.doc:524
LIB "linalg.lib";
ring r = 0,(x),dp;
matrix A[4][4] = 1,4,4,7,2,5,5,4,4,1,1,3,0,2,2,7;
mat_rk(A);
@end smallexample
@c ---end content mat_rk---

@c ------------------- U_D_O -------------
@node U_D_O, pos_def, mat_rk, linalg_lib
@subsubsection U_D_O
@cindex U_D_O
@c ---content U_D_O---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
U_D_O(A); constant invertible matrix A

@item @strong{Return:}
list Z: Z[1]=P , Z[2]=U , Z[3]=D , Z[4]=O
@*gives a permutation matrix P,
@*a normalized lower triangular matrix U ,
@*a diagonal matrix D, and
@*a normalized upper triangular matrix O
@*with P*A=U*D*O

@item @strong{Note:}
Z[1]=-1 means that A is not regular (proc uses gaussred)

@end table
@strong{Example:}
@smallexample
@c skipped computation of example U_D_O d2t_singular/linalg_lib.doc:558
LIB "linalg.lib";
ring r = 0,(x),dp;
matrix A[5][5] = 10, 4,  0, -9,  8,
-3, 6, -6, -4,  9,
0, 3, -1, -9, -8,
-4,-2, -6, -10,10,
-9, 5, -1, -6,  5;
list Z = U_D_O(A);              //construct P,U,D,O s.t. P*A=U*D*O
print(Z[1]);                    //P
print(Z[2]);                    //U
print(Z[3]);                    //D
print(Z[4]);                    //O
print(Z[1]*A);                  //P*A
print(Z[2]*Z[3]*Z[4]);          //U*D*O
@end smallexample
@c ---end content U_D_O---

@c ------------------- pos_def -------------
@node pos_def, hessenberg, U_D_O, linalg_lib
@subsubsection pos_def
@cindex pos_def
@c ---content pos_def---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
pos_def(A); A = constant, symmetric square matrix

@item @strong{Return:}
int:
@*1 if A is positive definit ,
@*0 if not,
@*-1 if unknown

@end table
@strong{Example:}
@smallexample
@c skipped computation of example pos_def d2t_singular/linalg_lib.doc:597
LIB "linalg.lib";
ring r = 0,(x),dp;
matrix A[5][5] = 20,  4,  0, -9,   8,
4, 12, -6, -4,   9,
0, -6, -2, -9,  -8,
-9, -4, -9, -20, 10,
8,  9, -8,  10, 10;
pos_def(A);
matrix B[3][3] =  3,  2,  0,
2, 12,  4,
0,  4,  2;
pos_def(B);
@end smallexample
@c ---end content pos_def---

@c ------------------- hessenberg -------------
@node hessenberg, evnf, pos_def, linalg_lib
@subsubsection hessenberg
@cindex hessenberg
@c ---content hessenberg---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
hessenberg(M); matrix M

@item @strong{Assume:}
M constant square matrix

@item @strong{Return:}
matrix H; Hessenberg form of M

@end table
@strong{Example:}
@smallexample
@c skipped computation of example hessenberg d2t_singular/linalg_lib.doc:634
LIB "linalg.lib";
ring R=0,x,dp;
matrix M[3][3]=3,2,1,0,2,1,0,0,3;
print(M);
print(hessenberg(M));
@end smallexample
@c ---end content hessenberg---

@c ------------------- evnf -------------
@node evnf, eigenvals, hessenberg, linalg_lib
@subsubsection evnf
@cindex evnf
@c ---content evnf---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
evnf(e[,m]); ideal e, intvec m

@item @strong{Assume:}
ncols(e)==size(m)

@item @strong{Return:}
order eigenvalues e with multiplicities m

@end table
@c ---end content evnf---

@c ------------------- eigenvals -------------
@node eigenvals, minipoly, evnf, linalg_lib
@subsubsection eigenvals
@cindex eigenvals
@c ---content eigenvals---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
eigenvals(M); matrix M

@item @strong{Assume:}
eigenvalues of M in basefield

@item @strong{Return:}
@format
list l;
  ideal l[1];
    number l[1][i];  i-th eigenvalue of M
  intvec l[2];
    int l[2][i];  multiplicity of i-th eigenvalue of M
@end format

@end table
@strong{Example:}
@smallexample
@c skipped computation of example eigenvals d2t_singular/linalg_lib.doc:690
LIB "linalg.lib";
ring R=0,x,dp;
matrix M[3][3]=3,2,1,0,2,1,0,0,3;
print(M);
eigenvals(M);
@end smallexample
@c ---end content eigenvals---

@c ------------------- minipoly -------------
@node minipoly, jordan, eigenvals, linalg_lib
@subsubsection minipoly
@cindex minipoly
@c ---content minipoly---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
minpoly(M); matrix M

@item @strong{Assume:}
eigenvalues of M in basefield

@item @strong{Return:}
@format
list l;  minimal polynomial of M
  ideal l[1];
    number l[1][i];  i-th root of minimal polynomial of M
  intvec l[2];
    int l[2][i];  multiplicity of i-th root of minimal polynomial of M
@end format

@end table
@strong{Example:}
@smallexample
@c skipped computation of example minipoly d2t_singular/linalg_lib.doc:726
LIB "linalg.lib";
ring R=0,x,dp;
matrix M[3][3]=3,2,1,0,2,1,0,0,3;
print(M);
minipoly(M);
@end smallexample
@c ---end content minipoly---

@c ------------------- jordan -------------
@node jordan, jordanbasis, minipoly, linalg_lib
@subsubsection jordan
@cindex jordan
@c ---content jordan---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
jordan(M); matrix M

@item @strong{Assume:}
eigenvalues of M in basefield

@item @strong{Return:}
@format
list l;  Jordan data of M
  ideal l[1];
    number l[1][i];  eigenvalue of i-th Jordan block of M
  intvec l[2];
    int l[2][i];  size of i-th Jordan block of M
  intvec l[3];
    int l[3][i];  multiplicity of i-th Jordan block of M
@end format

@end table
@strong{Example:}
@smallexample
@c skipped computation of example jordan d2t_singular/linalg_lib.doc:764
LIB "linalg.lib";
ring R=0,x,dp;
matrix M[3][3]=3,2,1,0,2,1,0,0,3;
print(M);
jordan(M);
@end smallexample
@c ---end content jordan---

@c ------------------- jordanbasis -------------
@node jordanbasis, jordanmatrix, jordan, linalg_lib
@subsubsection jordanbasis
@cindex jordanbasis
@c ---content jordanbasis---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
jordanbasis(M); matrix M

@item @strong{Assume:}
eigenvalues of M in basefield

@item @strong{Return:}
@format
list l:
  module l[1];  inverse(l[1])*M*l[1] in Jordan normal form
  intvec l[2];
    int l[2][i];  weight filtration index of l[1][i]
@end format

@end table
@strong{Example:}
@smallexample
@c skipped computation of example jordanbasis d2t_singular/linalg_lib.doc:799
LIB "linalg.lib";
ring R=0,x,dp;
matrix M[3][3]=3,2,1,0,2,1,0,0,3;
print(M);
list l=jordanbasis(M);
print(l[1]);
print(l[2]);
print(inverse(l[1])*M*l[1]);
@end smallexample
@c ---end content jordanbasis---

@c ------------------- jordanmatrix -------------
@node jordanmatrix, jordannf, jordanbasis, linalg_lib
@subsubsection jordanmatrix
@cindex jordanmatrix
@c ---content jordanmatrix---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
jordanmatrix(e,s,m); ideal e, intvec s, intvec m

@item @strong{Assume:}
ncols(e)==size(s)==size(m)

@item @strong{Return:}
@format
matrix J;  Jordan matrix with list(e,s,m)==jordan(J)
@end format

@end table
@strong{Example:}
@smallexample
@c skipped computation of example jordanmatrix d2t_singular/linalg_lib.doc:834
LIB "linalg.lib";
ring R=0,x,dp;
ideal e=ideal(2,3);
intvec s=1,2;
intvec m=1,1;
print(jordanmatrix(e,s,m));
@end smallexample
@c ---end content jordanmatrix---

@c ------------------- jordannf -------------
@node jordannf,, jordanmatrix, linalg_lib
@subsubsection jordannf
@cindex jordannf
@c ---content jordannf---
Procedure from library @code{linalg.lib} (@pxref{linalg_lib}).

@table @asis
@item @strong{Usage:}
jordannf(M); matrix M

@item @strong{Assume:}
eigenvalues of M in basefield

@item @strong{Return:}
matrix J; Jordan normal form of M

@end table
@strong{Example:}
@smallexample
@c skipped computation of example jordannf d2t_singular/linalg_lib.doc:865
LIB "linalg.lib";
ring R=0,x,dp;
matrix M[3][3]=3,2,1,0,2,1,0,0,3;
print(M);
print(jordannf(M));
@end smallexample
@c ---end content jordannf---


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/matrix_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/matrix_lib.doc INSTEAD
@c library version: (1.26.2.3,2003/05/14)
@c library file: ../Singular/LIB/matrix.lib
@cindex matrix.lib
@cindex matrix_lib
@table @asis
@item @strong{Library:}
matrix.lib
@item @strong{Purpose:}
    Elementary Matrix Operations

@end table

@strong{Procedures:}
@menu
* compress:: matrix, zero columns from A deleted
* concat:: matrix, concatenation of matrices A1,A2,...
* diag:: matrix, nxn diagonal matrix with entries poly p
* dsum:: matrix, direct sum of matrices A1,A2,...
* flatten:: ideal, generated by entries of matrix A
* genericmat:: generic nxm matrix [entries from id]
* is_complex:: 1 if list c is a complex, 0 if not
* outer:: matrix, outer product of matrices A and B
* power:: matrix/intmat, n-th power of matrix/intmat A
* skewmat:: generic skew-symmetric nxn matrix [entries from id]
* submat:: submatrix of A with rows/cols specified by intvec r/c
* symmat:: generic symmetric nxn matrix [entries from id]
* tensor:: matrix, tensor product of matrices A nd B
* unitmat:: unit square matrix of size n
* gauss_col:: transform a matrix into col-reduced Gauss normal form
* gauss_row:: transform a matrix into row-reduced Gauss normal form
* addcol:: add p*(c1-th col) to c2-th column of matrix A, p poly
* addrow:: add p*(r1-th row) to r2-th row of matrix A, p poly
* multcol:: multiply c-th column of A with poly p
* multrow:: multiply r-th row of A with poly p
* permcol:: permute i-th and j-th columns
* permrow:: permute i-th and j-th rows
* rowred:: reduction of matrix A with elementary row-operations
* colred:: reduction of matrix A with elementary col-operations
* rm_unitrow:: remove unit rows and associated columns of A
* rm_unitcol:: remove unit columns and associated rows of A
* headStand:: A[n-i+1,m-j+1]=headStand(A[i,j])
@end menu
@c ---end content LibInfo---

@c ------------------- compress -------------
@node compress, concat,, matrix_lib
@subsubsection compress
@cindex compress
@c ---content compress---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
compress(A); A matrix/ideal/module/intmat/intvec

@item @strong{Return:}
same type, zero columns/generators from A deleted
@*(if A=intvec, zero elements are deleted)

@end table
@strong{Example:}
@smallexample
@c reused example compress d2t_singular/matrix_lib.doc:64
LIB "matrix.lib";
ring r=0,(x,y,z),ds;
matrix A[3][4]=1,0,3,0,x,0,z,0,x2,0,z2,0;
print(A);
@expansion{} 1, 0,3, 0,
@expansion{} x, 0,z, 0,
@expansion{} x2,0,z2,0
print(compress(A));
@expansion{} 1, 3,
@expansion{} x, z,
@expansion{} x2,z2
module m=module(A); show(m);
@expansion{} // module, 4 generator(s)
@expansion{} [1,x,x2]
@expansion{} [0]
@expansion{} [3,z,z2]
@expansion{} [0]
show(compress(m));
@expansion{} // module, 2 generator(s)
@expansion{} [1,x,x2]
@expansion{} [3,z,z2]
intmat B[3][4]=1,0,3,0,4,0,5,0,6,0,7,0;
compress(B);
@expansion{} 1,3,
@expansion{} 4,5,
@expansion{} 6,7
intvec C=0,0,1,2,0,3;
compress(C);
@expansion{} 1,2,3
@c end example compress d2t_singular/matrix_lib.doc:64
@end smallexample
@c ---end content compress---

@c ------------------- concat -------------
@node concat, diag, compress, matrix_lib
@subsubsection concat
@cindex concat
@c ---content concat---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
concat(A1,A2,..); A1,A2,... matrices

@item @strong{Return:}
matrix, concatenation of A1,A2,.... Number of rows of result matrix
is max(nrows(A1),nrows(A2),...)

@end table
@strong{Example:}
@smallexample
@c reused example concat d2t_singular/matrix_lib.doc:98
LIB "matrix.lib";
ring r=0,(x,y,z),ds;
matrix A[3][3]=1,2,3,x,y,z,x2,y2,z2;
matrix B[2][2]=1,0,2,0; matrix C[1][4]=4,5,x,y;
print(A);
@expansion{} 1, 2, 3,
@expansion{} x, y, z,
@expansion{} x2,y2,z2
print(B);
@expansion{} 1,0,
@expansion{} 2,0
print(C);
@expansion{} 4,5,x,y
print(concat(A,B,C));
@expansion{} 1, 2, 3, 1,0,4,5,x,y,
@expansion{} x, y, z, 2,0,0,0,0,0,
@expansion{} x2,y2,z2,0,0,0,0,0,0
@c end example concat d2t_singular/matrix_lib.doc:98
@end smallexample
@c ---end content concat---

@c ------------------- diag -------------
@node diag, dsum, concat, matrix_lib
@subsubsection diag
@cindex diag
@c ---content diag---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
diag(p,n); p poly, n integer
@*diag(A); A matrix

@item @strong{Return:}
diag(p,n): diagonal matrix, p times unit matrix of size n.
@* diag(A) : n*m x n*m diagonal matrix with entries all the entries of
the nxm matrix A, taken from the 1st row, 2nd row etc of A

@end table
@strong{Example:}
@smallexample
@c reused example diag d2t_singular/matrix_lib.doc:131
LIB "matrix.lib";
ring r = 0,(x,y,z),ds;
print(diag(xy,4));
@expansion{} xy,0, 0, 0,
@expansion{} 0, xy,0, 0,
@expansion{} 0, 0, xy,0,
@expansion{} 0, 0, 0, xy
matrix A[3][2] = 1,2,3,4,5,6;
print(A);
@expansion{} 1,2,
@expansion{} 3,4,
@expansion{} 5,6
print(diag(A));
@expansion{} 1,0,0,0,0,0,
@expansion{} 0,2,0,0,0,0,
@expansion{} 0,0,3,0,0,0,
@expansion{} 0,0,0,4,0,0,
@expansion{} 0,0,0,0,5,0,
@expansion{} 0,0,0,0,0,6
@c end example diag d2t_singular/matrix_lib.doc:131
@end smallexample
@c ---end content diag---

@c ------------------- dsum -------------
@node dsum, flatten, diag, matrix_lib
@subsubsection dsum
@cindex dsum
@c ---content dsum---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
dsum(A1,A2,..); A1,A2,... matrices

@item @strong{Return:}
matrix, direct sum of A1,A2,...

@end table
@strong{Example:}
@smallexample
@c reused example dsum d2t_singular/matrix_lib.doc:159
LIB "matrix.lib";
ring r = 0,(x,y,z),ds;
matrix A[3][3] = 1,2,3,4,5,6,7,8,9;
matrix B[2][2] = 1,x,y,z;
print(A);
@expansion{} 1,2,3,
@expansion{} 4,5,6,
@expansion{} 7,8,9
print(B);
@expansion{} 1,x,
@expansion{} y,z
print(dsum(A,B));
@expansion{} 1,2,3,0,0,
@expansion{} 4,5,6,0,0,
@expansion{} 7,8,9,0,0,
@expansion{} 0,0,0,1,x,
@expansion{} 0,0,0,y,z
@c end example dsum d2t_singular/matrix_lib.doc:159
@end smallexample
@c ---end content dsum---

@c ------------------- flatten -------------
@node flatten, genericmat, dsum, matrix_lib
@subsubsection flatten
@cindex flatten
@c ---content flatten---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
flatten(A); A matrix

@item @strong{Return:}
ideal, generated by all entries from A

@end table
@strong{Example:}
@smallexample
@c reused example flatten d2t_singular/matrix_lib.doc:188
LIB "matrix.lib";
ring r = 0,(x,y,z),ds;
matrix A[2][3] = 1,2,x,y,z,7;
print(A);
@expansion{} 1,2,x,
@expansion{} y,z,7
flatten(A);
@expansion{} _[1]=1
@expansion{} _[2]=2
@expansion{} _[3]=x
@expansion{} _[4]=y
@expansion{} _[5]=z
@expansion{} _[6]=7
@c end example flatten d2t_singular/matrix_lib.doc:188
@end smallexample
@c ---end content flatten---

@c ------------------- genericmat -------------
@node genericmat, is_complex, flatten, matrix_lib
@subsubsection genericmat
@cindex genericmat
@c ---content genericmat---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

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

@item @strong{Return:}
nxm matrix, with entries from id.

@item @strong{Note:}
if id has less than nxm elements, the matrix is filled with 0's,
(default: id=maxideal(1)).
@*genericmat(n,m); creates the generic nxm matrix

@end table
@strong{Example:}
@smallexample
@c reused example genericmat d2t_singular/matrix_lib.doc:220
LIB "matrix.lib";
ring R = 0,x(1..16),lp;
print(genericmat(3,3));      // the generic 3x3 matrix
@expansion{} x(1),x(2),x(3),
@expansion{} x(4),x(5),x(6),
@expansion{} x(7),x(8),x(9)
ring R1 = 0,(a,b,c,d),dp;
matrix A = genericmat(3,4,maxideal(1)^3);
print(A);
@expansion{} a3, a2b,a2c,a2d,
@expansion{} ab2,abc,abd,ac2,
@expansion{} acd,ad2,b3, b2c
int n,m = 3,2;
ideal i = ideal(randommat(1,n*m,maxideal(1),9));
print(genericmat(n,m,i));    // matrix of generic linear forms
@expansion{} 4a-8b-2c-3d,-a+b-4c+5d,
@expansion{} -8a-9b+c+7d,a-9b+9c+4d,
@expansion{} 6a-5b+9c,   2a+8c+d
@c end example genericmat d2t_singular/matrix_lib.doc:220
@end smallexample
@c ---end content genericmat---

@c ------------------- is_complex -------------
@node is_complex, outer, genericmat, matrix_lib
@subsubsection is_complex
@cindex is_complex
@c ---content is_complex---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
is_complex(c); c = list of size-compatible modules or matrices

@item @strong{Return:}
1 if c[i]*c[i+1]=0 for all i, 0 if not, hence checking whether the
list of matrices forms a complex.

@item @strong{Note:}
Ideals are treated internally as 1-line matrices.
@*If printlevel > 0, the position where c is not a complex is shown.

@end table
@strong{Example:}
@smallexample
@c reused example is_complex d2t_singular/matrix_lib.doc:256
LIB "matrix.lib";
ring r  = 32003,(x,y,z),ds;
ideal i = x4+y5+z6,xyz,yx2+xz2+zy7;
list L  = nres(i,0);
is_complex(L);
@expansion{} 1
L[4]    = matrix(i);
is_complex(L);
@expansion{} 0
@c end example is_complex d2t_singular/matrix_lib.doc:256
@end smallexample
@c ---end content is_complex---

@c ------------------- outer -------------
@node outer, power, is_complex, matrix_lib
@subsubsection outer
@cindex outer
@c ---content outer---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
outer(A,B); A,B matrices

@item @strong{Return:}
matrix, outer (tensor) product of A and B

@end table
@strong{Example:}
@smallexample
@c reused example outer d2t_singular/matrix_lib.doc:285
LIB "matrix.lib";
ring r=32003,(x,y,z),ds;
matrix A[3][3]=1,2,3,4,5,6,7,8,9;
matrix B[2][2]=x,y,0,z;
print(A);
@expansion{} 1,2,3,
@expansion{} 4,5,6,
@expansion{} 7,8,9
print(B);
@expansion{} x,y,
@expansion{} 0,z
print(outer(A,B));
@expansion{} x, y, 2x,2y,3x,3y,
@expansion{} 0, z, 0, 2z,0, 3z,
@expansion{} 4x,4y,5x,5y,6x,6y,
@expansion{} 0, 4z,0, 5z,0, 6z,
@expansion{} 7x,7y,8x,8y,9x,9y,
@expansion{} 0, 7z,0, 8z,0, 9z
@c end example outer d2t_singular/matrix_lib.doc:285
@end smallexample
@c ---end content outer---

@c ------------------- power -------------
@node power, skewmat, outer, matrix_lib
@subsubsection power
@cindex power
@c ---content power---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
power(A,n); A a square-matrix of type intmat or matrix, n=integer

@item @strong{Return:}
intmat resp. matrix, the n-th power of A

@item @strong{Note:}
for A=intmat and big n the result may be wrong because of int overflow

@end table
@strong{Example:}
@smallexample
@c reused example power d2t_singular/matrix_lib.doc:317
LIB "matrix.lib";
intmat A[3][3]=1,2,3,4,5,6,7,8,9;
print(power(A,3));"";
@expansion{}    468   576   684
@expansion{}   1062  1305  1548
@expansion{}   1656  2034  2412
@expansion{}
ring r=0,(x,y,z),dp;
matrix B[3][3]=0,x,y,z,0,0,y,z,0;
print(power(B,3));"";
@expansion{} yz2,    xy2+x2z,y3+xyz,
@expansion{} y2z+xz2,yz2,    0,
@expansion{} y3+xyz, y2z+xz2,yz2
@expansion{}
@c end example power d2t_singular/matrix_lib.doc:317
@end smallexample
@c ---end content power---

@c ------------------- skewmat -------------
@node skewmat, submat, power, matrix_lib
@subsubsection skewmat
@cindex skewmat
@c ---content skewmat---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

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

@item @strong{Return:}
skew-symmetric nxn matrix, with entries from id
@*(default: id=maxideal(1))
@*skewmat(n); creates the generic skew-symmetric matrix

@item @strong{Note:}
if id has less than n*(n-1)/2 elements, the matrix is
@*filled with 0's,

@end table
@strong{Example:}
@smallexample
@c reused example skewmat d2t_singular/matrix_lib.doc:351
LIB "matrix.lib";
ring R=0,x(1..5),lp;
print(skewmat(4));    // the generic skew-symmetric matrix
@expansion{} 0,    x(1), x(2),x(3),
@expansion{} -x(1),0,    x(4),x(5),
@expansion{} -x(2),-x(4),0,   0,
@expansion{} -x(3),-x(5),0,   0
ring R1 = 0,(a,b,c),dp;
matrix A=skewmat(4,maxideal(1)^2);
print(A);
@expansion{} 0,  a2, ab, ac,
@expansion{} -a2,0,  b2, bc,
@expansion{} -ab,-b2,0,  c2,
@expansion{} -ac,-bc,-c2,0
int n=3;
ideal i = ideal(randommat(1,n*(n-1) div 2,maxideal(1),9));
print(skewmat(n,i));  // skew matrix of generic linear forms
@expansion{} 0,       4a+b-8c, -a+6b+c,
@expansion{} -4a-b+8c,0,       -8a+2b-9c,
@expansion{} a-6b-c,  8a-2b+9c,0
kill R1;
@c end example skewmat d2t_singular/matrix_lib.doc:351
@end smallexample
@c ---end content skewmat---

@c ------------------- submat -------------
@node submat, symmat, skewmat, matrix_lib
@subsubsection submat
@cindex submat
@c ---content submat---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
submat(A,r,c); A=matrix, r,c=intvec

@item @strong{Return:}
matrix, submatrix of A with rows specified by intvec r
and columns specified by intvec c.

@end table
@strong{Example:}
@smallexample
@c reused example submat d2t_singular/matrix_lib.doc:384
LIB "matrix.lib";
ring R=32003,(x,y,z),lp;
matrix A[4][4]=x,y,z,0,1,2,3,4,5,6,7,8,9,x2,y2,z2;
print(A);
@expansion{} x,y, z, 0,
@expansion{} 1,2, 3, 4,
@expansion{} 5,6, 7, 8,
@expansion{} 9,x2,y2,z2
intvec v=1,3,4;
matrix B=submat(A,v,1..3);
print(B);
@expansion{} x,y, z,
@expansion{} 5,6, 7,
@expansion{} 9,x2,y2
@c end example submat d2t_singular/matrix_lib.doc:384
@end smallexample
@c ---end content submat---

@c ------------------- symmat -------------
@node symmat, tensor, submat, matrix_lib
@subsubsection symmat
@cindex symmat
@c ---content symmat---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

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

@item @strong{Return:}
symmetric nxn matrix, with entries from id (default: id=maxideal(1))

@item @strong{Note:}
if id has less than n*(n+1)/2 elements, the matrix is filled with 0's,
symmat(n); creates the generic symmetric matrix

@end table
@strong{Example:}
@smallexample
@c reused example symmat d2t_singular/matrix_lib.doc:417
LIB "matrix.lib";
ring R=0,x(1..10),lp;
print(symmat(4));    // the generic symmetric matrix
@expansion{} x(1),x(2),x(3),x(4),
@expansion{} x(2),x(5),x(6),x(7),
@expansion{} x(3),x(6),x(8),x(9),
@expansion{} x(4),x(7),x(9),x(10)
ring R1 = 0,(a,b,c),dp;
matrix A=symmat(4,maxideal(1)^3);
print(A);
@expansion{} a3, a2b,a2c,ab2,
@expansion{} a2b,abc,ac2,b3,
@expansion{} a2c,ac2,b2c,bc2,
@expansion{} ab2,b3, bc2,c3
int n=3;
ideal i = ideal(randommat(1,n*(n+1) div 2,maxideal(1),9));
print(symmat(n,i));  // symmetric matrix of generic linear forms
@expansion{} 4a-8b-2c,-a+b-4c, -8a-9b+c,
@expansion{} -a+b-4c, a-9b+9c, 6a-5b+9c,
@expansion{} -8a-9b+c,6a-5b+9c,2a+8c
kill R1;
@c end example symmat d2t_singular/matrix_lib.doc:417
@end smallexample
@c ---end content symmat---

@c ------------------- tensor -------------
@node tensor, unitmat, symmat, matrix_lib
@subsubsection tensor
@cindex tensor
@c ---content tensor---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
tensor(A,B); A,B matrices

@item @strong{Return:}
matrix, tensor product of A and B

@end table
@strong{Example:}
@smallexample
@c reused example tensor d2t_singular/matrix_lib.doc:449
LIB "matrix.lib";
ring r=32003,(x,y,z),(c,ds);
matrix A[3][3]=1,2,3,4,5,6,7,8,9;
matrix B[2][2]=x,y,0,z;
print(A);
@expansion{} 1,2,3,
@expansion{} 4,5,6,
@expansion{} 7,8,9
print(B);
@expansion{} x,y,
@expansion{} 0,z
print(tensor(A,B));
@expansion{} x, y, 2x,2y,3x,3y,
@expansion{} 0, z, 0, 2z,0, 3z,
@expansion{} 4x,4y,5x,5y,6x,6y,
@expansion{} 0, 4z,0, 5z,0, 6z,
@expansion{} 7x,7y,8x,8y,9x,9y,
@expansion{} 0, 7z,0, 8z,0, 9z
@c end example tensor d2t_singular/matrix_lib.doc:449
@end smallexample
@c ---end content tensor---

@c ------------------- unitmat -------------
@node unitmat, gauss_col, tensor, matrix_lib
@subsubsection unitmat
@cindex unitmat
@c ---content unitmat---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
unitmat(n); n integer >= 0

@item @strong{Return:}
nxn unit matrix

@item @strong{Note:}
needs a basering, diagonal entries are numbers (=1) in the basering

@end table
@strong{Example:}
@smallexample
@c reused example unitmat d2t_singular/matrix_lib.doc:481
LIB "matrix.lib";
ring r=32003,(x,y,z),lp;
print(xyz*unitmat(4));
@expansion{} xyz,0,  0,  0,
@expansion{} 0,  xyz,0,  0,
@expansion{} 0,  0,  xyz,0,
@expansion{} 0,  0,  0,  xyz
print(unitmat(5));
@expansion{} 1,0,0,0,0,
@expansion{} 0,1,0,0,0,
@expansion{} 0,0,1,0,0,
@expansion{} 0,0,0,1,0,
@expansion{} 0,0,0,0,1
@c end example unitmat d2t_singular/matrix_lib.doc:481
@end smallexample
@c ---end content unitmat---

@c ------------------- gauss_col -------------
@node gauss_col, gauss_row, unitmat, matrix_lib
@subsubsection gauss_col
@cindex gauss_col
@c ---content gauss_col---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
gauss_col(A[,e]); A a matrix, e any type

@item @strong{Return:}
- a matrix B, if called with one argument; B is the complete column-
reduced upper-triangular normal form of A if A is constant,
(resp. as far as this is possible if A is a polynomial matrix;
no division by polynomials).
@* - a list L of two matrices, if called with two arguments;
L satisfies L[1] = A * L[2] with L[1] the column-reduced form of A
and L[2] the transformation matrix.

@item @strong{Note:}
* The procedure just applies interred to A with ordering (C,dp).
The transformation matrix is obtained by applying 'lift'.
This should be faster than the procedure colred.
@* * It should only be used with exact coefficient field (there is no
pivoting and rounding error treatment).
@* * Parameters are allowed. Hence, if the entries of A are parameters,
B is the column-reduced form of A over the rational function field.

@end table
@strong{Example:}
@smallexample
@c reused example gauss_col d2t_singular/matrix_lib.doc:522
LIB "matrix.lib";
ring r=(0,a,b),(A,B,C),dp;
matrix m[8][6]=
0,    2*C, 0,    0,  0,   0,
0,    -4*C,a*A,  0,  0,   0,
b*B,  -A,  0,    0,  0,   0,
-A,   B,   0,    0,  0,   0,
-4*C, 0,   B,    2,  0,   0,
2*A,  B,   0,    0,  0,   0,
0,    3*B, 0,    0,  2b,  0,
0,    AB,  0,    2*A,A,   2a;"";
@expansion{}
list L=gauss_col(m,1);
print(L[1]);
@expansion{} 0,0,2*C, 0,       0,0,
@expansion{} A,0,-4*C,0,       0,0,
@expansion{} 0,0,-A,  (1/2b)*B,0,0,
@expansion{} 0,0,B,   -1/2*A,  0,0,
@expansion{} 0,1,0,   0,       0,0,
@expansion{} 0,0,B,   A,       0,0,
@expansion{} 0,0,0,   0,       1,0,
@expansion{} 0,0,0,   0,       0,1
print(L[2]);
@expansion{} 0,         0,        0,               1/2,      0,         0,
@expansion{} 0,         0,        1,               0,        0,         0,
@expansion{} 1/(a),     0,        0,               0,        0,         0,
@expansion{} -1/(2a)*B, 1/2,      0,               C,        0,         0,
@expansion{} 0,         0,        -3/(2b)*B,       0,        1/(2b),    0,
@expansion{} 1/(2a2)*AB,-1/(2a)*A,(-2b+3)/(4ab)*AB,-1/(a)*AC,-1/(4ab)*A,1/(2a)
ring S=0,x,(c,dp);
matrix A[5][4] =
3, 1, 1, 1,
13, 8, 6,-7,
14,10, 6,-7,
7, 4, 3,-3,
2, 1, 0, 3;
print(gauss_col(A));
@expansion{} 8/9,-5/9,-1/3,7/9,
@expansion{} 1,  0,   0,   0,
@expansion{} 0,  1,   0,   0,
@expansion{} 0,  0,   1,   0,
@expansion{} 0,  0,   0,   1
@c end example gauss_col d2t_singular/matrix_lib.doc:522
@end smallexample
@c inserted refs from d2t_singular/matrix_lib.doc:547
@ifinfo
@menu
See also:
* colred::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{colred}.
@end iftex
@c end inserted refs from d2t_singular/matrix_lib.doc:547

@c ---end content gauss_col---

@c ------------------- gauss_row -------------
@node gauss_row, addcol, gauss_col, matrix_lib
@subsubsection gauss_row
@cindex gauss_row
@c ---content gauss_row---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
gauss_row(A [,e]); A matrix, e any type

@item @strong{Return:}
- a matrix B, if called with one argument; B is the complete row-
reduced lower-triangular normal form of A if A is constant,
(resp. as far as this is possible if A is a polynomial matrix;
no division by polynomials).
@* - a list L of two matrices, if called with two arguments;
L satisfies L[1] = L[2] * A with L[1] the row-reduced form of A
and L[2] the transformation matrix.

@item @strong{Note:}
* This procedure just applies gauss_col to the transposed matrix.
The transformation matrix is obtained by applying lift.
This should be faster than the procedure rowred.
@* * It should only be used with exact coefficient field (there is no
pivoting and rounding error treatment).
@* * Parameters are allowed. Hence, if the entries of A are parameters,
B is the row-reduced form of A over the rational function field.

@end table
@strong{Example:}
@smallexample
@c reused example gauss_row d2t_singular/matrix_lib.doc:585
LIB "matrix.lib";
ring r=(0,a,b),(A,B,C),dp;
matrix m[6][8]=
0, 0,  b*B, -A,-4C,2A,0, 0,
2C,-4C,-A,B, 0,  B, 3B,AB,
0,a*A,  0, 0, B,  0, 0, 0,
0, 0,  0, 0, 2,  0, 0, 2A,
0, 0,  0, 0, 0,  0, 2b, A,
0, 0,  0, 0, 0,  0, 0, 2a;"";
@expansion{}
print(gauss_row(m));"";
@expansion{} 0,  A,   0,       0,     0,0,0,0,
@expansion{} 0,  0,   0,       0,     1,0,0,0,
@expansion{} 2*C,-4*C,-A,      B,     0,B,0,0,
@expansion{} 0,  0,   (1/2b)*B,-1/2*A,0,A,0,0,
@expansion{} 0,  0,   0,       0,     0,0,1,0,
@expansion{} 0,  0,   0,       0,     0,0,0,1
@expansion{}
ring S=0,x,dp;
matrix A[4][5] =  3, 1,1,-1,2,
13, 8,6,-7,1,
14,10,6,-7,1,
7, 4,3,-3,3;
list L=gauss_row(A,1);
print(L[1]);
@expansion{} 1/2,-7/3,-19/6,5/6,
@expansion{} 1,  0,   0,    0,
@expansion{} 0,  1,   0,    0,
@expansion{} 0,  0,   1,    0,
@expansion{} 0,  0,   0,    1
print(L[2]);
@expansion{} 0,   -6,  -5,  1,
@expansion{} -1/2,2/3, -1/6,-1/6,
@expansion{} 1/2, -5/3,-5/6,1/6,
@expansion{} 0,   13/3,11/3,-1/3
@c end example gauss_row d2t_singular/matrix_lib.doc:585
@end smallexample
@c inserted refs from d2t_singular/matrix_lib.doc:606
@ifinfo
@menu
See also:
* rowred::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{rowred}.
@end iftex
@c end inserted refs from d2t_singular/matrix_lib.doc:606

@c ---end content gauss_row---

@c ------------------- addcol -------------
@node addcol, addrow, gauss_row, matrix_lib
@subsubsection addcol
@cindex addcol
@c ---content addcol---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
addcol(A,c1,p,c2); A matrix, p poly, c1, c2 positive integers

@item @strong{Return:}
matrix, A being modified by adding p times column c1 to column c2

@end table
@strong{Example:}
@smallexample
@c reused example addcol d2t_singular/matrix_lib.doc:629
LIB "matrix.lib";
ring r=32003,(x,y,z),lp;
matrix A[3][3]=1,2,3,4,5,6,7,8,9;
print(A);
@expansion{} 1,2,3,
@expansion{} 4,5,6,
@expansion{} 7,8,9
print(addcol(A,1,xy,2));
@expansion{} 1,xy+2, 3,
@expansion{} 4,4xy+5,6,
@expansion{} 7,7xy+8,9
@c end example addcol d2t_singular/matrix_lib.doc:629
@end smallexample
@c ---end content addcol---

@c ------------------- addrow -------------
@node addrow, multcol, addcol, matrix_lib
@subsubsection addrow
@cindex addrow
@c ---content addrow---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
addcol(A,r1,p,r2); A matrix, p poly, r1, r2 positive integers

@item @strong{Return:}
matrix, A being modified by adding p times row r1 to row r2

@end table
@strong{Example:}
@smallexample
@c reused example addrow d2t_singular/matrix_lib.doc:656
LIB "matrix.lib";
ring r=32003,(x,y,z),lp;
matrix A[3][3]=1,2,3,4,5,6,7,8,9;
print(A);
@expansion{} 1,2,3,
@expansion{} 4,5,6,
@expansion{} 7,8,9
print(addrow(A,1,xy,3));
@expansion{} 1,   2,    3,
@expansion{} 4,   5,    6,
@expansion{} xy+7,2xy+8,3xy+9
@c end example addrow d2t_singular/matrix_lib.doc:656
@end smallexample
@c ---end content addrow---

@c ------------------- multcol -------------
@node multcol, multrow, addrow, matrix_lib
@subsubsection multcol
@cindex multcol
@c ---content multcol---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
addcol(A,c,p); A matrix, p poly, c positive integer

@item @strong{Return:}
matrix, A being modified by multiplying column c with p

@end table
@strong{Example:}
@smallexample
@c reused example multcol d2t_singular/matrix_lib.doc:683
LIB "matrix.lib";
ring r=32003,(x,y,z),lp;
matrix A[3][3]=1,2,3,4,5,6,7,8,9;
print(A);
@expansion{} 1,2,3,
@expansion{} 4,5,6,
@expansion{} 7,8,9
print(multcol(A,2,xy));
@expansion{} 1,2xy,3,
@expansion{} 4,5xy,6,
@expansion{} 7,8xy,9
@c end example multcol d2t_singular/matrix_lib.doc:683
@end smallexample
@c ---end content multcol---

@c ------------------- multrow -------------
@node multrow, permcol, multcol, matrix_lib
@subsubsection multrow
@cindex multrow
@c ---content multrow---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
multrow(A,r,p); A matrix, p poly, r positive integer

@item @strong{Return:}
matrix, A being modified by multiplying row r with p

@end table
@strong{Example:}
@smallexample
@c reused example multrow d2t_singular/matrix_lib.doc:710
LIB "matrix.lib";
ring r=32003,(x,y,z),lp;
matrix A[3][3]=1,2,3,4,5,6,7,8,9;
print(A);
@expansion{} 1,2,3,
@expansion{} 4,5,6,
@expansion{} 7,8,9
print(multrow(A,2,xy));
@expansion{} 1,  2,  3,
@expansion{} 4xy,5xy,6xy,
@expansion{} 7,  8,  9
@c end example multrow d2t_singular/matrix_lib.doc:710
@end smallexample
@c ---end content multrow---

@c ------------------- permcol -------------
@node permcol, permrow, multrow, matrix_lib
@subsubsection permcol
@cindex permcol
@c ---content permcol---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
permcol(A,c1,c2); A matrix, c1,c2 positive integers

@item @strong{Return:}
matrix, A being modified by permuting column c1 and c2

@end table
@strong{Example:}
@smallexample
@c reused example permcol d2t_singular/matrix_lib.doc:737
LIB "matrix.lib";
ring r=32003,(x,y,z),lp;
matrix A[3][3]=1,x,3,4,y,6,7,z,9;
print(A);
@expansion{} 1,x,3,
@expansion{} 4,y,6,
@expansion{} 7,z,9
print(permcol(A,2,3));
@expansion{} 1,3,x,
@expansion{} 4,6,y,
@expansion{} 7,9,z
@c end example permcol d2t_singular/matrix_lib.doc:737
@end smallexample
@c ---end content permcol---

@c ------------------- permrow -------------
@node permrow, rowred, permcol, matrix_lib
@subsubsection permrow
@cindex permrow
@c ---content permrow---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
permrow(A,r1,r2); A matrix, r1,r2 positive integers

@item @strong{Return:}
matrix, A being modified by permuting row r1 and r2

@end table
@strong{Example:}
@smallexample
@c reused example permrow d2t_singular/matrix_lib.doc:764
LIB "matrix.lib";
ring r=32003,(x,y,z),lp;
matrix A[3][3]=1,2,3,x,y,z,7,8,9;
print(A);
@expansion{} 1,2,3,
@expansion{} x,y,z,
@expansion{} 7,8,9
print(permrow(A,2,1));
@expansion{} x,y,z,
@expansion{} 1,2,3,
@expansion{} 7,8,9
@c end example permrow d2t_singular/matrix_lib.doc:764
@end smallexample
@c ---end content permrow---

@c ------------------- rowred -------------
@node rowred, colred, permrow, matrix_lib
@subsubsection rowred
@cindex rowred
@c ---content rowred---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
rowred(A[,e]); A matrix, e any type

@item @strong{Return:}
- a matrix B, being the row reduced form of A, if rowred is called
with one argument.
@*(as far as this is possible over the polynomial ring; no division
by polynomials)
@* - a list L of two matrices, such that L[1] = L[2] * A with L[1]
the row-reduced form of A and L[2] the transformation matrix
(if rowred is called with two arguments).

@item @strong{Note:}
* This procedure is designed for teaching purposes mainly.
@* * The straight forward Gaussian algorithm is implemented in the
library (no standard basis computation).
@*The transformation matrix is obtained by concatenating a unit
matrix to A. proc gauss_row should be faster.
@* * It should only be used with exact coefficient field (there is no
pivoting) over the polynomial ring (ordering lp or dp).
@* * Parameters are allowed. Hence, if the entries of A are parameters
the computation takes place over the field of rational functions.

@end table
@strong{Example:}
@smallexample
@c reused example rowred d2t_singular/matrix_lib.doc:808
LIB "matrix.lib";
ring r=(0,a,b),(A,B,C),dp;
matrix m[6][8]=
0, 0,  b*B, -A,-4C,2A,0, 0,
2C,-4C,-A,B, 0,  B, 3B,AB,
0,a*A,  0, 0, B,  0, 0, 0,
0, 0,  0, 0, 2,  0, 0, 2A,
0, 0,  0, 0, 0,  0, 2b, A,
0, 0,  0, 0, 0,  0, 0, 2a;"";
@expansion{}
print(rowred(m));"";
@expansion{} 0,  0,    0,    0, 1,0,  0,0,
@expansion{} 0,  0,    0,    0, 0,0,  1,0,
@expansion{} 0,  0,    0,    0, 0,0,  0,1,
@expansion{} 0,  0,    (b)*B,-A,0,2*A,0,0,
@expansion{} 2*C,-4*C, -A,   B, 0,B,  0,0,
@expansion{} 0,  (a)*A,0,    0, 0,0,  0,0
@expansion{}
list L=rowred(m,1);
print(L[1]);
@expansion{} 0,  0,    0,    0, 1,0,  0,0,
@expansion{} 0,  0,    0,    0, 0,0,  1,0,
@expansion{} 0,  0,    0,    0, 0,0,  0,1,
@expansion{} 0,  0,    (b)*B,-A,0,2*A,0,0,
@expansion{} 2*C,-4*C, -A,   B, 0,B,  0,0,
@expansion{} 0,  (a)*A,0,    0, 0,0,  0,0
print(L[2]);
@expansion{} 0,0,0,1/2,   0,        -1/(2a)*A,
@expansion{} 0,0,0,0,     1/(2b),   -1/(4ab)*A,
@expansion{} 0,0,0,0,     0,        1/(2a),
@expansion{} 1,0,0,2*C,   0,        -2/(a)*AC,
@expansion{} 0,1,0,0,     -3/(2b)*B,(-2b+3)/(4ab)*AB,
@expansion{} 0,0,1,-1/2*B,0,        1/(2a)*AB
@c end example rowred d2t_singular/matrix_lib.doc:808
@end smallexample
@c inserted refs from d2t_singular/matrix_lib.doc:824
@ifinfo
@menu
See also:
* gauss_row::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{gauss_row}.
@end iftex
@c end inserted refs from d2t_singular/matrix_lib.doc:824

@c ---end content rowred---

@c ------------------- colred -------------
@node colred, rm_unitrow, rowred, matrix_lib
@subsubsection colred
@cindex colred
@c ---content colred---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
colred(A[,e]); A matrix, e any type

@item @strong{Return:}
- a matrix B, being the column reduced form of A, if colred is
called with one argument.
@*(as far as this is possible over the polynomial ring;
no division by polynomials)
@* - a list L of two matrices, such that L[1] = A * L[2] with L[1]
the column-reduced form of A and L[2] the transformation matrix
(if colred is called with two arguments).

@item @strong{Note:}
* This procedure is designed for teaching purposes mainly.
@* * It applies rowred to the transposed matrix.
proc gauss_col should be faster.
@* * It should only be used with exact coefficient field (there is no
pivoting) over the polynomial ring (ordering lp or dp).
@* * Parameters are allowed. Hence, if the entries of A are parameters
the computation takes place over the field of rational functions.

@end table
@strong{Example:}
@smallexample
@c reused example colred d2t_singular/matrix_lib.doc:862
LIB "matrix.lib";
ring r=(0,a,b),(A,B,C),dp;
matrix m[8][6]=
0,    2*C, 0,    0,  0,   0,
0,    -4*C,a*A,  0,  0,   0,
b*B,  -A,  0,    0,  0,   0,
-A,   B,   0,    0,  0,   0,
-4*C, 0,   B,    2,  0,   0,
2*A,  B,   0,    0,  0,   0,
0,    3*B, 0,    0,  2b,  0,
0,    AB,  0,    2*A,A,   2a;"";
@expansion{}
print(colred(m));"";
@expansion{} 0,0,0,0,    2*C, 0,
@expansion{} 0,0,0,0,    -4*C,(a)*A,
@expansion{} 0,0,0,(b)*B,-A,  0,
@expansion{} 0,0,0,-A,   B,   0,
@expansion{} 1,0,0,0,    0,   0,
@expansion{} 0,0,0,2*A,  B,   0,
@expansion{} 0,1,0,0,    0,   0,
@expansion{} 0,0,1,0,    0,   0
@expansion{}
list L=colred(m,1);
print(L[1]);
@expansion{} 0,0,0,0,    2*C, 0,
@expansion{} 0,0,0,0,    -4*C,(a)*A,
@expansion{} 0,0,0,(b)*B,-A,  0,
@expansion{} 0,0,0,-A,   B,   0,
@expansion{} 1,0,0,0,    0,   0,
@expansion{} 0,0,0,2*A,  B,   0,
@expansion{} 0,1,0,0,    0,   0,
@expansion{} 0,0,1,0,    0,   0
print(L[2]);
@expansion{} 0,        0,         0,     1,        0,               0,
@expansion{} 0,        0,         0,     0,        1,               0,
@expansion{} 0,        0,         0,     0,        0,               1,
@expansion{} 1/2,      0,         0,     2*C,      0,               -1/2*B,
@expansion{} 0,        1/(2b),    0,     0,        -3/(2b)*B,       0,
@expansion{} -1/(2a)*A,-1/(4ab)*A,1/(2a),-2/(a)*AC,(-2b+3)/(4ab)*AB,1/(2a)*AB
@c end example colred d2t_singular/matrix_lib.doc:862
@end smallexample
@c inserted refs from d2t_singular/matrix_lib.doc:880
@ifinfo
@menu
See also:
* gauss_col::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{gauss_col}.
@end iftex
@c end inserted refs from d2t_singular/matrix_lib.doc:880

@c ---end content colred---

@c ------------------- rm_unitrow -------------
@node rm_unitrow, rm_unitcol, colred, matrix_lib
@subsubsection rm_unitrow
@cindex rm_unitrow
@c ---content rm_unitrow---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
rm_unitrow(A); A matrix (being col-reduced)

@item @strong{Return:}
matrix, obtained from A by deleting unit rows (having just one 1
and else 0 as entries) and associated columns

@end table
@strong{Example:}
@smallexample
@c reused example rm_unitrow d2t_singular/matrix_lib.doc:904
LIB "matrix.lib";
ring r=0,(A,B,C),dp;
matrix m[8][6]=
0,0,  0,   0, 2C, 0,
0,0,  0,   0, -4C,A,
A,-C2,0,   B, -A, 0,
0,0,  1/2B,-A,B,  0,
1,0,  0,   0, 0,  0,
0,0,  0,   2A,B,  0,
0,1,  0,   0, 0,  0,
0,0,  1,   0, 0,  0;
print(rm_unitrow(m));
@expansion{} 0, 2C, 0,
@expansion{} 0, -4C,A,
@expansion{} B, -A, 0,
@expansion{} -A,B,  0,
@expansion{} 2A,B,  0
@c end example rm_unitrow d2t_singular/matrix_lib.doc:904
@end smallexample
@c ---end content rm_unitrow---

@c ------------------- rm_unitcol -------------
@node rm_unitcol, headStand, rm_unitrow, matrix_lib
@subsubsection rm_unitcol
@cindex rm_unitcol
@c ---content rm_unitcol---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@item @strong{Usage:}
rm_unitcol(A); A matrix (being row-reduced)

@item @strong{Return:}
matrix, obtained from A by deleting unit columns (having just one 1
and else 0 as entries) and associated rows

@end table
@strong{Example:}
@smallexample
@c reused example rm_unitcol d2t_singular/matrix_lib.doc:939
LIB "matrix.lib";
ring r=0,(A,B,C),dp;
matrix m[6][8]=
0,  0,    A,   0, 1,0,  0,0,
0,  0,  -C2,   0, 0,0,  1,0,
0,  0,    0,1/2B, 0,0,  0,1,
0,  0,    B,  -A, 0,2A, 0,0,
2C,-4C,  -A,   B, 0,B,  0,0,
0,  A,    0,   0, 0,0,  0,0;
print(rm_unitcol(m));
@expansion{} 0, 0,  B, -A,2A,
@expansion{} 2C,-4C,-A,B, B,
@expansion{} 0, A,  0, 0, 0
@c end example rm_unitcol d2t_singular/matrix_lib.doc:939
@end smallexample
@c ---end content rm_unitcol---

@c ------------------- headStand -------------
@node headStand,, rm_unitcol, matrix_lib
@subsubsection headStand
@cindex headStand
@c ---content headStand---
Procedure from library @code{matrix.lib} (@pxref{matrix_lib}).

@table @asis
@end table
@c ---end content headStand---

repo_name: mthl/texinfo

license: mit


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/mondromy_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/mondromy_lib.doc INSTEAD
@c library version: (1.22.2.2,2002/02/20)
@c library file: ../Singular/LIB/mondromy.lib
@cindex mondromy.lib
@cindex mondromy_lib
@table @asis
@item @strong{Library:}
mondromy.lib
@item @strong{Purpose:}
  Monodromy of an Isolated Hypersurface Singularity
@item @strong{Author:}
Mathias Schulze, email: mschulze@@mathematik.uni-kl.de

@item @strong{Overview:}
A library to compute the monodromy of an isolated hypersurface singularity.
It uses an algorithm by Brieskorn (manuscripta math. 2 (1970), 103-161) to
compute a connection matrix of the meromorphic Gauss-Manin connection up to
arbitrarily high order, and an algorithm of Gerard and Levelt (Ann. Inst.
Fourier, Grenoble 23,1 (1973), pp. 157-195) to transform it to a simple pole.

@end table

@strong{Procedures:}
@menu
* detadj:: determinant and adjoint matrix of square matrix U
* invunit:: series inverse of polynomial u up to order n
* jacoblift:: lifts f^kappa in jacob(f) with minimal kappa
* monodromyB:: monodromy of isolated hypersurface singularity f
* H2basis:: basis of Brieskorn lattice H''
@end menu
@cindex Monodromy
@cindex hypersurface singularity
@cindex Gauss-Manin connection
@cindex Brieskorn lattice
@c inserted refs from d2t_singular/mondromy_lib.doc:35
@ifinfo
@menu
See also:
* gaussman_lib::
@end menu
@end ifinfo
@iftex
@strong{See also:}
@ref{gaussman_lib}.
@end iftex
@c end inserted refs from d2t_singular/mondromy_lib.doc:35

@c ---end content LibInfo---

@c ------------------- detadj -------------
@node detadj, invunit,, mondromy_lib
@subsubsection detadj
@cindex detadj
@c ---content detadj---
Procedure from library @code{mondromy.lib} (@pxref{mondromy_lib}).

@table @asis
@item @strong{Usage:}
detadj(U); U matrix

@item @strong{Assume:}
U is a square matrix with non zero determinant.

@item @strong{Return:}
The procedure returns a list with at most 2 entries.
@*If U is not a square matrix, the list is empty.
@*If U is a square matrix, then the first entry is the determinant of U.
If U is a square matrix and the determinant of U not zero,
then the second entry is the adjoint matrix of U.

@item @strong{Display:}
The procedure displays comments if printlevel>=1.

@end table
@strong{Example:}
@smallexample
@c computed example detadj d2t_singular/mondromy_lib.doc:68
LIB "mondromy.lib";
ring R=0,x,dp;
matrix U[2][2]=1,1+x,1+x2,1+x3;
list daU=detadj(U);
daU[1];
@expansion{} -x2-x
print(daU[2]);
@expansion{} x3+1, -x-1,
@expansion{} -x2-1,1
@c end example detadj d2t_singular/mondromy_lib.doc:68
@end smallexample
@c ---end content detadj---

@c ------------------- invunit -------------
@node invunit, jacoblift, detadj, mondromy_lib
@subsubsection invunit
@cindex invunit
@c ---content invunit---
Procedure from library @code{mondromy.lib} (@pxref{mondromy_lib}).

@table @asis
@item @strong{Usage:}
invunit(u,n); u poly, n int

@item @strong{Assume:}
The polynomial u is a series unit.

@item @strong{Return:}
The procedure returns the series inverse of u up to order n
or a zero polynomial if u is no series unit.

@item @strong{Display:}
The procedure displays comments if printlevel>=1.

@end table
@strong{Example:}
@smallexample
@c computed example invunit d2t_singular/mondromy_lib.doc:103
LIB "mondromy.lib";
ring R=0,(x,y),dp;
invunit(2+x3+xy4,10);
@expansion{} 1/8x2y8-1/16x9+1/4x4y4+1/8x6-1/4xy4-1/4x3+1/2
@c end example invunit d2t_singular/mondromy_lib.doc:103
@end smallexample
@c ---end content invunit---

@c ------------------- jacoblift -------------
@node jacoblift, monodromyB, invunit, mondromy_lib
@subsubsection jacoblift
@cindex jacoblift
@c ---content jacoblift---
Procedure from library @code{mondromy.lib} (@pxref{mondromy_lib}).

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

@item @strong{Assume:}
The polynomial f in a series ring (local ordering) defines
an isolated hypersurface singularity.

@item @strong{Return:}
The procedure returns a list with entries kappa, xi, u of type
int, vector, poly such that kappa is minimal with f^kappa in jacob(f),
u is a unit, and u*f^kappa=(matrix(jacob(f))*xi)[1,1].

@item @strong{Display:}
The procedure displays comments if printlevel>=1.

@end table
@strong{Example:}
@smallexample
@c computed example jacoblift d2t_singular/mondromy_lib.doc:137
LIB "mondromy.lib";
ring R=0,(x,y),ds;
poly f=x2y2+x6+y6;
jacoblift(f);
@expansion{} [1]:
@expansion{}    2
@expansion{} [2]:
@expansion{}    1/2x2y3*gen(2)+1/6x7*gen(1)+5/6x6y*gen(2)-2/3xy6*gen(1)+1/6y7*gen(2)-4\
   x4y5*gen(2)-3/2x9y2*gen(1)-15/2x8y3*gen(2)+9/2x3y8*gen(1)-3/2x2y9*gen(2)
@expansion{} [3]:
@expansion{}    1-9x2y2
@c end example jacoblift d2t_singular/mondromy_lib.doc:137
@end smallexample
@c ---end content jacoblift---

@c ------------------- monodromyB -------------
@node monodromyB, H2basis, jacoblift, mondromy_lib
@subsubsection monodromyB
@cindex monodromyB
@c ---content monodromyB---
Procedure from library @code{mondromy.lib} (@pxref{mondromy_lib}).

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

@item @strong{Assume:}
The polynomial f in a series ring (local ordering) defines
an isolated hypersurface singularity.

@item @strong{Return:}
The procedure returns a residue matrix M of the meromorphic
Gauss-Manin connection of the singularity defined by f
or an empty matrix if the assumptions are not fulfilled.
If opt=0 (default), exp(-2*pi*i*M) is a monodromy matrix of f,
else, only the characteristic polynomial of exp(-2*pi*i*M) coincides
with the characteristic polynomial of the monodromy of f.

@item @strong{Display:}
The procedure displays more comments for higher printlevel.

@end table
@strong{Example:}
@smallexample
@c computed example monodromyB d2t_singular/mondromy_lib.doc:175
LIB "mondromy.lib";
ring R=0,(x,y),ds;
poly f=x2y2+x6+y6;
matrix M=monodromyB(f);
print(M);
@expansion{} 7/6,0,  0,0,  0,  0,0,   0,-1/2,0,  0,  0,    0,
@expansion{} 0,  7/6,0,0,  0,  0,-1/2,0,0,   0,  0,  0,    0,
@expansion{} 0,  0,  1,0,  0,  0,0,   0,0,   0,  0,  0,    0,
@expansion{} 0,  0,  0,4/3,0,  0,0,   0,0,   0,  0,  0,    0,
@expansion{} 0,  0,  0,0,  4/3,0,0,   0,0,   0,  0,  0,    0,
@expansion{} 0,  0,  0,0,  0,  1,0,   0,0,   0,  0,  0,    0,
@expansion{} 0,  0,  0,0,  0,  0,5/6, 0,0,   0,  0,  0,    0,
@expansion{} 0,  0,  0,0,  0,  0,0,   1,0,   0,  0,  0,    0,
@expansion{} 0,  0,  0,0,  0,  0,0,   0,5/6, 0,  0,  0,    0,
@expansion{} 0,  0,  0,0,  0,  0,0,   0,0,   2/3,0,  0,    0,
@expansion{} 0,  0,  0,0,  0,  0,0,   0,0,   0,  2/3,0,    0,
@expansion{} 0,  0,  0,0,  0,  0,0,   0,0,   0,  0,  47/44,-625/396,
@expansion{} 0,  0,  0,0,  0,  0,0,   0,0,   0,  0,  9/44, -3/44
@c end example monodromyB d2t_singular/mondromy_lib.doc:175
@end smallexample
@c ---end content monodromyB---

@c ------------------- H2basis -------------
@node H2basis,, monodromyB, mondromy_lib
@subsubsection H2basis
@cindex H2basis
@c ---content H2basis---
Procedure from library @code{mondromy.lib} (@pxref{mondromy_lib}).

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

@item @strong{Assume:}
The polynomial f in a series ring (local ordering) defines
an isolated hypersurface singularity.

@item @strong{Return:}
The procedure returns a list of representatives of a C@{f@}-basis of the
Brieskorn lattice H''=Omega^(n+1)/df^dOmega^(n-1).

@item @strong{Theory:}
H'' is a free C@{f@}-module of rank milnor(f).

@item @strong{Display:}
The procedure displays more comments for higher printlevel.

@end table
@strong{Example:}
@smallexample
@c computed example H2basis d2t_singular/mondromy_lib.doc:213
LIB "mondromy.lib";
ring R=0,(x,y),ds;
poly f=x2y2+x6+y6;
H2basis(f);
@expansion{} [1]:
@expansion{}    x4
@expansion{} [2]:
@expansion{}    x2y2
@expansion{} [3]:
@expansion{}    y4
@expansion{} [4]:
@expansion{}    x3
@expansion{} [5]:
@expansion{}    x2y
@expansion{} [6]:
@expansion{}    xy2
@expansion{} [7]:
@expansion{}    y3
@expansion{} [8]:
@expansion{}    x2
@expansion{} [9]:
@expansion{}    xy
@expansion{} [10]:
@expansion{}    y2
@expansion{} [11]:
@expansion{}    x
@expansion{} [12]:
@expansion{}    y
@expansion{} [13]:
@expansion{}    1
@c end example H2basis d2t_singular/mondromy_lib.doc:213
@end smallexample
@c ---end content H2basis---


code:
@c ---content LibInfo---
@comment This file was generated by doc2tex.pl from d2t_singular/mprimdec_lib.doc
@comment DO NOT EDIT DIRECTLY, BUT EDIT d2t_singular/mprimdec_lib.doc INSTEAD
@c library version: (1.1.2.3,2002/03/19)
@c library file: ../Singular/LIB/mprimdec.lib
@cindex mprimdec.lib
@cindex mprimdec_lib
@table @asis
@item @strong{Library:}
mprimdec.lib
@item @strong{Purpose:}
   procedures for primary decomposition of modules
@item @strong{Authors:}
Alexander Dreyer, dreyer@@mathematik.uni-kl.de; adreyer@@web.de

@item @strong{Remark:}
These procedures are implemented to be used in characteristic 0.
@*They also work in positive characteristic >> 0.
@*In small characteristic and for algebraic extensions, the
procedures via Gianni, Trager, Zacharias may not terminate.

@end table

@strong{Procedures:}
@menu
* separator:: computes a list of separators of prime ideals
* PrimdecA:: (not necessarily minimal) primary decomposition via Shimoyama/Yokoyama (suggested by Graebe)
* PrimdecB:: (not necessarily minimal) primary decomposition for pseudo-primary ideals
* modDec:: minimal primary decomposition via Shimoyama/Yokoyama (suggested by Graebe)
* zeroMod:: minimal zero-dimensional primary decomposition via Gianni, Trager and Zacharias
* GTZmod:: minimal primary decomposition via Gianni, Trager and Zacharias
* dec1var:: primary decomposition for one variable
* annil:: the annihilator of M/N in the basering
* splitting:: splitting to simpler modules
* primTest:: tests whether i is prime or homogeneous
* preComp:: enhanced Version of splitting
* indSet:: lists with varstrings of(in)dependent variables
* GTZopt:: a faster version of GTZmod
* zeroOpt:: a faster version of zeroMod
* clrSBmod:: extracts an minimal SB from a SB
* minSatMod:: minimal saturation of N w.r.t. I
* specialModulesEqual:: checks for equality of standard bases of modules if N1 is contained in N2 or vice versa
* stdModulesEqual:: checks for equality of standard bases
* modulesEqual:: checks for equality of modules
* getData:: extracts oldData and computes the remaining data
@end menu
@c ---end content LibInfo---

@c ------------------- separator -------------
@node separator, PrimdecA,, mprimdec_lib
@subsubsection separator
@cindex separator
@c ---content separator---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
separator(l); list l of prime ideals

@item @strong{Return:}
list sepList;
@*a list of separators of the prime ideals in l,
@*i.e. polynomials p_ij, s.th. p_ij is in l[j],
@*for all l[j] not contained in l[i]
@*but p_ij is not in l[i]

@end table
@strong{Example:}
@smallexample
@c computed example separator d2t_singular/mprimdec_lib.doc:68
LIB "mprimdec.lib";
ring r=0,(x,y,z),dp;
ideal i=(x2y,xz2,y2z,z3);
list l=minAssGTZ(i);
list sepL=separator(l);
sepL;
@expansion{} [1]:
@expansion{}    x
@expansion{} [2]:
@expansion{}    y
@c end example separator d2t_singular/mprimdec_lib.doc:68
@end smallexample
@c ---end content separator---

@c ------------------- PrimdecA -------------
@node PrimdecA, PrimdecB, separator, mprimdec_lib
@subsubsection PrimdecA
@cindex PrimdecA
@c ---content PrimdecA---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
PrimdecA (N[, i]); module N, int i

@item @strong{Return:}
list l
@*a (not necessarily minimal) primary decomposition of N
computed by a generalized version of
@*the algorithm of Schimoyama/Yokoyama,
@*if i=1 is given, the factorizing Groebner is used
@*to compute the isolated primes.

@end table
@strong{Example:}
@smallexample
@c computed example PrimdecA d2t_singular/mprimdec_lib.doc:101
LIB "mprimdec.lib";
ring r=0,(x,y,z),dp;
module N=x*gen(1)+ y*gen(2),
x*gen(1)-x2*gen(2);
list l=PrimdecA(N);
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=x*gen(1)+y*gen(2)
@expansion{}       _[2]=x*gen(2)-gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=x2+y
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(2)
@expansion{}       _[2]=x*gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=x
@expansion{} [3]:
@expansion{}    [1]:
@expansion{}       _[1]=y*gen(1)
@expansion{}       _[2]=y*gen(2)
@expansion{}       _[3]=x*gen(1)
@expansion{}       _[4]=x*gen(2)
@expansion{}    [2]:
@expansion{}       _[1]=y
@expansion{}       _[2]=x
@c end example PrimdecA d2t_singular/mprimdec_lib.doc:101
@end smallexample
@c ---end content PrimdecA---

@c ------------------- PrimdecB -------------
@node PrimdecB, modDec, PrimdecA, mprimdec_lib
@subsubsection PrimdecB
@cindex PrimdecB
@c ---content PrimdecB---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
PrimdecB (N, p); pseudo-primary module N, isolated prime ideal p

@item @strong{Return:}
list l
@*a (not necessarily minimal) primary decomposition of N

@end table
@strong{Example:}
@smallexample
@c computed example PrimdecB d2t_singular/mprimdec_lib.doc:130
LIB "mprimdec.lib";
ring r=0,(x,y,z),dp;
module N=y*gen(1),y2*gen(2),yz*gen(2),yx*gen(2);
ideal p=y;
list l=PrimdecB(N,p);
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=y*gen(1)
@expansion{}       _[2]=y*gen(2)
@expansion{}    [2]:
@expansion{}       _[1]=y
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=y*gen(1)
@expansion{}       _[2]=y*gen(2)
@expansion{}       _[3]=x*gen(1)
@expansion{}       _[4]=x*gen(2)
@expansion{}    [2]:
@expansion{}       _[1]=y
@expansion{}       _[2]=x
@expansion{} [3]:
@expansion{}    [1]:
@expansion{}       _[1]=z*gen(1)
@expansion{}       _[2]=z*gen(2)
@expansion{}       _[3]=y*gen(1)
@expansion{}       _[4]=x*gen(1)
@expansion{}       _[5]=x*gen(2)
@expansion{}       _[6]=y2*gen(2)
@expansion{}    [2]:
@expansion{}       _[1]=z
@expansion{}       _[2]=y
@expansion{}       _[3]=x
@c end example PrimdecB d2t_singular/mprimdec_lib.doc:130
@end smallexample
@c ---end content PrimdecB---

@c ------------------- modDec -------------
@node modDec, zeroMod, PrimdecB, mprimdec_lib
@subsubsection modDec
@cindex modDec
@c ---content modDec---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
modDec (N[, i]); module N, int i

@item @strong{Return:}
list l
@*a minimal primary decomposition of N
@*computed by an generalized version of
@*the algorithm of Schimoyama/Yokoyama,
@*if i=1 is given, the factorizing Groebner is used

@end table
@strong{Example:}
@smallexample
@c computed example modDec d2t_singular/mprimdec_lib.doc:162
LIB "mprimdec.lib";
ring r=0,(x,y,z),dp;
module N=x*gen(1)+ y*gen(2),
x*gen(1)-x2*gen(2);
list l=modDec(N);
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=x*gen(1)+y*gen(2)
@expansion{}       _[2]=x*gen(2)-gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=x2+y
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(2)
@expansion{}       _[2]=x*gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=x
@c end example modDec d2t_singular/mprimdec_lib.doc:162
@end smallexample
@c ---end content modDec---

@c ------------------- zeroMod -------------
@node zeroMod, GTZmod, modDec, mprimdec_lib
@subsubsection zeroMod
@cindex zeroMod
@c ---content zeroMod---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
zeroMod (N[, check]); zero-dimensional module N[, module check]

@item @strong{Return:}
list l
@*the minimal primary decomposition of a zero-dimensional module N,
computed by a generalized version of the algorithm
@*of Gianni, Trager and Zacharias

@item @strong{Note:}
if the parameter check is given, only components
@*not containing check are computed

@end table
@strong{Example:}
@smallexample
@c computed example zeroMod d2t_singular/mprimdec_lib.doc:197
LIB "mprimdec.lib";
ring r=0,z,dp;
module N=z*gen(1),(z-1)*gen(2),(z+1)*gen(3);
list l=zeroMod(N);
@expansion{} 2
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(1)
@expansion{}       _[2]=gen(3)
@expansion{}       _[3]=z*gen(2)-gen(2)
@expansion{}    [2]:
@expansion{}       _[1]=z-1
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(2)
@expansion{}       _[2]=gen(3)
@expansion{}       _[3]=z*gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=z
@expansion{} [3]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(1)
@expansion{}       _[2]=gen(2)
@expansion{}       _[3]=z*gen(3)+gen(3)
@expansion{}    [2]:
@expansion{}       _[1]=z+1
@c end example zeroMod d2t_singular/mprimdec_lib.doc:197
@end smallexample
@c ---end content zeroMod---

@c ------------------- GTZmod -------------
@node GTZmod, dec1var, zeroMod, mprimdec_lib
@subsubsection GTZmod
@cindex GTZmod
@c ---content GTZmod---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
GTZmod (N[, check]); module N[, module check]

@item @strong{Return:}
list l
@*the minimal primary decomposition of the module N,
@*computed by a generalized version of the algorithm
@*of Gianny, Trager and Zacharias

@item @strong{Note:}
if the parameter check is given, only components
@*not containing check are computed

@end table
@strong{Example:}
@smallexample
@c computed example GTZmod d2t_singular/mprimdec_lib.doc:231
LIB "mprimdec.lib";
ring r=0,(x,y,z),dp;
module N=x*gen(1)+ y*gen(2),
x*gen(1)-x2*gen(2);
list l=GTZmod(N);
@expansion{} 2
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=x*gen(1)+y*gen(2)
@expansion{}       _[2]=x*gen(2)-gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=x2+y
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(2)
@expansion{}       _[2]=x*gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=x
@c end example GTZmod d2t_singular/mprimdec_lib.doc:231
@end smallexample
@c ---end content GTZmod---

@c ------------------- dec1var -------------
@node dec1var, annil, GTZmod, mprimdec_lib
@subsubsection dec1var
@cindex dec1var
@c ---content dec1var---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
dec1var (N); zero-dimensional module N[, module check]

@item @strong{Return:}
list l
@*the minimal primary decomposition of a submodule N of R^s
if nvars(R)=1

@item @strong{Note:}
if the parameter check is given, only components
@*not containing check are computed

@end table
@strong{Example:}
@smallexample
@c computed example dec1var d2t_singular/mprimdec_lib.doc:265
LIB "mprimdec.lib";
ring r=0,z,dp;
module N=z*gen(1),(z-1)*gen(2),(z+1)*gen(3);
list l=dec1var(N);
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(1)
@expansion{}       _[2]=gen(3)
@expansion{}       _[3]=z*gen(2)-gen(2)
@expansion{}    [2]:
@expansion{}       _[1]=z-1
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(2)
@expansion{}       _[2]=gen(3)
@expansion{}       _[3]=z*gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=z
@expansion{} [3]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(1)
@expansion{}       _[2]=gen(2)
@expansion{}       _[3]=z*gen(3)+gen(3)
@expansion{}    [2]:
@expansion{}       _[1]=z+1
@c end example dec1var d2t_singular/mprimdec_lib.doc:265
@end smallexample
@c ---end content dec1var---

@c ------------------- annil -------------
@node annil, splitting, dec1var, mprimdec_lib
@subsubsection annil
@cindex annil
@c ---content annil---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
annil(N); module N

@item @strong{Return:}
ideal ann=std(quotient(N,freemodule(nrows(N))));
@*the annihilator of M/N in the basering

@item @strong{Note:}
ann is a std basis in the basering

@end table
@strong{Example:}
@smallexample
@c computed example annil d2t_singular/mprimdec_lib.doc:296
LIB "mprimdec.lib";
ring r=0,(x,y,z),dp;
module N=x*gen(1), y*gen(2);
ideal ann=annil(N);
ann;
@expansion{} ann[1]=xy
@c end example annil d2t_singular/mprimdec_lib.doc:296
@end smallexample
@c ---end content annil---

@c ------------------- splitting -------------
@node splitting, primTest, annil, mprimdec_lib
@subsubsection splitting
@cindex splitting
@c ---content splitting---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
splitting(N[,check[, ann]]); module N, module check, ideal ann

@item @strong{Return:}
(l, check) list l, module check
@*the elements of l consists of a triple with
@*[1] of type module [2] and [3] of type ideal
@*s.th. the intersection of the modules is equal to the
zero-dimensional module N, furthermore l[j][3]=annil(l[j][1])
if l[j][2]!=0 then the module l[j][1] is primary
@*with associated prime l[j][2],
@*and check=intersect(check, l[j][1]) is computed

@item @strong{Note:}
if the parameter check is given, only components not containing
check are computed; if ann is given, ann is used instead of annil(N)

@end table
@strong{Example:}
@smallexample
@c computed example splitting d2t_singular/mprimdec_lib.doc:334
LIB "mprimdec.lib";
ring r=0,z,lp;
module N=z*gen(1), (z+1)*gen(2);
N=std(N);
list l; module check;
(l, check)=splitting(N);
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(2)
@expansion{}       _[2]=z*gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=z
@expansion{}    [3]:
@expansion{}       _[1]=z
@expansion{}    [4]:
@expansion{}       _[1]=z
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(1)
@expansion{}       _[2]=z*gen(2)+gen(2)
@expansion{}    [2]:
@expansion{}       _[1]=z+1
@expansion{}    [3]:
@expansion{}       _[1]=z+1
@expansion{}    [4]:
@expansion{}       _[1]=z+1
check;
@expansion{} check[1]=z*gen(2)+gen(2)
@expansion{} check[2]=z*gen(1)
@c end example splitting d2t_singular/mprimdec_lib.doc:334
@end smallexample
@c ---end content splitting---

@c ------------------- primTest -------------
@node primTest, preComp, splitting, mprimdec_lib
@subsubsection primTest
@cindex primTest
@c ---content primTest---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
primTest(i[, p]); a zero-dimensional ideal i, irreducible poly p in i

@item @strong{Return:}
if i neither is prime nor is homogeneous then ideal(0) is returned,
else radical(i)

@end table
@strong{Example:}
@smallexample
@c computed example primTest d2t_singular/mprimdec_lib.doc:365
LIB "mprimdec.lib";
ring r=0,(x,y,z),lp;
ideal i=x+1,y-1,z;
i=std(i);
ideal primId=primTest(i,z);
primId;
@expansion{} primId[1]=z
@expansion{} primId[2]=y-1
@expansion{} primId[3]=x+1
i=x,z2,yz,y2;
i=std(i);
primId=primTest(i);
primId;
@expansion{} primId[1]=x
@expansion{} primId[2]=y
@expansion{} primId[3]=z
@c end example primTest d2t_singular/mprimdec_lib.doc:365
@end smallexample
@c ---end content primTest---

@c ------------------- preComp -------------
@node preComp, indSet, primTest, mprimdec_lib
@subsubsection preComp
@cindex preComp
@c ---content preComp---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
preComp(N,check[, ann]); module N, module check, ideal ann

@item @strong{Return:}
(l, check) list l, module check
@*the elements of l consists of a triple with
@*[1] of type module [2] and [3] of type ideal
@*s.th. the intersection of the modules is equal to the
zero-dimensional module N, furthermore l[j][3]=annil(l[j][1])
if l[j][2]!=0 then the module l[j][1] is primary
@*with associated prime l[j][2],
@*and check=intersect(check, l[j][1]) is computed

@item @strong{Note:}
only components not containing check are computed;
@*if ann is given, ann is used instead of annil(N)

@end table
@strong{Example:}
@smallexample
@c computed example preComp d2t_singular/mprimdec_lib.doc:408
LIB "mprimdec.lib";
ring r=0,z,lp;
module N=z*gen(1), (z+1)*gen(2);
N=std(N);
list l; module check;
(l, check)=preComp(N,freemodule(2));
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=z*gen(1)
@expansion{}       _[2]=gen(2)
@expansion{}    [2]:
@expansion{}       _[1]=z
@expansion{}    [3]:
@expansion{}       _[1]=z
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(1)
@expansion{}       _[2]=z*gen(2)+gen(2)
@expansion{}    [2]:
@expansion{}       _[1]=z+1
@expansion{}    [3]:
@expansion{}       _[1]=z+1
check;
@expansion{} check[1]=z*gen(1)
@expansion{} check[2]=z*gen(2)+gen(2)
@c end example preComp d2t_singular/mprimdec_lib.doc:408
@end smallexample
@c ---end content preComp---

@c ------------------- indSet -------------
@node indSet, GTZopt, preComp, mprimdec_lib
@subsubsection indSet
@cindex indSet
@c ---content indSet---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

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

@item @strong{Return:}
list with two entrees
@*both are lists of new varstrings with the dependent variables
the independent set, the ordstring with the corresp. block ordering,
and the integer where the independent set starts in the varstring

@item @strong{Note:}
the first entry gives the strings for all maximal independent sets
the second gives the strings for the independent sets,
@*which cannot be enhanced

@end table
@strong{Example:}
@smallexample
@c computed example indSet d2t_singular/mprimdec_lib.doc:446
LIB "mprimdec.lib";
ring s1=(0,x,y),(a,b,c,d,e,f,g),lp;
ideal i=ea-fbg,fa+be,ec-fdg,fc+de;
i=std(i);
list  l=indSet(i);
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       [1]:
@expansion{}          e,f
@expansion{}       [2]:
@expansion{}          a,b,c,d,g
@expansion{}       [3]:
@expansion{}          (C,dp(2),dp)
@expansion{}       [4]:
@expansion{}          5
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       [1]:
@expansion{}          a,b,c,d
@expansion{}       [2]:
@expansion{}          e,f,g
@expansion{}       [3]:
@expansion{}          (C,dp(4),dp)
@expansion{}       [4]:
@expansion{}          3
@expansion{}    [2]:
@expansion{}       [1]:
@expansion{}          a,c,e
@expansion{}       [2]:
@expansion{}          b,d,f,g
@expansion{}       [3]:
@expansion{}          (C,dp(3),dp)
@expansion{}       [4]:
@expansion{}          4
@c end example indSet d2t_singular/mprimdec_lib.doc:446
@end smallexample
@c ---end content indSet---

@c ------------------- GTZopt -------------
@node GTZopt, zeroOpt, indSet, mprimdec_lib
@subsubsection GTZopt
@cindex GTZopt
@c ---content GTZopt---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
GTZopt (N[, check]); module N[, module check]

@item @strong{Return:}
list l
@*the minimal primary decomposition of the module N,
@*computed by a generalized and optimized version of
@*the algorithm of Gianny, Trager and Zacharias

@item @strong{Note:}
if the parameter check is given, only components
@*not containing check are computed

@end table
@strong{Example:}
@smallexample
@c computed example GTZopt d2t_singular/mprimdec_lib.doc:481
LIB "mprimdec.lib";
ring r=0,(x,y,z),dp;
module N=x*gen(1)+ y*gen(2),
x*gen(1)-x2*gen(2);
list l=GTZopt(N);
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=x*gen(1)+y*gen(2)
@expansion{}       _[2]=x*gen(2)-gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=x2+y
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(2)
@expansion{}       _[2]=x*gen(1)
@expansion{}    [2]:
@expansion{}       _[1]=x
@c end example GTZopt d2t_singular/mprimdec_lib.doc:481
@end smallexample
@c ---end content GTZopt---

@c ------------------- zeroOpt -------------
@node zeroOpt, clrSBmod, GTZopt, mprimdec_lib
@subsubsection zeroOpt
@cindex zeroOpt
@c ---content zeroOpt---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
zeroOpt (N[, check]); zero-dimensional module N[, module check]

@item @strong{Return:}
list l
@*the minimal primary decomposition of a zero-dimensional module N,
computed by a generalized and optimized version of the algorithm
of Gianny, Trager and Zacharias

@item @strong{Note:}
if the parameter check is given, only components
@*not containing check are computed

@end table
@strong{Example:}
@smallexample
@c computed example zeroOpt d2t_singular/mprimdec_lib.doc:516
LIB "mprimdec.lib";
ring r=0,z,dp;
module N=z*gen(1),(z-1)*gen(2),(z+1)*gen(3);
list l=zeroOpt(N);
l;
@expansion{} [1]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(1)
@expansion{}       _[2]=z*gen(2)-gen(2)
@expansion{}       _[3]=gen(3)
@expansion{}    [2]:
@expansion{}       _[1]=z-1
@expansion{} [2]:
@expansion{}    [1]:
@expansion{}       _[1]=z*gen(1)
@expansion{}       _[2]=gen(2)
@expansion{}       _[3]=gen(3)
@expansion{}    [2]:
@expansion{}       _[1]=z
@expansion{} [3]:
@expansion{}    [1]:
@expansion{}       _[1]=gen(1)
@expansion{}       _[2]=gen(2)
@expansion{}       _[3]=z*gen(3)+gen(3)
@expansion{}    [2]:
@expansion{}       _[1]=z+1
@c end example zeroOpt d2t_singular/mprimdec_lib.doc:516
@end smallexample
@c ---end content zeroOpt---

@c ------------------- clrSBmod -------------
@node clrSBmod, minSatMod, zeroOpt, mprimdec_lib
@subsubsection clrSBmod
@cindex clrSBmod
@c ---content clrSBmod---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
clrSBmod(N); N module which is SB ordered by monomial ordering

@item @strong{Return:}
module = minimal SB

@end table
@strong{Example:}
@smallexample
@c computed example clrSBmod d2t_singular/mprimdec_lib.doc:543
LIB "mprimdec.lib";
ring  r = (0,a,b),(x,y,z),dp;
module N1=ax2+y,a2x+y,bx;
module N2=clrSBmod(N1);
N2;
@expansion{} N2[1]=(a)*x2*gen(1)+y*gen(1)
@expansion{} N2[2]=(b)*x*gen(1)
@c end example clrSBmod d2t_singular/mprimdec_lib.doc:543
@end smallexample
@c ---end content clrSBmod---

@c ------------------- minSatMod -------------
@node minSatMod, specialModulesEqual, clrSBmod, mprimdec_lib
@subsubsection minSatMod
@cindex minSatMod
@c ---content minSatMod---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
minSatMod(N, I); module N, ideal I

@item @strong{Return:}
list with 2 elements:
@*[1]=sat(N,product(I))[1],
@*[2]=p, the polynomial of minimal degree s.th. [1]=quotient(N,p)

@end table
@strong{Example:}
@smallexample
@c computed example minSatMod d2t_singular/mprimdec_lib.doc:572
LIB "mprimdec.lib";
ring  r = 0,(x,y,z),dp;
module N=xy*gen(1);
ideal h=yz,z2;
list l=minSatMod(N,h);
l;
@expansion{} [1]:
@expansion{}    _[1]=x*gen(1)
@expansion{} [2]:
@expansion{}    y
@c end example minSatMod d2t_singular/mprimdec_lib.doc:572
@end smallexample
@c ---end content minSatMod---

@c ------------------- specialModulesEqual -------------
@node specialModulesEqual, stdModulesEqual, minSatMod, mprimdec_lib
@subsubsection specialModulesEqual
@cindex specialModulesEqual
@c ---content specialModulesEqual---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
specialModulesEqual(N1, N2) N1, N2 standard bases of modules,
s.th. N1 is contained in N2 or vice versa

@item @strong{Return:}
int i
@*if (N1==N2) then i=1
@*else i=0

@end table
@strong{Example:}
@smallexample
@c computed example specialModulesEqual d2t_singular/mprimdec_lib.doc:603
LIB "mprimdec.lib";
ring  r = 0,(x,y,z),dp;
module N1=x*freemodule(2);
module N2=xy*freemodule(2);
int i=specialModulesEqual(N1,N2);
i;
@expansion{} 0
N2=N1;
i=specialModulesEqual(N1,N2);
i;
@expansion{} 1
@c end example specialModulesEqual d2t_singular/mprimdec_lib.doc:603
@end smallexample
@c ---end content specialModulesEqual---

@c ------------------- stdModulesEqual -------------
@node stdModulesEqual, modulesEqual, specialModulesEqual, mprimdec_lib
@subsubsection stdModulesEqual
@cindex stdModulesEqual
@c ---content stdModulesEqual---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
stdModulesEqual(N1, N2) N1, N2 standard bases of modules,

@item @strong{Return:}
int i
@*if (N1==N2) then i=1
@*else i=0

@end table
@strong{Example:}
@smallexample
@c computed example stdModulesEqual d2t_singular/mprimdec_lib.doc:636
LIB "mprimdec.lib";
ring  r = 0,(x,y,z),dp;
module N1=x*freemodule(2);
module N2=xy*freemodule(2);
int i=stdModulesEqual(N1,N2);
i;
@expansion{} 0
N2=N1;
i=stdModulesEqual(N1,N2);
i;
@expansion{} 1
@c end example stdModulesEqual d2t_singular/mprimdec_lib.doc:636
@end smallexample
@c ---end content stdModulesEqual---

@c ------------------- modulesEqual -------------
@node modulesEqual, getData, stdModulesEqual, mprimdec_lib
@subsubsection modulesEqual
@cindex modulesEqual
@c ---content modulesEqual---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
modulesEqual(N1, N2) N1, N2 modules,

@item @strong{Return:}
int i
@*if (N1==N2) then i=1
@*else i=0

@end table
@strong{Example:}
@smallexample
@c computed example modulesEqual d2t_singular/mprimdec_lib.doc:669
LIB "mprimdec.lib";
ring  r = 0,(x,y,z),dp;
module N1=x*freemodule(2);
module N2=xy*freemodule(2);
int i=modulesEqual(N1,N2);
i;
@expansion{} 0
N2=N1;
i=modulesEqual(N1,N2);
i;
@expansion{} 1
@c end example modulesEqual d2t_singular/mprimdec_lib.doc:669
@end smallexample
@c ---end content modulesEqual---

@c ------------------- getData -------------
@node getData,, modulesEqual, mprimdec_lib
@subsubsection getData
@cindex getData
@c ---content getData---
Procedure from library @code{mprimdec.lib} (@pxref{mprimdec_lib}).

@table @asis
@item @strong{Usage:}
getData(N, l[, noCheck]); module N, list l[, int noCheck]

@item @strong{Return:}
(ann, check, M, checked)
@*ideal ann, module check, M, int checked

if l[1] is contained in N [and noCheck is not given]
@*then checked=1, ann=ideal(0), check=0, M=0;
@*else checked=0, M=freemodule(nrows(N)); check=l[1]
@*(resp. check=M if l is an empty list) and
@*if size(l)>1 then ann=l[2] else ann is the annihilator of M/N.

@item @strong{Note:}
ann is a std basis in the basering

@end table
@strong{Example:}
@smallexample
@c computed example getData d2t_singular/mprimdec_lib.doc:710
LIB "mprimdec.lib";
ring  r = 0,(x,y,z),lp;
module N=x*gen(1),y*gen(2);
N=std(N);
ideal ann; module check, M; int checked; list l;
(ann, check, M, checked)=getData(N,l);
ann; check; M; checked;
@expansion{} ann[1]=xy
@expansion{} check[1]=gen(1)
@expansion{} check[2]=gen(2)
@expansion{} M[1]=gen(1)
@expansion{} M[2]=gen(2)
@expansion{} 0
l=list(check,ann);
(ann, check, M, checked)=getData(N,l);
ann; check; M; checked;
@expansion{} ann[1]=xy
@expansion{} check[1]=gen(1)
@expansion{} check[2]=gen(2)
@expansion{} M[1]=gen(1)
@expansion{} M[2]=gen(2)
@expansion{} 0
l=list(N);
(ann, check, M, checked)=getData(N,l);
ann; check; M; checked;
@expansion{} ann[1]=0
@expansion{} check[1]=0
@expansion{} M[1]=0
@expansion{} 1
@c end example getData d2t_singular/mprimdec_lib.doc:710
@end smallexample
@c ---end content getData---