Magma allows one to homogenize a polynomial ring or ideal by use of the Homogenization function, and also to restrict again to the original ring with elimination performed automatically.
Given an ideal I of the polynomial ring P = R[x1, ..., xn], create a polynomial ring H as a single variable extension of P, the homogenized ideal J of H corresponding to I, and the homogenization map f: P -> H, and return J and f.If the argument b (standing for "before") is true, the homogenization variable is inserted before the current variables of P, so H is defined to be R[h, x1, ..., xn] and f maps P.i to H.(k + i) (so the xi variables of P are mapped to the xi variables of H).
If the argument b is false, the homogenization variable is inserted after the current variables of P, so H is defined to be R[x1, ..., xn, h] and f maps P.i to H.i (so the xi variables of P are mapped to the xi variables of H).
If the argument b is omitted, it is taken to be false, so the homogenization variable is introduced after the current variables of P.
If the argument order is given, then H is constructed with the specified order; otherwise, the grevlex order is used for H by default. See the section on monomial orders (Section Representation and Monomial Orders) for the valid values for the argument order.
The image under f of a polynomial of P is the homogenization of f in H, while the image under f of an ideal of P is the homogenization ideal Ih in H. The inverse image under f of a polynomial of H is the restriction back to P (obtained by setting the homogenization variable to 1), while the inverse image under f of an ideal J of H is the restriction back to P of the ideal obtained by setting the homogenization variable to 1.