I have trouble understanding what the coordinate ring of an open affine variety, i.e. the ring of regular functions on that variety, is (in the classical sense). Let $k$ be algebraically closed.
If $X \subseteq \mathbb A^n$ is a closed affine variety, then the coordinate ring is defined as $k[X] := k[x_1, \dots, x_n] / I(X)$ where $I(X) = (f_1, \dots, f_m)$ is the finitely generated ideal of polynomials vanishing on $X$.
If $D(f) \subseteq \mathbb A^n$ is a distinguished open set for some $f \in k[x_1, \dots, x_n]$, then $k[D(f)] = k[x_1, \dots, x_n, f^{-1}]$ is the localisation at $f$.
Now for a general open affine variety $U \subseteq \mathbb A^n$, we can write them as $U = \mathbb A^n \setminus X$ for a closed variety $X = V(f_1, \dots, f_m)$ where $X$ is the vanishing set of $f_1, \dots, f_m \in k[x_1, \dots, x_n]$. How can I construct $k[U]$? Is it simply the $k$-algebra generated by the $k[D(f_i)]$ for $i = 1, \dots, m$, i.e. $k[U] = k[x_1, \dots, x_n, f_1^{-1}, \dots, f_m^{-1}]$?