# bugs with sort_product&meld

The following code

{\mu,\nu,\rho,\sigma}::Indices(vector).
\epsilon^{\mu\nu\rho\sigma}::EpsilonTensor.
{a^{\mu},b^{\mu}}::NonCommuting.
{a^{\mu},b^{\mu}}::SelfNonCommuting.
tr{#}::Trace.
ts:=\epsilon^{\mu\nu\rho\sigma}\tr{a^{\mu}a^{\nu}b^{\rho}b^{\sigma}}+\epsilon^{\mu\nu\rho\sigma}\tr{a^{\mu}b^{\nu}b^{\rho}a^{\sigma}};
meld(_);
sort_product(_);
canonicalise(_);


can't get the right result, are there some bugs here?

edited

It seems you're interested in manipulating the expression:
$$\epsilon^{\mu \nu \rho \sigma} tr\left(a^{\mu} a^{\nu} b^{\rho} b^{\sigma}\right)+\epsilon^{\mu \nu \rho \sigma} tr\left(a^{\mu} b^{\nu} b^{\rho} a^{\sigma}\right)$$

But you didn't define the trace

tr{#}::Trace.


Then

{\mu,\nu,\rho,\sigma}::Indices(vector).
\epsilon^{\mu\nu\rho\sigma}::EpsilonTensor.
{a^{\mu},b^{\mu}}::NonCommuting.
{a^{\mu},b^{\mu}}::SelfNonCommuting.
tr{#}::Trace.
ts:=\epsilon^{\mu\nu\rho\sigma} tr{a^{\mu}a^{\nu}b^{\rho}b^{\sigma}}
+\epsilon^{\mu\nu\rho\sigma} tr{a^{\mu}b^{\nu}b^{\rho}a^{\sigma}};
meld(_);


returns
$$2\epsilon^{\mu \nu \rho \sigma} tr\left(a^{\mu} a^{\nu} b^{\rho} b^{\sigma}\right)$$

The meld algorithm does not work with noncommuting/anticommuting objects yet, please wait a little longer.