Comment #1 on issue 1601 by asmeurer: match trouble and tutorial http://code.google.com/p/sympy/issues/detail?id=1601
Yep, this is pretty much what I saw when I stepped through it in the debugger. It seems like there should be a way for the pattern to check to see if it can still match the x to b after matching sin(x) in (4), instead of just throwing it out. Thanks for pointing out .as_independent(). I was writing my own function that did that for another part of my code. Also, I think args are ordered based on hash values, whereas printing is based on Basic._compare_pretty. So they are not necessarily reverse of each other (args ordering can be different on different machines that compute hashes differently). Maybe you should convert this into a Sphinx doc and put it in the docs. It would have been nice to have whenever I was trying to figure out how match works. I searched for papers on matching mathematical expressions and found: http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.36.139 Maple's docs don't cite any papers for their pattern matching. I wonder, how do other open-source CAS's do it? -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sympy-issues" 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-issues?hl=en -~----------~----~----~----~------~----~------~--~---
