I'm having difficulties with an exercise from Liu's book, on exercise 5.3.12. In particular I'd like to show that if $f:X\to Y$ is a proper morphism of schemes with every fiber $X_y$ geometrically integral the $f_*O_X \simeq O_Y$.
One is obviously reduced to proving the case when $Y$ is affine, of ring $A$. Then $\Gamma(X, O_X)=B$ is a finite $A$-algebra with the property that for each prime ideal $\mathfrak{p}$ of $A$ then $B\otimes k(\mathfrak{p})\simeq k(\mathfrak{p})$ by the geometrically integral hypothesis. How does one deduce from this that $A\simeq B$? I wanted to use the upper semi continuity theorem but that's hopeless since nothing guarantees that $B$ is flat over $A$.
The lack of flatness got me confused also... if $f$ is a closed immersion, then it is certainly not true that $f_*O_X\simeq O_Y$, but maybe empty fibers arent considered geometrically integral... after all the $0$ ring, isn't integral.
Consider the cokernel $M$ of the inclusion $A \subset B$, i.e. we have a short exact sequence of $A$-modules $$0 \to A \to B \to M \to 0.$$ Since tensor product is right exact, $M \otimes k(\mathfrak p) = 0$ for all $\mathfrak p \in A$. So by Nakayama, the localizations $M_{\mathfrak p}$ vanish for all $\mathfrak p$, hence $M = 0$.