id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
10946 Evaluation and subsitution of multi-variable polynomials wuthrich malb "Let f be a polynomial in two variables x and y over a ring R.
Consider the following three commands
i) f(2,3)
ii) f(x=2,y=3)
iii) f.subs(x=2,y=3)
They give the same results but not the same type. i) gives an element in R while ii) and iii) are constant polynomials in two variables:
{{{
sage: K. = QQ[]
sage: f = x^2 + y^2
sage: f(2,3).parent()
Rational Field
sage: f(x=2,y=3).parent()
Multivariate Polynomial Ring in x, y over Rational Field
sage: f.subs(x=2,y=3).parent()
Multivariate Polynomial Ring in x, y over Rational Field
}}}
Following the documentation, i) and ii) should give an element in R
while iii) is a polynomial.
f(x=2,y=3) is the {{{__call__}}} method in {{{sage.rings.polynomials.multi_polynomial_libsingular.pyx}}} and there, in the first lines (currently line 1673), it jumps to execute subs.
See this thread: http://groups.google.com/group/sage-devel/browse_thread/thread/503d0d82307c9aa5
" defect new major sage-7.4 commutative algebra multi_polynomials, evaluation, substitution N/A