On Feb 19, 7:59 pm, Alex Raichev <tortoise.s...@gmail.com> wrote:
> Hi all:
>
> I get an error when i try to coerce monomials of a multivariate
> polynomial ring over a number field to the corresponding polynomial
> ring over QQbar.  Shouldn't this work?  They're monomials; no
> coefficients.  Here's an example.
>
> Alex
>
> ----------------------------------------------------------------------
> | Sage Version 3.2.3, Release Date: 2009-01-05                       |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> sage: var('t')
> t
> sage: F= NumberField(t^2+1,'a')
> sage: R.<x,y>= PolynomialRing(F,2,'xy')
> sage: print x.parent()
> Multivariate Polynomial Ring in x, y over Number Field in a with
> defining polynomial t^2 + 1
> sage: RR= R.change_ring(QQbar)
> sage: print RR(x).parent()
> ---------------------------------------------------------------------------
> TypeError                                 Traceback (most recent call
> last)

Yes, this should work.  (But currently only for NumberField(t^2+1,
'a'); that particular case is hardcoded into the QQbar coercion
mechanism, because QQbar was written before number fields had
embeddings, so it doesn't know which embedding to pick in general.)

There's a bug.  And, now that you've pointed out the bug, I figured
out how to crash Sage with a segmentation fault; so it's a serious
bug.  Thanks for reporting it!  This bug is now being tracked at
http://trac.sagemath.org/sage_trac/ticket/5316

Carl
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to