Is there a computer algebra system that is able to compute the Lie algebra cohomology in a given representation? What if the Lie algebra is finite dimensional? In my case I would like to be able to compute the cohomology in the following situation: let $\mathfrak{g}\subset \mathfrak{h}$ be an inclusion of finite dimensional complex Lie albebras, I'd like to compute the cohomology of $Hom(\mathfrak{g}, \mathfrak{h}/\mathfrak{g})$.

1$\begingroup$ You might try LiE wwwmath.univpoitiers.fr/~maavl/LiE although it looks like it only does stuff about reductive groups. For fixed finitedimensional algebra and fixed finitedimensional representation, I'm sure Mathematica can handle it. $\endgroup$ – Theo JohnsonFreyd Oct 26 '10 at 16:55

1$\begingroup$ Although LiE is a great package, it does not do Lie algebra cohomology. $\endgroup$ – Chuck Hague Oct 27 '10 at 15:33
I have looked at this question a few years ago (with some more recent sporadic gilmpses), so I am definitely not uptodate. Here it goes, anyway, what I have learned back then:
GAP.
GAP is a wonderful tool, but I would not call its cohomology computation capabilities efficient. As far I understand, it implements a straightfoward approach by constructing appropriate matrices and solve a linear algebra problem. One sees easily how the matrix size grows prohibitively with the dimension of an algebra. Seems to be not suitable for anything beyond "toy" problems.Mathematica.
Mathematicabased package "SuperLie" for computations in Lie (super)algebras, including cohomology, written by Pavel Grozman and used by Dimitry Leites and his collaborators in their recent papers (see arXiv): http://www.equaonline.com/math/SuperLie/ . Seems to have a very steep learning curve but looks quite impressive. Seems to outperform GAP, but how far  I don't know.C.
There is program (constantly evolving as far I understand) for computations of cohomology of Lie (super)algebras by Vladimir Kornyak (see arXiv). He is doing things beyond straightforward linear algebra approach  for example, he tries to split the cochain complex to smaller subcomplexes and perform reduction modulo an appropriate prime (in the case of zero characteristic). Seems to be comparable with "SuperLie" (as far as cohomology is concerned). It is written in plain C and does not have overheads of computer algebra systems. Unfortunately, Kornyak does not disclose (at least publically) sources or even binaries.REDUCE.
N. v.d Hijligenberg and G. Post, Computation by computer of Lie superalgebra homology and cohomology, Acta Appl. Math. 41 (1995), 123134 http://dx.doi.org/10.1007/BF00996108  haven't looked at it.LiE
J. Silhan, Algorithmic computations of Lie algebras cohomologies, Proceedings of the 22nd Winter School ``Geometry and Physics'', Rend. Circ. Mat. Palermo Suppl. No. 71 (2003), 191197 http://dml.cz/handle/10338.dmlcz/701718 . A more specific program, implemented in LiE, for computation of cohomology of parabolic subalgebras of classical Lie algebras and related, basing on celebrated Kostant's work. Haven't looked at it thoroughly.Magma.
I never bothered with this commercial package which seems to be comparable with GAP.?
D.V. Reshetnikov, Computation of cohomology groups of the Lie algebras of type $B_n$ and $C_n$, Russian Math. (Izv. VUZ) 53 (2009), N8, 5859 http://dx.doi.org/10.3103/S1066369X0908009X . Here the author reports (quite uselessly, I should admit, as no further details are given) about a program for computation of Lie algebra cohomology developed by him.
I personally think that there is a big unexplored area here  one should use heavily sparsity of occuring matrices (currently none of the programs described above seems to use it). Which kind of sparsity it is, is not clear apriori, and, moreover, I suspect that for different algebras and modules one will have different kinds of sparsity. This makes an interesting connection with methods and tricks from numerical linear algebra.
Again, take all this with a grain of salt, as things may have changed since I looked at them.
In the Maple computer algebra system you have the package LieAlgebraCohomology which should do what you want.

$\begingroup$ If I'm not wrong, maple can only compute the cohomology of $\mathfrak{g}$ in a Lie subalgebra, not in any representation. $\endgroup$ – Michele Torielli Oct 28 '10 at 15:22

$\begingroup$ @Michele: this depends on the version of Maple. At least they claim that Maple 12 can compute the Lie algebra cohomology with coefficients in a representation: maplesoft.com/view.aspx?SF=5898/M12WhatsNewPro.pdf $\endgroup$ – mathphysicist Oct 29 '10 at 19:35

$\begingroup$ yes, I agree with you but when you open the description of the command LieALgebra Cohomology it seems that it can compute only if the representation is a Lie subalgebra. Thank you for the replay. $\endgroup$ – Michele Torielli Oct 30 '10 at 8:34

$\begingroup$ @MicheleTorielli In Maple, can the coefficients of the Lie algebra be Integers $\mathbb{Z}$, so that cohomology is of the form $\mathbb{Z}^r\oplus\mathbb{Z}_{t_1}\oplus\ldots\oplus\mathbb{Z}_{t_s}$? If not, is there any software for that? $\endgroup$ – Leo Sep 27 '14 at 19:49

2$\begingroup$ In Maple 2016 (sorry I'm late to the discussion), it can compute relative cohomology with values in a representation. Example 5 in the documentation shows how to define the representation. $\endgroup$ – José FigueroaO'Farrill Apr 30 '17 at 11:03