#11199: QuotientRing elements are not callable
----------------------------+-----------------------------------------------
Reporter: vbraun | Owner: AlexGhitza
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.7.1
Component: algebra | Keywords:
Author: Volker Braun | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
It would be convenient if quotient ring elements would be callable like
polynomials. This is currently not the case:
{{{
sage: R.<x,y> = QQ[]
sage: I = R.ideal(x)
sage: Q = R.quotient_ring(I)
sage: Q
Quotient of Multivariate Polynomial Ring in x, y over Rational Field by
the ideal (x)
sage: Q.inject_variables()
Defining xbar, ybar
sage: p = xbar + ybar
sage: p(1,1)
---------------------------------------------------------------------------
TypeError Traceback (most recent call
last)
/home/vbraun/opt/sage-4.7.alpha4/devel/sage-main/<ipython console> in
<module>()
TypeError: 'QuotientRingElement' object is not callable
}}}
The attached patch implements this functionality by handing the argument
through to the lift.
Arguably, it should check that the result does not depend on the
presentation. Pro: catches errors; Con: potentially slow, ideal membership
test necessary if arguments are polynomials.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11199>
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 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-trac?hl=en.