Home Online Manual
Back: katsura
Forward: is_zero
FastBack: inout_lib
FastForward: random_lib
Up: poly_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.2.6.4 freerank

Procedure from library poly.lib (see poly_lib).

freerank(M[,any]); M=poly/ideal/vector/module/matrix

rank of module presented by M in case it is free.
By definition this is vdim(coker(M)/m*coker(M)) if coker(M) is free, where m is the maximal ideal of the variables of the basering and M is considered to be a matrix.
(the 0-module is free of rank 0)

rank of coker(M) if coker(M) is free and -1 else;
in case of a second argument return a list:
L[1] = rank of coker(M) or -1
L[2] = minbase(M)

freerank(syz(M)); computes the rank of M if M is free (and -1 else)

LIB "poly.lib";
ring r;
ideal i=x;
module M=[x,0,1],[-x,0,-1];
freerank(M);          // should be 2, coker(M) is not free
==> 2
freerank(syz (M),"");
==> [1]:
==>    1
==> [2]:
==>    _[1]=gen(2)+gen(1)
// [1] should be 1, coker(syz(M))=M is free of rank 1
// [2] should be gen(2)+gen(1) (minimal relation of M)
==> -1
freerank(syz(i));     // should be 1, coker(syz(i))=i is free of rank 1
==> 1