#9944: categories for polynomial rings
----------------------------------------------+-----------------------------
Reporter: robertwb | Owner: nthiery
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.7
Component: categories | Keywords:
Author: Robert Bradshaw | Upstream: N/A
Reviewer: Nicolas M. ThiƩry, Mike Hansen | Merged:
Work_issues: Speedup |
----------------------------------------------+-----------------------------
Changes (by SimonKing):
* status: needs_info => needs_work
* work_issues: => Speedup
Comment:
I suggest to speed things up by modifying "Polynomial base injection
morphism". Internally, it uses rather slow ways of creating a polynomial
of degree zero. It is likely to be faster to do what `R.from_base` does:
Take the One of the ring (if it exists!) and use its `_lmul_` method (if
it has `_lmul_`).
I also understand why `Algebras(...).parent_class.__init_extra__(R)` has
no effect on the choice of a conversion map from `R.base()` to `R`: It
calls `R.one()` in order to create a better coercion map; but `R.one()`
will, internally, construct a conversion from the base to `R`. At that
point, the "better" coercion is not defined, and thus the usual conversion
is created and cached.
In other words, `R.from_base` will only be used for conversion if `R` does
''not'' obey the rules of the new coercion framework (e.g., if it has a
custom `__call__`).
Since the polynomial base injection morphism is a specialised method, it
should be possible to internally construct the One of R without invoking
coercion. My plan is to combine it with
[attachment:trac9944_second_referee.patch] and submit a patch that then
certainly needs a reviewer.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9944#comment:21>
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.