#16443: Category Modules ~> Algebras
------------------------------+------------------------
Reporter: elixyre | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.3
Component: categories | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------+------------------------
Comment (by nthiery):
It in fact does not work either: a parent in `Modules(...)` should
implement a base_ring method. This method just turns out not to be
called upon initialization if B is just in `Modules()` instead of
`Algebras()`, so the problem goes undetected, so far ...
It indeed feels a bit redundant to have to specify the base ring in
the category *and* in the `base_ring` method. The thing is that, in the
category, one can now specify something like `Algebras(Rings())`; I'd
say it's even recommended. So one can't recover the base ring from the
just the category. It's not so bad, because more often than not, when
implementing a module, one inherits from some preexisting module that
implements `base_ring` for us.
Now, yes, definitely, this all might not be stated explicitly in the
documentation; and the error message is not informative ...
Step that can be taken right away:
- add a `base_ring` abstract method in `Modules.ParentMethods`
Steps that are a bit more tricky (I tried and dropped the case; but I
had to act fast then to get #10963 in):
- Remove the `base_ring` method from `CategoryObject` (it has nothing to
do there).
- Implement a `base_ring` method for all the existing modules
(polynomials, ...), putting it in common abstract super classes
whenever possible.
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/ticket/16443#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.