Replacing an expression by another in the ring of polynomials
Let f=xy2+x+y+z∈Z[x,y,z] I want to replace xy2 by z. Is there a single command to do this with using the ring Z[x,y,z] to get x+y+2z. (Without using symbolic variables, I need to use this ring in my situation) ???