I'm sorry for my carelessness. The right code is
{\mu,\nu}::Indices(vector).
tr{#}::Trace.
u^{\mu}::SelfNonCommuting.
u^{\mu}::ImplicitIndex.
ex:=A tr{u^{\nu} u^{\mu} u^{\mu} u^{\nu}}+B tr{ u^{\mu} u^{\mu} u^{\nu} u^{\nu}};
meld(_);
factor_in(_,$A,B$);
I want to use meld
& factor_in
to get the following result:
$$
(A+B) tr(u^\mu u^\mu u^\nu u^\nu)
$$
but I failed, is this a bug? I find the algorithm meld
seems to be unsound, the following code is another example:
{\mu,\nu,\rho}::Indices(vector).
A^{\mu\nu}::AntiSymmetric.
B^{\mu\nu}::Symmetric.
C^{\mu\nu}::AntiSymmetric.
tr{#}::Trace.
{A^{\mu\nu},B^{\mu\nu},C^{\mu\nu}}::NonCommuting.
{A^{\mu\nu},B^{\mu\nu},C^{\mu\nu}}::SelfNonCommuting.
{A^{\mu\nu},B^{\mu\nu},C^{\mu\nu}}::ImplicitIndex.
ex:=a tr{A^{\mu\nu} B^{\mu\rho} B^{\nu\rho}}+b tr{C^{\mu\nu} A^{\mu\rho} B^{\nu\rho}}+c tr{C^{\mu\nu} B^{\mu\rho} A^{\nu\rho}};
meld(_);
The result is
$$
\left(a+b+c\right) tr\left(A^{\mu \nu} B^{\mu \rho} B^{\nu \rho}\right).
$$
This is very strange.