Why doesn't Simplify
and FullSimplify
operate on object generated using SymmetrizedArray
?
For example:
FullSimplify[SymmetrizedArray[metric.riemann, {n, n, n, n}, Antisymmetric[{3, 4}]
leaves expressions like 1/2*(-2a'[t]^2+2a[t]*a''[t])
without obvious simplification of factors 2
.
More transparent example: (FullSimplify
acting on structured array and on normal array)
In:
AA = SymmetrizedArray[{{1, 2} -> (a^2 - b^2)^3, {1, 3} -> ((a-b) (a + b))^3, {2, 3} -> x}, {3, 3}, Antisymmetric[{1, 2}]];
B1 = Normal[FullSimplify[AA]]
B2 = FullSimplify[Normal[AA]]
Out:
{{0,(a^2-b^2)^3,(a-b)^3 (a+b)^3},{-(a^2-b^2)^3,0,x},{-(a-b)^3 (a+b)^3,-x,0}}
{{0,(a^2-b^2)^3,(a^2-b^2)^3},{-(a^2-b^2)^3,0,x},{-(a^2-b^2)^3,-x,0}}
Of course my expressions are much more complicated and time consuming. I can't do it by transforming a structured array to normal form, because it is better to do operations (in this case simplification) only on independent components (in order to economize computing time and memory).
Perhaps I should use Map
, but I don't understand how it works with a structured array.
Any suggestions ?