Dear all, For parents in the category `Set`, sage has a method `construction`, which yields either None, or a functor F and a parent R, such that F(R) yields the original parent, see below for the docstring.
Many parents implement a method `change_ring`, which returns the parent with the base ring replaced. For example: sage: R.<x> = QQ[] sage: R.change_ring(ZZ) Univariate Polynomial Ring in x over Integer Ring What I wonder: shouldn't `change_ring` be also a parent method in some category, e.g. in Category_over_base_ring, which defaults to def change_ring(self, R): c = self.construction() if c is None: raise NotImplementedError return c[0](R) Martin Signature: Sets.ParentMethods.construction(self) Docstring: Return a pair "(functor, parent)" such that "functor(parent)" returns "self". If "self" does not have a functorial construction, return "None". EXAMPLES: sage: QQ.construction() (FractionField, Integer Ring) sage: f, R = QQ['x'].construction() sage: f Poly[x] sage: R Rational Field sage: f(R) Univariate Polynomial Ring in x over Rational Field -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/d1ea5e5e-8b89-4c7d-9c6e-b72a09a4a688n%40googlegroups.com.