Opened 10 years ago
Closed 10 years ago
#11552 closed defect (fixed)
Fix surjectivity testing for free module morphisms
Reported by: | rbeezer | Owned by: | jason, was |
---|---|---|---|
Priority: | major | Milestone: | sage-4.7.2 |
Component: | linear algebra | Keywords: | |
Cc: | SimonKing, robertwb, mmarco | 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 10 years ago by
- Cc SimonKing robertwb added
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 10 years ago by
- Description modified (diff)
comment:3 Changed 10 years ago by
Changed 10 years ago by
comment:4 Changed 10 years ago by
- Cc mmarco 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 10 years ago by
- Reviewers set to John Palmieri
- Status changed from needs_review to positive_review
Looks good to me.
comment:6 in reply to: ↑ 5 Changed 10 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 10 years ago by
- Merged in set to sage-4.7.2.alpha2
- Resolution set to fixed
- Status changed from positive_review to 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.