**Question.** How is the *nilpotent of class 2 (nil-2) free product* of groups defined?


I came across this construction reading the following paper.


Alan H. Mekler (1981), Stability of nilpotent groups of class 2 and prime exponent. Journal of Symbolic Logic, 46, pp 781-788. doi:10.2307/2273227. 


There the author use the nil-2 free product in order to build
the nil-2 exponent $p$ group generated by some nice graph $\Gamma$.



Nilpotent of class 2 free product
The original nilpotent product was defined by Golovin, who called it the "metabelian product":


Golovin, O.N. *Metabelian products of groups*, Amer. Math. Soc. Transl. Ser. 2 vol. 2 (1956), 117-131, MR 17:824b.


For $2$-nilpotent groups $G$ and $H$, the $2$-nilpotent product of $G$ and $H$ is defined to be
$$ G\amalg^{\mathfrak{N}\_2} H = \frac{G\*H}{(G\*H)\_3}$$
where $G\*H$ is the free product, and $(G\*H)\_3$ is the third term of the lower central series of $G\*H$. Golovin defines it for arbitrary groups, in which case you mod out by the intersection of $(G\*H)\_3$ with the cartesian $[G,H]$.


The group has a nice normal form, in that the elements of $G\amalg^{\mathfrak{N}\_2} H$ can be written as $ghc$, where $g\in G$, $h\in H$, and $c\in [H,G]$, where $[H,G]$ is isomorphic to the abelian tensor product $H^{\rm ab}\otimes G^{\rm ab}$; the product is given by $(ghc)(g'h'c') = gg'hh'cc'[h,g']$.


The group has the "obvious" universal property relative to nil-2 groups: there are natural inclusions $i\_G\colon G\to G\amalg^{\mathfrak{N}\_2} H$ and $i\_H\colon H\to G\amalg^{\mathfrak{N}\_2}H$, and if $K$ is any nil-2 group and $f\colon G\to K$ and $g\colon H\to K$ are group homomorphisms, then there is a unique homomorphism $\varphi\colon G\amalg^{\mathfrak{N}\_2}H\to K$ such that $f=\varphi\circ i\_G$ and $g=\varphi\circ i\_H$.


(More generally, as indicated by Primoz, you can define a $\mathfrak{V}$-product for any variety $\mathfrak{V}$, for groups $G\_i\in\mathfrak{V}$ as 
$$ \frac{\mathop{\*}\limits\_{i\in I} G\_i}{\mathfrak{V}(\mathop{\*}\limits\_{i\in I}G\_i)},$$
where $\mathfrak{V}(K)$ is the $\mathfrak{V}$-verbal subgroup of $K$. If you don't assume the $G\_i$ all lie in $\mathfrak{V}$, then you mod out by the intersection of that verbal subgroup with the cartesian $[G\_i]\_{i\in I}$, which is the kernel of the canonical map from the free product of the $G\_i$ to the direct product of the $G\_i$).


