I am running the new libsingular and I get the following sage: R = PolynomialRing(QQ, ['a','b','c','d','e'], 5) sage: K = R.fraction_field() sage: a,b,c,d,e = K.gens() sage: sage: ig = 12*a*e-3*b*d+c^2 sage: jg = 72*a*c*e+9*b*c*d-27*a*d^2-27*e*b^2-2*c^3 sage: hg = 8*a*c-3*b^2 sage: deltag = 4*ig^3-jg^2 sage: sage: Ky.<y> = PolynomialRing(K,'y') sage: phipoly = y^3-3*ig*y+jg --------------------------------------------------------------------------- <type 'exceptions.TypeError'> Traceback (most recent call last)
/home/vdbergh/sage-2.5/<ipython console> in <module>() /home/vdbergh/sage-2.5/element.pyx in element.ModuleElement.__add__() /home/vdbergh/sage-2.5/element.pyx in element.bin_op_c() <type 'exceptions.TypeError'>: unsupported operand parent(s) for '+': 'Univariat e Polynomial Ring in y over Fraction Field of Polynomial Ring in a, b, c, d, e o ver Rational Field' and 'Fraction Field of Polynomial Ring in a, b, c, d, e over Rational Field' At least it tells you exactly where the error is. I tried to reproduce it on a simple example but could not so far. Michel On May 17, 5:47 pm, "William Stein" <[EMAIL PROTECTED]> wrote: > On 5/17/07, Prof. J. E. Cremona <[EMAIL PROTECTED]> wrote: > > > > > > > Problem: when executing the following, the last line takes forever and > > had to be killed: > > > R = PolynomialRing(QQ, ['a','b','c','d','e'], 5) > > K = R.fraction_field() > > a,b,c,d,e = K.gens() > > > ig = 12*a*e-3*b*d+c^2 > > jg = 72*a*c*e+9*b*c*d-27*a*d^2-27*e*b^2-2*c^3 > > hg = 8*a*c-3*b^2 > > deltag = 4*ig^3-jg^2 > > > Ky.<y> = PolynomialRing(K,'y') > > phipoly = y^3-3*ig*y+jg > > > What am I missing? > > Nothing -- You have found a subtle bug in SAGE's coercion code. > If you make the coercion that is going on in the last line very explicit, > then the above line works, e.g., this works (note that I've used some > more compact notation at the beginning, but it's equivalent to > what you wrote): > > {{{ > R.<a,b,c,d,e> = QQ[] > K = R.fraction_field() > a,b,c,d,e = K.gens() > ig = 12*a*e-3*b*d+c^2 > jg = 72*a*c*e+9*b*c*d-27*a*d^2-27*e*b^2-2*c^3 > hg = 8*a*c-3*b^2 > deltag = 4*ig^3-jg^2 > > }}} > > {{{ > Ky.<y> = PolynomialRing(K,'y') > phipoly = y^3-3*ig*y+Ky([jg]) > phipoly > /// > y^3 + (-3*c^2 + 9*b*d - 36*a*e)*y + -2*c^3 + 9*b*c*d - 27*b^2*e - > 27*a*d^2 + 72*a*c*e > > }}} > > The difference is that I put Ky([jg]) explicitly instead of jg. > > Whatever is causing this is a serious bug, and I hope somebody fixes > it soon (or that I do). It's trac #365: > http://www.sagemath.org:9002/sage_trac/ticket/365 > > > > > > > John > > > -- > > Prof. J. E. Cremona | > > University of Nottingham | Tel.: +44-115-9514920 > > School of Mathematical Sciences | Fax: +44-115-9514951 > > University Park | Email: [EMAIL PROTECTED] > > Nottingham NG7 2RD, UK | > > > This message has been checked for viruses but the contents of an attachment > > may still contain software viruses, which could damage your computer system: > > you are advised to perform your own checks. Email communications with the > > University of Nottingham may be monitored as permitted by UK legislation. > > -- > William Stein > Associate Professor of Mathematics > University of Washingtonhttp://www.williamstein.org --~--~---------~--~----~------------~-------~--~----~ 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/ -~----------~----~----~----~------~----~------~--~---