TITLE: Hartshorne Exercise 1.1 (a)
QUESTION [10 upvotes]: (see bottom for apology)

Let $Y$ be the plane curve $y = x^2$ (i.e., $Y$ is the zero set of the polynomial $f = y - x^2$). Show that $A(Y)$ is isomorphic to a polynomial ring in one variable over $K$.

In case the notation is non-standard, let $A = k[x_1, ... , x_n]$. Then $A(Y) = A / I(Y)$ is the affine coordinate ring of an algebraic subset $Y \subseteq \mathbb A^n$, where $I(Y) = \{ f \in A | f(P) = 0 \ \forall P \in Y\}$. 

My initial thoughts: 
I can use the information in the question to help me; I know in advance that $A(Y)$ is going to be generated by one of its elements (as a $k$-algebra). I'd like to see what the elements of $A(Y)$ look like, as this will help me to find a generator. 
My attempt: 
I'm quotienting out by $I(Y) = I(Z(\mathfrak{a})) = \sqrt{\mathfrak{a}}$ (Hilbert's Nullstellensatz), where $\mathfrak{a}$ is the ideal generated by $f$. It'd be nice if $\mathfrak{a}$ was a radical ideal. Suppose $g \in \sqrt{\mathfrak{a}}$. Then $g^r \in \mathfrak{a}$ for some positive integer $r$, i.e. $g(x,y)^r = h(x,y)(y-x^2)$
 for some $h(x,y) \in A$. Since $(y-x^2)$ is irreducible in $A$ and it divides $g(x,y)^r$, it must divide $g(x,y)$, and so $g(x,y) \in \mathfrak{a}$. So I have that $I(Y) = \mathfrak{a}$. [if this method is correct, it can be generalised to show that an ideal of $A$ generated by an irreducible is radical]
So elements of $A(Y)$ are of the form $p(x,y) + \langle y-x^2 \rangle$. Notice that $(x + \langle y-x^2\rangle)^2 = x^2 + \langle y-x^2 \rangle = x^2 + y - x^2 + \langle y - x^2 \rangle = y + \langle y - x^2 \rangle$. Thus $x + \langle y - x^2 \rangle$ is a generator of $A(Y)$. 
Let $\phi : A(Y) \to k[z]$ be the $k$-linear map specified by sending $x + \langle y - x^2 \rangle $ to $z$. This is an isomorphism of $k$-algebras. 

I promise I won't ask about every exercise in this book; I just want to make sure I'm approaching the topic in the right way. Obviously what appears above isn't how I'd structure a proper solution - I included my thought processes where possible in the hope that someone might tell me I'm thinking about this in the right/wrong way.
Thanks a lot.

REPLY [8 votes]: Let $K$ be a commutative ring, and let $X,Y,T$ be indeterminates. By the universal property of polynomial algebras, there are unique $K$-algebra morphisms 
$$
c:K[T]\to K[X,Y],\quad p:K[X,Y]\to K[T]
$$
satisfying
$$
c(T)=X,\quad p(X)=T,\quad p(Y)=T^2.
$$
Let 
$$
\pi:K[X,Y]\to\frac{K[X,Y]}{(Y-X^2)}
$$
be the canonical projection. We claim 
(A) $\ p$ induces a $K$-algebra morphism 
$$
\overline p:\frac{K[X,Y]}{(Y-X^2)}\to K[T],
$$
(B) $\ \overline p$ and $\pi\circ c:K[T]\to K[X,Y]/(Y-X^2)$ are inverse $K$-algebra isomorphisms.
The proof is straightforward.