Let $M$ be a filtered module over a filtered algebra $A$, and suppose $gr(M)$ is flat over $gr(A)$, where $gr$ means the associated graded module and algebra, respectively.


What can one say in general about the flatness of $M$ over $A$, or with relevant assumptions (for instance in the above, we should assume both filtrations are complete to avoid dumb counterexamples)? Are there good references for this sort of question? I have played with the various definitions of flatness trying to find an obvious relationship, but I find flatness proofs confusing.


The particular examples I have in mind are comparing $U(\mathfrak{g})$-modules to $S(\mathfrak{g})$-modules, and $D(X)$-modules to $O(T^\*X)$-modules for affine varieties $X$, if it helps. I suspect the answer doesn't depend on any of the details though.



Associated graded and flatness
Let me suppose, as in your examples, that we have a base field $k$.


It is well known that to check that a right $A$-module $M$ is flat it is enough to show that whenever $I\leq\_\ell A$ is a left ideal, the map $M\otimes\_AI\to M\otimes\_A A$ induced by the inclusion $I\to A$ is injective. This condition can be rewritten: $M$ is flat iff for each left ideal $I\leq\_\ell A$ we have $\mathrm{Tor}^A\_1(M,A/I)=0$.


So now suppose $A$ and $M$ are (exhaustively, separatedly, increasingly from zero) filtered in such a way that $\mathrm{gr}M$ is a flat $\mathrm{gr}A$-module. 


Pick a left ideal $I\leq\_\ell A$; notice that the filtration on $A$ induces a filtration on the quotient $A/I$. We can compute $\mathrm{Tor}^A\_\bullet(M,A/I)$ as the homology of the homologically graded complex $$\cdots\to M\otimes\_kA^{\otimes\_kp}\otimes\_kA/I\to M\otimes\_kA^{\otimes\_k(p-1)}\otimes\_kA/I\to\cdots$$ with certain differentials whose formula does not fit in this margin, coming from the bar resolution. Now the filtrations on $M$, on $A$ and on $A/I$ all collaborate to provide a filtration of our complex. We've gotten ourselves a positively homologicaly graded with a canonically bounded below, increasing, exhaustive and separated filtration. The corresponding spectral sequence then converges, and its limit is $\mathrm{Tor}^A\_\bullet(M,A/I)$. Its $E^0$ term is the complex
$$\cdots\to\mathrm{gr}M\otimes\_k\mathrm{gr}A^{\otimes\_kp}\otimes\_k\mathrm{gr}(A/I)\to \mathrm{gr}M\otimes\_k\mathrm{gr}A^{\otimes\_k(p-1)}\otimes\_k\mathrm{gr}(A/I)\to\cdots$$
with, again, the bar differential, and its homology, which is the $E^1$ page of the spectral sequence, is then precisely $\mathrm{Tor}^{\mathrm{gr}A}\_\bullet(\mathrm{gr}M,\mathrm{gr}(A/I))$. Since we are assuming that $\mathrm{gr}M$ is $\mathrm{gr}A$-flat, this last $\mathrm{Tor}$ vanishes in positive degrees, so the limit of the spectral sequence also vanishes in positive degrees. In particular, $\mathrm{Tor}^A\_1(M,A/I)=0$.


**NB:** As Victor observed above in a comment, Bjork's *Rings of differential operators* proves in its Proposition 3.12 that $\mathrm{w.dim}\_AM\leq\mathrm{w.dim}\_{\mathrm{gr}A}\mathrm{gr}M$ (here $\mathrm{w.dim}$ is the *flat dimension*) from which it follows at once that $M$ is flat as soon as $\mathrm{gr}M$ is; the argument given is essentialy the same one as mine. I am very suprised about not having found this result in McConnell and Robson's!


