Implementing Classical (Subscript[g, 0])

(*Orig:  { (Subscript[(SuperPlus[X]), 1]),  (Subscript[(SuperPlus[X]), 2]),   (Subscript[(SuperPlus[X]), 3]), (Subscript[(SuperPlus[H]), 1]),   (Subscript[(SuperPlus[H]), 2]),  (Subscript[(SuperMinus[H]), 2]),  (Subscript[(SuperMinus[H]), 1]),   (Subscript[(SuperMinus[X]), 3]),  (Subscript[(SuperMinus[X]), 2]),   (Subscript[(SuperMinus[X]), 1])};
          {X,    Y,    Z,   A,    B,    b,    a,    z,    y,     x};
trivial cobracket, W is by definition the dual of w.
lowercase letters represent the lower Borel
A,B central. *)
PBWBasis = {X,Y,Z,b,a,z,y,x};
PBWRule={X->1,Y->2,Z->3,b->4,a->5,z->6,y->7,x->8};
Br[U@X,U@Y]=0;
Br[U@X,U@Z]=0;
Br[U@X,U@b]=U@X;
Br[U@X,U@a]=-2U@X;
Br[U@X,U@z]=0;
Br[U@X,U@y]=0;
Br[U@X,U@x]=(2A-B)U[];
Br[U@Y,U@Z]=0;
Br[U@Y,U@b]=-2U@Y;
Br[U@Y,U@a]=U@Y;
Br[U@Y,U@z]=0;
Br[U@Y,U@y]=(-A+2B)U[];
Br[U@Y,U@x]=0;
Br[U@Z,U@b]=-U@Z;
Br[U@Z,U@a]=-U@Z;
Br[U@Z,U@z]=(A+B)U[];
Br[U@Z,U@y]=-U@X;
Br[U@Z,U@x]=U@Y;
Br[U@b,U@a]=0;
Br[U@b,U@z]=-U@z;
Br[U@b,U@y]=-2U@y;
Br[U@b,U@x]=U@x;
Br[U@a,U@z]=-U@z;
Br[U@a,U@y]=U@y;
Br[U@a,U@x]=-2U@x;
Br[U@z,U@y]=0;
Br[U@z,U@x]=0;
Br[U@y,U@x]=-U@z;

co-bracket:
δ(X) =X^(2A-B)  (wedge) 
δ(Y) =Y^(2B-A)
δ(Z) = Z^(A+B)+X^Y

CheckJac[a_,b_,c_]:=Br[U@a,Br[U@b,U@c]]+Br[U@b,Br[U@c,U@a]]+Br[U@c,Br[U@a,U@b]]//Simp

CheckJac[x,y,a]

x_⪯y_:=OrderedQ[{x,y}/.PBWRule];
x_≺y_:=!OrderedQ[{y,x}/.PBWRule];
Simp[ℰ_]:= Collect[ℰ, _U, Expand];

(Subscript[U, i_])[ℰ_] := ℰ /. {A->(Subscript[A, i]),s->(Subscript[s, i]),B->(Subscript[B, i]),t->(Subscript[t, i]), u_U :> Replace[u, x_ :> (Subscript[x, i]),1]};
Br[U[(Subscript[(x_), i_])],U[(Subscript[(y_), i_])]]:=Br[U[(Subscript[x, i])],U[(Subscript[y, i])]]=(Subscript[U, i])[Br[U@x,U@y]];
Br[U[(Subscript[(x_), i_])],U[(Subscript[(y_), j_])]] /; i=!=j := 0;
Br[x_,x_]=0;
Br[U[y_],U[x_]]:=Br[U[y],U[x]]=Simp[-Br[U[x],U[y]]];
Br[x_,y_] := x**y-y**x;

Unprotect[NonCommutativeMultiply];
NonCommutativeMultiply[x_] := x;
0**_=_**0=0;
x_**U[]:=x; U[]**x_:=x;
(a_*x_U)**(b_*y_U) := If[a b === 0, 0, Simp[a b (x**y)]];
(a_*x_U)**y_ := Simp[a(x**y)]; x_**(a_*y_U) := Simp[a(x**y)];
(x_Plus)**y_ := (#**y)& /@ x; x_**(y_Plus) := (x**#)& /@ y;

U[xx___,x_] ** U[y_,yy___] := If[x⪯y,U[xx,x,y,yy], U@xx**(U@y**U@x+Br[U@x,U@y])**U@yy];

UU[l___,((x_)^(n_)),r___]:= UU[l,Sequence@@Table[x,{n}],r];
UU[l___,1,r___]:= UU[l,r];
UU[]=U[];
UU[l_,r___]:=U[l]**UU[r];