# Changing Parent on multivariable polynomial ring

This question is similar to https://ask.sagemath.org/question/803...

```
R.<x,y,z,w> = QQ[]
f=x*y*z*w
f1=derivative(f,x)
f2=derivative(f,y)
f3=derivative(f,z)
f4=derivative(f,w)
J = R.ideal([f1, f2, f3,f4])
```

Now f is in its Jacobian by Euler identity so we can lift f as follows.

```
f in J
```

returns true.

```
f.lift(J)
```

returns the lift of f. Now consider h=f^(2)/ (x*y*z). Although this seems like a rational function, this is actually a polynomial.

```
h in J
```

returns true. However, I get an error when doing

```
h.lift(J)
```

The reason for this is Sage reads h as living not in the multivariable ring, but the fraction field of it because I divided by x*y*z. Apparently, there is no lift function for polynomials living in the fraction field. However, it is still an honest polynomial as it divides cleanly with no remainder. To be more clear,

```
f.parent()
```

returns Multivariate Polynomial Ring in x, y, z, w over Rational Field.

```
h.parent()
```

returns Fraction Field of Multivariate Polynomial Ring in x, y, z, w over Rational Field. Is there a way to make h belong to the multivariate ring instead of its fraction field so I can apply the lift function?

By the way,

`J = R.ideal(jacobian(f,R.gens()).list())`

and`J = R.ideal(f.gradient())`

and`J = f.jacobian_ideal()`

.