Hello everybody, I have a question related with the application rules in a defined function in Mathematica. The following script provides the use of Wick theorem, so, after defining the function 'fourfields' corresponding to the application of the Wick theorem for four fields, I applied some rules (deffnitionsff and rules). However as you can see there, the rules do not work. But, if I defined a new function fourfieldscopy which is just the copy-paste of the fourfield's output, it works!! I really appreciate if anyone can suggest me how to rewrite the code such that 'fourfields' function accepts the rules and make the process automatically. Thanks.