08.02.2015 Views

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Sage</strong> <strong>Reference</strong> <strong>Manual</strong>: <strong>Matrices</strong> <strong>and</strong> <strong>Spaces</strong> <strong>of</strong> <strong>Matrices</strong>, Release 6.1.1<br />

...<br />

ZeroDivisionError: The modulus cannot be zero<br />

saturation(p=0, pro<strong>of</strong>=None, max_dets=5)<br />

Return a saturation matrix <strong>of</strong> self, which is a matrix whose rows span the saturation <strong>of</strong> the row span <strong>of</strong> self.<br />

This is not unique.<br />

The saturation <strong>of</strong> a Z module M embedded in Z n is the a module S that contains M with finite index such<br />

that Z n /S is torsion free. This function takes the row span M <strong>of</strong> self, <strong>and</strong> finds another matrix <strong>of</strong> full rank<br />

with row span the saturation <strong>of</strong> M.<br />

INPUT:<br />

•p - (default: 0); if nonzero given, saturate only at the prime p, i.e., return a matrix whose row span is<br />

a Z-module S that contains self <strong>and</strong> such that the index <strong>of</strong> S in its saturation is coprime to p. If p is<br />

None, return full saturation <strong>of</strong> self.<br />

•pro<strong>of</strong> - (default: use pro<strong>of</strong>.linear_algebra()); if False, the determinant calculations are done with<br />

pro<strong>of</strong>=False.<br />

•max_dets - (default: 5); technical parameter - max number <strong>of</strong> determinant to compute when bounding<br />

prime divisor <strong>of</strong> self in its saturation.<br />

OUTPUT:<br />

•matrix - a matrix over ZZ<br />

Note: The result is not cached.<br />

ALGORITHM: 1. Replace input by a matrix <strong>of</strong> full rank got from a subset <strong>of</strong> the rows. 2. Divide out<br />

any common factors from rows. 3. Check max_dets r<strong>and</strong>om dets <strong>of</strong> submatrices to see if their GCD (with<br />

p) is 1 - if so matrix is saturated <strong>and</strong> we’re done. 4. Finally, use that if A is a matrix <strong>of</strong> full rank, then<br />

hnf(transpose(A)) −1 ∗ A is a saturation <strong>of</strong> A.<br />

EXAMPLES:<br />

sage: A = matrix(ZZ, 3, 5, [-51, -1509, -71, -109, -593, -19, -341, 4, 86, 98, 0, -246, -11,<br />

sage: A.echelon_form()<br />

[ 1 5 2262 20364 56576]<br />

[ 0 6 35653 320873 891313]<br />

[ 0 0 42993 386937 1074825]<br />

sage: S = A.saturation(); S<br />

[ -51 -1509 -71 -109 -593]<br />

[ -19 -341 4 86 98]<br />

[ 35 994 43 51 347]<br />

Notice that the saturation spans a different module than A.<br />

sage: S.echelon_form()<br />

[ 1 2 0 8 32]<br />

[ 0 3 0 -2 -6]<br />

[ 0 0 1 9 25]<br />

sage: V = A.row_space(); W = S.row_space()<br />

sage: V.is_submodule(W)<br />

True<br />

sage: V.index_in(W)<br />

85986<br />

sage: V.index_in_saturation()<br />

85986<br />

333

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!