Characterization of transcendental elements in algebraic function fields I would like to prove this equivalence:

Let $F|K$ be an algebraic function field. Then $z \in F$ is transcendental over $K$ if and only if $[F:K(z)] < \infty$. (This statement is Remark 1.1.2 from Stichtenoth, Algebraic Function Fields and Codes.)

If $z \in F$ is transcendent, then from $a_n z^n + \cdots + a_1 z + a_0 = 0$, $a_i \in K$, it follows that $a_i = 0$, $i=1,\ldots,n$. So with this it should be possible to construct a finite basis of $F$ as a $K(z)$-vector space. But I don't know how.
And if $B = \{f_1,\ldots,f_n\}$ is a finite basis of $F$ as a $K(z)$-vector space I don't know how to deduce an equation like above for $z$.
I would be thankful for any kind of help.
 A: By definition $F$ is finite extension of $K(X)$. Now take $z\in F$. We have a tower of extensions $K\subset K(z)\subset F$. 
Assume that $z$ is algebraic over $K$, that is, $[K(z):K]<\infty$. If $[F:K(z)]<\infty,$ then $[F:K]<\infty$, so $[K(X):K]<\infty$, a contradiction. 
Conversely, assume that $z$ is transcendental over $K$. We know that $z$ is algebraic over $K(X)$. This means that there exist an integer $m\ge 1$ and $a_0(X),a_1(X),\dots,a_m(X)\in K[X]$, $a_m(X)\neq 0$, such that $a_m(X)z^m+\cdots+a_1(X)z+a_0(X)=0$. Since $z$ is transcendental over $K$ not all $a_i(X)\in K$. Now rewrite $a_m(X)z^m+\cdots+a_1(X)z+a_0(X)$ as a non-zero polynomial in $X$ with coefficients in $K(z)$ proving in this way that $X$ is algebraic over $K(z)$. (The coefficient of $X^t$, with $t$ maximal, in $a_m(X)z^m+\cdots+a_1(X)z+a_0(X)$ can't be $0$, otherwise $z$ would be algebraic over $K$ which is impossible.) Then $[K(X,z):K(z)]<\infty$ and since $[F:K(X,z)]<\infty$ we get $[F:K(z)]<\infty$.
Remark. Maybe I've missed something as long as the proof of this characterization is considered in Stichtenoth's book as being trivial.
