Hi Martin!

On Mon, Mar 16, 2009 at 11:35:22AM +0100, Martin Rubey wrote:
> "Nicolas M. Thiery" <[email protected]> writes:
> > Just a short question: does the interpreter handle transitivity:
> > i.e. if there is a coercion A -> B and one B -> C, then deduce one for
> > A -> C?
> 
> I just realized that you probably "really" are asking about how to
> deal with domains that have many representations, bases, etc., like
> symmetric functions.

Definitely! The system should be flexible enough to support this,
among other things.

> I have not come up with a completely satisfying answer yet.  One
> possibility is to have a coercion package that performs the
> coercion.  A complete (but silly) example is attached.
> 
> The problem with this approach is that
> 
>     MyDom1 has coerce: % -> MyDom2
> 
> gives false, because the coerce is not exported by MyDom1, but rather
> by MyCoerce...

> The good thing about this approach is that you can play all tricks
> you like in MyCoerce.  For example, you could easily implement
> Dijkstra to find a shortest coercion path.  Of course, you could also
> cache this.
> 
> Is this what you had in mind?

Yup. That's what's implemented in MuPAD (with some subtleties so as to
scale well to a couple thousand domains/parents, and in particular not
get in the way of the memory management).

The Sage implementation has the same aims.

Cheers,
                                Nicolas
--
Nicolas M. ThiĆ©ry "Isil" <[email protected]>
http://Nicolas.Thiery.name/

--~--~---------~--~----~------------~-------~--~----~
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to