TITLE: What are the conditions for a system of equations to have a solution in some abelian group extension?
QUESTION [8 upvotes]: Given an abelian group $G$ and a system of equations
$$a_1 = n^1_1 y_1 + ... + n^1_r y_r$$
$$...$$
$$a_s = n^s_1 y_1 + ... + n^s_r y_r$$
for $a_i \in G$ and $n^i_j \in \mathbb{Z}_{\geq 0}$, under what conditions does there exist a group containing $G$ as a subgroup in which this system is solvable? In particular, can the conditions be stated in the first-order logic of group theory?
For example, a system
$$a_1 = y_1$$
$$a_2 = y_1$$
is solvable in an extension if and only if $a_1 = a_2$, so its conditions can be stated in first-order logic.
Furthermore, any single equation $a = n_1 y_1 + ... + n_r y_r$ with at least one $n_i \neq 0$ can be solved in some extension of any group, since in $H = (G \times \mathbb{Z}) / \langle (a, -n_i)\rangle $ we have $y_i = (0, 1)$ as a solution, with $G$ embedding into it by $\alpha: G \rightarrow H: g \mapsto (g, 0)$, as described by this answer

REPLY [3 votes]: First let's note that there is a universal way to map $G$ to a group admitting solutions to these equations. Let $G' = (G\oplus \mathbb{Z}^r)/H$, where $H$ is the subgroup of $G\oplus \mathbb{Z}^r$ generated by $\{(-a_j,n_1^j,\dots,n_r^j)\mid 1\leq j \leq s\}$, and let $\varphi\colon G\to G'$ be defined by $\varphi(g) = (g,0,\dots,0)+H$. Then defining \begin{align*} e_1 &= (0,1,0,\dots,0) + H\\ e_2 &= (0,0,1,\dots,0) + H\\ &\vdots \\ e_r &= (0,0,0,\dots,1)+H\end{align*}
these elements are solutions to your equations, in the sense that $\varphi(a_j) = n^j_1e_1 + \dots + n^j_re_r$ for all $1\leq j \leq s$.
Moreover, if $\psi\colon G\to K$ is any group homomorphism, and $k_1,\dots,k_r$ are solutions to your equations in $K$, in the sense that $\psi(a_j) = n^j_1k_1 + \dots + n^j_rk_r$ for all $1\leq j \leq s$, then there is a unique homomorphism $\psi'\colon G'\to K$ such that $\psi'(e_i) = k_i$ for all $1\leq i\leq r$ and $\psi'\circ \varphi = \psi$.
Now suppose your equations are solvable in some group $K$ containing $G$ as a subgroup. Then taking $\psi$ to be the inclusion in the discussion above, we find that $\psi'\circ \varphi = \psi$ is injective, and hence $\varphi$ is injective. Conversely, if $\varphi$ is injective, then your equations are solvable in $G'$, which contains $G$ as a subgroup (or rather, contains its isomorphic copy $\text{im}(\varphi)$). So your question is equivalent to asking when $\varphi$ is injective.
Well, $\varphi$ is injective iff there is no $b\neq 0$ in $G$ such that $\varphi(b) = 0$. Equivalently, iff there is no $b\neq 0$ in $G$ such that $(b,0,\dots,0)\in H$.
A general element of $H$ is a $\mathbb{Z}$-linear combination of the generators: $$m_1(-a_1,n_1^1,\dots,n_r^1) + \dots + m_s(-a_s,n_1^s,\dots,n_r^s).$$ And now it's clear that the question is really one of linear algebra over $\mathbb{Z}$: is it the case that for all $(m_1,\dots,m_s)\in \mathbb{Z}^s$, if $$(*) \quad \left(\begin{matrix} n_1^1 & \dots & n_1^s \\ \vdots & \ddots & \vdots \\ n_r^1 & \dots & n_r^s \end{matrix}\right)\left(\begin{matrix} m_1\\ \vdots \\ m_s\end{matrix}\right) = \left(\begin{matrix}0\\ \vdots \\ 0\end{matrix}\right),$$ then $$(**) \quad m_1a_1 + \dots + m_sa_s = 0?$$
The set of solutions to $(*)$ is a subgroup of $\mathbb{Z}^s$ (the nullspace of the coefficient matrix), and since every subgroup of $\mathbb{Z}^s$ is finitely generated, we can pick generators $\{(m_1^k,\dots,m_s^k)\mid 1\leq k \leq \ell\}$. And it suffices to check $(**)$ on the generators. So yes, the condition on the coefficients $a_1,\dots,a_r$ is definable in first-order logic, even by a conjunction of atomic formulas: $$\bigwedge_{k=1}^\ell m_1^ka_1 + \dots + m_s^ka_s = 0.$$