I am trying to introduce a rule of multiplication of entries of a matrix which would have the following property:
delta[k,i]*delta[k,j]=delta[k,i]*delta[i,j] and then produce some manipulation with the matrix, for example, calculate its square with respect to this rule. How can I introduce such rule in Mathematica? Of course, the multiplication of entries which have not equal indexes should be usual one.
WBRUPD Also delta is symmetric. So, Dmitri I expect instead of
In[1]:= Clear[delta]; delta[k_, i_]*delta[k_, j_] :> delta[k, i]*delta[i, j]; delta[k_, i_] :> delta[i, k]; FullSimplify[delta[0, 1] (delta[0, 2] - delta[2, 1])] Out[33]= delta[0, 1] (delta[0, 2] - delta[2, 1]) to get 0 as the answer.