Does anyone know what's up with this weird error? Sage can multiply a
symbolic variable and a constant of a polynomial ring R but not a
symbolic variable and an element of R.base_ring().
Alex
sage: var('t')
t
sage: K.<a>= NumberField(t^2+2,'a')
sage: R.<x>= PolynomialRing(K)
sage: t*R(a)
a*t
sage: t*a
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/Users/arai021/.sage/temp/prj_567_106.cs.auckland.ac.nz/1430/
_Users_arai021_afs_sage_work_mgf_sage_1.py in <module>()
/Applications/sage-3.3/local/lib/python2.5/site-packages/sage/
structure/element.so in sage.structure.element.RingElement.__mul__
(sage/structure/element.c:8632)()
/Applications/sage-3.3/local/lib/python2.5/site-packages/sage/
structure/coerce.so in
sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/
coerce.c:5847)()
TypeError: unsupported operand parent(s) for '*': 'Symbolic Ring' and
'Number Field in a with defining polynomial t^2 + 2'
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---