Cadabra
a field-theory motivated approach to computer algebra

Exponents, indices and labels

Exponents, indices and labels are traditionally all placed using super- or subscript notation, making these slightly ambiguous for a computer algebra system. Since this situation can become quite complex (how do you represent the third power of the first element of a vector?), Cadabra requires all powers to be entered with a double-star "$**$" notation:
ex1:= a**2; ex2:= a**(2 + 3b);
\(\displaystyle{}{a}^{2}\)
(a)**2
\(\displaystyle{}{a}^{\left(2 +3b\right)}\)
(a)**(2 + 3b)
In addition, all sub- or superscripts with curly braces indicate indices, to which the summation convention applies. In particular, there are not allowed to be more than two identical indices in a single product. The summation convention does not apply to arguments with any other bracket types. In particular, sub- or superscripts with square or pointy brackets have (as of yet) no fixed meaning.
Copyright © 2001-2024 Kasper Peeters
Questions? info@cadabra.science