# meld returns zero where it shouldn't?

+1 vote

I've been trying to make use of meld and I'm finding some potential bugs.

Consider:

X_{a b c}_{d}::TableauSymmetry(shape=(2,1,1), indices=(0,3,1,2)).

This generates a tensor X_{a b c}_{d} which is antisymmetric in abc but with the totally antisymmetric part in abcd removed.

If I evaluate meld on the following three quantities:

meld($X_{a b d d}$);
meld($X_{a d b d}$);
meld($X_{d a b d}$);

I get 0 for the first two and X_{d a b d} for the last. Of course, they should all be nonzero. (For the last, if I then call canonicalise and meld again, I get 0 because it rearranges the indices into the first case.)

Similar behavior occurs with the simpler tensor

X_{a b}_{c}::TableauSymmetry(shape=(2,1), indices=(0,2,1)).

where

meld($X_{a d d}$);
meld($X_{d a d}$);

gives 0 for the first but X_{d a d} for the second.

Perhaps I am doing something stupid but I don't quite see what it is.

Funky, that's definitely not supposed to happen. My guess is that there's something that incorrectly throws away the trace before it even tries to do the full meld algorithm. But I'll have a look.

Hi dbutter. Is there a reason to use a double subindex? In general, programming languages might be puzzled by that notation. So, if I were you, I'd avoid to write double indices.

My understanding was that Cadabra treats sequential and multiple subscripts and superscripts equivalently. The only reason I wrote it that way was to emphasize the symmetry properties of those indices.

That's correct, each index has its own 'sub' or 'super' flag, and grouping them as in X_{a b c} is no different from X_{a}_{b}_{c}.

The problem was something else and has been fixed (or rather, circumvented).