Используя статью: Michael Weyraucha, Daniel Scholz, Computing the Baker–Campbell–Hausdorff series and the Zassenhaus product, предложенную
Taus, и помощь
Vince Diesel с операциями в Mathematica, удалось написать код для разложения
(через коммутаторы). Может кому пригодится. Всем спасибо.
(Оффтоп)
Код:
(* M.Weyrauch,D.Scholz/Computer Physics Communications 180 (2009) \
1558\[Dash]1565 *)
(* Goldberg's method *)
(* polynomial generator *)
g[1] = 1;
g[s_] := g[s] = Expand[1/s*D[t*(t - 1)*g[s - 1], t]];
c[w_] := c[w] = Module[
{m, m1, m2, k},
m = Length[w];
m1 = Floor[m/2];
m2 = Floor[(m - 1)/2];
Integrate[t^m1*(t - 1)^m2*Product[g[w[[k]]], {k, m}], {t, 0, 1}]
];
BCH[n_Integer, alph_List] := Module[
{p},
p = Flatten[Permutations /@ IntegerPartitions[n], 1];
Plus @@ (c[Sort[#]]*(words[#, alph] -
(-1)^n*words[#, Reverse[alph]]) & /@ p) // Expand];
words[p_List, alph_List] := StringJoin @ (ConstantArray @@@
Partition[Riffle[p, alph, {1, 2*Length[p], 2}], 2]);
(* polynomial converter *)
CircleTimes[a_, b_, c__] := CircleTimes[CircleTimes[a, b], c];
PolyToCom[n_Integer] := Module[
{
POLY, LISTA, LISTB, TMP, A, B, WORDS, ANSWER, i
},
POLY = Apply[List, BCH[n, {"x", "y"}]];
LISTA = POLY[[All, 1]];
LISTB = POLY[[All, 2]];
TMP = StringCases[LISTB, StartOfString ~~ "xy" ~~ ___] ;
WORDS = TMP // Flatten;
A = LISTA[[Take[Position[TMP, x_String] // Flatten, {1, -1, 2}]]];
B = StringCount[WORDS, "x"];
ANSWER = A;
Do[
{
ANSWER[[i]] =
A[[i]]/B[[i]] Apply[CircleTimes,
ToExpression[StringCases[WORDS[[i]], Repeated[_, 1]]], {0}]
}, {i, 1, Length[WORDS]}
];
Total[ANSWER]
]
(* EXAMPLE(S) *)
PolyToCom[2]
PolyToCom[3]
PolyToCom[4]
PolyToCom[5]
PolyToCom[6]