Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the right category for DefaultConvertMaps, rather than SetsWithPartialMaps #23184

Closed
roed314 opened this issue Jun 9, 2017 · 25 comments
Closed

Comments

@roed314
Copy link
Contributor

roed314 commented Jun 9, 2017

Currently, the category for DefaultConvertMaps is SetsWithPartialMaps().

sage: type(QQ[['x']].coerce_map_from(QQ))
<type 'sage.structure.coerce_maps.DefaultConvertMap_unique'>
sage: QQ[['x']].coerce_map_from(QQ).category_for()
Category of sets with partial maps

In contrast,

sage: QQ.hom(QQ[['x']]).category_for()
Category of euclidean domains

Depends on #23201

Component: coercion

Keywords: sd86.5

Author: David Roe, Julian Rüth

Branch: 5eccb52

Reviewer: Julian Rüth, David Roe

Issue created by migration from https://trac.sagemath.org/ticket/23184

@roed314 roed314 added this to the sage-8.0 milestone Jun 9, 2017
@roed314
Copy link
Contributor Author

roed314 commented Jun 9, 2017

Changed keywords from none to sd86.5

@roed314
Copy link
Contributor Author

roed314 commented Jun 9, 2017

Dependencies: #23201

@pjbruin
Copy link
Contributor

pjbruin commented Jun 9, 2017

comment:2

Please make sure that you only refine the category when this makes mathematical sense. In #15618, I implemented taking SetsWithPartialMaps as the default category for a DefaultConvertMap because in general such a map is not defined everywhere, nor is it always a morphism in the category where the parents live.

@pjbruin
Copy link
Contributor

pjbruin commented Jun 9, 2017

comment:3

I guess this should be fixed in PowerSeries_generic._coerce_map_from_() by returning a specific map instead of True.

@roed314
Copy link
Contributor Author

roed314 commented Jun 9, 2017

comment:4

Replying to @pjbruin:

Please make sure that you only refine the category when this makes mathematical sense. In #15618, I implemented taking SetsWithPartialMaps as the default category for a DefaultConvertMap because in general such a map is not defined everywhere, nor is it always a morphism in the category where the parents live.

My plan is to only change the category for coercions, not conversions. I can't think of any examples where coercions aren't morphisms in the meet of the categories of the parents involved. All of the examples I see in #15618 are conversions, which this ticket won't affect.

@roed314
Copy link
Contributor Author

roed314 commented Jun 9, 2017

comment:5

Replying to @pjbruin:

I guess this should be fixed in PowerSeries_generic._coerce_map_from_() by returning a specific map instead of True.

You could fix it in this way, but that's a lot of work that would need to be duplicated over and over again for different examples of DefaultConvertMaps.

@roed314
Copy link
Contributor Author

roed314 commented Jun 10, 2017

@roed314
Copy link
Contributor Author

roed314 commented Jun 10, 2017

Author: David Roe

@roed314
Copy link
Contributor Author

roed314 commented Jun 10, 2017

Commit: 3cc08d1

@roed314
Copy link
Contributor Author

roed314 commented Jun 10, 2017

New commits:

b00d97fMake DefaultConvertMaps have a more refined category (than SetsWithPartialMaps) when they're actually coercions
5fbc34cChange base ring for CuspFormsRing in Hecke triangle group
906d5b2Fix base rings for many other parents in sage/modular/moform_hecketriangle
3e0fcd7Merge branch 't/23201/hecke_triangle_group_cusp_form_base_ring' into t/23184/use_the_right_category_for_defaultconvertmaps__rather_than_setswithpartialmaps
3cc08d1Fix a problem in quivers from changing the category of DefaultConvertMaps, add doctests to _generic_convert_map

@roed314
Copy link
Contributor Author

roed314 commented Jun 10, 2017

comment:8

All tests pass.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 11, 2017

Changed commit from 3cc08d1 to 09d3456

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 11, 2017

Branch pushed to git repo; I updated commit sha1. New commits:

09d3456Fix a dangling sage: prompt

@saraedum
Copy link
Member

comment:10

Looks good except for a few places where S.category() should be replaced with an appropriate meet. I'll fix that myself.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 11, 2017

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

5eccb52Refactor _default_convert_map

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Jun 11, 2017

Changed commit from 09d3456 to 5eccb52

@saraedum
Copy link
Member

Changed author from David Roe to David Roe, Julian Rüth

@saraedum
Copy link
Member

Reviewer: Julian Rüth

@saraedum
Copy link
Member

comment:14

tests pass.

@roed314
Copy link
Contributor Author

roed314 commented Jun 11, 2017

Changed reviewer from Julian Rüth to Julian Rüth, David Roe

@roed314
Copy link
Contributor Author

roed314 commented Jun 11, 2017

comment:15

Looks good.

@vbraun
Copy link
Member

vbraun commented Jun 12, 2017

@fchapoton
Copy link
Contributor

Changed commit from 5eccb52 to none

@fchapoton
Copy link
Contributor

comment:17

you used a bad syntax for the trac role here :

+        We check that `trac`:23184 has been resolved::

it should have been

+        We check that :trac:`23184` has been resolved::

So please review #23526

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants