Home Online Manual
Top
Back: jacobson_lib
Forward: jacobson
FastBack:
FastForward:
Up: jacobson_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.11.3.1 smith

Procedure from library jacobson.lib (see jacobson_lib).

Usage:
smith(M[, eng1, eng2]); M matrix, eng1 and eng2 are optional integers

Return:
matrix or list of matrices, depending on arguments

Assume:
Basering is a commutative polynomial ring in one variable

Purpose:
compute the Smith Normal Form of M with (optionally) transformation matrices

Theory:
Groebner bases are used for the Smith form like in [2] and [3].

Note:
By default, just the Smith normal form of M is returned.
If the optional integer eng1 is non-zero, the list {U,D,V} is returned
where U*M*V = D and the diagonal field entries of D are not normalized.
The normalization of the latter can be done with the 'divideUnits' procedure.
U and V above are square unimodular (invertible) matrices.
Note, that the procedure works for a rectangular matrix M.

The optional integer eng2 determines the Groebner basis engine:
0 (default) ensures the use of 'slimgb' , otherwise 'std' is used.

Display:
If printlevel=1, progress debug messages will be printed,
if printlevel>=2, all the debug messages will be printed.

Example:
 
LIB "jacobson.lib";
ring r = 0,x,Dp;
matrix m[3][2]=x, x^4+x^2+21, x^4+x^2+x, x^3+x, 4*x^2+x, x;
list s=smith(m,1);
print(s[2]);  // non-normalized Smith form of m
==> 21,0,
==> 0, x,
==> 0, 0 
print(s[1]*m*s[3] - s[2]); // check U*M*V = D
==> 0,0,
==> 0,0,
==> 0,0 
list t = divideUnits(s);
print(t[2]); // the Smith form of m
==> 1,0,
==> 0,x,
==> 0,0 
See also: divideUnits; jacobson.