#11555: Expand print representation of free module morphisms
------------------------------+---------------------------------------------
   Reporter:  rbeezer         |          Owner:  jason, was  
       Type:  enhancement     |         Status:  needs_review
   Priority:  minor           |      Milestone:  sage-4.7.2  
  Component:  linear algebra  |       Keywords:  beginner    
Work_issues:                  |       Upstream:  N/A         
   Reviewer:                  |         Author:  Rob Beezer  
     Merged:                  |   Dependencies:              
------------------------------+---------------------------------------------
Changes (by newvalueoldvalue):

  * keywords:  => beginner
  * status:  new => needs_review
  * author:  => Rob Beezer


Old description:

> 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 ...
> }}}
>
> The cutoff (...) on the domains is totally arbitrary, at 60 characters.
>
> Here is the new output with upcoming patch:
>
> {{{
> Free module morphism defined by the matrix
> [1]
> [0]
> [0]
> [0]
> [0]
> [0]
> Domain: Ambient free module of rank 6 over the principal ideal domain
> Integer Ring
> Codomain: Free module of degree 4 and rank 1 over Integer Ring
> Echelon basis matrix:
> [1 0 0 0]
> }}}

New description:

 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 ...
 }}}

 The cutoff (...) on the domains is totally arbitrary, at 60 characters.

 Here is the new output with upcoming patch:

 {{{
 Free module morphism defined by the matrix
 [1]
 [0]
 [0]
 [0]
 [0]
 [0]
 Domain: Ambient free module of rank 6 over the principal ideal domain
 Integer Ring
 Codomain: Free module of degree 4 and rank 1 over Integer Ring
 Echelon basis matrix:
 [1 0 0 0]
 }}}

 '''Apply:'''
   1.  [attachment:trac_11555-free-module-morphism-printing.patch]

--

Comment:

 Passes all long tests for 4.7.1.alpha3

 Small chance this will bitrot, relative to some other patches I have up
 for related files.  I'll try to stay on top of it, but let me know if this
 causes doctests failures.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11555#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to