Pensieve Header: Are there well-defined derivations on A(r/g)?

Basis[n_] := DeleteCases[
Permutations[P@@Range[n]],
Alternatives[
P[___,i_,j_,___] /; i==j+1 ,
P[___, i_, j_, k_, ___] /; i==j+2 && k==j+1
]
];
ToBasis[p_P] := p //. {
P[l___,i_,j_,r___] /; i==j+1  :> P[l,j,i,r],
P[l___, i_, j_, k_, r___] /; i==j+2 && k==j+1 :> P[l,k,i,j,r]
};
ToBasis[expr_] := expr /. p_P :> ToBasis[p];

Basis[4]

Basis[4] // ToBasis

TestD[p_P] := Module[
{n=Length[p]},
ToBasis[
Append[p, n+1]+Prepend[(#+1)& /@ p, 1]-Prepend[p, n+1]-Append[(#+1)& /@ p, 1]
]
]

Print /@ (
(TestD /@ Basis[4]) /. Thread[
Basis[5] -> V /@ Range[Length[Basis[5]]]
]
);

Print /@ (
(TestD /@ Basis[5]) /. Thread[
Basis[6] -> V /@ Range[Length[Basis[6]]]
]
);