kpeeters / cadabra2

A field-theory motivated approach to computer algebra.
https://cadabra.science/
GNU General Public License v3.0
223 stars 37 forks source link

Evaluation rules with component nodes fail #86

Open kpeeters opened 6 years ago

kpeeters commented 6 years ago

Expressions of the form 'tensor = components expression' should be valid substitution rules for evaluate, but they do not produce the right tree structure:

{r,t}::Coordinate.
{m,n}::Indices(values={t,r}, position=fixed).
ex:= A_{m} = A_{m};
rl:= A_{t} = 3;
evaluate(ex, rl, rhsonly=True, simplify=True)
ex2:= A_{m};
evaluate(ex2, ex);

All examples avoid this by doing a substitute rather than an evaluate, but this should nevertheless be fixed.