One-to-one homomorphism $f: F\to F$ which is not onto? The following question comes from a past qualifying exam:

What is an example of a ring homomorphism $f: F\to F$ such that $f$ is
  one-to-one but not onto? (Here $F$ is assumed to be a field.) 

Clearly, $F$ cannot be a finite field. Also, $F\neq\mathbb{Q}$, since every ring homomorphism $\mathbb{Q}\to\mathbb{Q}$ is the identity map. Would a function field $F=K(t)$ work as an example? Let $\mathbb{F}_2$ be the field with two elements. I thought of the following map
$$\psi: \mathbb{F}_2(t)\to \mathbb{F}_2(t) $$
where $\psi(x)=x^2$ for all $x\in \mathbb{F}_2(t)$. Let's check: $\psi(x+y)=(x+y)^2=x^2+y^2=\psi(x)+\psi(y)$, so $\psi$ is additive. Now $\psi(xy)=(xy)^2=x^2y^2=\psi(x)\psi(y)$. And $f(1)=1$. Clearly $f$ is not onto; and $f$ is one-to-one because its kernel cannot be whole of $\mathbb{F}_2(t)$, so it needs to be $(0)$. Have I got it right?
Thanks & Merry Christmas!
 A: The example is good, but there are simpler examples; consider a field $F$ and the map $f\colon F[t]\to F[t]$ given by
$$
f(a)=a\quad(a\in F),\quad f(t)=t^2
$$
so $f(p(t))=p(t^2)$. Then $f$ is a non surjective, but injective, ring homomorphism. Then we can extend $f$ to a homomorphism
$$
\tilde{f}\colon F(t)\to F(t)
$$
by
$$
\tilde{f}\left(\frac{p(t)}{q(t)}\right)=\frac{f(p(t))}{f(q(t))}=\frac{p(t^2)}{q(t^2)}.
$$
This is again a ring homomorphism, which is not surjective, because
$$
t\ne\frac{p(t^2)}{q(t^2)}
$$
because $tq(t^2)$ has odd degree, while $p(t^2)$ has even degree.
A: Yes your example is correct. In fact, you chose the so-called Frobenius-endomorphism. It is onto iff the field is perfect, which $\Bbb F(t)$ is not.
A slightly easier example may be the Frobenius-endomorphism $\Bbb F[t] \rightarrow \Bbb F[t]$.
A: Let $\{p_k\}_{k\in\mathbb N}$ be the prime numbers. $R_1$ be the ring (extension of $\mathbb Q$) spanned by $\{\sqrt{p_k}\}_{k\in\mathbb N}$ and $R_2$ be the ring spanned by $\{\sqrt{p_{2k}}\}_{k\in\mathbb N}$. Clearly, $R_2$ is a genuine subring of $R_1$. Then the homomorphism $\varphi : R_1\to R_1$, which is defined by $\varphi(\sqrt{p_{k}})=\sqrt{p_{2k}}$, is 1-1 but its range in $R_2$.
