Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

What I found was the easiest is to define my parents as inheriting from the corresponding objects from Algebras(QQ), and then reset the category using Parent's methods since I am guaranteed to have a subcategory. For example

 def CParent (MPolynomialRing_libsingular)
    def __init__(self, n, names, order)
        self._somedata = somevalue
        super(CParent, self).__init__(QQ, n, names, order)
        self._unset_category()
        self._init_category_(Cs)

This way I don't even need to implement an element class and I can focus on morphisms which is the only thing that changes in this category.