# Problems with combine(_)

+1 vote

I found two problems in the 'combine(_)' algorithm.

The first is that it does not take into account the commuting rules of the objects:

{m,n,o,p}::Indices.
{x,y,w,z}::Indices.
a::ImplicitIndex(a^{m}).
b::ImplicitIndex(b_{m}).
{a{#},b{#}}::AntiCommuting.
ex:= a b;
explicit_indices(_);
combine(_);


The output for this code is the following.

a b
a^{m} b_{m}
(b a)

The second problem is that it seems that it is not possibile to make some indices implicit, unless they are in the order lower-upper position, respectively. For example:

{\alpha, \beta, \gamma, \delta}::Indices.
a::ImplicitIndex(a^{\alpha}).
M::ImplicitIndex(M_{\alpha \beta}).
ex:= a M a;
explicit_indices(_);
combine(_);


The output in this case is:

a M a
a^{\alpha} M{\alpha \beta} a^{\beta}
a^{\alpha} M
{\alpha \beta} a^{\beta}

combine(_) does not do anything to the expression.

Thanks for reporting. Yes, combine has various issues, some of which are reported elsewhere on this Q&A. I'm on holiday right now, plan to look into this when I'm back. Will keep you posted here.