Let $\mathfrak{g}$ be a nilpotent Lie algebra over a field $k$ of characteristic 0. I heard that it is possible to construct a presentation of $\mathfrak{g}$ using $H^1(\mathfrak{g},k)$ and $H^2(\mathfrak{g},k)$.
More specifically, it is well known that $$H^1(\mathfrak{g},k) := (\mathfrak{g}/[\mathfrak{g},\mathfrak{g}])^*.$$ So that we may think of $\mathfrak{g}/[\mathfrak{g},\mathfrak{g}]$ as the free Lie algebra generated by (any basis of) $H_1(\mathfrak{g},k)$. I heard there is some way of uncovering the entire Lie algebra by considering the cup product somehow, could anyone help me understand how this is done? A reference would be helpful as well.
Thanks in advance!
EDIT: I found a paper of Clair Miller, titled “The Second Homology Group of a Group”, and can be found here.
It has nothing to do with my suggestive question about the adjoint of the cup product, however, it gives an interpretation of $H_2(G,\mathbb{Z})$ for an arbitrary group $G$, in terms of the group of commutator relations in $G$ modulo universal commutator relations. I guess I am still curious as to how to read what commutator is associated to a given cocycle.
Let $L$ be a finite-dimensional nilpotent Lie algebra over a field $k$, and $E$ a minimal generating system of $L$. Then it is well-known that the cardinality of $E$ is given by $$ |E|=\dim H^1(L,K). $$ Indeed, we know that the cardinality of $E$ is equal to the dimension of the $K$-vector space $(E)_K$ generated by $E$. This maps naturally into $L/[L,L]$. It is easy to see that this mapping is an isomorphism. On the other hand we have $$ H^1(L,K)={\rm Hom}_L(L,K)={\rm Hom}_K(L/[L,L],K). $$ Secondly it is also known by the Hochschild-Serre sequence, that we have, for a minimal relation system $R$ of $L$, that $$ |R|=\dim H^2(L,K). $$ This yields some information by generators and relations for $L$ given by the cohomology $H^1(L,K)$ and $H^2(L,K)$ (but not a characterisation).