Hi there!
I have a polynomial $f(x,y) = xy + x^2y^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(ZmodN(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?