kpeeters / cadabra2

A field-theory motivated approach to computer algebra.
https://cadabra.science/
GNU General Public License v3.0
228 stars 37 forks source link

Trace and Determinant are confusing #138

Open kpeeters opened 5 years ago

kpeeters commented 5 years ago

When declaring properties, the notation for a trace is

T::Trace( A_{m n} );

and this means $T = A_{m m}$. However, when you do

{m,n,p}::Indices(vector);
Tr{#}::Trace(indices=vector);

and then write

ex:= Tr( A );

the implicit meaning is A_{m m} as well. This is used for instance in explicit_indices,

{m,n,p}::Indices(vector);
Tr(#)::Trace(indices=vector);
A::ImplicitIndex(A_{m n});
ex:= Tr( A );
explicit_indices(_);

leads to $A_{m m}$ as well.

These are not necessarily inconsistent (declaration of a property versus use of an operator declared to have that property), but definitely confusing. Needs docs.