= Solution
Use $c=[a,b]=a^{-1}b^{-1}ab$. The two defining <relators> say that $c$ commutes with $a,b$, hence is central. The given <group commutator> identities give
$$
(a^mb^nc^k)(a^rb^sc^\ell)
=a^{m+r}b^{n+s}c^{k+\ell-nr}.
$$
Consequently a <word collection in a two-step nilpotent group> algorithm maintains an integer triple $(m,n,k)$, initially $(0,0,0)$. Reading $a^\epsilon$, with $\epsilon=\pm1$, changes it to $(m+\epsilon,n,k-n\epsilon)$; reading $b^\epsilon$ changes it to $(m,n+\epsilon,k)$. Each step uses the displayed multiplication rule and reads one letter, so it terminates and produces the requested expression.
By the stipulated uniqueness, \b[the word is trivial exactly when $\boxed{(m,n,k)=(0,0,0)}$], which solves its <word problem for a group>. Moreover the <commutator subgroup> is $\langle c\rangle$: the quotient by $\langle c\rangle$ is abelian, and $c$ itself is a commutator. It is central, so the <nilpotency class> is at most two. Uniqueness also implies $c\ne1$, since $(0,0,1)$ and $(0,0,0)$ are distinct triples. Hence \b[the exact nilpotency class is $\boxed{2}$.]
Back to article page