semantic-math / math-rules

Manipulate math-ast ASTs based on algebraic rules
MIT License
4 stars 1 forks source link

Multiplying polynomials #34

Open aliang8 opened 7 years ago

aliang8 commented 7 years ago

Added rule for multiplying polynomials.

x^2 * x^1', '1 x^3

aliang8 commented 7 years ago

The helper rule does it for a single polynomial, specially when they're an implicit multiplication of terms (e.g 6xyz), while the rule itself applies the helper to all the terms and handles x. I think it would be easier with the helper, but if you feel like it is unnecessary , I could try to find another way to combine them.