Hello, I am manipulating lists of pairs of elements like {x[i][t] y[j][1],y[j][1]y[k][t1]...}. Each element has two indices and I would like to replace each pair by a function as follows:
when there are two x's: x[i][t] x[j][t1] -> A[i,j,t,t1] ; when there is one x and one: x[i][t] y[j][t1] -> B[i,j,t,t1] ; when there are any 2 y's: y[j][t1] y[k][t1] -> 0.
where A,B are functions of 4 arguments that I have defined elsewhere. I would like to do this without having to give explicit values to the i,j,t,t1 and loop over them. How could this be done? Thank you in advance and best wishes,
Stefano