On Oct 28, 2006, at 8:23 PM, William Stein wrote:
> What are the rules for algebras going to be? > > Suppose R and S are commutative rings (for simplicity) and M and N are > R modules and K is an S-module. > > Choose x in M and y in N. Then coerce should work exactly as before. > All the _coerce_ maps are R-module homomorphisms, etc., and there > is nothing new going on here. Next assume that z in K. To do x + z, > we have to worry about base rings. > > PROPOSED RULE: Suppose there is a coerce map (of rings!) R --> S. > Then to compute x+z we first compute Z = M.base_extend(S), which is an > S-module > such that _coerce_ on elements of M gives elements of Z in the > natural way. > We are now do the add > Z._coerce_(x) + z > using the usual rules. This sounds good to me. > Next, consider multiplication. Suppose in addition that M, N, and > K are > all > algebras. Suppose that x in M and z in K. Multiplication should > work in > exactly the same way as addition above. [...] Also sounds good. I'm a bit worried about ambiguous situations arising, although I can't think of any specific examples. If both objects are module elements (or algebra elements) then everything's ok I think. I'm more worried about multiplying a ring element by an algebra element; it feels like it might be possible to get an ambiguous situation where you don't know whether to coerce yourself towards a scalar multiplication or an algebra multiplication. David --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---