>> Hmm. I have to think about it. For the moment, the only think I am >> sure of: coercions should *always* be safe.
> Does this mean you want GF(5)(3)*2 and RR(pi)*2 to fail? These > currently work due to coercions that would be unsafe according to my > definition. For R(3)*2 it seems reasonable not to fail, because every ring R can easily made into a Z-module where the above is just a shorthand for writing R(3) + R(3). Of course the result is in R. In general, if you have two rings R, S and a homomorphism h: R->S, then you can make S into a left-R-algebra by defining r*s := h(r)*s if the image of h lies in the center of S. (Note the possibility of non-commutativity.) If you also have an appropriate k: S->R then the question is whether r*s (maybe now defined as r*k(s)) is in R or in S. (I don't think that h(r)*s must be equal to r*k(s) even if you disregard being in R or S.) What happens in Sage in such a case? Or are cycles like (h,k) automatically detected in the coercion framework? Ralf --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---