I'm just learning the language of schemes, so I'm sorry if this seems a little elementary. Consider an affine scheme $\text{Spec}(R)$. For an ideal $I$ of $R$, denote by $U(I)$ the open subset of $\text{Spec}(R)$ consisting of prime ideals $p$ that do not contain $I$.
Is the ring of regular functions on $U(I)$ simply $R_I$ (the localization of $R$ with respect to $I$)? If $I$ is a principal ideal, then this is one of the earliest results in Hartschorne. Also, it is easy to see that $R_I$ injects into the ring of regular functions on $U(I)$. My guess is that this injection is not surjective, but I can't seem to come up with any examples. Thanks!
$R_S$
to denote the localization other people write as$S^{-1}R$
then$R_I$
is not a reasonable thing to consider, because while $I$ is certainly a multiplicatively closed subset of $R$, it also contains zero, so inverting it gives the zero ring. If you use$R_I$
by analogy with the notation$R_{\mathfrak p}=(R-\mathfrak p)^{-1}R$
for a prime ideal $\mathfrak p$ of $R$, note that $(R-I)$ is only a multiplicatively closed subset when $I$ is prime. When $I$ is prime, this localization is actually sort of opposite to reg. fn's on $U(I)$. $\endgroup$$R_{\mathfrak p}$
is regular functions defined near the closed subscheme $V(\mathfrak p)$, rather than away from it. $\endgroup$