Let $P=K[x_1,\dots,x_n]$ be a polynomial ring over a field $K$ and $I = (f)$ be a principal ideal in $P$ generated by $f \in P - \{0 \}$. Moreover let $L \subset \{x_1, \dots, x_n \}$ and $\hat{P} = K\{x_i : x_i \notin L \}$. Show $I \cap \hat{P} = (0) \iff f \notin \hat{P}$. (Exercise 4, Section 3.4 from Kreuzer and Robbiano, Computational Commutative Algebra, vol. 1.)
So I know that in one direction, if $f \not\in \hat{P}$, then $f$ contains a variable in $L$, but then $\hat{P}$ cannot contain any variable that is not in $L$. So the intersection must be $0$. (this need some justification...?) I am not sure about the other way. If someone could show me both, that would be good.
For the forward direction:
If $I\cap{}\hat{P}=(0)$, then since $f\in{}I$, we have $f\notin{}\hat{P}$, since $f\neq{}0$ and $f\notin{}(0)$ (since P is an integral domain).
And backwards:
If $f\notin{}\hat{P}$, then note that every element of $I$ is of the form $h=\sum_{i=1}^ng_if=gf$ where the $g_i\in{}P$ and $g=\sum_{i=1}^ng_i$. Since $f\notin{}\hat{P}$ then it must contain a variable of $L$ since degree of polynomials is additive, which means that $gf$ must have a variable in $L$, unless $g=0$, which would make $gf=0$. Therefore $I\cap\hat{P}=(0)$.