Finding generators for vanishing ideal $I(S)$ Let $A=k[x,y]$ where $k$ is a field. Let $S=\{(y),(x,y-1)\}$ be a subset of $\operatorname{Spec}A$. Then $I(S)$ consists of those polynomials in both $(y)$ and $(x,y-1)$.
How could one find generators for the ideal $I(S)$?
I know that if $f\in S$, then we have that $f=gy$ for some $g\in A$. Further, we have $f=hx+j(y-1)$ for some $h,j\in A$.
From this it follows that $(g-j)y-hx-j=0$. But I'm not sure how this helps us find the generators. What am I missing?
 A: I claim that $I(S) = (xy, y(y - 1)).$ First, observe that $xy, y(y-1)\in I(S).$  Now, consider an arbitrary polynomial $p(x,y)\in I(S).$ Subtracting off any terms which are multiples of $xy$ already, we may assume that $p(x,y)$ is of the form
$$
p(x,y) = a + \sum_{i > 0} b_i x^i + \sum_{j > 0} c_j y^j.
$$
It suffices to prove that $y(y - 1)\mid p(x,y).$
Since $p(x,y)\in (y)\cap (x,y-1)$ is a multiple of $y,$ we have
\begin{align*}
0 &= p(x,0)\\
&= a + \sum_{i > 0} b_i x^i + \sum_{j > 0} c_j 0^j\\
&= a + \sum_{i > 0} b_i x^i.
\end{align*}
The only way for this to be true is if $a = 0$ and $b_i = 0$ for all $i.$ Thus,
$$
p(x,y) = \sum_{j > 0} c_j y^j = y\sum_{j > 0}c_j y^{j-1}.
$$
Let us write $p(x,y) = yg(y),$ where $g(y) = \sum_{j\geq 0}c_{j+1} y^j.$ We know that $p\in(x,y-1)$ if and only if $p(0,1) = 0,$ so that $g(1) = 0.$ However, this tells us that $y - 1\mid g,$ which implies that $y(y-1)\mid p,$ as desired.
A: Lemma. Let $R$ be a commutative ring and $I$ and $J$ be comaximal ideals, i.e., $I+J = R$. Then $I \cap J = IJ$.
Proof. See here or here.
Returning to your problem, since $1 = y - (y-1) \in (y) + (x,y-1)$, then $(y)$ and $(x, y-1)$ are comaximal. Applying the lemma, we have
$$
(y) \cap (x, y-1) = (y)(x,y-1) = (xy, y(y-1)) \, .
$$
In general, finding generators for the intersection of ideals in polynomial rings can be tricky, but there is a general algorithm using Gröbner bases.
