Solution (source code)

= Solution

A subgroup $H\le G$ is a <benign subgroup> when there are an embedding of $G$ into a <finitely presented group> $E$ and a <finitely generated subgroup> $L\le E$ with $G\cap L=H$. Finite generation is required of $L$, not of $H$ itself. We use <Britton's lemma>, the <normal form theorem for an amalgamated free product>, and, for the final quotient assertion, the <Higman embedding theorem>.

Choose witnesses $E_H,L_H$ and $E_K,L_K$ for $H,K$. The <amalgamated free product> $P=E_H*_G E_K$ embeds both witnesses and their common copy of $G$. It is finitely presented: take their two finite presentations and add the finitely many equalities identifying the images of a finite generating set of $G$. These equalities identify all elements of $G$, so they present precisely the amalgam. The original intersections $G\cap L_H=H$ and $G\cap L_K=K$ are preserved by the embeddings.

Now form the <finitely presented group>
$$
T=\langle P,t,s\mid t^{-1}\ell t=\ell\ (\ell\in L_H),\quad
s^{-1}ks=k\ (k\in L_K)\rangle.
$$
Only finitely many commutation relators, one for each of the chosen subgroup generators, are needed. The subgroup $Q=\langle G,t,s\rangle$ is exactly the multiple <HNN extension> of $G$ centralizing $H$ and $K$. To prove this claim, take a word in $G,t,s$ reduced for those associated subgroups. It remains reduced in $T$: a $t$-pinch with a coefficient in $G$ occurs precisely when that coefficient lies in $L_H\cap G=H$, and an $s$-pinch precisely when it lies in $K$. <Britton's lemma> therefore prevents any extra relation, and it also embeds $G$.

Write $G^u=u^{-1}Gu$. The subgroup $L_{\cap}=G^{ts}$ is finitely generated. If $s^{-1}t^{-1}gts\in G$, Britton reduction must first pinch $t^{-1}gt$, requiring $g\in H$; its value is then $g$. The remaining $s^{-1}gs$ can represent a base element only if $g\in K$, and then its value is again $g$. Conversely every $g\in H\cap K$ commutes with both letters. Hence
$$
\boxed{G\cap L_{\cap}=H\cap K,}
$$
so the intersection is benign.

For the join, put $J=\langle H,K\rangle$ and $L_{\vee}=\langle G^t,G^s\rangle$, again finitely generated. The subgroup generated by $G,G^t,G^s$ in $Q$ is
$$
U=(G*_H G^t)*_K G^s.
$$
Indeed, expanding conjugate-copy syllables as $t^{-1}gt$ or $s^{-1}gs$ shows that the only possible Britton reductions are exactly the identifications in the indicated amalgamations; a reduced amalgam word therefore has no additional way to become trivial.

We use this elementary consequence of amalgam normal forms: if $C\le D\le A$, then inside $A*_CB$ the subgroup $\langle D,B\rangle$ is $D*_CB$ and intersects $A$ exactly in $D$. A reduced expression with a $B\setminus C$ syllable cannot lie in $A$, because multiplying it by an inverse base element still leaves a reduced nontrivial amalgam word. Apply this first to $G*_H G^t$ with $D=J$, obtaining $D_1=\langle J,G^t\rangle$ and $D_1\cap G=J$. Since $K\le J\le D_1$, apply it again in $U=(G*_H G^t)*_K G^s$ to obtain $\langle D_1,G^s\rangle\cap(G*_H G^t)=D_1$.

Each element of $H$ lies in $G^t$, and each element of $K$ lies in $G^s$, since the corresponding stable letter centralizes it. Thus $J\le L_{\vee}$, and $L_{\vee}=\langle D_1,G^s\rangle$. Intersecting the previous identities with $G$ gives
$$
\boxed{G\cap L_{\vee}=J=\langle H,K\rangle.}
$$
This proves the <intersection and join of benign subgroups> construction with actual finitely generated witnesses inside $T$.

Finally let $N\triangleleft G$ be benign, witnessed by $N=G\cap L$ in a <finitely presented group> $E$. Choose finite generators $X$ for $G$ and express both $X$ and a finite generating set for $L$ as words in $E$. Enumerate every word $w$ on $X$, every word $v$ on those generators of $L$, and every finite proof in the presentation of $E$ that their substituted words are equal. Dovetail these searches and list $w$ when such a proof is found. Exactly the words representing elements of $G\cap L=N$ are listed: membership has a finite expression in the generators of $L$, and every valid equality has a finite relator proof. Since $N$ is normal, these are exactly the null words of $G/N$.

Use this enumerable list as relators on the finite alphabet $X$. Its normal closure is precisely the kernel of $F(X)\to G/N$, so it is a <recursive presentation of a group> for $G/N$. The <Higman embedding theorem> now yields
$$
\boxed{G/N\text{ embeds in a finitely presented group}.}
$$
This is <normal benign subgroup quotient embedding>; no word algorithm for $E$ or membership algorithm for $L$ was assumed.