kpeeters / cadabra2

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

Collecting scalar terms in expressions with `DifferentialForms` #160

Closed Doxdrum closed 4 years ago

Doxdrum commented 4 years ago

It seems that the wedge product does not allow (yet) collecting scalar terms

Example

{f,g}::DifferentialForm(degree=0).
{V, W}::DifferentialForm(degree=1).
foo := f V ^ g W;
canonicalise(foo);
sort_product(foo);
collect_factors(foo);

In the above example all the simplification algorithms return the original foo expression, while the expected result is $f g V \wedge W$.

Doxdrum commented 4 years ago

Solved in commit e7548d3e565f81da1ae17e534d7d2c4ed91ff8b3 Thank you @kpeeters