#9138: Categories for all rings
--------------------------------------------+-------------------------------
Reporter: jbandlow | Owner: nthiery
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: categories | Keywords: introspection,
categories for rings
Author: Simon King | Upstream: N/A
Reviewer: | Merged:
Work_issues: Categories for more rings... |
--------------------------------------------+-------------------------------
Comment(by SimonKing):
It turned out that the notion of "coercion" was not used in the proper
way, in sage.rings.polynomial.pbori. Namely, `_coerce_` was used to
''convert'' a boolean set into a boolean polynomial. That can not be
called a coercion, since boolean sets have no parent (at least no parent
that would allow for a coercion map). The old coercion model did not mind,
but the new coercion model complains about those things.
Moreover, there was a custom call method that first tried to call
`self._coerce_(x)`. When one renames that call method to
`_element_contructor_` (for the new coercion model) then one obtains an
infinite recursion, because you need to evaluate the element constructor
for constructing the `_coerce_` method.
In other words, one needs to replace `P._coerce_(...)` and `P.coerce(...)`
by either `P(...)` or by a direct call to `P._coerce_c_impl(...)`. This is
what I'm trying now.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9138#comment:45>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.