preimage(f, I)
i1 : R = QQ[x,y,z] o1 = R o1 : PolynomialRing
i2 : S = QQ[t,u] o2 = S o2 : PolynomialRing
i3 : f = map(R, S, {x*y, y*z}) o3 = map (R, S, {x*y, y*z}) o3 : RingMap R <-- S
i4 : preimage_f ideal(x^2,y^2) 2 2 o4 = ideal (u , t*u, t ) o4 : Ideal of S
preimage(f, M)
$M$ and target of $f$ should have the same ambient module.
The object preimage is a method function.