Here is my question: how to define global section functor from D-module on affine flag variety to representation of affine Lie algebra?


Let's me explain the difficulty: it seems there doesn't exist global definition of D-module on ind-scheme. For affine flag variety, it is a union of finite dimensional subvarieties, and usually we can't make them smooth. We should think of a D-module on a singular variety as a usual D-module on big smooth space which supports on this singular variety. On the other hand, the global sections of D-module depends on the embedding of singular variety to the other smooth One. 


I really don't know how to think of global section functor of D-module on affine flag variety, so I don't know how to formulate the localization theorem.


Maybe I should look at Frenkel-Gaitsgory's paper, but I'm afraid it is a question before reading their papers.


Moreover, I would like to know what is the status of localization theorem for affine Lie algebra?
1. at Critical level
2. at noncritical level



About localization theorem for affine Lie algebra?
The main problem seems to be that you think the global section functor for (twisted) D-modules on a singular variety depends on a choice of embedding into a smooth variety. This is not true - D-modules can be defined on singular spaces using the infinitesimal site, and you can define global sections without any choice of embedding. Beilinson and Drinfeld describe the characteristic zero theory in section 7.10 of their unfinished book on Hitchin's integrable system, available from [this page](http://www.math.harvard.edu/~gaitsgde/grad_2009/)


Also, here are [notes on D-modules on ind-schemes](http://www.math.harvard.edu/~gaitsgde/grad_2009/SeminarNotes/Apr15%28LimsofCats%29.pdf), from Dennis Gaitsgory's seminar.


The derived global section functor used in localization is constructed in section 23.5 of the [Frenkel-Gaitsgory paper](http://arxiv.org/abs/0712.0788). If you read the introduction of the paper, you will find a statement of their results, and you will find a claim that much less is known away from the critical level.


