factor_in
Collect terms in a sum that differ only by given pre-factors.
Given a list of symbols, this algorithm collects terms in a sum that
only differ by pre-factors consisting of these given symbols. As an
example,ex:=a b + a c + a d;
ab+ac+ad
factor_in(_, $b,c$);
(b+c)a+ad
The name is perhaps most easily understood by thinking of it as a
complement to
factor_out
. Or in case you are familiar with
FORM, factor_in
is like its antibracket
statement.
The algorithm of course also works with indexed objects, as inex:=A_{m} B_{m} + C_{m} A_{m};
factor_in(_, $B_{n}, C_{n}$);
AmBm+CmAm
AmBm+CmAm
(not yet finished)