TITLE: How is this observation related to Koszul duality?
QUESTION [5 upvotes]: Let $X$ be a smooth variety, $\mathcal D$ the sheaf of algebraic differentail operators, $\Omega$ the algebraic deRham complex and $\mathcal M$ a quasi coherent $\mathcal O_X$-module. 
Now there is a bijection between $\mathcal D$-module structures on $\mathcal M$ and $\Omega$ dg-module structures on $\Omega \otimes_{\mathcal O_X} \mathcal M$. 
For example given a $\mathcal D$-module structure on $\mathcal M$ we can define the corresponding differential by imposing the rule $d(m)(X)=X.m$ on $\Omega\otimes_{\mathcal O_X} \mathcal M$. (X denotes a vectorfield and $m$ a local section of $\mathcal M$.
A similar statement holds if one takes instead $\mathcal D=U(\mathfrak g)$ the universal envelope of a Lie-algebra and $\Omega=\bigwedge \mathfrak g^*$ the standard complex.
Now in both of there cases $\mathcal D$ and $\Omega$ are Koszul-dual, meaning that there are equivalences between carefully defined versions of their "derived categories".
Yet formulations of Koszul duality I am aware of, seem not to extend the above correspondence. Roughly speaking they are $\mathcal M \mapsto Hom(\Omega, \mathcal M)$ instead of $\mathcal M \mapsto \Omega \otimes \mathcal M$. 
So my questions are: 
What does the above observation have to do with Kosul duality?
Is there a formulation of Koszul duality extending the above correspondence?

REPLY [7 votes]: There are, basically, two answers to your question that I am aware of.
The first one amounts to saying that there is no difference between tensoring with $\Omega$ and taking $Hom$ from $\Omega$.  More precisely, the difference between these things corresponds to the difference between the left and right $\mathcal D$-modules: the former are supposed to be tensored with $\Omega$, while for the latter one takes $Hom$ from $\Omega$.  Indeed, the $\mathcal O$-algebra $\Omega$ being Frobenius, tensoring with it only differs from taking the $Hom$ from it by the twist with the line bundle of top forms and the homological shift. This twist just transforms left $\mathcal D$-modules into right $\mathcal D$-modules.  The three functors form a commutative triangle (up to the shift).
Similarly, if your Lie algebra $\mathfrak g$ is finite-dimensional, tensoring $\mathfrak g$-modules with the cohomological or the homological standard complex of $\mathfrak g$ is almost the same functor, the twist with the one-dimensional $\mathfrak g$-module of top exterior forms on $\mathfrak g$ and the homological shift being the only difference between the two.
The second answer purports to construct the kind of duality that you are looking for in the more general situations when $\Omega$ is no longer Frobenius.  The first question that you can ask yourself in this case is, what would be the functor in the opposite direction, i.e., the adjoint functor to tensoring with $\Omega$ over $\mathcal O$?  The answer is, it is the functor $Hom_{\mathcal O}(\mathcal D,{-})$.
The latter functor looks somewhat problematic when the variety $X$ is not affine, as the internal $Hom$ from a noncoherent quasi-coherent sheaf may be not a well-behaved operation.  Perhaps this problem can be dealt with, but at the moment I do not know how to do it.
When $X$ is affine, however, the theory of derived $D$-$\Omega$ duality for the functors $\Omega\otimes_{\mathcal O}{-}$ and $Hom_{\mathcal O}(\mathcal D,{-})$ is developed in Appendix B to my AMS Memoir "Two kinds of derived categories, Koszul duality, and comodule-contramodule correspondence", http://arxiv.org/abs/0905.2621.  In the case of a (possibly infinite-dimensional) Lie algebra $\mathfrak g$, this is done in Section 6.6 of the same paper.
Basically, you want to look on the module-contramodule side of the commutative triangle of "Koszul triality", as presented in my paper.  In particular, the appropriate category of $\Omega$-modules that you want to consider (when $\Omega$ is infinite-dimensional, e.g., $\Omega=\bigwedge\mathfrak g^\ast$ and $\mathfrak g$ is infinite-dimensional) is that of contramodules (modules with the infinite summation operations).  And the appropriate version of the derived category of $\Omega$-modules is the contraderived category.