I had a glance at the `diagonalize` code, I don't know the logic of the `Matrix` module, but I think it clashes with `SymPy`'s policy of immutable elements.

Do you want me to try to fix the `diagonalize` code or is someone else working on it? I don't know exactly how to fix it, but I could give a try.