# 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.

-

You could set f=map(S/I,R) and obtain the intersection as ker(f).

-
Marc, if intend to continue to contribute regularly to this site, it would be nice if you registered your account (it takes only a minute to do that). This way it would be easier for the software to recognize you (and it's the third time I ask the moderators to merge your older account into a newly created one). –  t.b. Jan 7 '12 at 17:29
actually I want to register (I meanwhile have an OPen ID), but cannot find the link for this. I also registerd with the same name but a newer account. –  Marc Olschok Jan 9 '12 at 20:47
The account you used for writing your last comment is registered. If you want to add other registration information like Open ID, then you should go to your user profile here (this page is accessible by clicking on your name at the top middle at the top of each page). Adding registration information can be done here (this page can be reached by clicking "my logins" on the user profile page). –  t.b. Jan 9 '12 at 20:55
I've located the following earlier accounts of yours: math.stackexchange.com/users/15341, math.stackexchange.com/users/15825, math.stackexchange.com/users/16790, math.stackexchange.com/users/19253, math.stackexchange.com/users/20407, math.stackexchange.com/users/21246. If you want to merge them into your current registered account, please flag for moderator attention (at the bottom of your answer you have the "flag" link. Click it and explain the situation briefly in the "other" field.) –  t.b. Jan 10 '12 at 10:45

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

-