Hi all,
I stumbled upon the discussion on matrix assumptions and the bit of history behind this sympy module:
First off all, thank you Matt, this is incredibly cool stuff!
Now, I'm trying to do some matrix algebra while encoding knowledge about the matrices involved. For instance, say my matrix U is unitary, i.e. U * U.T = I. I've looked around in the documentation and source code, but couldn't figure out, if the new assumption system can be used to simplify matrix expressions.
I was trying to exploit this using sympy as follows:
from sympy import Q, symbols, MatrixSymbol, ask, simplify
from sympy.assumptions.assume import global_assumptions
n = symbols('n', integer=True)
U = MatrixSymbol('U', n, n)
global_assumptions.add(Q.unitary(U))
UU = U * U.T
print UU
simpleUU = simplify(UU)
print simpleUU
I was hoping that the second print would output the Identity, but somehow this didn't work. Any suggestions, pointers, hints?
Cheers,
Chris