[Maxima] Checking equivilence of equalities
Richard Fateman
fateman at eecs.berkeley.edu
Wed Feb 8 09:50:32 CST 2012
On 2/8/2012 3:10 AM, Edd Barrett wrote:
> On Wed, Feb 08, 2012 at 06:01:31AM -0500, Stavros Macrakis wrote:
>> Could you give some examples of non-trivial situations where this
>> functionality is useful? That might help in thinking about approaches.
>> Your current example is easily handled with 'solve' but of course that
>> won't work when Maxima can't solve the equations.
> I am writing regression tests for a maxima program that I have written.
> I will first decide test case inputs and then by hand determine the
> output I expect.
>
> When the tests are run, the actual result (as determined by my program(
> needs to be compared for equivilence to the expected result.
>
> Given that there are many ways to express the same equality, I either
> need to convert the equality into a canonical form and test for
> syntactic equality, or have maxima do this for me.
>
> I hope that explains this OK.
>
Not really. If you compare EXPRESSIONS, this makes sense.
If you compare EQUALITIES, then all you need to test for is 3 values.
true, false, and unknown.
2=2 is true
2=3 is false
f(x)=g(y) is presumably unknown.
In the world of equalities, 4=4 is also true, so
equal_test(2=2,4=4) is true.
Is that what you want?
The reason that some stuff, e.g. "comparing equalities" is not in Maxima or
in any other computer algebra system, is that you probably don't need it.
Comparing expressions, e.g.
sin(x+2*%pi) and sin(x)
DOES make sense.
More information about the Maxima
mailing list