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

Zoom always does a `partial=True` type match #303

Open kpeeters opened 5 days ago

kpeeters commented 5 days ago

For convenience, the zoom algorithm always allows for more than the indicated factors in any term:

ex:=A D + A B C D E;
zoom(_, $A D$);

keeps both terms. For backward compatibility we cannot change this, but it would be useful to have a partial=False type flag which forces zoom to only keep the first term in the example above (similar to what substitute does).