Perhaps as a bit of explanation of why you may care about this and why our 
hand is forced:

Given symbolic expression A and B, what should

bool(A == B) and bool(A != B) be?

Python forces us that these are either True or False and since equality 
testing happens all over in Python, throwing an error isn't really an 
option either.

It would seem the reasonable equality notion here is: "as functions in 
whatever variables are present". That's a notion of equality that is not 
always practically decidable and in fact is even theoretically undecidable 
in full generality (see Richardson's Theorem). It then seems reasonable to 
have bool(A==B) return True if equality can be established and False 
otherwise. That's generally what is attempted in sage.

The question now arises for bool(A != B): what should it do for undecided 
cases? At least I was originally under the impression that a similar 
approach might be prudent to also return "False" for undecided, in which 
case bool(A==B) and bool(A!=B) aren't necesarily complementary: they could 
both be false.

This is problematic in python, but even more important: the primitives in 
Maxima that we rely on don't even do this!
We use "is(equal(A,B))" in maxima. In maxima, "is(equal(x,x^2))" returns 
"unknown" because there are values for x that make it True as well as 
values that make it False. So "unknown" doesn't mean "unable to determine 
if the two expressions describe the same function".

With what I understand presently, I don't think we have a reasonable other 
option than to just make "bool(A!=B) == not bool(A==B)". Now would be a 
good time to voice concerns and help with finding alternatives, should they 
exist.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/40012127-c062-4d08-8066-708834a9d788n%40googlegroups.com.

Reply via email to