#18221: x / 2 doesn't work for x generator of free Q-algebra
------------------------+-----------------------------------
Reporter: darij | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.7
Component: coercion | Keywords: coercion, sd67,
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------+-----------------------------------
{{{
sage: R.<x> = FreeAlgebra(QQ)
sage: x/2
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call
last)
<ipython-input-2-749cf4ad628f> in <module>()
----> 1 x/Integer(2)
/home/skraeling/sage/src/sage/structure/element.pyx in
sage.structure.element.RingElement.__div__
(build/cythonized/sage/structure/element.c:18393)()
1955 return
(<RingElement>self)._div_(<RingElement>right)
1956 global coercion_model
-> 1957 return coercion_model.bin_op(self, right, div)
1958
1959 cpdef RingElement _div_(self, RingElement right):
/home/skraeling/sage/src/sage/structure/coerce.pyx in
sage.structure.coerce.CoercionModel_cache_maps.bin_op
(build/cythonized/sage/structure/coerce.c:7628)()
849 if xp is yp:
850 return op(x,y)
--> 851 action = self.get_action(xp, yp, op, x, y)
852 if action is not None:
853 return (<Action>action)._call_(x, y)
/home/skraeling/sage/src/sage/structure/coerce.pyx in
sage.structure.coerce.CoercionModel_cache_maps.get_action
(build/cythonized/sage/structure/coerce.c:13309)()
1334 pass
1335 action = self.discover_action(R, S, op, r, s)
-> 1336 action = self.verify_action(action, R, S, op)
1337 self._action_maps.set(R, S, op, action)
1338 return action
/home/skraeling/sage/src/sage/structure/coerce.pyx in
sage.structure.coerce.CoercionModel_cache_maps.verify_action
(build/cythonized/sage/structure/coerce.c:14389)()
1386
1387 if action.left_domain() is not R or
action.right_domain() is not S:
-> 1388 raise RuntimeError, """There is a BUG in the
coercion model:
1389 Action found for R %s S does not have the correct
domains
1390 R = %s
RuntimeError: There is a BUG in the coercion model:
Action found for R <built-in function div> S does not have
the correct domains
R = Free Algebra on 1 generators (x,) over Rational Field
S = Integer Ring
(should be Free Algebra on 1 generators (x,) over Rational
Field, Rational Field)
action = Right inverse action by Rational Field on Free
Algebra on 1 generators (x,) over Rational Field (<type
'sage.categories.action.InverseAction'>)
}}}
--
Ticket URL: <http://trac.sagemath.org/ticket/18221>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.