First time here? Check out the FAQ!
answered 2024-02-23 23:27:39 +0100
Lazy alternative
sage: P._sympy_().subs(sympy.sympify({ x*y: w }))._sage_() 7*w^2 + 5*w*x + 6*w*y + 4*w + x + 2*y + 3*z
HTH,