Recovering a Lie algebra from its affine Lie algebra For a complex simple Lie algebra $\mathfrak g$ let $\hat{\mathfrak g}$ be its affine Lie algebra (see e.g. http://en.wikipedia.org/wiki/Affine_Lie_algebra#Definition for the definition).  Is there an intrinsic way of recovering $\mathfrak g$ from $\hat{\mathfrak g}$?  In other words, if I'm given an arbitrarily defined infinite-dimensional Lie algebra $\mathfrak h$ and I want to know if it's isomorphic to $\hat{\mathfrak g}$ for some $\mathfrak g$, is there some deterministic method of finding what $\mathfrak g$ would have to be?
Thanks!
 A: The extraction of a finite-type Lie subalgebra from an abstract affine Lie algebra is not functorial, because you have lots of automorphisms.  Even if you are given a presentation with a Dynkin diagram, the choice of which node to delete is not necessarily unique, due to the existence of diagram automorphisms: an unbounded number in type A, and just a few in the other types.  However, each affine Lie algebra corresponds to exactly one isomorphism class of finite type Lie algebra - this follows immediately from the classification theorem.
If you are given an infinite-dimensional Lie algebra over $\mathbb{C}$ that for some reason you know to be Kac-Moody, and it is presented to you in a way that makes computation of a Cartan subalgebra possible, then you immediately obtain the rank.  This is because the Cartan is unique up to linear automorphism.  Assuming you have a way to look at commutators, you can then decompose the Lie algebra into root spaces.  Choosing a suitable hyperplane yields a Dynkin diagram, and you can extract a finite type Lie algebra deterministically from the classification.
A: (Too long for a comment). This is a (vague) comment on Qiaochu Yuan's comment on whether $\widehat{\mathfrak g_1} \simeq \widehat{\mathfrak g_2}$ implies $\mathfrak g_1 \simeq \mathfrak g_2$. This is definitely true. 
The twisted case could be reduced somehow to the untwisted one, so I will deal with the latter. By taking central quotients and commutants, the question is reduced to whether isomorphism of the corresponding loop algebras -- $\mathfrak g_1 \otimes \mathbb C[t,t^{-1}] \simeq \mathfrak g_2 \otimes \mathbb C[t,t^{-1}]$ -- implies the isomorpism of the underlying simple Lie algebras $\mathfrak g_1 \simeq \mathfrak g_2$. This is true even when the algebra of Laurent polynomials $\mathbb C[t,t^{-1}]$ is replaced by an arbitrary commutative associative algebra $A$ with unit, and probably can be dealt with by looking on some invariants of loop algebars (for example, looking on the second cohomology $H^2(\mathfrak g \otimes A, \mathfrak g \otimes A)$, we can separate the case of $sl(n)$ from the other types). 
It can be dealt with, however, from a somewhat unusual viewpoint (which is probably an overkill): note that this isomorphism implies that the identities of algebras $\mathfrak g_1$ and $\mathfrak g_2$ are the same (as identities of $\mathfrak g \otimes A$ and $\mathfrak g$ are the same), and by theorem of Kushkulei and Razmyslov (see Yu.P. Razmyslov, Identities of Algebras and Their Representations, AMS, 1994 (translation from Russian), around p. 30), this implies $\mathfrak g_1 \simeq \mathfrak g_2$.
A: It's not clear exactly what "given" means here, but I assume you know the affine Dynkin diagram belonging to the given affine Lie algebra.   In that case the ordinary Dynkin diagram of the original simple finite dimensional Lie algebra is uniquely determined: this is easily seen from the classification, but might have a conceptual proof.  Thus the finite dimensional Lie algebra itself is determined,
by the classical theory.  
I'd add that the question itself seems a little artificial, since I can't imagine a situation where I'd "know" the infinite dimensional Lie algebra without having started with the finite dimensional one.   Can you elaborate?  
