[proofplan]
The kernel computation is immediate from the definition of the vanishing ideal, so the main point is surjectivity. Given a regular function, we first refine its local quotient presentations to a finite cover by principal open subsets. We then use the Hilbert Nullstellensatz and the reducedness of coordinate rings to prove a finite principal-open patching lemma: compatible local fractions on a finite principal cover come from one global element of the [coordinate ring](/page/Coordinate%20Ring). Applying this lemma to the local presentations of the regular function gives a polynomial representative, and the [first isomorphism theorem](/theorems/851) gives the asserted isomorphism.
[/proofplan]
[step:Identify the kernel of the evaluation homomorphism]
Let
\begin{align*}
R:=k[x_1,\ldots,x_n].
\end{align*}
For $f,g\in R$, $\lambda\in k$, and $a\in X$, evaluation gives
\begin{align*}
\Phi(f+g)(a)=f(a)+g(a)=\Phi(f)(a)+\Phi(g)(a),
\end{align*}
\begin{align*}
\Phi(fg)(a)=f(a)g(a)=\Phi(f)(a)\Phi(g)(a),
\end{align*}
and
\begin{align*}
\Phi(\lambda f)(a)=\lambda f(a)=\lambda\Phi(f)(a).
\end{align*}
Also $\Phi(1_R)$ is the constant function $1$ on $X$. Thus $\Phi:R\to\mathcal O(X)$ is a $k$-algebra homomorphism.
By definition, $f\in\ker\Phi$ exactly when $\Phi(f)$ is the zero function on $X$, which means
\begin{align*}
f(a)=0
\end{align*}
for every $a\in X$. This condition is precisely $f\in I(X)$. Therefore
\begin{align*}
\ker\Phi=I(X).
\end{align*}
[/step]
[step:Refine the local quotient presentations to finitely many principal opens]
Let $\varphi\in\mathcal O(X)$. For each point $a\in X$, choose a Zariski open neighbourhood $U_a\subset X$ of $a$ and polynomials $p_a,q_a\in R$ such that $q_a(b)\ne 0$ for every $b\in U_a$ and
\begin{align*}
\varphi(b)=\frac{p_a(b)}{q_a(b)}
\end{align*}
for every $b\in U_a$.
We first refine each neighbourhood to a principal open subset. Since principal open subsets form a basis for the Zariski topology on the affine algebraic set $X$, for each $a\in X$ there is a polynomial $g_a\in R$ such that
\begin{align*}
a\in D_X(g_a):=\{b\in X:g_a(b)\ne 0\}\subset U_a.
\end{align*}
Indeed, the closed subsets of $X$ are the sets $X\cap V(J)$ with $J\trianglelefteq R$; if $a\in U_a$, then $X\setminus U_a=X\cap V(J)$ for some ideal $J$, so some $g_a\in J$ satisfies $g_a(a)\ne 0$ and gives the displayed containment. Because $q_a$ is nonzero on $U_a$, it is nonzero on $D_X(g_a)$. The family $\{D_X(g_a)\}_{a\in X}$ covers $X$. Since $X$ is closed in the Noetherian [topological space](/page/Topological%20Space) $\mathbb A_k^n$, the subspace $X$ is Noetherian and hence quasi-compact. Therefore there are points $a_1,\ldots,a_m\in X$ such that
\begin{align*}
X=D_X(g_{a_1})\cup\cdots\cup D_X(g_{a_m}).
\end{align*}
For $1\le i\le m$, define
\begin{align*}
g_i:=g_{a_i},\qquad p_i:=p_{a_i},\qquad q_i:=q_{a_i}.
\end{align*}
Then $X=\bigcup_{i=1}^m D_X(g_i)$, $q_i$ has no zero on $D_X(g_i)$, and
\begin{align*}
\varphi(b)=\frac{p_i(b)}{q_i(b)}
\end{align*}
for every $b\in D_X(g_i)$.
[guided]
We need a finite principal-[open cover](/page/Open%20Cover) because polynomial rings and coordinate rings patch most cleanly over principal opens. The definition of regularity only gives arbitrary open neighbourhoods $U_a$, so the first task is to replace them by opens of the form $D_X(g)$.
Fix $a\in X$. Since $\varphi$ is regular at $a$, there are an [open set](/page/Open%20Set) $U_a\subset X$ with $a\in U_a$ and polynomials $p_a,q_a\in R$ such that $q_a(b)\ne 0$ for all $b\in U_a$ and
\begin{align*}
\varphi(b)=\frac{p_a(b)}{q_a(b)}
\end{align*}
for every $b\in U_a$. We now justify the refinement to a principal open. Since $U_a$ is open in the subspace Zariski topology, its complement is closed in $X$, so there is an ideal $J_a\trianglelefteq R$ with
\begin{align*}
X\setminus U_a=X\cap V(J_a).
\end{align*}
Because $a\notin X\setminus U_a$, not every element of $J_a$ vanishes at $a$. Choose $g_a\in J_a$ with $g_a(a)\ne 0$. Then
\begin{align*}
a\in D_X(g_a):=\{b\in X:g_a(b)\ne 0\}\subset U_a.
\end{align*}
The containment follows because every point of $X\setminus U_a=X\cap V(J_a)$ is a zero of every element of $J_a$, in particular of $g_a$. Thus principal open subsets form a basis in the only way needed here. The containment $D_X(g_a)\subset U_a$ is important: it ensures that the same local quotient formula still represents $\varphi$ on the smaller set. Since $q_a$ is nonzero on all of $U_a$, it is also nonzero on $D_X(g_a)$.
The collection $\{D_X(g_a)\}_{a\in X}$ covers $X$, because each point $a$ lies in its own chosen $D_X(g_a)$. To pass to a [finite subcover](/page/Finite%20Subcover), use that $\mathbb A_k^n$ is Noetherian in the Zariski topology by [Hilbert's basis theorem](/theorems/2904), and every subspace of a Noetherian topological space is Noetherian. Hence $X$ is Noetherian, so every open cover of $X$ has a finite subcover. Choose points $a_1,\ldots,a_m\in X$ such that
\begin{align*}
X=D_X(g_{a_1})\cup\cdots\cup D_X(g_{a_m}).
\end{align*}
Writing
\begin{align*}
g_i:=g_{a_i},\qquad p_i:=p_{a_i},\qquad q_i:=q_{a_i}
\end{align*}
for $1\le i\le m$, we have a finite principal cover $X=\bigcup_{i=1}^m D_X(g_i)$ and, on each $D_X(g_i)$, the formula
\begin{align*}
\varphi(b)=\frac{p_i(b)}{q_i(b)}
\end{align*}
holds with $q_i(b)\ne 0$ throughout that open set. This is exactly the form needed for the algebraic patching step.
[/guided]
[/step]
[step:Rewrite the local quotients with denominators coming from the principal opens]
Let $A:=R/I(X)$, and let $\pi:R\to A$ be the quotient map. For $h\in R$, write $\bar h:=\pi(h)$. For $h\in R$, define the zero locus of $h$ on $X$ by
\begin{align*}
V_X(h):=\{b\in X:h(b)=0\}.
\end{align*}
Since $q_i$ has no zero on $D_X(g_i)$, every point of $X$ at which $q_i$ vanishes is a point at which $g_i$ vanishes. Equivalently,
\begin{align*}
V_X(q_i)\subset V_X(g_i).
\end{align*}
Because $k$ is algebraically closed and $X$ is an affine algebraic set, the Hilbert Nullstellensatz gives that $I(X)$ is radical; equivalently, by [citetheorem:9543], the coordinate ring $A$ is reduced. Applying the ideal-containment form of the Hilbert Nullstellensatz on $X$ to $V_X(q_i)\subset V_X(g_i)$, there is an integer $N_i\in\mathbb N$ and a polynomial $u_i\in R$ such that
\begin{align*}
g_i^{N_i}-u_iq_i\in I(X).
\end{align*}
Define
\begin{align*}
s_i:=g_i^{N_i}\in R,\qquad r_i:=u_ip_i\in R.
\end{align*}
Then $D_X(s_i)=D_X(g_i)$, and for every $b\in D_X(s_i)$ we have
\begin{align*}
s_i(b)=u_i(b)q_i(b).
\end{align*}
Since $q_i(b)\ne 0$ on this set,
\begin{align*}
\frac{r_i(b)}{s_i(b)}=\frac{u_i(b)p_i(b)}{u_i(b)q_i(b)}=\frac{p_i(b)}{q_i(b)}=\varphi(b).
\end{align*}
Thus
\begin{align*}
\varphi(b)=\frac{r_i(b)}{s_i(b)}
\end{align*}
for every $b\in D_X(s_i)$.
[/step]
[step:Patch compatible fractions on the finite principal cover]
We prove the patching statement needed for the fractions $r_i/s_i$. Let $\bar s_i,\bar r_i\in A$ denote the residue classes of $s_i,r_i$. For any $u\in A$, write
\begin{align*}
A_u:=A[u^{-1}]
\end{align*}
for the localization of $A$ obtained by inverting $u$. The principal opens $D_X(s_i)$ cover $X$, and the fractions
\begin{align*}
\frac{\bar r_i}{\bar s_i}
\end{align*}
agree as functions on overlaps because all of them equal $\varphi$. Since $A$ is reduced by [citetheorem:9543], equality of elements of $A$ as functions on $X$ is detected by pointwise equality on $X$.
[claim:Finite principal-open patching]
There exists an element $\bar F\in A$ such that, for every $1\le i\le m$, the restriction of $\bar F$ to $D_X(s_i)$ agrees with $\bar r_i/\bar s_i$.
[/claim]
[proof]
For every pair $i,j$, define
\begin{align*}
\delta_{ij}:=\bar s_j\bar r_i-\bar s_i\bar r_j\in A.
\end{align*}
On $D_X(s_i)\cap D_X(s_j)$, the equality of the two local functions represented by the fractions implies that $\delta_{ij}$ vanishes as a function. Hence $\delta_{ij}$ vanishes on the principal open $D_X(s_is_j)$. Therefore every point of $X$ at which $\delta_{ij}$ is nonzero lies in $V_X(s_is_j)$, or equivalently
\begin{align*}
V_X(s_is_j)\cup V_X(\delta_{ij})=X.
\end{align*}
Thus the product $(\bar s_i\bar s_j)\delta_{ij}$ vanishes at every point of $X$. Since $A$ is reduced by [citetheorem:9543], this product is zero in $A$. In particular, there is an integer $M_{ij}\in\mathbb N$ such that
\begin{align*}
(\bar s_i\bar s_j)^{M_{ij}}\delta_{ij}=0
\end{align*}
in $A$. Let $M\in\mathbb N$ be an integer with $M\ge M_{ij}$ for every pair $i,j$. Define
\begin{align*}
t_i:=\bar s_i^{M+1}\in A,\qquad a_i:=\bar r_i\bar s_i^M\in A.
\end{align*}
Then the principal opens $D_X(t_i)$ still cover $X$, because $D_X(t_i)=D_X(s_i)$. Moreover, for every $i,j$,
\begin{align*}
t_j a_i-t_i a_j
=\bar s_j^{M+1}\bar r_i\bar s_i^M-\bar s_i^{M+1}\bar r_j\bar s_j^M
=(\bar s_i\bar s_j)^M(\bar s_j\bar r_i-\bar s_i\bar r_j)
=0.
\end{align*}
Since the opens $D_X(t_1),\ldots,D_X(t_m)$ cover $X$, the elements $t_1,\ldots,t_m$ have no common zero on $X$. Applying the weak Hilbert Nullstellensatz to the ideal $(t_1,\ldots,t_m)\trianglelefteq A$, whose zero set in $X$ is empty, gives that this ideal is the unit ideal. Therefore there exist $c_1,\ldots,c_m\in A$ such that
\begin{align*}
c_1t_1+\cdots+c_mt_m=1.
\end{align*}
Define
\begin{align*}
\bar F:=c_1a_1+\cdots+c_ma_m\in A.
\end{align*}
Fix $j$. Recall that $A_{t_j}=A[t_j^{-1}]$ denotes the localization of $A$ obtained by inverting $t_j$. In the localization $A_{t_j}$, the identity $t_j a_i=t_i a_j$ gives
\begin{align*}
a_i=\frac{t_i a_j}{t_j}.
\end{align*}
Thus
\begin{align*}
\bar F
=\sum_{i=1}^m c_i a_i
=\sum_{i=1}^m c_i\frac{t_i a_j}{t_j}
=\frac{a_j}{t_j}\sum_{i=1}^m c_i t_i
=\frac{a_j}{t_j}.
\end{align*}
Because
\begin{align*}
\frac{a_j}{t_j}=\frac{\bar r_j\bar s_j^M}{\bar s_j^{M+1}}=\frac{\bar r_j}{\bar s_j}
\end{align*}
in $A_{t_j}=A_{\bar s_j}$, the restriction of $\bar F$ to $D_X(s_j)$ is
\begin{align*}
\frac{\bar r_j}{\bar s_j}.
\end{align*}
This proves the claim.
[/proof]
[guided]
The purpose of this step is to turn several local fractions into one global element of the coordinate ring. The local data are the fractions
\begin{align*}
\frac{\bar r_i}{\bar s_i}
\end{align*}
on the principal opens $D_X(s_i)$, and they are compatible because each one represents the same function $\varphi$.
For every pair of indices $i,j$, define the cross-multiplication defect
\begin{align*}
\delta_{ij}:=\bar s_j\bar r_i-\bar s_i\bar r_j\in A.
\end{align*}
If two fractions are equal on the overlap $D_X(s_i)\cap D_X(s_j)$, then their cross-products agree there. Since
\begin{align*}
D_X(s_i)\cap D_X(s_j)=D_X(s_is_j),
\end{align*}
the element $\delta_{ij}$ vanishes as a function on $D_X(s_is_j)$. Equivalently, any point of $X$ where $\delta_{ij}$ might be nonzero must lie in $V_X(s_is_j)$.
We now convert this geometric vanishing statement into an algebraic annihilation statement. The coordinate ring $A$ is reduced by [citetheorem:9543], so an element of $A$ that vanishes at every point of $X$ is zero. Since $\delta_{ij}$ vanishes on $D_X(s_is_j)$, every point where $\delta_{ij}$ may be nonzero lies in $V_X(s_is_j)$. Hence the product $(\bar s_i\bar s_j)\delta_{ij}$ vanishes at every point of $X$, and reducedness gives
\begin{align*}
(\bar s_i\bar s_j)\delta_{ij}=0
\end{align*}
in $A$. In particular, there exists an integer $M_{ij}\in\mathbb N$ such that
\begin{align*}
(\bar s_i\bar s_j)^{M_{ij}}\delta_{ij}=0
\end{align*}
in the coordinate ring $A$. Choose one integer $M\in\mathbb N$ with $M\ge M_{ij}$ for all pairs $i,j$. Now replace each denominator $\bar s_i$ by the higher power
\begin{align*}
t_i:=\bar s_i^{M+1}
\end{align*}
and replace the numerator by
\begin{align*}
a_i:=\bar r_i\bar s_i^M.
\end{align*}
This replacement does not change the represented fraction on $D_X(s_i)$, because
\begin{align*}
\frac{a_i}{t_i}=\frac{\bar r_i\bar s_i^M}{\bar s_i^{M+1}}=\frac{\bar r_i}{\bar s_i}
\end{align*}
in the localization where $\bar s_i$ is invertible. The advantage of the replacement is that compatibility becomes exact:
\begin{align*}
t_j a_i-t_i a_j
=\bar s_j^{M+1}\bar r_i\bar s_i^M-\bar s_i^{M+1}\bar r_j\bar s_j^M
=(\bar s_i\bar s_j)^M(\bar s_j\bar r_i-\bar s_i\bar r_j)
=0.
\end{align*}
Because the principal opens $D_X(s_i)$ cover $X$, the same is true of $D_X(t_i)$, since $D_X(t_i)=D_X(s_i)$. Thus the elements $t_1,\ldots,t_m$ have no common zero on $X$. Equivalently, the zero set in $X$ of the ideal $(t_1,\ldots,t_m)\trianglelefteq A$ is empty. The weak Hilbert Nullstellensatz applied to this ideal in the affine coordinate ring $A$ says that an ideal with empty zero set is the unit ideal. Hence there are elements $c_1,\ldots,c_m\in A$ satisfying
\begin{align*}
c_1t_1+\cdots+c_mt_m=1.
\end{align*}
This is the algebraic analogue of a [partition of unity](/page/Partition%20of%20Unity) for this finite principal cover.
Define
\begin{align*}
\bar F:=c_1a_1+\cdots+c_ma_m\in A.
\end{align*}
We check that $\bar F$ restricts to the desired local fraction. Fix $j$. Recall that $A_{t_j}=A[t_j^{-1}]$ is the localization of $A$ obtained by inverting $t_j$. In this localization, the element $t_j$ is invertible, and the exact compatibility relation $t_j a_i=t_i a_j$ gives
\begin{align*}
a_i=\frac{t_i a_j}{t_j}.
\end{align*}
Therefore
\begin{align*}
\bar F
=\sum_{i=1}^m c_i a_i
=\sum_{i=1}^m c_i\frac{t_i a_j}{t_j}
=\frac{a_j}{t_j}\sum_{i=1}^m c_i t_i
=\frac{a_j}{t_j}.
\end{align*}
Since $\sum_i c_i t_i=1$, this becomes
\begin{align*}
\bar F=\frac{a_j}{t_j}=\frac{\bar r_j\bar s_j^M}{\bar s_j^{M+1}}=\frac{\bar r_j}{\bar s_j}
\end{align*}
on $D_X(s_j)$. Thus the single element $\bar F\in A$ agrees with every local fraction, so the local regular function has been patched into a global coordinate-ring element.
[/guided]
[/step]
[step:Lift the patched coordinate-ring element to a polynomial representative]
By the patching claim, there is $\bar F\in A$ whose restriction to each $D_X(s_i)$ agrees with the fraction
\begin{align*}
\frac{\bar r_i}{\bar s_i}.
\end{align*}
Choose a polynomial $F\in R$ with $\pi(F)=\bar F$. For every point $b\in X$, choose an index $i$ such that $b\in D_X(s_i)$. On this open set, $\bar F$ and the displayed local fraction define the same function, while the fraction
\begin{align*}
\frac{r_i}{s_i}
\end{align*}
represents $\varphi$. Therefore
\begin{align*}
F(b)=\varphi(b).
\end{align*}
Since $b\in X$ was arbitrary, $\Phi(F)=\varphi$. Hence $\Phi$ is surjective.
[/step]
[step:Apply the quotient isomorphism]
We have proved that $\Phi:R\to\mathcal O(X)$ is a surjective $k$-algebra homomorphism and that $\ker\Phi=I(X)$. By the [first isomorphism theorem for rings](/theorems/851), $\Phi$ induces a unique $k$-algebra isomorphism
\begin{align*}
\overline{\Phi}:R/I(X)\to\mathcal O(X)
\end{align*}
satisfying
\begin{align*}
\overline{\Phi}(f+I(X))=\Phi(f)
\end{align*}
for every $f\in R$. Since $R/I(X)=k[X]$, this is the desired natural isomorphism
\begin{align*}
k[X]\cong\mathcal O(X).
\end{align*}
[/step]