We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My testing is as follows:
In[1]:= (* The following method doesn't rely on NCAlgebra package. Unable to Simplify non-commutative Expression Further in Mathematica. https://community.wolfram.com/groups/-/m/t/3076922*) ClearAll["Global`*"] Unprotect[NonCommutativeMultiply]; a_ ** (b_?NumberQ c_) := b*(a ** c) (b_?NumberQ c_) ** a_ := b*(c ** a) a_ ** (b_ + c_) := a ** b + a ** c (b_ + c_) ** a_ := b ** a + c ** a comm[x_, y_] := x ** y - y ** x anticomm[x_, y_] := x ** y + y ** x A ** anticomm[C, B] ** D - A ** C ** anticomm[D, B] + anticomm[C, A] ** D ** B - C ** anticomm[D, A] ** B // Simplify % == comm[A ** B, C ** D] // FullSimplify Out[9]= A ** B ** C ** D - C ** D ** A ** B Out[10]= True
<< NC` << NCAlgebra` NC::Directory: You are using a paclet version of NCAlgebra. NCAlgebra::SmallCapSymbolsNonCommutative: All lower cap single letter symbols (e.g. a,b,c,...) were set as noncommutative. In[15]:= (* The following method doesn't rely on NCAlgebra package. Unable to Simplify non-commutative Expression Further in Mathematica. https://community.wolfram.com/groups/-/m/t/3076922*) ClearAll["Global`*"] Unprotect[NonCommutativeMultiply]; a_ ** (b_?NumberQ c_) := b*(a ** c) (b_?NumberQ c_) ** a_ := b*(c ** a) a_ ** (b_ + c_) := a ** b + a ** c (b_ + c_) ** a_ := b ** a + c ** a comm[x_, y_] := x ** y - y ** x anticomm[x_, y_] := x ** y + y ** x A ** anticomm[C, B] ** D - A ** C ** anticomm[D, B] + anticomm[C, A] ** D ** B - C ** anticomm[D, A] ** B // Simplify % == comm[A ** B, C ** D] // FullSimplify During evaluation of In[15]:= ClearAll::wrsym: Symbol T is Protected. Out[23]= 0 Out[24]= True
As you can see, now the result is 0. Any tips for fixing this problem will be appreciated.
See here for the related discussion.
Regards, Zhao
The text was updated successfully, but these errors were encountered:
You assume that ClearAll "unloads" NCAlgebra but this is far from it.
Sorry, something went wrong.
No branches or pull requests
My testing is as follows:
As you can see, now the result is 0. Any tips for fixing this problem will be appreciated.
See here for the related discussion.
Regards,
Zhao
The text was updated successfully, but these errors were encountered: