I'm trying to derive Ricci scalar in terms of derivatives of g inverse. The last three terms of the expression are similar, but they are still not collected.
For more information see the full notebooks:
Ricci_scalar.cnb (See the last line for the above referred expresssion.)
I think it's related to the bug report: sort_product bug with position=independent and identical variables
Action of sort_product depends on the choice of index
This issue is now hopefully fixed, in version 126.96.36.199 which is the current head of the github master branch. Please let me know.
Thank you so much Kasper for such a quick resolution. It's working now.