Why is it that an ideal is homogeneous if and only if it is generated by homogeneous elements? Hartshorne says the following on pg. 9 

An ideal is homogeneous if and only if it is generated by homogeneous elements.

Take $\langle x+y,x^3+y^3\rangle$. It is generated by homogeneous elements. But how is it homogeneous? Clearly $x+y+x^3+y^3$ is not homogeneous.
 A: We'll say that an ideal is homogeneous if it admits a decomposition $I=\bigoplus_{r=0}^\infty  I_r$ of homogeneous parts (compatible with the decomposition $S=\oplus S_r$ of its homogeneous ring). 
Suppose $I$ is generated by homogeneous elements. That is, it is is generated by a collection of elements $\{f_i\}$ each inside some $S_r$. Then every element of $I$ is a finite sum $$ \sum_i g_if_i  $$
for some polynomials (not a priori homogeneous) $g_i$, by definition of ideal. But since $S$ is homogeneous, every $g_i$ have a decomposition $g_i = \sum g_{ij}$ with each $g_j$ homogeneous of degree $j$. Hence 
$$
\sum_i \sum_j g_{ij}f_i.
$$
Hence the element $\sum_i g_if_i$ can also be decomposed into homogeneous parts ($g_{ij}f_i$ lies in $S_{j+\deg f_i}$), so $I$ is homogeneous.
Conversely, suppose $I$ is homogeneous. Then it is generated by all its homogeneous elements.
A: If an ideal I is homogeneous, and if a possibly non-homogeneous P(x,y) element belongs to I, each homogeneous component of P(x,y) belongs to I. Therefore, given any system of generators of $I$, each of their homogeneous components belo,gs to $I$ – in other words, $I$ is generated by the homogeneous components of a system of not necessarily homogeneous set of generators.
