On Sun, 29 Oct 2006 04:18:09 -0700, Bill Hart <[EMAIL PROTECTED]> wrote:
> > Incidentally, although SAGE might assign certain canonical isomorphisms > and inclusions as canonical, the user should be able to reassign what > the canonical homomorphism is for any ring. I'm not convinced. > This would apply even if > the rings weren't isomorphic, or one included in another. The user > should be able to specify a homomorphism from one ring to another and > specify it as canonical and then have sage automatically coerce > expressions along the canonical map. This would make it impossible to ensure that canonical coercion satisfies the axioms we've laid down. > E.g. > > R=ZZ['x'] > f=R(x^2+3*x) > S=ZZ['x'] > CanonicalHomomorphism(R,S,[s->x+1) > S(f) > x^2+5*x+4 > > I'm not saying a system like this would be easily constructed, nor easy > to implement. But by the year 2020, one might hope to have something > this smart. First problem -- in your example above (given immutability of poly rings), R and S will be identical objects. So you can't distinguish them. They are both *the* poly ring in x over Z. I don't think it would be difficult to implement in a dumb way, but it would be difficult to reason with, ensure it is working correctly, and write the code that builds on it. MAGMA has an AssertEmbedding command this, though. Imagine, e.g., that the user defined a nonstandard canonical coercion map between Z['x'] and Z['y'], but that some function the user calls or the library code assumes the map is the standard one -- weird weird bugs occur. -- William --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---