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

Derivatives and implicit dependence on coordinates

There is no fixed notation for derivatives; as with all other objects you have to declare derivatives by associating a property to them, in this case the Derivative property.
\nabla{#}::Derivative;
Property Derivative attached to nabla{#}.
Derivative objects can be used in various ways. You can just write the derivative symbol, as in
ex:=\nabla{ A_{\mu} };
Aμ
\nabla(A_{\mu})
Or you can write the coordinate with respect to which the derivative is taken,
s::Coordinate; A_{\mu}::Depends(s); ex:=\nabla_{s}{ A_{\mu} };
Property Coordinate attached to s.
Property Depends attached to Aμ.
sAμ
\nabla_{s}(A_{\mu})
Finally, you can use an index as the subscript argument, as in
{ \mu, \nu }::Indices(vector); ex:=\nabla_{\nu}{ A_{\mu} };
Property Indices(position=free) attached to [μ,ν].
νAμ
\nabla_{\nu}(A_{\mu})
(in which case the first line is, for the purpose of using the derivative operator, actually unnecessary).
The main point of associating the Derivative property to an object is to make the object obey the Leibnitz or product rule, as illustrated by the following example,
\nabla{#}::Derivative; ex:= \nabla{ A_{\mu} * B_{\nu} }; product_rule(_);
Property Derivative attached to nabla{#}.
(AμBν)
\nabla(A_{\mu} B_{\nu})
AμBν+AμBν
\nabla(A_{\mu}) B_{\nu} + A_{\mu} \nabla(B_{\nu})
This behaviour is a consequence of the fact that Derivative derives from Distributable. Note that the Derivative property does not automatically give you commuting derivatives, so that you can e.g. use it to write covariant derivatives.
More specific derivative types exist too. An example are partial derivatives, declared using the PartialDerivative property. Partial derivatives are commuting and therefore automatically symmetric in their indices,
\partial{#}::PartialDerivative; {a,b,m,n}::Indices(vector); C_{m n}::Symmetric; ex:=T^{b a} \partial_{a b}( C_{m n} D_{n m} );
Property PartialDerivative attached to partial{#}.
Property Indices(position=free) attached to [a,b,m,n].
Property Symmetric attached to Cmn.
Tbaab(CmnDnm)
T^{b a} \partial_{a b}(C_{m n} D_{n m})
canonicalise(_);
Tabab(CmnDmn)
T^{a b} \partial_{a b}(C_{m n} D_{m n})
Copyright © 2001-2024 Kasper Peeters
Questions? info@cadabra.science