I feel like I'm jumping into this discussion late, but it's something I've been thinking about too...
On Oct 28, 2006, at 7:05 PM, William Stein wrote: > Regarding ring and algebra elements, suppose x is in a ring R and y > is in a K-algebra S. We want to define what "x * y" means. The > most natural thing to me would be > > x * y is K._coerce_(x) * y > > and that's it. If no coerce map exists, fail. > > Am I missing something? The above rule is definitely easy to > understand. > > William I think if there is a natural coercion S -> R, one should also be able to do x * y = x * y.base_extend(R) Right now something like sage: R.<x> = ZZ['x'] sage: (1/2) * (x^2-x) throws an "unable to find a common parent" type error. I am wondering if there are any (many) other cases where there is an unambiguous common parent that is not the parent of either "sibling." I think there should be generic code able to handle this for elements defined over a basering (e.g. polynomials, series, matrices, etc.) but perhaps there are other such situations too (e.g. the product of elements of two extensions of Q, though I haven't given thought to how messy this could become). Robert --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---