Opened 11 years ago
Closed 11 years ago
#11552 closed defect (fixed)
Fix surjectivity testing for free module morphisms
Reported by: | Rob Beezer | Owned by: | jason, was |
---|---|---|---|
Priority: | major | Milestone: | sage-4.7.2 |
Component: | linear algebra | Keywords: | |
Cc: | Simon King, Robert Bradshaw, Miguel Marco | Merged in: | sage-4.7.2.alpha2 |
Authors: | Rob Beezer | Reviewers: | John Palmieri |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
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:
Attachments (1)
Change History (8)
comment:1 Changed 11 years ago by
Authors: | → Rob Beezer |
---|---|
Cc: | Simon King Robert Bradshaw added |
Description: | modified (diff) |
Status: | new → needs_review |
comment:2 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 11 years ago by
Changed 11 years ago by
Attachment: | trac_11552-module-morphism-surjectivity-v2.patch added |
---|
comment:4 Changed 11 years ago by
Cc: | Miguel Marco added |
---|---|
Description: | modified (diff) |
Version 2 patch tests if a morphism is surjective with the .is_submodule()
method. Slower, I guess, but a greater chance of being correct. An example from mmarco has been added to illustrate the non-unique echelon basis for the image. The necessity of these changes is detailed on #11579 (and perhaps, see #11553).
comment:5 follow-up: 6 Changed 11 years ago by
Reviewers: | → John Palmieri |
---|---|
Status: | needs_review → positive_review |
Looks good to me.
comment:6 Changed 11 years ago by
Replying to jhpalmieri:
Looks good to me.
Thanks, John - appreciate you taking the time to look at this. - Rob
comment:7 Changed 11 years ago by
Merged in: | → sage-4.7.2.alpha2 |
---|---|
Resolution: | → fixed |
Status: | positive_review → closed |
Note: See
TracTickets for help on using
tickets.
Passes all long tests for me on 4.7.1.alpha3 and patchbot is green-lighting it at the moment.