This is an old revision of the document!
ExpandTensors expands out products leaving unexpended symbolic terms.ExpandTensors[transformations] or ExpandTensors[[Simplifications: transformations]] applies transformations at each level of expand procedure.ExpandTensors true will not expand expressions like (A_a^a + B_a^a)*(C_b^b + D_b^b).Expand tensors in expressions:
println ExpandTensors >> '(a+b)**10*(x_n + y_n)*(f_m - r_m)'.t
> (a+b)**10*x_{n}*f_{m}+(a+b)**10*f_{m}*y_{n}-(a+b)**10*r_{m}*y_{n}-(a+b)**10*x_{n}*r_{m}
println ExpandTensors >> '(1 + x)**4*(A_a + B_a)'.t
> (1 + x)**4*A_a + (1 + x)**4*B_a
println Expand >> '(1 + x)**4'.t
> x**4+1+4*x**3+6*x**2+4*x
println Expand >> '(x + y)/z'.t
> x/z+y/z
Expand relabels dummies when necessary:
println Expand >> '(A_m^m + 1)**3'.t
> 3*A_{m}^{m}*A_{a}^{a}+A_{m}^{m}*A_{a}^{a}*A_{b}^{b}+1+3*A_{b}^{b}
Expand does not go inside functions and denominators; ExpandAll does:
println Expand >> 'f[(x + y)**2]'.t
> f[(x + y)**2]
println ExpandAll >> 'f[(x + y)**2]'.t
> f[x**2 + 2*x*y + y**2]