Well I tried it in my interpreter, in the illustrative example. seems to work,,
actually tolist() converts them into simple list of lists, and transformation_matrix is defined as lists of lists too.
On comparing two lists, python will run down to each sympy symbol(in each list) for comparisions, which have their __eq__ defined ..