Homogeneous basis on a polynomial subalgebra

Let $$k$$ be an algebraically closed field of characteristic $$0$$ and $$A=k[X_1, \ldots, X_n]$$ with the grading induced by the total degree. Let $$B$$ be a graded $$k$$-subalgebra of $$A$$, ie, if $$(A_k)$$ is the grading of $$A$$, then $$(B \cap A_k)$$ is the grading of $$B$$. Suppose $$B$$ is polynomial, ie freely generated by some $$b_1, \ldots, b_r$$. Can $$B$$ be always freely generated by homogeneous elements?

• If the ring is abstractly a polynomial ring, then it is a regular ring. Thus the maximal ideal generated by all homogeneous elements of positive degree is regular. A minimal set of homogeneous generators for this ideal is also a minimal set of generators of the ring as a $k$-algebra. – Jason Starr Jun 14 at 19:21
• I don't really understand why a minimal set of homogeneous generators for the ideal would be a minimal set of generators of the ring. Of course, it is a minimal set of homogeneous generators for the ring, but is it a minimal set of generators for the ring? – keaine Jun 14 at 21:13
• This is a standard result included in commutative algebra textbooks. It suffices to prove that all homogeneous elements of the ring are contained in the subring generated by the ideal generators. Every positive-degree element of the ring is in the ideal, hence is a linear combination of ideal generators whose coefficients are homogeneous of strictly smaller degree. Now use the induction hypothesis. – Jason Starr Jun 14 at 22:53
• I don't quite understand where this goes. With what you said, we prove that our minimal set of homogeneous elements generates the ring. But I don't get why they are algebraically independent. – keaine Jun 15 at 1:38
• As a maximal ideal in a regular ring of dimensions $n$, also the maximal ideal is generated by a regular sequence of length $n$. – Jason Starr Jun 15 at 3:02