-
-
Notifications
You must be signed in to change notification settings - Fork 688
Closed
Description
This should work automagically:
----------------------------------------------------------------------
| Sage Version 4.2.1, Release Date: 2009-11-14 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: a = CyclotomicField(3).random_element()
sage: b = CyclotomicField(4).random_element()
sage: a + b
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/ghitza/.sage/temp/artin/9098/_home_ghitza__sage_init_sage_0.py in <module>()
/home/ghitza/sage-devel/local/lib/python2.6/site-packages/sage/structure/element.so in sage.structure.element.ModuleElement.__add__ (sage/structure/element.c:6989)()
/home/ghitza/sage-devel/local/lib/python2.6/site-packages/sage/structure/coerce.so in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:7021)()
TypeError: unsupported operand parent(s) for '+': 'Cyclotomic Field of order 3 and degree 2' and 'Cyclotomic Field of order 4 and degree 2'
sage: a * b
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/ghitza/.sage/temp/artin/9098/_home_ghitza__sage_init_sage_0.py in <module>()
/home/ghitza/sage-devel/local/lib/python2.6/site-packages/sage/structure/element.so in sage.structure.element.RingElement.__mul__ (sage/structure/element.c:10248)()
/home/ghitza/sage-devel/local/lib/python2.6/site-packages/sage/structure/coerce.so in sage.structure.coerce.CoercionModel_cache_maps.bin_op (sage/structure/coerce.c:7021)()
TypeError: unsupported operand parent(s) for '*': 'Cyclotomic Field of order 3 and degree 2' and 'Cyclotomic Field of order 4 and degree 2'
I think it's a coercion problem. If someone knows better, please change the trac component accordingly.
CC: @sagetrac-vripoll @stumpc5 @tscrim
Component: coercion
Keywords: cyclotomic, coxeter
Author: Frédéric Chapoton
Branch/Commit: 0a00b44
Reviewer: Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/7589