#8481: lift doesn't work for vector space homomorphisms
------------------------------+---------------------------------------------
Reporter: jhpalmieri | Owner: was
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.3.4
Component: linear algebra | Keywords:
Author: John Palmieri | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Changes (by newvalueoldvalue):
* status: new => needs_review
* author: => John Palmieri
Old description:
> {{{
> sage: V = QQ**2
> sage: W = QQ**2
> sage: f = V.hom([W.1, W.1])
> sage: f.lift(W.1)
> ---------------------------------------------------------------------------
> AttributeError Traceback (most recent call
> last)
>
> /Users/palmieri/<ipython console> in <module>()
>
> /Applications/sage/local/lib/python2.6/site-
> packages/sage/modules/free_module_morphism.pyc in lift(self, x)
> 337 x = self.codomain()(x)
> 338 A = self.matrix()
> --> 339 H, U =
> A.hermite_form(transformation=True,include_zero_rows=False)
> 340 Y = H.solve_left(vector(self.codomain().coordinates(x)))
> 341 C = Y*U
>
> ...
> }}}
New description:
{{{
sage: V = QQ**2
sage: W = QQ**2
sage: f = V.hom([W.1, W.1])
sage: f.lift(W.1)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call
last)
/Users/palmieri/<ipython console> in <module>()
/Applications/sage/local/lib/python2.6/site-
packages/sage/modules/free_module_morphism.pyc in lift(self, x)
337 x = self.codomain()(x)
338 A = self.matrix()
--> 339 H, U =
A.hermite_form(transformation=True,include_zero_rows=False)
340 Y = H.solve_left(vector(self.codomain().coordinates(x)))
341 C = Y*U
...
}}}
Another somewhat related issue:
{{{
sage: X = QQ**2
sage: V = X.span([[2, 0], [0, 8]], ZZ)
sage: V.linear_combination_of_basis([1, -1/2])
(2, -4)
}}}
Note that (2, -4) is not actually in V, but no error occurred. This
problem is caused by having {{{check=False}}} somewhere in the code,
rather than {{{check=True}}}. As a consequence of this, calls to f.lift()
where V is the domain of f can result in elements not contained in V.
The attached patch fixes both of these issues.
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8481#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.