Surjective+finite-type+quasi-finite doesn't imply finite

Exercise II.3.5 (c) in Hartshorne, Algebraic Geometry, asks to find an example of a surjective, finite-type and quasi-finite morphism of schemes which is not finite.

I need to find a finitely generated $A$-algebra $B$ which is not finite generated as an $A$-module. The only examples, I could find, of such a kind of $B$ give rise to a morphism which is not quasi-finite. Basically I was trying to use some modification of the classic $B=\mathbb{C}[x]$. I have also thought to find a morphism which is not closed, since we know that a finite morphism is always closed, but even this way didn't lead me anywhere.

Do you have any suggestion?

P.S.: $f$ quasi-finite means that $f^{-1}(y)$ is a finite set for every point $y\in Y$.

MOREOVER: while thinking at this example, I asked another question to myself. Which is a quasi-finite morphism which is not of finite-type?

Thank you very much!

• Hint: have you looked at the previous exercise? Is there some way you could mess with this to get something which satisfies your goals? – KReiser Sep 24 '15 at 16:09
• @KReiser, thank you for your reply. Do you mean the exercise characterizing finite morphisms or the one stating that a finite morphism is closed? In the first case I cannot see any way to mess anything and in the second case I have actually tried, but the only example I could found was not surjective. – A. Prufrock Sep 24 '15 at 16:41
• I mean exercise II.3.4, which asks you to prove that $f:X\to Y$ is finite iff for every open affine $\mathrm{Spec} B = V\subset Y$, $f^{-1}(V)$ is affine and Spec of some finite $B$-module. What conditions can you violate about this statement? – KReiser Sep 24 '15 at 16:53
• Just a cultural note: often finite type is part of the definition of quasifinite, in order to make the concept stable under base change. With these definitions stuff like $k \subset k(x)$ won't count. – Hoot Sep 24 '15 at 17:05
• For the problem: could you do it without the surjectivity requirement? We can probably cheat to get around that. The target being the affine line could certainly work. – Hoot Sep 24 '15 at 17:07

The example given, $Y=\mathbf A^1_k$ for $k$ any field, $X=A\sqcup B$ for $A=\operatorname{Spec} k[x,y]/(xy-1)$, $B=\{\ast\}=\operatorname{Spec} k$, is valid. Here the map $f:X\rightarrow Y$ is induced by the map $\varphi:k[x]\rightarrow\Gamma(X,\mathscr O_X)=\Gamma(A\sqcup B,\mathscr O_A\times\mathscr O_B)\cong k[x,y]/(xy-1)\times k$, which is in turn induced by the universal property of the product by the maps $k[x]\rightarrow k[x,y]/(xy-1)$, $k[x]\rightarrow k$. It is obviously quasi-finite; it is of finite type since $X=A\sqcup B$ is a cover of $X$ by open affines and $Y$ is itself affine. Surjectivity of closed points is obvious. Finally, if $\eta$ is the generic point of $A$, and $\xi$ is the generic point of $Y$, then we ask what is $f(\eta)$. If $\mathfrak m\subset\mathscr O_{X,\eta}$ is the maximal ideal of the stalk, and $p_\eta:\Gamma(X,\mathscr O_X)$ is the map into the stalk, then $f(\eta)$ is the point in $Y$ corresponding to $\varphi^{-1}p_\eta^{-1}(\mathfrak m)$. But now $$\mathscr O_{X,\eta}\cong (k[x,y]/(xy-1)\times k)_{(0,k)}\cong (k[x,y]/(xy-1))_{(0)}=k(x)$$ with $\mathfrak m=(0)$ in that ring, so $f(\eta)$ corresponds to $\varphi^{-1}((0,k))=(0)$.
A note about looking for an affine example $f:\operatorname{Spec} A\rightarrow\operatorname{Spec} B$. Identifying $B$ with its image we may assume $B\subset A$, $A$ f.g. over $B$ (finite type) satisfying lying over (surjectivity) but with only finitely many primes lying over a given $\mathfrak p\in\operatorname{Spec} B$. Localizing at the multiplicatively closed set $U:=B-\mathfrak p$, and quotienting by $\mathfrak p_{\mathfrak p}$, we may be tempted to assume $B_{\mathfrak p}/\mathfrak p_{\mathfrak p}$ is a field $k$ (certainly the localization induces a bijection between the primes of $A$ lying over $\mathfrak p$ and primes of $A[U^{-1}]/\mathfrak p A[U^{-1}]$). But it is possible that while $A$ is not finite over $B$, $A[U^{-1}]$ is finite over $B[U^{-1}]$, so we cannot naïvely reduce to this case. But if we go ahead and ask for a finitely-generated $k$-algebra $A$ with finitely many primes which is not finite dimensional as a $k$-vector space, we run into problems. In particular, by the general form of the Nullstellensatz, $A$ is a Jacobson ring. (By the basis theorem it is Noetherian.) A Noetherian ring $R$ is Jacobson iff for every $\mathfrak p\in\operatorname{Spec} R$ such that $R/\mathfrak p$ is 1-dimensional, $R/\mathfrak p$ has infinitely many maximal ideals. Since $\operatorname{Spec} A$ is finite by assumption, this implies $A$ must have dimension zero; i.e. all primes are maximal. Hence $A$ is Artinian and finite-dimensional over $k$; i.e. $f$ is a finite morphism of schemes.