Projective modules restricted to smooth curves I asked this question on Stack Exchange, but no one answered this.
I want to prove a coherent sheaf $M$ on $X$ is locally free if and only if this is true for $M|_{X'}$ ,
for all smooth curves $X'$ mapping to $X$. I think the only if direction is obvious. For the if direction, a coherent module is flat if and only if it is projective, for Dedekind domains if and only if torsion free as well. So I am thinking of using Tor$_1$. There is local criterion for flatness, but I am not sure if this will help.
This is used at the beginning of the proof of Proposition 5.13 of Gaitsgory's lecture notes.
 A: Assume that $X$ is integral and smooth (as in Gaitsgory's notes). For any two points $x,y$ in $X$, there is a smooth connected curve $C$ passing through $x$ and $y$. Since $M_{|C}$ is locally free, this implies $\dim M_x/\mathfrak{m}_xM_x=\dim M_y/\mathfrak{m}_yM_y$, where  $\mathfrak{m}_x$ is the maximal ideal of $\mathscr{O}_{X,x}$. But this implies that $M$ is locally free.
A: In Borel's book "Algebraic D-modules" the the following result is proved:
Propositon VI.1.7 If $M$ is a $D_X$-module that is coherent as $\mathcal{O}_X$-module, then $M$ is locally free.
Question. "This is used at the beginning of the proof of Proposition 5.13 of Gaitsgory's lecture notes."
Answer: If you are interested in an alternative proof  of the proof of Gaitsgory's Proposition 5.13 you do not need the connection to be flat for the result to hold. Hence if $X$ is a regular scheme of finite type over a field $k$ of characteristic zero and if $M$ is a coherent $\mathcal{O}_X$-module with a connection
$$\nabla: M\rightarrow M\otimes \Omega^1 $$
then $M$ is locally free. The proof is given in the book and does not use curves.
