Untrace first, so do something like
{\mu,\nu,\rho}::Indices(vector).
{a^{\mu},b^{\mu},c^{\mu}}::ImplicitIndex;
tr{#}::Trace.
ex:=tr(m a^{\mu} b^{\nu} c^{\rho} a^{\mu} b^{\rho} c^{\nu}
+n b^{\mu} c^{\nu} a^{\rho} b^{\nu} c^{\mu} a^{\rho}
+l c^{\mu} a^{\nu} b^{\mu} c^{\rho} a^{\nu} b^{\rho});
distribute(_);
untrace(_);
sort_product(_);
rename_dummies(_);
factor_in(_, $m,n,l$);
to get
$$(m+n+l) {\rm tr}( a^{\mu} b^{\nu} c^{\rho} a^{\mu} b^{\rho} c^{\nu} )$$
Note that for untrace
to work, you need to give your $a,b,c$ objects the ImplicitIndex
property; just doing NonCommuting
is not enough (if you do the latter, untrace
will take them out of the trace).