# Morphisms, inducing isomorphisms on global functions

Let $f:X\to Y$ be a surjective morphism of complex varieties with $Y$ affine. Assume that every fiber of this morphism has the property that all the global functions are constant.

What else do I need to assume to conclude that $f$ induces an isomorphism on global functions? Does it enough to assume that $Y$ is smooth in codimension 1?

-
Do you assume the fibres are reduced? Without this the condition that $Y$ is smooth in codimension $1$ is not enough. – ulrich Oct 5 '11 at 4:23
Do you have a counterexample in mind? – Roman Fedorov Oct 5 '11 at 4:38
Yes. Let $A=k[x,y]$, $I$ the ideal $(x,y)^2$ and $B$ the subalgebra of $A$ generated by $I$. Let $X=Spec(A)$, $Y = Spec(B)$ and $f$ the morphism induced by the inclusion $B \subset A$.Then $Y$ is smooth in codimension $1$ and$f$ is a bijection on points so your condition is satisfied. – ulrich 0 secs ago – ulrich Oct 5 '11 at 5:06
Of course you are right. But I would expect that there is some sufficient condition on $Y$ like being Cohen-Macaulay? – Roman Fedorov Oct 5 '11 at 16:19