# Computing contractions of ideals in Macaulay2

Does Macaulay2 compute contractions of ideals under ring homomorphisms. Specifically, if $R\subseteq S$ is a ring extension (say polynomial rings over $\mathbb{Q}$ which can be specified in M2) and $I$ is an ideal in $S$ given by generators, is there a command to compute $I\cap R$?

EDIT: The eliminate command is supposed to do what I want, except when I use it the output is an ideal in the original ring.

-

More generally there is also the function preimage which takes $f$ a function from $R$ to $S$ and $I$ an ideal in $S$ and outputs $I^c$ in $R$ http://www.math.uiuc.edu/Macaulay2/doc/Macaulay2-1.6/share/doc/Macaulay2/Macaulay2Doc/html/_preimage.html