TITLE: Is it true that if the pushforward of a coherent sheaf is locally free, then the original sheaf is locally free?
QUESTION [11 upvotes]: I think the title says it all.  If I have a finite map $p:X\to Y$ between schemes, and $F$ is a coherent sheaf on $X$ such that $p_*F$ is locally free, can I conclude that $F$ is locally free?
Assumptions I would be happy to make:

The map $p$ is flat.
$X$ and $Y$ are both $\mathbb{A}^n$.


I would be much more pleased with a reference than a proof, since I would like to use this result in a paper.

REPLY [8 votes]: Since you asked for reference, here are some references that may be helpful  (the question is local):
1) (EDITED: Thanks to BCnrd for keeping me honest here!) If $(R,m)\to (S,n)$ is a map of  Cohen-Macaulay local rings of same dimensions, $N$ a finite $S$-module which is $R$-free flat then $${\rm{depth}}_ S N ={\rm{depth}} R = {\rm{depth}} S.$$
This follows from Prop 1.2.16 and Theorem A.11 of Bruns-Herzog "Cohen-Macaulay rings". Namely, take $M=R$ in both results, one get from A.11 that $\dim_SN = \dim_RN + \dim_SN/mN$, so $\dim_SN/mN=0$, then 1.2.16 gives  ${\rm{depth}}_SN = {\rm{depth}} R$.
2) If $S$ is regular, then f.g modules with maximal depth are free.
This is well-known. It follows from Auslander-Buchsbaum formula, as Boyarsky pointed out.
EDIT: Just to be clear, it is enought to assume: $f$ is finite, $X$ regular, and $Y$ Cohen-Macaulay scheme (certainly true if $Y$ also regular or smooth, but is a much weaker condition). For example the map induced by $k[x,y]/(xy) \to k[x]$ by killing $y$ works.