====== PowerUnfold ====== ---- ====Description==== * ''PowerUnfold'' expands all powers of products and unfolds powers of indexed arguments into products. * ''PowerUnfold[var1, var2, ...]'' expands only with respect to the variables ''var1'', ''var2'', ... * ''PowerUnfold'' is similar to ''PowerExpand'' when applied to indexless expressions. * ''PowerUnfold'' is effectively the inverse of [[documentation:ref:collectscalars]]. ====Examples==== ---- Unfold power of tensors: println PowerUnfold >> '(A_m*A^m)**3'.t > A_{m}*A^{m}*A_{a}*A^{a}*A_{b}*A^{b} ---- Unfold with respect to ''A_m'': println PowerUnfold['A_m'] >> '(A_m*A^m)**3*(B_m*B^m)**2'.t > (B_m*B^m)**2*A_{m}*A^{m}*A_{a}*A^{a}*A_{b}*A^{b} ---- ''PowerUnfold'' works same as [[documentation:ref:powerexpand|PowerExpand]] in the case of indexless expressions: println PowerUnfold >> '(a*b)**(1/2)'.t > a**(1/2)*b**(1/2) ---- ====See also==== * Related guides: [[documentation:guide:applying_and_manipulating_transformations]], [[documentation:guide:list_of_transformations]] * Related transformations: [[documentation:ref:collectscalars]], [[documentation:ref:powerexpand]] * JavaDocs: [[http://api.redberry.cc/redberry/1.1.9/java-api/cc/redberry/core/transformations/powerexpand/PowerUnfoldTransformation.html|PowerUnfoldTransformation]] * Source code: [[https://bitbucket.org/redberry/redberry/src/tip/core/src/main/java/cc/redberry/core/transformations/powerexpand/PowerUnfoldTransformation.java|PowerUnfoldTransformation.java]]