# Why won't Mathematica simplify tensor products fully?

I am working on a project and part of the output of my code is the following: $$\text{a1}\otimes\text{a2}+\text{a1}\otimes(\text{a1}\otimes\text{a1}-\text{a2})-\text{a1}\otimes\text{a1}\otimes\text{a1}.$$

To me this clearly simplifies to 0, but for some reason, Mathematica cannot see this even if I use Simplify or FullSimplify. Is there any way to help it to see this?

In[283]:= ExpandAll[ a1\[TensorProduct]a2 + a1\[TensorProduct](-a2 + a1\[TensorProduct]a1)
- a1\[TensorProduct]a1\[TensorProduct]a1]

Out[283]= a1\[TensorProduct]a2 + a1\[TensorProduct](-a2 + a1\[TensorProduct]a1)
- a1\[TensorProduct]a1\[TensorProduct]a1

• @rhermans I didn't put the raw code as it was very ugly and didn't show my point as well as an image. I have replaced with the code now. Aug 9 '18 at 10:16
• Still it's better that you share your ugly code than to ask us to guess and type the code for you. Using images it's fine provided you also provide plain text code (in InputForm) that we can Copy&Paste. Thanks for editing your question. Don't forget to take the tour Aug 9 '18 at 11:30

expr = a1\[TensorProduct]a2 +  a1\[TensorProduct](-a2 + a1\[TensorProduct]a1) -
a1\[TensorProduct]a1\[TensorProduct]a1


TensorExpand @ expr


0

• while your solution works its a bit disappointing that FullSimplify does not attempt TensorExpand? Aug 9 '18 at 14:42
• @chris, I agree. PowerExpand and ComplexExpand are also not used by FullSimplify because they "make special assumptions on input". Perhaps TensorExpand is not used for the same reason.
– kglr
Aug 9 '18 at 14:53
• @chris you can always manually add TensorExpand to TransformationFunctions: FullSimplify[expr, TransformationFunctions -> {Automatic, TensorExpand}]. Aug 10 '18 at 9:37