[sage-devel] Re: Question about change_ring

2024-04-14 Thread 'Martin R' via sage-devel
Ah, yes! There are constructions of parents where the second argument is not the base ring, and there are also constructions with higher arity. So, I guess that, to be on the safe side, a generic change_ring method would have to check `self.construction()[1] == self.base_ring()`. Martin On Sat

[sage-devel] Re: Question about change_ring

2024-04-13 Thread julian...@fsfe.org
Dear Martin, I don't know much about this area but I don't think construction() is always implemented like that. For example FreeAlgebra(QQ, 2).tensor(FreeAlgebra(QQ, 2)).construction() returns a functor and two arguments. As a default implementation in the category this might still well work f