Processing math: 100%
Cadabra
a field-theory motivated approach to computer algebra

expand_power

Expand powers into repeated products
Expand powers into repeated products, i.e. do the opposite of collect_factors. For example,
ex:=(A B)**3;
(AB)3
expand_power(_);
ABABAB
sort_product(_);
AAABBB
collect_factors(_);
A3B3
This command automatically takes care of index relabelling when necessary, as in the following example
{m,n,p,q,r}::Indices(vector). ex:= (A_m B_m)**3;
(AmBm)3
expand_power(_);
AmBmAnBnApBp
Copyright © 2001-2024 Kasper Peeters
Questions? info@cadabra.science