Closed kpeeters closed 2 years ago
I also have found a strange thing about meld():
{j,k}::Indices;
ex := A = - x x n_{k} n_{k} - x x n_{j} n_{j};
meld(_);
Result is A = 2x x n_{k} n_{k}
instead of -2x x n_{k} n_{k}
Is there any way to avoid using meld() if I just want to get rid of antisymmetric tensor with repeating index, like e_{j j k}
?
One more example of strange meld():
#!/usr/bin/cadabra2
{a,b,c}::Indices;
{a,b,c}::Integer(1..3);
{X,Y}::Symbol
{X,Y,n_{a}}::Commuting
ex := 10 X n_{a} Y + 2 Y X n_{a};
meld(_);
ex := 10 X n_{a} Y + 2 X Y n_{a};
meld(_);
Results: (100X Y + 4Y X) n_{a}
and 104X Y n_{a}
instead of 12 X Y n_{a}
A fix is in preparation, hang on.
@slazav: Dom has fixed the issues you were seeing. You still need a sort_product
for your 10 X n_{a} Y + 2 Y X n_{a}
example, but that is expected behaviour. Changes are in github on the master
branch.
Yes, it works! Thank you
Originally posted by Arina on the Q&A.
The result is:
https://sun9-42.userapi.com/impg/5KgSyCX43Lj8g9jlTeWoZ0Gkl--HeOKGSROUqw/x63QYCeAssk.jpg?size=699x169&quality=96&proxy=1&sign=aa6fd8cde7d0ecdbdb305539a09b6948&type=album