I'm sorry if my question is rather trivial, but I can't figure it out.. Given $A$ a ring and $P=Proj(A[X_0,\cdots,X_n])$, I know that $\oplus_n H^0(P,\mathcal{O}(n))=A[X_0,\cdots,X_n]$. This equality is not true in general for every graded algebra $B$ for which $P=Proj(B)$. Under which hypothesis is still verified $\oplus_n H^0(P,\mathcal{O}(n))=B$?
Thank you