is the pushforward of a flat sheaf flat?

Let $f:X \to Y$ be a morphism of schemes and let $F$ be an $\mathcal{O}_X$-module flat over $Y$. Is $f_*F$ flat over $Y$?

What's wrong with this argument? [EDIT: as Parsa points out, the (underived) projection formula does not hold for arbitrary modules on Y]

Let $N' \to N$ be an injection of modules over $Y$, we need to show that $f_*F \otimes N' \to f_*F \otimes N$ is an injection. By the projection formula $f_* F \otimes M = f_*(F \otimes f^*M)$. Using this we see $f_* F \otimes N' \to f_*F \otimes N = f_*(F \otimes f^*N' \to F \otimes f^*N)$ (the pushforward of the morphism, right?). Flatness of $F$ implies (right?) $F \otimes f^*N' \to F \otimes f^*N$ is injective. By left-exactness of $f_*$ we are done.

[EDIT: what is a counterexample then?]

[EDITT: this is clearly false, otherwise theorems about the semicontinuity of the cohomology of the fibres wouldn't be meaningful. It would be nice to have a simple counterexample though, anyone?]

-
Did you mean to ask a question about $\mathscr{O}_X$-modules or quasicoherent sheaves? –  Zhen Lin Apr 19 '12 at 11:30
well, I'm only interested in quasi-coherent ones, but does it make a difference? what would fail? –  Jacob Bell Apr 19 '12 at 11:32
(in general the pushforward of a quasi-coherent sheaf may not be quasi-coherent, that's probably why I never the qC word. but you can assume f to be quasi-compact if you want) –  Jacob Bell Apr 19 '12 at 11:33
Just asking, because you tagged the question as quasicoherent-sheaves. Your argument seems to be correct. –  Zhen Lin Apr 19 '12 at 11:41
The projection formula only holds for locally free modules. –  Parsa Apr 19 '12 at 11:54
show 1 more comment

Consider an integral surface $Y=\mathrm{Spec} A$ with a single non-normal point $y_0$. Let $\pi : Y'=\mathrm{Spec} B\to Y$ be the normalization map and let $X=Y'\setminus \pi^{-1}(y_0)$. Then $f: X\to Y$ is an open immerison, so $O_X$ is flat over $Y$. But $f_*O_X=O_X(X)=B$ because $B$ is normal and $Y'\setminus X$ has codimension $2$ in $Y'$. As $A\to B$ is birational (and even finite), if it were flat it would be an isomorphism. Thus $f_*O_X$ is not flat over $Y$.

Below is a concrete example. Let $B=\mathbb C[x,y]$ and let $A=\mathbb C+ (x,y)^2\mathbb C[x,y]$. Then $\mathrm{Spec}(B)\to \mathrm{Spec}(A)$ is finite birational, and $(0,0)$ is the only point where the morphism is not an isomorphism. In this example, a direct computation already shows that $B=O_X(X)$.

-
Why if $A \to B$ is birational, then the flatness implies the isomorphism? And what do you mean by $A = \mathbb{C} + (x,y)^2 \mathbb{C}[x,y]$? –  Li Yutong Feb 3 at 22:51