Hi everyone,
I just read the documentation and noticed that there is, as I understood it, a mathematical mistake (and also at the execution).
If you look at this
section, it seems to assert that the product (not the Hadamard product, but usual one) of two symmetric matrices is also symmetric, which is True if and only if both matrices commutes; but as their shape is (in the example) defined as 2x2, they do not necessarily.
from sympy import Q, ask, MatrixSymbol, Equality
X = MatrixSymbol('X', 2, 2)
Z = MatrixSymbol('Z', 2, 2)
print(ask(Q.symmetric(X * Z), Q.symmetric(X) & Q.symmetric(Z))) # True
print(ask(Equality(X * Z, Z * X), Q.symmetric(X) & Q.symmetric(Z))) # False
Here both output should give False.
Best regards,
F. Périat