# Flat sheaves over a non-flat base $X \rightarrow Y$

I have a relatively naive question. Suppose that $f: X \rightarrow Y$ is a map of schemes. Then, we get a map of local rings $\mathcal{O}_{Y,f(x)} \rightarrow \mathcal{O}_{X,x}$ and thus for any sheaf $F$ on $X$ we can say that $F$ is flat over $Y$ if the stalk $F_x$ is flat as a $\mathcal{O}_{Y,f(x)}$-module. This notion is important, for example, because it is a prerequisite for applying many theorems of the form "If $F$ is flat over $Y$ and (hypothesis) then $f_*F$ is locally free on $Y$".

I would like an example of a sheaf $F$ which is flat on $X$ and still flat over $Y$ when $f$ is not flat, if such an example exists. If no such example exists, why not?

Bonus points if addressing the specific situation where $f$ is proper and birational (e.g. $X$ is a blow-up of $Y$).

Notice that if $G$ is locally free on $Y$ then $F = f^*G$ will be locally free on $X$ but will be flat over $Y$ if only if $f$ is flat so an example will not arise this way.

-
You mean if $F$ is flat over $X$, then $f_*F$ is... –  Ehsan M. Kermani Jul 30 '12 at 20:51
The zero sheaf is a trivial example... –  Zhen Lin Jul 31 '12 at 1:02

I guess your $F$ is a sheaf of modules on $X$. When $X$ and $Y$ are both integral and $f$ is dominant, then the constant sheaf of rational functions on $X$ is flat on $X$ and $Y$.
If you want an example with coherent sheaves, it is harder because of the following property: if $B$ is an $A$-algebra and $M$ is a faithfully flat $B$-module, then $M$ is flat over $A$ if and only if $B$ is flat over $A$. (The proof is straightforward). If $F$ is coherent, non zero, and flat over $X$ with $X$ irreducible, then the support of $F$ is equal to $X$, hence for any affine open subscheme $U$ of $X$, $F(U)$ is faithfully flat over $O_X(U)$. So $F$ flat over $Y$ implies that $X\to Y$ is flat.
A counterexample when $X$ is not irreducible (and $F\ne 0$): let $Y$ be the disjoint union of two integral affine schemes $U, V$ of positive dimension, let $X$ be the union of $U$ and a closed point of $V$ et let $G$ be $O_Y$ on $U$ and $0$ on $V$, let $F$ be the pull-back of $G$ to $X$. Then $F$ is flat over $X, Y$ but $X\to Y$ is not flat.