These are all basically examples of sections of injective canonical maps going the other direction. There clearly shouldn't be a coerce method going that direction because the objects are not isomorphic. If we switch to a data-driven, category theoretic coercion system, it should be possible to recognize this kind of situation and handle it appropriately. Personally, I'd like to see what comes out of discussions at SD4 (or before too I suppose) on the feasibility of such an extension to Sage's coercion model, and how it would work. David
On 5/22/07, Michel <[EMAIL PROTECTED]> wrote: > > > > > I'm concerned that your proposal, if I understand it correctly, > > will make it difficult to avoid infinite loops. Could you flesh > > out your proposal more, and specifically address issues > > involving infinite loops? > > I guess this was more of an idea than a proposal. But given > the rethinking of the coercion model it is perhaps appropriate > to raise it. > > To address your concerrn wouldn't it be sufficient to specify that > > _noncanonical_into_ > > should *not* call R(self). Or if it *really* wants to then it should > do R._call_(self) (single underscore). > > In the examples I have in mind things are pretty simple. > Constant diagonal matrices --> base ring. > Fraction field element-> base ring (if the denominator is a unit) > Constant polynomials -> base ring. > Field extension -> base field (if applicable) > > etc... > > Michel > > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] 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/ -~----------~----~----~----~------~----~------~--~---
