sympy/sympy — pull request #2625 by Tempel (2013-11-24 03:54:04+00:00)
Title: Issue 4107: Equality with matrices

http://code.google.com/p/sympy/issues/detail?id=4107

This allows matrices to be properly used within Equality objects. Two features were added to do this:

1. Relational was changed to support objects with an _eval_Eq method, as suggested by @mrocklin. If creating an Equality, Relational will check for the presence of _eval_Eq in either argument, and fall back on the existing algorithm if the method does not exist, or returns None.
2. MatrixExpr had an _eval_Eq method added to it. It checks if the other argument has a shape matching its own, then creates an Equality for every element of the matrix, and wraps them all in an And.