Prove there exists a polynomial vanishing on all points of $X$ algebraic curve Let $X \subset \mathbb{A}^3$ be an algebraic curve and suppose $X$ does not contain a line parallel to the $z$- axis. Prove that there exists a nonzero polynomial $f(x,y)$ vanishing at all points of $X$.
I think this question requires a dimensional argument and to be more precise I was thinking of applying the following result:
If $X$ is an irreducible $n$- dimensional quasiprojective variety and $Y \subset X$ the set of zeros of $m$ forms on $X$, then every nonempty component of $Y$ has dimension $\geq n -m$.
So, in my case $X$ has dimension $n= 1$ because it is an algebraic curve, $m = 1$ and $Y$ is the set of zeros of $f$. That way, I get that every component of $Y$ has dimension $\geq 0$. So it looks like $f$ vanishes at some points of $X$ and the intersection is never empty. To prove the exercise, I should prove that $\dim Y = 1$. I don’t know how to move from here and not sure about the correctness of my reasoning until this point.
 A: Intuitively, the way one finds such a polynomial is to consider the projection of the curve $X$ on to the $xy$-plane and then find a polynomial vanishing on the image of this projection. This will be a polynomial in $x$ and $y$ which is constant along all the vertical fibers of this projection, and therefore it will vanish on $X$.
To construct such a polynomial, consider $I(X)$ and take $f_1,\cdots,f_n$ as a generating set with no $f_i \in (f_1,\cdots,f_{i-1})$. By the condition that $X$ is a curve in $\Bbb A^3$, $n$ is at least $2$ (this is the only place where the dimension is important). If either $f_1$ or $f_2$ is just a polynomial in $x$ and $y$, we we're done. Else, we can use the resultant of $f_1$ and $f_2$ with respect to $z$ to produce a polynomial in just $x$ and $y$ which vanishes everywhere $f_1$ and $f_2$ do: in particular, such a polynomial must vanish on $X$.
A: Consider the projection from $X$ to the $xOy$ plane. Set $Y=\overline{\phi(X)}$, so $\phi$ is a regular map form $X$ to $Y$. Use the assumption, the dimension of fibers can't be $1$, then it must be $0$, so ${\rm dim}Y=1$. Then the ideal of $Y$(regarded as a variety in $\mathbb{A}^2$) is $(g(x,y))$ for some polynomial. This means that $g(x,y)$ is zero on $X$ which proves the existence. And if any $f(x,y)$ is $0$ on $X$ then it is also $0$ on $Y$, and we get $g|f$.
