I think what you are getting is expected behavior.  Remember that when you 
switch n and n + 1, you are switching the side of the equation that they will 
end up on.  So in the first one, you have all terms with n on the right-hand 
side, and in the second one, you have all the terms with n + 1 on the 
right-hand side.  If you have something like p[1, 2, n]*p[1, 2, n + 1], the one 
that you choose to collect with respect to in your script (Idx(n) or Idx(n + 
1)) will determine the tie breaker.

Aaron Meurer


Okay, that sounds good, Aaron; thank you for checking this over: it is greatly appreciated. I think that in this case, Idx(n+1) works well for me.

Nicholas

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to