How to change commutativity of a SymPy symbol after creation?
Suppose I create a SymPy symbol
import sympy as sp x = sp.Symbol('x', commutative = False)
How can I change the commutative assumption to
True without creating a new Symbol?
with sp.assuming( sp.Q.commutative(x) ): print( sp.ask( Q.commutative(x) ) )
But it still gives