can you help me?...
Let X $\subseteq \mathbb{A}^n$ be an algebraic set, and $f, g:X\rightarrow k$ two regular functions. If $X$ is irreducible and an open $U \subseteq X$ exists such that $f_{|U} = g_{|U}$, prove that $f=g$.
I have been able to prove that:
Let E be the subset where $f = g$ so E is closed (Why? I know that $E = (f,g)^{-1}(\Delta_{k})$ but... why is $(\Delta_{k})$ closed?). So $U \subseteq E \Rightarrow \bar{U} \subseteq \bar{E}=E$ (beacuse E is closed) $\Rightarrow X \subseteq E$, because $\bar{U}=X \Rightarrow E = X$ and $f=g$ in X.
$\Delta\subset X\times X\subset \mathbb{A}^n\times \mathbb{A}^n=\mathbb{A}^{2n}$.
Suppose the coordinates of $\mathbb{A}^{2n}$ are $x_1,\ldots,x_n,y_1,\ldots, y_n.$ And $X$ is defined by $f_1,\ldots, f_m$.
Then $ X\times X$ is defined by $f_1(x),\ldots, f_m(x),f_1(y),\ldots, f_m(y)$ where $x=(x_1,\ldots,x_n),y=(y_1,\ldots, y_n)$.
And $\Delta$ is defined by $f_1(x),\ldots, f_m(x),f_1(y),\ldots, f_m(y),x_1-y_1,\ldots, x_n-y_n$. Hence it is closed.