Welcome to Cadabra Q&A, where you can ask questions and receive answers from other members of the community.
+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 your help in advance.

asked in Bug reports by (170 points)

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.

1 Answer

0 votes

I'm pleased to report that the AntiCommuting issue has just been fixed in git. In your expression that is unaffected by combine(_), it sounds like that's just because you didn't put an indexbracket around M.

answered by (240 points)
...