dimension of a projective variety 
Let $Y$ be a projective variety with homogeneous coordinate ring $S(Y)$, where $S=k[x_{0},x_{1},\dots ,x_{n}]$ and $k$ is algebraically closed. Show that $\dim S(Y)=\dim Y+1$.

My solution so far:
Let $H_{i}=Z_{\mathbb{P}^{n}}(x_{i})$. Let $U_{i}=\mathbb{P}^{n}\setminus H_{i}$. $\phi:U_{i}\rightarrow A=k[y_{1},\dots ,y_{n}]$ is a homeopmorphism. Define $Y_{i}=\phi(Y\cap U_{i})$.
The plan is to show that $A(Y_{j})\cong (S(Y)_{x_{j}})_{0}$ (homogeneous elements of degree $0$ in the localization of $S$) for some $j$. The rest of the solution follows from there. I know that there exists $j$ such that $\dim Y=\dim A(Y_{j})$. I will assume that this $j=0$ for easy notation. $S$ is a graded ring with gradation $S=\oplus_{d\geq 0}S_{d}$ where $S_{d}$ consists of monomials of total degree $d$. Therefore
$$\displaystyle S(Y)_{x_{0}}=\bigoplus_{d\in\mathbb{Z}}(S_{x_{0}})_{d}/((S_{x_{0}})_{d}\cap I(Y)_{x_{0}}).$$
Any homogeneous element of degree $0$ has the form $f=\displaystyle \overline{\tfrac{\prod_{i\geq 1}^{n}x_{i}^{\alpha_{i}}}{x_{0}^{m}}}$ where $\sum\alpha_{i}=m$. I will define the polynomial on top as $F$ so $f=\tfrac{\overline{F}}{x_{0}^{m}}$. I think the appropriate map would be $\alpha:(S(Y)_{x_{0}})_{0}\rightarrow A(Y_{j})$ $f\mapsto F(1,\tfrac{x_{1}}{x_{0}},\dots ,\tfrac{x_{n}}{x_{0}})$. My problem is I don't know if this map is well defined (i.e.) if $f=\tfrac{\overline{F}}{x_{0}^{m}}$ and $f= \tfrac{\overline{G}}{x_{0}^{m}}$ is $F(1,\tfrac{x_{1}}{x_{0}},\dots ,\tfrac{x_{n}}{x_{0}})=G(1,\tfrac{x_{1}}{x_{0}},\dots ,\tfrac{x_{n}}{x_{0}})$. Also I don't really know what elements of $A(Y_{j})$ look like to verify this.
A hint would be much appreciated. Thanks.
 A: Let me write what you wrote, just in my own notation.
Define $k[x_1,\ldots,x_n]\to (S(Y)_{x_0})_0$ by
$$f(x_1,\ldots,x_n)\mapsto \frac{\displaystyle x_0^m f\left(\frac{x_1}{x_0},\ldots,\frac{x_n}{x_0}\right)}{x_0^m}$$
where $m$ is the multidegree of $f$. This is clearly a well-defined $k$-algebra map. Moreover, it's easy to see that $f$ maps to $0$ if and only if $g(X_0,\ldots,X_n)=0$ for all $[X_0:\ldots:X_n]\in U_0$, where $\displaystyle g(x_0,\ldots,x_n)=x_0^m f\left(\frac{x_1}{x_0},\ldots,\frac{x_n}{x_0}\right)$. In other words, the kernel of this map is precisely $I(Y_0)$. Thus, we get an embedding $A(Y_0)\hookrightarrow (S(Y)_{x_0})_0$. This map is clearly surjective since it hits all of the generators.
So, $A(Y_0)\cong (S(Y_0)_{x_0})_0$, and so it's not hard to see that $A(Y_0)[x_0,x_0^{-1}]\cong S(Y)_{x_0}$. Taking fraction fields shows that
$$K(Y_0)(x_0)\cong \text{Frac}(S(Y))$$
as $k$-algebras. So,
$$\dim S(Y)=\text{tr.deg}_k \text{Frac}(S(Y))=\text{tr.deg}K(Y_0)(x_0)=\text{tr.deg}K(Y_0)+1=\dim Y+1$$
Of course, in the above, I took $i=0$, but it's the same (just notationally more annoying) for $i=1,2,\dots,n$.
