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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<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 />

lift()<br />

Return the lift <strong>of</strong> this matrix to the integers.<br />

EXAMPLES:<br />

sage: a = matrix(GF(7),2,3,[1..6])<br />

sage: a.lift()<br />

[1 2 3]<br />

[4 5 6]<br />

sage: a.lift().parent()<br />

Full MatrixSpace <strong>of</strong> 2 by 3 dense matrices over Integer Ring<br />

Subdivisions are preserved when lifting:<br />

sage: a.subdivide([], [1,1]); a<br />

[1||2 3]<br />

[4||5 6]<br />

sage: a.lift()<br />

[1||2 3]<br />

[4||5 6]<br />

matrix_window(row=0, col=0, nrows=-1, ncols=-1, check=1)<br />

Return the requested matrix window.<br />

EXAMPLES:<br />

sage: a = matrix(GF(7),3,range(9)); a<br />

[0 1 2]<br />

[3 4 5]<br />

[6 0 1]<br />

sage: type(a)<br />

<br />

We test the optional check flag.<br />

sage: matrix(GF(7),[1]).matrix_window(0,1,1,1)<br />

Traceback (most recent call last):<br />

...<br />

IndexError: matrix window index out <strong>of</strong> range<br />

sage: matrix(GF(7),[1]).matrix_window(0,1,1,1, check=False)<br />

Matrix window <strong>of</strong> size 1 x 1 at (0,1):<br />

[1]<br />

minpoly(var=’x’, algorithm=’generic’, pro<strong>of</strong>=None)<br />

Returns the minimal polynomial <strong>of</strong> self.<br />

INPUT:<br />

•var - a variable name<br />

•algorithm - ‘generic’ (default)<br />

•pro<strong>of</strong> – (default: True); whether to provably return the true minimal polynomial; if False, we only<br />

guarantee to return a divisor <strong>of</strong> the minimal polynomial. There are also certainly cases where the<br />

computed results is frequently not exactly equal to the minimal polynomial (but is instead merely a<br />

divisor <strong>of</strong> it).<br />

WARNING: If pro<strong>of</strong>=True, minpoly is insanely slow compared to pro<strong>of</strong>=False.<br />

EXAMPLES:<br />

296 Chapter 14. Dense matrices over Z/nZ for n small

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

Saved successfully!

Ooh no, something went wrong!