Sorry,

I had no intention to give a negative impression about sage! In fact I
think it is great!
Thanks for fixing this.

Michel

On May 26, 6:42 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On 5/26/07, Michel <[EMAIL PROTECTED]> wrote:
>
>
>
> > sage: z=QQ['z'].gen()
> > sage: W=NumberField(z^2+1,'s')
> > sage: Q.<u,v,w>=W[]
> > sage: W1=FractionField(Q)
> > sage: S.<x,y,z>=W1[]
> > sage: L=FractionField(S)
> > sage: L(u)
> > x
>
> > What's going on?
>
> The coercion *model* in SAGE is sound; we thought it through
> carefully at and after SAGE Days 2 and put months into it.  However,
> the actual *implementation* of the coercion model is often way
> too paranoid in particular cases.  That's what happened in the
> above example, where the code in multi_polynomial_ring_generic.pyx
> raised two TypeErrors when it shouldn't have.    There are undoubtedly
> several other cases like this.  I think the best way to improve things
> is for you (and everybody else) to report to sage-devel
> any time they have such problems -- make sure to include a complete
> easy to test example like you did above.  The code that you report
> goes into the doctest, you get credited in the changelog with finding
> the error, and SAGE gets better.  And, as you've probably noticed, such bugs
> do get promptly fixed.
>
> So, thanks!
>
> > x+u gives an exception although it seems natural there should be a
> > canonical coercion from Q to S.
>
> See attached patch.  The following now works:
>
> sage: z = polygen(QQ, 'z')
> sage: W.<s>=NumberField(z^2+1)
> sage: Q.<u,v,w> = W[]
> sage: W1 = FractionField (Q)
> sage: S.<x,y,z> = W1[]
> sage: u + x
> x + u
> sage: x + 1/u
> x + 1/u
>
> William
>
>  4611.patch
> 2KDownload


--~--~---------~--~----~------------~-------~--~----~
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/
-~----------~----~----~----~------~----~------~--~---

Reply via email to