dd[a_,b_]:=KroneckerDelta[a,b]

P0[a_,b_,c_,d_]=1/3dd[a,b] dd[c,d]

P1[a_,b_,c_,d_]=1/2 (dd[a,c] dd[b,d]-dd[a,d] dd[b,c])

P2[a_,b_,c_,d_]=(-1/3 ( dd[a,b] dd[c,d])+1/2(dd[a,c] dd[b,d]+dd[a,d] dd[b,c]))

P0[a,b,c,d]+P1[a,b,c,d]+P2[a,b,c,d] // Simplify

Sum[P0[a,b,c,d] P0[c,d,e,f],{c,1,3},{d,1,3}] // Simplify

Sum[P0[a,b,c,d] P1[c,d,e,f],{c,1,3},{d,1,3}] // Simplify

P0P2=Sum[P0[a,b,c,d] P2[c,d,e,f],{c,1,3},{d,1,3}] // Simplify

Sum[P1[a,b,c,d] P2[c,d,e,f],{c,1,3},{d,1,3}] // Simplify

P0sqtest=Sum[P0[a,b,c,d] P0[c,d,e,f],{c,1,3},{d,1,3}] -P0[a,b,e,f]// Expand// FullSimplify

P1sqtest=Sum[P1[a,b,c,d] P1[c,d,e,f],{c,1,3},{d,1,3}] -P1[a,b,e,f]// Expand// FullSimplify

P2sqtest:=Sum[P2[a,b,c,d] P2[c,d,e,f],{c,1,3},{d,1,3}] -P2[a,b,e,f]// Expand// FullSimplify

Table[P1sqtest /. {a->1,b->1},{e,1,3},{f,1,3}]

Table[Table[P1sqtest /. {a->1,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[Table[P1sqtest /. {a->2,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[Table[P1sqtest /. {a->3,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[P2sqtest /. {a->1,b->1},{e,1,3},{f,1,3}]

Table[Table[P2sqtest /. {a->1,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[Table[P2sqtest /. {a->2,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[Table[P2sqtest /. {a->3,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[P0sqtest /. {a->1,b->1},{e,1,3},{f,1,3}]

Table[Table[P0sqtest /. {a->1,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[Table[P0sqtest /. {a->2,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[Table[P0sqtest /. {a->3,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[P0P2 /. {a->1,b->1},{e,1,3},{f,1,3}]

Table[Table[P0P2 /. {a->1,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[Table[P0P2/. {a->2,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Table[Table[P0P2 /. {a->3,b->n},{e,1,3},{f,1,3}],{n,1,3}]

Clear[AA]

AA[a_,b_,c_,d_]=A dd[a,b] dd[c,d] + B dd[a,c] dd[b,d] + C dd[a,d] dd[b,c]

T0test= Sum[AA[a,b,e,f] P0[e,f,c,d] ,{e,1,3},{f,1,3}] -(3 A + B +C) P0[a,b,c,d]// FullSimplify

Table[Table[T0test /. {a->1,b->n},{c,1,3},{d,1,3}],{n,1,3}] // Simplify

T1test=Sum[AA[a,b,e,f] P1[e,f,c,d] ,{e,1,3},{f,1,3}] -(B-C) P1[a,b,c,d]// Expand // Simplify

Table[Table[T1test /. {a->1,b->n},{c,1,3},{d,1,3}],{n,1,3}] // Simplify

Table[Table[T1test /. {a->2,b->n},{c,1,3},{d,1,3}],{n,1,3}] // Simplify

Table[Table[T1test /. {a->3,b->n},{c,1,3},{d,1,3}],{n,1,3}] // Simplify

T2test:=Sum[AA[a,b,e,f] P2[e,f,c,d] ,{e,1,3},{f,1,3}] -(B+C) P2[a,b,c,d]// Expand // Simplify

Table[Table[T2test /. {a->1,b->n},{c,1,3},{d,1,3}],{n,1,3}] // Simplify

Table[Table[T2test /. {a->2,b->n},{c,1,3},{d,1,3}],{n,1,3}] // Simplify

Table[Table[T2test /. {a->3,b->n},{c,1,3},{d,1,3}],{n,1,3}] // Simplify