[back] [prev] [next] [index] [root]

 


MatIndex

Computes the determinant of a row normal form of an integral matrix.

Syntax:

n := MatIndex(m);

integer
  n  
index
matrix
  m  
over Z

Description:

Suppose we have Z modules M|1\subset M|2 given via a basis of M|2 and a set of elements generating M|1. Furthermore let m be the matrix which rows contain the aforementioned generators. MatIndex(m) will compute the index of M|1 in M|2. If the index is not finite, a 0 will be returned.


Example:


kash> m := RandomMatrix(Z, 3);
[ 19  11   5]
[ -6 -18  -6]
[ 17  18   5]
kash> MatIndex(m);
540
kash> m := m{[1..2]};IsMat(m);
[ 19  11   5]
[ -6 -18  -6]
true
kash> MatIndex(m);
0
kash> m := Concatenation(m, RandomMatrix(Z, 3));IsMat(m);
[ [19 11  5], [ -6 -18  -6], [-16  -1 -16], [-4 -3 13], [17 11 -9] ]
true
kash> MatIndex(m);
> 1


<- back[back] [prev] [next] [index] [root]