Baker-Campbell-Hausdorff formula for nilpotency class three

Statement
The Baker-Campbell-Hausdorff formula for nilpotency class three is a special case of the Baker-Campbell-Hausdorff formula that works in the case of groups and Lie rings of nilpotency class (at most) three. In particular, it is a formula that can be used to go back and forth along the class three Lazard correspondence.

The explicit formula for $$\log(\exp(X)\exp(Y))$$ is given in many equivalent forms below:

Using the explicit formula
The explicit formula says the following. The iterated Lie bracket in this version of the formula is right-normed, i.e., $$[X_1,X_2,X_3]$$ stands for $$[X_1,[X_2,X_3]]$$::

$$\log(\exp(X)\exp(Y) = \sum_{n>0}\frac {(-1)^{n-1}}{n} \sum_{ \begin{smallmatrix} {r_i + s_i > 0} \\ {1\le i \le n} \end{smallmatrix}} \frac{(\sum_{i=1}^n (r_i+s_i))^{-1}}{r_1!s_1!\cdots r_n!s_n!} [ X^{r_1} Y^{s_1} X^{r_2} Y^{s_2} \ldots X^{r_n} Y^{s_n} ]$$

We calculate each of the terms individually for the case $$n = 1$$. Note that in this case, the expression for the outer sum is $$(-1)^{1-1}/1 = 1$$:

We now consider the case $$n = 2$$: -- This thing needs to be completed.

Using the general procedure
We describe here how the formula can be deduced using the general procedure outlined in deducing the Baker-Campbell-Hausdorff formula from associative algebra manipulation.

By the quick formula, we have:

$$W = \exp(X)\exp(Y) -1 = (X + Y) + \frac{1}{2!}(X^2 + 2XY + Y^2) + \frac{1}{3!}(X^3 + 3X^2Y + 3XY^2 + Y^3)$$

Since the class is three, we have $$W^4 = 0$$, hence we get:

$$\log(1 + W) = W - \frac{W^2}{2} + \frac{W^3}{3} = (X + Y) + \frac{1}{2!}(X^2 + 2XY + Y^2) + \frac{1}{3!}(X^3 + 3X^2Y + 3XY^2 + Y^3) - \frac{1}{2}((X + Y) + \frac{1}{2!}(X^2 + 2XY + Y^2) + \frac{1}{3!}(X^3 + 3X^2Y + 3XY^2 + Y^3))^2 + \frac{1}{3}((X + Y) + \frac{1}{2!}(X^2 + 2XY + Y^2) + \frac{1}{3!}(X^3 + 3X^2Y + 3XY^2 + Y^3))^3$$

The calculations for the degree one and degree two parts proceed exactly as they did in the class two case (see Baker-Campbell-Hausdorff formula for nilpotency class two). We thus concentrate on the degree three part:

$$\mbox{Degree three part} = \frac{1}{6}(X^3 + 3X^2Y + 3XY^2 + Y^3) - \frac{1}{4}(X + Y)(X^2 + 2XY + Y^2) - \frac{1}{4}(X^2 + 2XY + Y^2) + \frac{1}{3}(X + Y)^3$$

Instead of simplifying directly, we adopt the following procedure. We rewrite:

$$X^2 + 2XY + Y^2 = (X + Y)^2 + [X,Y]$$

We similarly rewrite:

$$X^3 + 3X^2Y + 3XY^2 + Y^3 = (X + Y)^3 + 2X[X,Y] + [X,Y]X + 2[X,Y]Y + Y[X,Y]$$

This can be further rewritten as:

$$X^3 + 3X^2Y + 3XY^2 + Y^3 = (X + Y)^3 + 3X[X,Y] + 3[X,Y]Y - [X,[X,Y]] + [Y,[X,Y]]$$

Now, we plug these into the expression

$$\mbox{Degree three part} = \frac{1}{6}((X + Y)^3 + 3X[X,Y] + 3[X,Y]Y - [X,[X,Y]] + [Y,[X,Y]]) - \frac{1}{4}(X + Y)((X + Y)^2 + [X,Y]) - \frac{1}{4}((X + Y)^2 + [X,Y])(X + Y) + \frac{1}{3}(X + Y)^3$$

We rearrange to obtain:

$$\mbox{Degree three part} = \left(\frac{1}{6} - \frac{1}{4} - \frac{1}{4} + \frac{1}{3}\right)(X + Y)^3 + \frac{1}{2}(X[X,Y] + [X,Y]Y) - \frac{1}{6}([X,[X,Y]] - [Y,[X,Y]]) - \frac{1}{4}(X + Y)[X,Y] - \frac{1}{4}([X,Y](X + Y))$$

The $$(X + Y)^3$$ term has zero coefficient and disappears, and we are left with:

$$\mbox{Degree three part} = \frac{1}{2}(X[X,Y] + [X,Y]Y) - \frac{1}{6}([X,[X,Y]] - [Y,[X,Y]]) - \frac{1}{4}X[X,Y] - \frac{1}{4}Y[X,Y] - \frac{1}{4}[X,Y]X - \frac{1}{4}[X,Y]Y$$

We now use that $$Y[X,Y] = [X,Y]Y + [Y,[X,Y]]$$ and $$[X,Y]X = X[X,Y] - [X,[X,Y]]$$ to get:

$$\mbox{Degree three part} = \frac{1}{2}(X[X,Y] + [X,Y]Y) - \frac{1}{6}([X,[X,Y]] - [Y,[X,Y]]) - \frac{1}{4}X[X,Y] - \frac{1}{4}[X,Y]Y - \frac{1}{4}[Y,[X,Y]] - \frac{1}{4}X[X,Y] + \frac{1}{4}[X,[X,Y]] - \frac{1}{4}[X,Y]Y$$

Combining coefficients, we find that the coefficients on $$X[X,Y]$$ and $$[X,Y]Y$$ are zero, and we are left with:

$$\mbox{Degree three part} = - \frac{1}{6}([X,[X,Y]] - [Y,[X,Y]]) + \frac{1}{4}([X,[X,Y]] - [Y,[X,Y]])$$

We simplify $$1/4 - 1/6 = 1/12$$ to get:

$$\mbox{Degree three part} = \frac{1}{12}([X,[X,Y]] - [Y,[X,Y]])$$

Plug this back in to the formula, and get the overall formula:

$$X + Y + \frac{1}{2}[X,Y] + \frac{1}{12}([X,[X,Y]] - [Y,[X,Y]])$$