Home Online Manual
Top
Back: integralSection
Forward: factorgroup
FastBack:
FastForward:
Up: multigrading_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.15.17.27 primitiveSpan

Procedure from library multigrading.lib (see multigrading_lib).

Purpose:
compute an integral basis for the minimal primitive
sublattice that contains the given vectors, i.e. the columns of V.

Returns:
int, where 0 is false and 1 is true.

Example:
 
LIB "multigrading.lib";
intmat V[3][2] =
1,4,
2,5,
3,6;
// should return a (3x2)-matrix whose columns
// generate the same lattice as [1, 2, 3] and [0, 1, 2]
intmat R = primitiveSpan(V);
print(R);
==>      1     0
==>      2     1
==>      3     2
// another example
intmat W[2][2] =
1,0,
0,1;
// should return a (2x2)-matrix whose columns
// generate the same lattice as [1, 0] and [0, 1]
intmat S = primitiveSpan(W);
print(S);
==>      1     0
==>      0     1
kill V, R, S, W;