# Homogenization of Ideals

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.

## `Homogenization(I, b): RngMPol, RngIntElt, BoolElt -> RngMPol, Map`

## `Homogenization(I, b, order): RngMPol, RngIntElt, BoolElt, ... -> RngMPol, Map`

## `Homogenization(I): RngMPol, RngIntElt, BoolElt -> RngMPol, Map`

## `Homogenization(I, order): RngMPol, RngIntElt, BoolElt, ... -> RngMPol, Map`

Given an ideal $I$ of the polynomial ring $P = R[x_1, \ldots, x_n]$, 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 \rightarrow 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, x_1, \ldots, x_n]$ and $f$ maps $P.i$ to $H.(k+i)$ (so the $x_i$ variables of $P$ are mapped to the $x_i$ 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[x_1, \ldots, x_n, h]$ and $f$ maps $P.i$ to $H.i$ (so the $x_i$ variables of $P$ are mapped to the $x_i$ 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](../GrobnerBases/order.md#dpoly-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 $I^h$ 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.
