Please forgive me if this is a basic problem or if there is already abundant solutions, but I don’t know how to articulate this this problem concisely and I could not find any results for this. I have been thinking about this problem for a long time and I cannot seem to find a solution.
What I want to do is compare symbolic statements through strings. For example, in mathematics,
4x = 4x is true.
But what about
(12/3)x = 4x
(5-1)x = (4/1)x
((5-1)/1)x = (4/1)x
so on . . .
In proofs,
1 = sin(x)^2 + cos(x)^2
tan(x) = sin(x)/cos(x)
sin(2x) = 2*sin(x)*cos(x)
and so on . . .
In logic,
~~p <-> p
~(p * q) <-> (~p v ~q)
~(p v q) <-> (~p * ~q)
(p v q) <-> (q v p)
(p * q) <-> (q * p)
and so on . . .
Keep in mind that these inputs are strings. The problem I’m running into is that there is theoretically an infinite amount of cases where both sides can be equal.
Of course the first problem is how to parse numerical values versus symbolic values and enumerate them. I am OK on this end.
I don’t even know where to begin so any pointers will be appreciated.
I would get a symbolic algebra package. They can do things like derivations, simplifications and comparisons with reductions. Many are also programmable. There are some good free ones out there.
There’s a list here:
http://en.wikipedia.org/wiki/List_of_computer_algebra_systems
If you are looking for a way of doing this in your code, perhaps you could find a symbolic algebra library for the language of your choice.