Morphisms between free modules are basically represented by matrices. Here is how they sometimes print:
sage: V = ZZ^6 sage: W = ZZ^4 sage: m = matrix(QQ, [[1, 0, 0 ,0], [0]*4, [0]*4, [0]*4, [0]*4, [0]*4]) sage: phi = V.hom(m, W) sage: rho = phi.restrict_codomain(W.span([W.0])) sage: rho Free module morphism defined by the matrix (not printing 6 x 1 matrix) Domain: Ambient free module of rank 6 over the principal ideal domain ... Codomain: Free module of degree 4 and rank 1 over Integer Ring Echelon ... (a) A matrix with more than 5 rows or columns will not print. We generally limit printing matrices with more than 20 rows or columns and print an informative message about .str() if you really want to see it. Matrix here is obtainable with the .matrix() method. (b) Description of domain and codomain is truncated, almost always skipping the basis, and in example above cutting off the one-line summary. (The ... are part of the original output, not something I did before posting.) Questions: (1) Any particular reason for the extreme brevity? (2) Any objections to expanding the print version to being more complete? Basically letting the matrix representation default to the matrix methods on size considerations and including the following: sage: rho.domain() Ambient free module of rank 6 over the principal ideal domain Integer Ring sage: rho.codomain() Free module of degree 4 and rank 1 over Integer Ring Echelon basis matrix: [1 0 0 0] -- To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org
