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) /Users/arai021/<ipython console> in <module>() /Applications/sage/local/lib/python2.5/site-packages/sage/rings/ polynomial/multi_polynomial_ring.pyc in __call__(self, x, check) 360 D = x.dict() 361 for i, a in D.iteritems(): --> 362 D[i] = K(a) 363 return MPolynomial_polydict(self, D) 364 elif set(P.variable_names()).issubset(set (self.variable_names())) and self.base_ring().has_coerce_map_from (P.base_ring()): /Applications/sage/local/lib/python2.5/site-packages/sage/rings/ qqbar.pyc in __call__(self, x) 662 elif hasattr(x, '_algebraic_'): 663 return x._algebraic_(QQbar) --> 664 return AlgebraicNumber(x) 665 666 def _repr_(self): /Applications/sage/local/lib/python2.5/site-packages/sage/rings/ qqbar.pyc in __init__(self, x) 2512 """ 2513 def __init__(self, x): -> 2514 AlgebraicNumber_base.__init__(self, QQbar, x) 2515 2516 def __reduce__(self): /Applications/sage/local/lib/python2.5/site-packages/sage/rings/ qqbar.pyc in __init__(self, parent, x) 2004 self._descr = ANExtensionElement (QQbar_I_generator, QQbar_I_nf(x.list())) 2005 else: -> 2006 raise TypeError, "Illegal initializer for algebraic number" 2007 2008 self._value = self._descr._interval_fast(64) TypeError: Illegal initializer for algebraic number --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---