On Friday, 23 September 2022 at 20:09:55 UTC+2 Nils Bruin wrote:

> On Friday, 23 September 2022 at 10:37:01 UTC-7 axio...@yahoo.de wrote:
>
>> OK, this is off topic, but: shouldn't it be this convention?  At least: 
>> shouldn't there be some convention?  Maybe it would be good to discuss this 
>> in a separate thread.  Thus, I repeat the question:
>>
>> Is there, or should there be a convention about x._bool_ returning False 
>> only when x is provably False?
>>
>> No, quite the opposite. Certainly in SR, equalities that can't be proven 
> correct (for "proof" used in the loose sense of what the various symbolic 
> engines are willing to confirm), will return "False" when converted to 
> "bool" value. The key is: _bool_ cannot really error out (that would break 
> too much in python) and does not allow for "unknown" outcomes, so some 
> choice must be made.
>

The doc of Expression.__bool__ says:

        Return True unless this symbolic expression can be shown by Sage
        to be zero.  Note that deciding if an expression is zero is
        undecidable in general.

which seems to be in agreement with what I thought.  Or am I missing 
something?

It seems really strange to me that "not O(x^7)" should be True.

Martin

-- 
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 sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/66413f29-fb5d-4988-a371-16c9b58495a9n%40googlegroups.com.

Reply via email to