ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 28 Feb 2015 19:00:54 +0100substitute x*y by uhttps://ask.sagemath.org/question/25972/substitute-xy-by-u/ Hi there!
I have a polynomial $f(x,y) = x*y + x^2*y^2 + x*y^2$
I want to substitute $x*y$ instances by a new unknown $u$ (s.t. $u = x * y$)
This is how I proceeded:
# this is the default code
P.<x, y> = PolynomialRing(Zmod(5))
f = x*y + x^2*y^2 + x*y^2
# now I want to introduce the substitution so I have a f(x,y,u)
new_ring.<x,y,u> = PolynomialRing(ZZ)
ff = f.sub(x*y = u)
Of course this code doesn't work... Any idea what I could do?mimooSat, 28 Feb 2015 19:00:54 +0100https://ask.sagemath.org/question/25972/