# Regular functions on $\mathbb P_k^n$

Let be $k$ an algebraically closed field and let's consider a projective algebraic set $V\subseteq\mathbb P^n_k$ with the induced Zariski topology. If $U\subseteq V$ is open, likewise the affine case, regular functions on $U$ are those functions that can be written locally as $\frac{f}{g}$ where $f,g\in \Gamma[V]_h$ are represented by homogeneous polynomials of the same degree.

If $V$ is an affine algebraic set one can show that $\mathcal O_V(D(f))=\Gamma[V]_f$ for all $f\in \Gamma[V]$.

In the projective case with the sheaf of regular functions definited above, can be shown that

$$\mathcal O_V(D(f))=\Gamma[V]_{(f)}$$

where $\Gamma[V]_{(f)}:=\{\frac{g}{f^n}\,:\, g,f\;\textrm{are homogeneous and}\; deg(g)=deg(f^n)\}$. This formula is true if $deg(f)>0$ because, for example, if $f=1$ then we would have $\mathcal O_V(D(1))=k$ so the global regular functions would be only costant functions on $V$. This is wrong because if $V$ is not connected we have other regular functions, precisely functions that are costant on every connected component of $V$.

So my question is: when one proves the relation $\mathcal O_V(D(f))=\Gamma[V]_{(f)}$, what is that goes wrong in the case $deg(f)=0$?

-

First let me congratulate on your critical sense: you have put the finger on a real problem!

Indeed if you consider a graded ring $A$ and its associated scheme $X=Proj(A)$, and if you take $f\in A_0$ homogeneous of degree zero, it is not true that you have an isomorphism of affine schemes $D_+(f)\cong Spec(A_{(f)})$.
As you notice, it is not even true that $\Gamma(D_+(f)),\mathcal O_X)=A_{(f)}$.

So what is to be done?

Very easy : do not take $f\in A_0$ !
And indeed you will notice that almost all books which introduce these schemes $Proj(A)$ take great care to claim an isomorphism $D_+(f)\cong Spec(A_{(f)})$ only for $f$ homogeneous of positive degree: $f\in A_+=\oplus _{d\geq 1}A_d$
Check it, first in EGA, but also in the secondary sources: Eisenbud-Harris, Görtz-Wedhorn, Hartshorne, Iitaka, Qing Liu, Mumford-Oda,...

-

Since our homogeneous coordinate ring is generated in degree $>0,$ localization at a non-constant (specifically at a generator) brings us into an affine open chart whose coordinate ring we can then find by dehomogenizing. Of course localization at a constant can tell us nothing about how local functions might glue together to give global sections.

-