#13321: FreeModule.hom stores its matrix over the wrong ring.
-----------------------------+----------------------------------------------
Reporter: mderickx | Owner: tbd
Type: PLEASE CHANGE | Status: new
Priority: major | Milestone: sage-5.3
Component: PLEASE CHANGE | Keywords:
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
-----------------------------+----------------------------------------------
This is ok:
{{{
sage: (ZZ^2).hom([[2,3],[3,6]],QQ^2)
Free module morphism defined by the matrix
[2 3]
[3 6]
Domain: Ambient free module of rank 2 over the principal ideal domain
Integer Ring
Codomain: Vector space of dimension 2 over Rational Field
}}}
This should not be possible:
{{{
sage: (QQ^2).hom([[1/3,1/4],[1/3,1/6]],ZZ^2)
Free module morphism defined by the matrix
[1/3 1/4]
[1/3 1/6]
Domain: Vector space of dimension 2 over Rational Field
Codomain: Ambient free module of rank 2 over the principal ideal domain
Integer Ring
}}}
This should work
{{{
sage: (ZZ^2).hom([[1/3,1/4],[1/3,1/6]],QQ^2) #goes boom with an error you
might have excpected in the previous example
Traceback (most recent call last):
...
TypeError: no conversion of this rational to integer
}}}
This should defenitly also not work:
{{{
sage: (GF(7)^2).hom([[20,0],[0,21]],ZZ^2)
Free module morphism defined by the matrix
[6 0]
[0 0]
Domain: Vector space of dimension 2 over Finite Field of size 7
Codomain: Ambient free module of rank 2 over the principal ideal domain
Integer Ring
}}}
The following should give a clue what is going wrong:
{{{
sage: (GF(7)^2).hom([[1/3,1/4],[1/3,1/6]],QQ^2)
Vector space morphism represented by the matrix:
[5 2]
[5 6]
Domain: Vector space of dimension 2 over Finite Field of size 7
Codomain: Vector space of dimension 2 over Rational Field
sage: _.matrix().parent()
Full MatrixSpace of 2 by 2 dense matrices over Finite Field of size 7
sage: (QQ^2).hom([[1/3,1/4],[1/3,1/6]],ZZ^2)
Free module morphism defined by the matrix
[1/3 1/4]
[1/3 1/6]
Domain: Vector space of dimension 2 over Rational Field
Codomain: Ambient free module of rank 2 over the principal ideal domain
Integer Ring
sage: _.matrix().parent()
Full MatrixSpace of 2 by 2 dense matrices over Rational Field
}}}
Seems that somewhere the domain and codomain are messed up.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13321>
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.