Opened 4 years ago
Closed 4 years ago
#23186 closed enhancement (fixed)
ZZ → QQ is not onto
Reported by:  saraedum  Owned by:  

Priority:  minor  Milestone:  sage8.0 
Component:  commutative algebra  Keywords:  sd86.5 
Cc:  Merged in:  
Authors:  Julian Rüth  Reviewers:  Travis Scrimshaw 
Report Upstream:  N/A  Work issues:  
Branch:  79fd62a (Commits, GitHub, GitLab)  Commit:  79fd62a8c40632891cf32502a3d80709edc68cf8 
Dependencies:  Stopgaps: 
Description (last modified by )
Currently, this fails
sage: QQ.coerce_map_from(ZZ).is_surjective() NotImplementedError
To fix this, we make the coercion morphism know it is not surjective.
Change History (6)
comment:1 Changed 4 years ago by
comment:2 Changed 4 years ago by
Why not do that at the category level?
comment:3 Changed 4 years ago by
 Branch set to u/saraedum/zz___qq_is_not_onto
comment:4 Changed 4 years ago by
 Branch u/saraedum/zz___qq_is_not_onto deleted
 Status changed from new to needs_review
comment:5 Changed 4 years ago by
 Branch set to u/saraedum/zz___qq_is_not_onto
 Commit set to 79fd62a8c40632891cf32502a3d80709edc68cf8
 Description modified (diff)
 Reviewers set to Travis Scrimshaw
 Status changed from needs_review to positive_review
Because to do something at the category level, you should be doing something for all objects in that category, not for one specific object (in a specific implementation). Now, if you wanted to have something in Rings
checking if a morphism to ZZ
was surjective returning True
, then that would be good because it is true for all rings (of characteristic 0). Although map
has a concrete implementation of is_surjective
, which is a technical detail that would need to be worked around (which that method probably should be lifted to the category of set morphisms).
The fix LGTM.
New commits:
79fd62a  ZZ is not onto QQ

comment:6 Changed 4 years ago by
 Branch changed from u/saraedum/zz___qq_is_not_onto to 79fd62a8c40632891cf32502a3d80709edc68cf8
 Resolution set to fixed
 Status changed from positive_review to closed
You should never, ever give information about specific objects at the category level.
However, you can impart this information in the
Z_to_Q
morphism class.