I will begin by stating my question, and then write down some related thoughts.


Let $\mathfrak{g}$ be a finite dimensional nilpotent Lie algebra over $\mathbb{C}$. Choose an ideal $\mathfrak{h}$ in $\mathfrak{g}$ of codimension 2. The quotient $\mathfrak{g}/\mathfrak{h}$ is then abelian. If $L$ is any 1-dimensional subspace of $\mathfrak{g}/\mathfrak{h}$, we can form its preimage in $\mathfrak{g}$, which is a Lie subalgebra.


True/False? The set of isomorphism classes of Lie algebras obtained in this way is finite. (Here I am disregarding the embedding into $\mathfrak{g}$ and asking about isomorphisms as abstract Lie algebras.)


EDIT. To clarify the statement: both $\mathfrak{g}$ and $\mathfrak{h}$ are fixed. Only the 1-dimensional subspace $L$ of the quotient $\mathfrak{g}/\mathfrak{h}$ varies.


Remark 1. A counterexample, if there is one, could only exist in dimension $\geq 8$. This is why it's pretty difficult to "get my hands on" this problem. I don't see an easy way to prove the statement, nor do I see any obvious counterexamples.


Remark 1'. I tried to assume that the answer is positive and get some kind of contradiction with the statement that the set of isomorphism classes of nilpotent Lie algebras of dimension $n$ (where $n\geq 7$) is infinite, but I couldn't find one.


Remark 2. This is not very helpful, but at least the answer to my question is positive when $\mathfrak{h}$ is abelian. (This does severely limit the possibilities for $\mathfrak{g}$, but at least it does not limit the nilpotence class of $\mathfrak{g}$.)


Any information about this would be much appreciated!



Isomorphism classes of nilpotent Lie algebras
I have found a counterexample while studying Lie algebra degenerations. Consider the following filiform nilpotent Lie algebra $\mathfrak{g}$ of dimension $13$, given by the brackets with respect to a basis
$(e\_1,\ldots ,e\_{13})$:
\begin{align\*}
[e\_1,e\_i] & = e\_{i+1},\quad 2\le i\le 12 \\[0.2cm]
[e\_2,e\_3] & = e\_5 \\
[e\_2,e\_4] & = e\_6 \\
[e\_2,e\_5] & = \frac{9}{10}e\_7-e\_9 \\
[e\_2,e\_6] & = \frac{4}{5}e\_8-2e\_{10} \\
[e\_2,e\_7] & = \frac{5}{7}e\_9-\frac{335}{126}e\_{11}+ \frac{22105}{15246}e\_{13}\\
[e\_2,e\_8] & = \frac{9}{14}e\_{10}-\frac{125}{42}e\_{12}\\
[e\_2,e\_9] & = \frac{9}{12}e\_{11}-\frac{4421}{1452}e\_{13}\\
[e\_2,e\_{10}] & = \frac{8}{15}e\_{12}\\
[e\_2,e\_{11}] & = \frac{27}{55}e\_{13}\\[0.5cm]
[e\_3,e\_4] & = \frac{1}{10}e\_{7}+e\_{9}\\
[e\_3,e\_5] & = \frac{1}{10}e\_{8}+e\_{10}\\
[e\_3,e\_6] & = \frac{3}{35}e\_9+\frac{83}{126}e\_{11}-\frac{22105}{15246}e\_{13}\\
[e\_3,e\_7] & = \frac{1}{14}e\_{10}+\frac{20}{63}e\_{12}\\
[e\_3,e\_8] & = \frac{5}{84}e\_{11}+\frac{697}{10164}e\_{13}\\
[e\_3,e\_{9}] & = \frac{1}{20}e\_{12}\\
[e\_3,e\_{10}] & = \frac{7}{165}e\_{13}\\
[e\_4,e\_5] & = \frac{1}{70}e\_9+\frac{43}{126}e\_{11}+\frac{22105}{15246}e\_{13}\\
[e\_4,e\_6] & = \frac{1}{70}e\_{10}+\frac{43}{126}e\_{12}\\
[e\_4,e\_7] & = \frac{1}{84}e\_{11}+\frac{7589}{30492}e\_{13}\\
[e\_4,e\_8] & = \frac{1}{105}e\_{12}\\
[e\_4,e\_9] & = \frac{1}{132}e\_{13}\\[0.5cm]
[e\_5,e\_6] & = \frac{1}{420}e\_{11}+\frac{313}{3388}e\_{13}\\
[e\_5,e\_7] & = \frac{1}{420}e\_{12}\\
[e\_5,e\_8] & = \frac{3}{1540}e\_{13}\\[0.5cm]
[e\_6,e\_7] & = \frac{1}{2310}e\_{13}
\end{align\*}
Let $\mathfrak{h}$ be the ideal generated by $e\_3,\ldots , e\_{13}$ of codimension $2$. Then $\mathfrak{g}/\mathfrak{h}=\{ [e\_1],[e\_2]\}$, and we
may write $L=\{ \alpha[e\_1]+\beta[e\_2]\}$, where $\alpha,\beta$ vary over all complex numbers. Hence the preimage is $L(\alpha,\beta)=\{\alpha e\_1+\beta e\_2,e\_3,\ldots ,e\_{13} \}$, which is a $1$-codimensional ideal in $\mathfrak{g}$. Now it is easy to see that
$$
L(1,\alpha)\simeq L(1,\alpha') \text{ if and only if } \alpha=\pm \alpha'.
$$
So we obtain infinitely many non-isomorphic Lie algebras.


