#10963: Axioms and more functorial constructions
-------------------------------------+-------------------------------------
Reporter: nthiery | Owner: stumpc5
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.2
Component: categories | Resolution:
Keywords: days54 | Merged in:
Authors: Nicolas M. Thiéry | Reviewers: Simon King, Frédéric
Report Upstream: N/A | Chapoton
Branch: | Work issues: To be merged
public/ticket/10963-doc- | simultaneously with #15801
distributive | Commit:
Dependencies: #11224, #8327, | 96fa89eaefdbb020d748e42ab23b9a7545621a14
#10193, #12895, #14516, #14722, | Stopgaps:
#13589, #14471, #15069, #15094, |
#11688, #13394, #15150, #15506, |
#15757, #15759, #16244 |
-------------------------------------+-------------------------------------
Comment (by nthiery):
Replying to [comment:733 SimonKing]:
> The element methods of Algebras(...) used to provide a copy of
`sage.structure.element.AlgebraElement.__mul__` (implementing the coercion
framework), but now it is gone. Is this a wise decision?
It's now `Magmas.ElementMethods.__mul__`. So we should be good.
> Generally I'd say that one ''should'' start with
`sage.structure.element.AlgebraElement` when one is implementing elements
of an algebra.
>
> However, because of subtle bug in Cython, it is I think possible to
create a Python class inheriting from `sage.categories.map.Map` and
`sage.structure.element.AlgebraElement`, but then certain cdef attributes
of the two base classes will be confused (hence, the two base classes are
actually incompatible, but Cython does not notice).
>
> Hence, there will be cases (such as endomorphism rings) where one has an
algebra formed by maps, and one can not use
`sage.structure.element.AlgebraElement` as a base class. It would then be
very handy if one could inherit coercion from the category's
element_class.
Most of our algebras based on CombinatorialFreeModule also don't
inherit from AlgebraElement, as this is only relevant when the
elements are "small" with a very fast arithmetic.
Btw: last year Robert told me that it was now possible to implement
Cython functions with binding behavior. We should really explore this
at some point to Cythonize all the low level methods in the categories
like `__mul__`. But that's for another ticket!
Cheers,
Nicolas
--
Ticket URL: <http://trac.sagemath.org/ticket/10963#comment:743>
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.