1
$\begingroup$

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.

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

1 Answer 1

1
$\begingroup$

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.

If the expression is a polynomial and the "knowledge" is expressed as equations of polynomials, then it is possible that Groebner bases might be useful - I am not sure.

$\endgroup$
2
  • $\begingroup$ Thank you. I'm sorry I didn't explain that I also might use non-linear equations. $\endgroup$ Commented Sep 24, 2022 at 15:22
  • $\begingroup$ I've accepted your answer because I can see the question is too broad and perhaps I'm not using the right terminology. Thanks! $\endgroup$ Commented Sep 24, 2022 at 15:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.