-
-
Notifications
You must be signed in to change notification settings - Fork 619
categories for polynomial rings #9944
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
Comments
comment:1
Attachment: 9944-poly-cat.patch.gz |
comment:2
Hi Robert! I have been through the patch, and it sounds good! I won't have the time to actually test it before some time, so please anyone beat me to it! Just one micro question: does PolynomialRing actually check that the ring is commutative? Cheers |
Author: Robert Bradshaw |
Reviewer: Nicolas M. Thiéry, Mike Hansen |
comment:3
Attachment: trac_9944.patch.gz I went ahead and moved the functionality to it's own category since we want the mathematical information at the category level. Could someone look over these changes? |
comment:4
The first patch only concerned univarite polynomial rings, the logic is not all correct for multivariate polynomial rings (though on an orthogonal note, that could use some fixing up as well). It seems odd to have a category of univariate polynomial rings over a fixed basering, which is why I put the logic into the concrete object. I suppose the category should a be declared as a graded R-algebra as well (do we have join categories yet?). I don't know if PolynomialRing asserts its basering is commutative, but IIRC it's been assumed for a long time. |
comment:5
Apply only 9944-poly-cat.patch |
Attachment: 9944-poly-cat-doctests.patch.gz |
comment:6
Apply 9944-poly-cat.patch and 9944-poly-cat-doctests.patch . |
This comment has been minimized.
This comment has been minimized.
comment:7
Attachment: trac-9944-poly-cat-review.patch.gz I would give this a positive review for Robert's idea and I would open a new ticket for the multivariate rings. I'll just send a mail to Mike whether he is ok with that or no. |
comment:8
Replying to @robertwb:
Sorry for the very late answer. In MuPAD, we had a category for And yes, we have join categories. See Category.join. I let you see whether to create the UnivariatePolynomialRing category |
comment:9
Replying to @nthiery:
Aparently there is a doctest failure. I fixed it, but unfortunately it went into my patch submitted for #9138. Therefore, "needs work". Question: Do we really want a category of polynomial rings? Or do we want that (1) polynomial rings use the category framework (that's the purpose of my patch for #9138) and (2) the category to which a given polynomial ring belongs is a bit narrower than simply "category of rings"? I hope it is the latter. My suggestion is that I submit a small patch fixing the doctests. Please tell whether my patch for #9138 improves the multivariate case. Then, perhaps it would be possible to give Roberts patches (+ doctest fix) a positive review, so that we can focus on #9138. |
Work Issues: Fix one test |
comment:11
At #9138, Jason Bandlow reported a slow-down, that is at least partially caused by the patches here. Do you have any idea what could be the reason? |
comment:12
Replying to @simon-king-jena:
Strange: Although the patch bot did see that error in one run, I can not reproduce it (but I had to change that test in my patch for #9138, because it turns The other issue, namely the performance loss, was studied on sage-devel. Florent Hivert found that a long mro does not matter for Python, but it does matter if the classes inherit from a cdef class. That is the case for most classes in Sage (inheriting from Eventually, that should be fixed in Cython (and I think Florent reported it upstream). But for now, it seems to me we should think of a work-around. Would it be acceptable coding practice to explicitly state in a derived class (say, |
This comment has been minimized.
This comment has been minimized.
comment:13
Concerning performance loss: It seems to me that part of the reason is the fact that with the patchse, I am not sure yet why that happens, but I think it would happen if |
comment:14
It seems I was right! Namely, the whole ring stuff is (unfortunately) inherited from And I'll change it and see what happens. |
comment:15
Very bad things happen. As soon as |
Call Parent.init during initialisation of a ring |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
comment:94
I hope it is OK that I modified one test in sage.rings.polynomial.polynomial_ring, by the new patch attachment: trac9944_addendum.patch. That test used to be
But that is unsafe, because this ticket removes the custom Therefore, it seems safer to me to replace it by
|
comment:96
I'm not sure how happy the release manager is with changing tickets after positive review (except it is him who is doing it). |
comment:97
Replying to @sagetrac-mraum:
I reckon that it does not matter to the release manager, unless one re-opens a ticket that is already closed (but that has not been the case here).
Thank you! |
comment:98
I removed the comment "needs review" from the ticket description. |
This comment has been minimized.
This comment has been minimized.
comment:99
One minor issue: attachment: trac9944_addendum.patch needs a proper commit message. |
Attachment: trac9944_addendum.patch.gz Making one doctest safer |
comment:100
Done! |
Merged: sage-4.7.1.alpha2 |
Currently, they're always just commutative rings.
Apply:
Note
The same result can be obtained with the original patches:
Depends on #11139
CC: @sagetrac-sage-combinat
Component: categories
Author: Robert Bradshaw, Simon King
Reviewer: Nicolas M. Thiéry, Mike Hansen, Martin Raum
Merged: sage-4.7.1.alpha2
Issue created by migration from https://trac.sagemath.org/ticket/9944
The text was updated successfully, but these errors were encountered: