Prime ideals of the ring $\Bbb C[x,y]$, proof given in Vakil's book.

I am reading Vakil's Algebraic Geometry lecture note, and the following is the proof of the statement that any non-principal prime ideal of $$\Bbb C[x,y]$$ is of the form $$(x-a,y-b)$$ for some $$a,b\in \Bbb C$$.

Suppose $$\mathfrak{p}$$ is a prime ideal that is not principal. Then we can find $$f,g\in \mathfrak{p}$$ with no common factor. By considering the Euclidean algorithm in $$\Bbb C(x)[y]$$, we can find a nonzero $$h(x)\in (f,g)\subset \mathfrak{p}$$. Since $$\mathfrak{p}$$ is prime, one of the linear factors of $$h(x)$$, say $$x-a$$, is in $$\mathfrak{p}$$. Similarly $$y-b\in \mathfrak{p}$$ for some $$b\in \Bbb C$$.

My question is: how can we find such $$h(x)$$ using Euclidean algorithm?

Note that $$\Bbb{C}(x)[y]$$ is a PID and gcd$$(f,g)=1$$, by Bezout identity (or Euclidean algorithm), there are $$a',b'\in \Bbb{C}(x)[y]$$ such that $$a'f+b'g=1$$. Now we can find some $$h\in \Bbb{C}[x]$$ such that $$a=a'h$$ and $$b=b'h$$ are in $$\Bbb{C}[x][y]=\Bbb{C}[x,y]$$. Therefore, $$af+bg=(a'h)f+(b'h)g=h(a'f+b'g)=h,$$ i.e., $$h\in (f,g)$$.
The Euclidean algorithm allows you to write $$f=pg+h$$ where $$h$$ is non-zero, so $$h=f-pg$$ is the desired item.
• How do we know that $h\in \Bbb C[x]$? Commented Mar 27, 2021 at 11:33