a field theory motivated approach to computer algebra


Distribute factors over sums.
Rewrite a product of sums as a sum of products, as in \begin{equation*} a\,(b+c) \rightarrow a\,b + a\,c\, . \end{equation*} This would read
ex:=a (b+c); distribute(_);
\(\displaystyle{}a \left(b+c\right)\)
\(\displaystyle{}a b+a c\)
The algorithm in fact works on all objects which carry the Distributable property,
Op{#}::Distributable; ex:=Op(A+B); distribute(_);
\(\displaystyle{}\text{Attached property Distributable to }Op\left(\#\right).\)
The primary example of a property which inherits the Distributable property is PartialDerivative. The distribute algorithm thus also automatically writes out partial derivatives of sums as sums of partial derivatives,
\partial{#}::PartialDerivative; ex:=\partial_{m}{A + B + C}; distribute(_);
\(\displaystyle{}\text{Attached property PartialDerivative to }\partial{\#}.\)
Copyright © 2001-2017 Kasper Peeters