Prove that a non-constant rational function on a variety has an infinite image I'm trying to prove that for an (EDIT: irreducible) variety of positive dimension (or, to simplify, one-dimensional) $V \subseteq \bar K^n$, we have
$$\operatorname{trdeg}(\bar K(V) : \bar K) > 0.$$
($K$ is any field, and $\bar K$ is its algebraic closure.)
To this end, I am attempting to show that any non-constant rational function $f = \frac{g}{h} \in \bar K(V)$ has an infinite image (where it is defined): that is,
$$f[V \setminus V(h)]$$
is an infinite subset of $\bar K$. (This implies that for any $p \in \bar K[t]$, if $p(f) = 0$ then $p(f(x)) = 0$ for every $x \in V \setminus V(h)$, so then $p$ is zero at all the values in $f[V \setminus V(h)]$, which is infinite, so then $p = 0 \in \bar K[t]$; thus $f$ is transcedental over $\bar K$.) I have managed to show that $V \setminus V(h)$ is infinite, but I am struggling to think of a nice proof that this implies that $f[V \setminus V(h)]$ is likewise infinite. Intuitively, it should be true: $f[V \setminus V(h)]$ cannot be finite, because polynomials are not discontinuous.
The only rigorous proof I can think of deals with continuity of $f$ over the domain $V \setminus V(h)$, but of course this requires a topology on both $V \setminus V(h)$ and $\bar K$, which might make sense for $\bar K = \mathbb C$, but not so much for $K$ a finite field. (At least, I'm less comfortable with that.)
Is there some algebraic-geometrical proof, then, that a non-constant rational function on a positive-dimensional irreducible variety takes on infinitely many values?
Even hints are ok. I would rather completely solve this on my own, but I'm definitely stuck.
EDIT: one other thought I had was to show that $f[V \setminus V(h)]$ is cofinite in $\bar K$: there are only finitely many values that $f$ does not take on. But I don't know for sure that this is actually true...
EDIT 2: yet another thought. Maybe $f$ defines a rational map (I don't know if that is precisely the right object to consider) into $\bar K$, so then then the image of $f$ is a variety (somehow) in $\bar K$, but it has positive dimension as well? I don't know, just throwing out ideas.
 A: If not, then take the union of the pre-images of the finitely many values that said function achieves. Think about why this gives you is a contradiction.
A: Thank you everyone for your hints! This is the solution I came up with.
Suppose that $V \in \bar K^n$ is any arbitrary variety, not necessarily irreducible, and take some $f = \frac{g}{h} \in \bar K(V)$. Now consider $f$ as a map defined on $V \setminus V(h) \to \bar K$, and let $S = \text{Im}(f) = f[V \setminus V(h)]$. Then we immediately have
$$V \setminus V(h) = \bigsqcup_{v \in S} f^{-1}[v],$$
so that
$$V = (V \cap V(h)) \sqcup \bigsqcup_{v \in S} f^{-1}[v].$$
We want to show that $V$ is reducible in certain cases, but the problem is that each $f^{-1}[v]$ is not necessarily a variety, since we really have
$$f^{-1}[v] = \{p \in V \setminus V(h) : \frac{g(p)}{h(p)} = v\} = (V \setminus V(h)) \cap V(g - vh).$$
But we can write
$$f^{-1}[v] \cup (V \cap V(h)) = (V(g - vh) \cap V) \cup (V \cap V(h)),$$
and this is a variety by construction. Then we have
$$V = (V \cap V(h)) \cup \bigcup_{v \in S} (f^{-1}[v] \cup (V \cap V(h))).\ \ \ \ \ \ \ \ \text{(*)}$$
If $\left|S\right| = 1$ then $S = \{v\}$, and $f^{-1}[v] = V \setminus V(h)$, so that $f^{-1}[v] \cup (V \cap V(h)) = V$, so (*) gives us $V$ as the union
$$V = (V \cap V(h)) \cup V,$$
which does not imply reducibility of $V$, since the right variety in the union is not proper. If, however, $S$ is finite and $\left|S\right| > 1$, then each $f^{-1}[v] \cup (V \cap V(h))$ is a proper subvariety of $V$, and so is $V \cap V(h))$ (which I have proved separately, by showing that $\dim(V \cap V(h)) < \dim(V)$). Then since $S$ is finite we have written $V$ as a finite union of proper subvarieties in (*), so $V$ is reducible.
Thus if $f[V \setminus V(h)]$ is finite and has at least two members, then $V$ is reducible. Taking the contrapositive, if $V$ is irreducible then $f[V \setminus V(h)]$ has either one member, or is infinite, which is equivalent to saying that $f$ is either constant or has an infinite image.
