# Show that $I(\overline{Y_1 \setminus Y_2}) = I(Y_1):I(Y_2)$

Let $$X$$ be an affine variaty in a commutative ring $$R$$ and let $$,Y_1,Y_2$$ be subvarieties of $$X$$. Show that in the coordinate ring $$A(X)=K[x_1,...,x_n]/I(X)$$, where $$K$$ is an algebraically closed field, holds $$I(\overline{Y_1 \setminus Y_2}) = I(Y_1):I(Y_2)$$.

Remark: In a ring $$R$$ the ideal quotient of the ideals $$J_1, J_2 \vartriangleleft R$$ is defined by $$(J_1:J_2)=\{f\in R\mid fJ_2\subset J_1\}$$.

My attempt is as follows:

$$\subseteq:$$ If $$f \in I(\overline{Y_1 \setminus Y_2})$$, then by the definitions $$f(x) = 0$$ for all $$x \in \overline{Y_1 \setminus Y_2}$$, which, by the fact that for any $$y \in Y_1$$ either $$y \in Y_1 \setminus Y_2$$ or $$y \in Y_2$$ holds, implies $$fI(Y_2) \subseteq I(Y_1)$$.

$$\supseteq:$$ If $$f \in I(J_1):I(J_2)$$, then $$fI(Y_2) \subseteq I(Y_1)$$. We now make a case distinction: If $$Y_1 = Y_2$$, then $$I(\overline{Y_1 \setminus Y_2}) = I(\emptyset) = A(X)$$, thus $$I(\overline{Y_1 \setminus Y_2})$$. If $$Y_1 \ne Y_2$$, then $$fI(Y_2) \subseteq I(Y_1)$$ implies $$f \in I(\overline{Y_1 \setminus Y_2})$$.

I am unsure why this seemingly does not require us to use that we are working in $$A(X)$$. I also do not get we need to consider $$\overline{Y_1 \setminus Y_2}$$ instead of $$Y_1 \setminus Y_2$$. Could you please explain this to me?

I don't quite get why you have to distinguish cases, and how you arrive at the final implication (if $$Y_1\neq Y_2$$ and $$fI(Y_2)\subseteq I(Y_1)$$ then $$f\in I(\overline{Y_1\setminus Y_2})$$). A concise argument would go as follows:
Let $$f$$ be such that $$fI(Y_2)\subseteq I(Y_1)$$. We will show first that $$f$$ vanishes on $$Y_1\setminus Y_2$$ (so if $$Y_1=Y_2$$ there is nothing to prove). Assume by contradiction that there exists $$y\in Y_1\setminus Y_2$$ such that $$f(y)\neq 0$$. As $$y\notin Y_2$$, there exists $$g\in I(Y_2)$$ such that $$g(y)\neq 0$$ (as $$Y_2=\{x\ |\ h(x)=0\ \forall h\in I(Y_2)\}$$). But then $$fg\in I(Y_1)$$ by hypothesis, and $$(fg)(y)=f(y)g(y)\neq 0$$ by construction, so we have a contradiction.
As the set of points $$V(f)$$ where $$f$$ vanishes is closed and contains $$Y_1\setminus Y_2$$, it must contain $$\overline{Y_1\setminus Y_2}$$. So we obtain $$f\in I(V(f))\subseteq I(\overline{Y_1\setminus Y_2})$$.
We are implicitly using that we are working in $$A(X)$$, because we use various properties (like $$V(I(Y))=Y$$ for any closed subset etc). Also, although we can associate a vanishing ideal $$I(S)$$ to every subset $$S$$ (not necessarily closed), we have in general that $$V(I(S))=\overline{S}$$. So indeed $$I(\overline{Y_1\setminus Y_2})=I(Y_1\setminus Y_2)$$, but $$V(I(Y_1\setminus Y_2))\neq Y_1\setminus Y_2$$ in general. I think this is the conceptual reason for working directly with the closure.