Hi Arina. Great question!
I believe that the mismatch between the expected and actual behaviour of the unwrap
algorithm is due to the "phylosophy" of CADABRA, i.e., it is a software centred in manipulation rather than calculation.
The "calculation" component of CADABRA came with the release of version 2.X, through the interaction with PYTHON (in particular with sympy
).
Note that if instead of unwrap
, you pass your expression to SYMPY, using map_sympy
, as follows
map_sympy($\partial_{t}{a}$);
you get the expected result (of executing a calculation).
Hope this can help you!
UPDATE
I understand the point in your comment, hahaha.
It seems to me that unwrap
is useful to "move objects out" because they are constant.
Example
In General Relativity the metric is covariantly constant, but its partial derivative is nonvanishing in general. So, you should assign a dependence on the partial derivative but not of the covariant derivative.
{l,m,n}::Indices.
\partial{#}::PartialDerivative.
\nabla{#}::Derivative.
g_{m n}::Depends(\partial{#});
\Psi::Depends(\partial{#},\nabla{#});
Now if you define the derivatives of $g \Psi$, and unwrap
, the difference is noticeable.
ex1 := \partial_{l}{ g_{m n} \Psi };
unwrap(ex1);
ex2 := \nabla_{l}{ g_{m n} \Psi };
unwrap(ex2);