LieSeries /: Expand[s_LieSeries] := Expand /@ s;
LieSeries /: Plus[ss__LieSeries] /; Length[{ss}]>1 := Module[
{l=Min[Length /@ {ss}]},
LieSeries @@ Total[Take[List @@ #, l]& /@ {ss}]
];
LieSeries /: c_?NumberQ * s_LieSeries := Expand[c*#]& /@ s;
LieSeries /: s_LieSeries + c_.*w_LW /; NumberQ[c] := Module[{d},
d=Deg[w];
If[Length[s]<d, 0,
ReplacePart[s, d -> s[[d]]+Expand[c*w]]
]
];

b[w_LW, s_LieSeries] := Join[
LieSeries@@Table[0, {Deg[w]}],
ad[w] /@ s
];
b[s_LieSeries, w_LW] := Expand[-b[w,s]];

ASeries /: Expand[s_ASeries] := Expand /@ s;
ASeries /: Plus[ss__ASeries] := Module[
{l=Min[Length /@ {ss}]},
ASeries @@ Total[Take[List @@ #, l]& /@ {ss}]
];
ASeries /: c_ * s_ASeries := Expand[c*#]& /@ s;
s1_ASeries**s2_ASeries := Module[
{d,k,m1,m2},
m1=LengthWhile[s1, #==0&];
m2=LengthWhile[s2, #==0&];
ASeries @@ Table[
Sum[s1[[k+1]]**s2[[d-k+1]], {k,m1,d-m2}],
{d, 0, Min[m1+Length[s2]-1, m2+Length[s1]-1]}
]
];
ASeries /: EulerE[s_ASeries] := ASeries @@ Expand[Range[{0,1+Length[s]}]*(List@@s)];