# Can equations be simplified with the help of a given set of equations?

There are many posts here and elsewhere asking for algorithms to simplify simple arithmetic expressions. For example, this question asks how to simplify the expression $$axc + byc + ayc + bxc$$. Symbolics and xcas are two examples among many of Computer Algebra Systems (CAS) that can do this. But Symbolics and xcas perform differently: Symbolics can simplify the expression above and turn it into $$cx(a + b) + cy(a + b)$$, whereas xcas completely factorizes the expression into $$(a + b)c(x + y)$$.

I was wondering if there is any CAS that simplifies expressions based on some set of equations that you can input into the system? As an example, assume that we knew $$a + b = 2$$ and $$x + y = -1$$: is there any known (implemented) algorithm that given said equations, would factorize the expression above into simply $$-2c$$ ? Perhaps it's more pertinent to ask: could such an algorithm exist?

In the example above, we can set $$y = -1 - x$$ and $$b = 2 - a$$ (as pointed out in a comment), but in more complicated examples it might not be possible.

• Not sure the this is what you want, but setting $b:=2-a$ and $y:=-1-x$ will give you the desired simplification.
– user16034
Commented Sep 23, 2022 at 14:56

If your knowledge is in the form of linear equations, as in your example, then you can make a simple substitution. In your example, set $$b=2-a$$ and $$y=-1-x$$, as Yves Daoust suggests. This will work for any system of linear equations.