Open bowenszhu opened 1 year ago
I would be curious to know how it can be implemented properly.
One can craft the answer with a custom rule
r3 = @rule (~x)*(~y)*(~z) + (~x)*(~a)*(~b) => (~x)*((~y)*(~z)+(~a)*(~b))
#
@syms a b c d
expr = a * b * c + c * a * d
res = simplify(expr, RuleSet([r3]))
but it is super specific and only works is the common term is the first in both.
This looks simple, but is fundamentally important for generating computationally inexpensive functions.