#11552: Fix surjectivity testing for free module morphisms
------------------------------+---------------------------------------------
Reporter: rbeezer | Owner: jason, was
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7.2
Component: linear algebra | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author: Rob Beezer
Merged: | Dependencies:
------------------------------+---------------------------------------------
Description changed by rbeezer:
Old description:
> Testing for surjectivity of a free module homorphism is probably just
> fine for vector spaces, but seems to be broken for modules.
>
> {{{
> sage: V = ZZ^2
> sage: m = matrix(ZZ, [[1,2],[0,2]])
> sage: phi = V.hom(m, V)
> sage: phi.lift(vector(ZZ, [0, 1]))
> ---------------------------------------------------------------------------
> ValueError Traceback (most recent call
> last)
>
> /sage/dev/devel/sage-main/<ipython console> in <module>()
>
> /sage/dev/local/lib/python2.6/site-
> packages/sage/modules/free_module_morphism.pyc in lift(self, x)
> 375 t = self.domain().linear_combination_of_basis(C)
> 376 except TypeError:
> --> 377 raise ValueError, "element is not in the image"
> 378 assert self(t) == x
> 379 return t
>
> ValueError: element is not in the image
> sage: phi.is_surjective()
> True
> }}}
>
> '''Apply:'''
> 1. [attachment:trac_11552-module-morphism-surjectivity-patch]
New description:
Testing for surjectivity of a free module homorphism is probably just fine
for vector spaces, but seems to be broken for modules.
{{{
sage: V = ZZ^2
sage: m = matrix(ZZ, [[1,2],[0,2]])
sage: phi = V.hom(m, V)
sage: phi.lift(vector(ZZ, [0, 1]))
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/sage/dev/devel/sage-main/<ipython console> in <module>()
/sage/dev/local/lib/python2.6/site-
packages/sage/modules/free_module_morphism.pyc in lift(self, x)
375 t = self.domain().linear_combination_of_basis(C)
376 except TypeError:
--> 377 raise ValueError, "element is not in the image"
378 assert self(t) == x
379 return t
ValueError: element is not in the image
sage: phi.is_surjective()
True
}}}
'''Apply:'''
1. [attachment:trac_11552-module-morphism-surjectivity.patch]
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11552#comment:2>
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.