Re: [sage-devel] Re: should bool(x > 0) be False or an exception?

2015-02-26 Thread Jakob Kroeker
>I changed the code to return an exception if the truth value is unknown and ran `sage -testall`. Did you upload the patch to somewhere? Where this change has to be made? > I might be willing to fix these tests when I have time. It seems that nothing happens for more than a year, so maybe som

Re: [sage-devel] Re: should bool(x > 0) be False or an exception?

2013-08-09 Thread Eviatar
I changed the code to return an exception if the truth value is unknown and ran `sage -testall`. Here are the results: sage -t devel/sage/sage/tensor/differential_form_element.py # 43 doctests failed sage -t devel/sage/sage/tensor/differential_forms.py # 1 doctest failed

[sage-devel] Re: should bool(x > 0) be False or an exception?

2013-08-04 Thread chris wuthrich
I am not against the exception. The question is what quantifiers we use for variables, isn't it? Antoher approach would be to implement it such that the quatifier is always "forall" for all variables in the expression, i.e. it only returns True if for all possible values of x, y, .. it is Tru

Re: [sage-devel] Re: should bool(x > 0) be False or an exception?

2013-08-03 Thread TB
On 01/08/2013 20:03, Eviatar wrote: Maxima does have an unknown answer for comparisons. I'm in favour of the exception. On Wednesday, 9 April 2008 19:18:48 UTC-7, Carl Witty wrote: I'd like to reopen discussion of #2781, "bool() for SymbolicEquation should raise an error when it doesn't

Re: [sage-devel] Re: should bool(x > 0) be False or an exception?

2013-08-02 Thread Volker Braun
I tend to be in favor of the True/False/raise Exception model for testing equality, but has anybody looked into what would be involved to transition the Sage ilbrary? I imagine we would have to adapt a lot of code. On Wednesday, July 31, 2013 5:33:30 AM UTC-4, kro...@uni-math.gwdg.de wrote:

Re: [sage-devel] Re: should bool(x > 0) be False or an exception?

2013-08-02 Thread Jakob Kröker
Dear Eviatar, could you provide some arguments for your choice? By the way, 'Unknown' is not usable for fixing this issue, because a value, that is neither True nor False should not be convertible to a boolean or integer or whatever is accepted by the 'if'-statement, but 'if' seems to accept Unk

[sage-devel] Re: should bool(x > 0) be False or an exception?

2013-08-01 Thread Eviatar
Maxima does have an unknown answer for comparisons. I'm in favour of the exception. On Wednesday, 9 April 2008 19:18:48 UTC-7, Carl Witty wrote: > > I'd like to reopen discussion of #2781, "bool() for SymbolicEquation > should raise an error when it doesn't know the answer". Jason created > a

Re: [sage-devel] Re: should bool(x > 0) be False or an exception?

2013-08-01 Thread Jesus Torrado
+1 to the exception. With respect to "pythonism", I would say that this is more pythonic than creating a 3-state boolean type. And I would like to raise attention this current, related sage-support discussion: https://groups.google.com/forum/#!topic/sage-support/JOA8JqgXJQA -- You received th

Re: [sage-devel] Re: should bool(x > 0) be False or an exception?

2013-07-31 Thread kroeker
Am Sonntag, 13. April 2008 02:39:24 UTC+2 schrieb William Stein: > On Sat, Apr 12, 2008 at 5:33 PM, Carl Witty wrote: > > > > On Apr 12, 8:58 am, Jason Grout wrote: > > > Carl Witty wrote: > > > > On Apr 10, 1:41 am, Simon King wrote: > > > >> On Apr 10, 4:18 am, Carl Witty wrote: > > > >

[sage-devel] Re: should bool(x > 0) be False or an exception?

2008-04-12 Thread Chris Chiasson
+1 for Carl's proposal with the addition that it should mention the "unevaluated if" functionality if/when it becomes available in sage (heck, maybe it should just point to the relevant threads or trac tickets in the interim...) On Apr 12, 7:33 pm, Carl Witty <[EMAIL PROTECTED]> wrote: > On Apr 1

[sage-devel] Re: should bool(x > 0) be False or an exception?

2008-04-12 Thread William Stein
On Sat, Apr 12, 2008 at 5:33 PM, Carl Witty <[EMAIL PROTECTED]> wrote: > > On Apr 12, 8:58 am, Jason Grout <[EMAIL PROTECTED]> wrote: > > Carl Witty wrote: > > > On Apr 10, 1:41 am, Simon King <[EMAIL PROTECTED]> wrote: > > >> On Apr 10, 4:18 am, Carl Witty <[EMAIL PROTECTED]> wrote: > > > >

[sage-devel] Re: should bool(x > 0) be False or an exception?

2008-04-12 Thread Carl Witty
On Apr 12, 8:58 am, Jason Grout <[EMAIL PROTECTED]> wrote: > Carl Witty wrote: > > On Apr 10, 1:41 am, Simon King <[EMAIL PROTECTED]> wrote: > >> On Apr 10, 4:18 am, Carl Witty <[EMAIL PROTECTED]> wrote: > > >>> I like the "raise an exception" behavior, because it would eliminate > >>> questions a

[sage-devel] Re: should bool(x > 0) be False or an exception?

2008-04-12 Thread Jason Grout
Carl Witty wrote: > On Apr 10, 1:41 am, Simon King <[EMAIL PROTECTED]> wrote: >> On Apr 10, 4:18 am, Carl Witty <[EMAIL PROTECTED]> wrote: >> >>> I like the "raise an exception" behavior, because it would eliminate >>> questions asking why form1 and form2 below are different (from this >>> sage-su

[sage-devel] Re: should bool(x > 0) be False or an exception?

2008-04-12 Thread Carl Witty
On Apr 10, 1:41 am, Simon King <[EMAIL PROTECTED]> wrote: > On Apr 10, 4:18 am, Carl Witty <[EMAIL PROTECTED]> wrote: > > > I like the "raise an exception" behavior, because it would eliminate > > questions asking why form1 and form2 below are different (from this > > sage-support > > threadhttp:

[sage-devel] Re: should bool(x > 0) be False or an exception?

2008-04-10 Thread Simon King
On Apr 10, 4:18 am, Carl Witty <[EMAIL PROTECTED]> wrote: > I like the "raise an exception" behavior, because it would eliminate > questions asking why form1 and form2 below are different (from this > sage-support > threadhttp://groups.google.com/group/sage-support/browse_thread/thread/79d0...).

[sage-devel] Re: should bool(x > 0) be False or an exception?

2008-04-09 Thread Carl Witty
On Apr 9, 8:16 pm, "didier deshommes" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 9, 2008 at 10:18 PM, Carl Witty <[EMAIL PROTECTED]> wrote: > > > I'd like to reopen discussion of #2781, "bool() for SymbolicEquation > > should raise an error when it doesn't know the answer". Jason created > > a p

[sage-devel] Re: should bool(x > 0) be False or an exception?

2008-04-09 Thread Chris Chiasson
Since x>=0 returns unevaluated, the problem seems like it is with the if statement, which is turning "maybe" into false. In Mathematica, the if statement would return unevaluated (for symbolic input into g). On Apr 9, 9:18 pm, Carl Witty <[EMAIL PROTECTED]> wrote: > I'd like to reopen discussion

[sage-devel] Re: should bool(x > 0) be False or an exception?

2008-04-09 Thread didier deshommes
On Wed, Apr 9, 2008 at 10:18 PM, Carl Witty <[EMAIL PROTECTED]> wrote: > > I'd like to reopen discussion of #2781, "bool() for SymbolicEquation > should raise an error when it doesn't know the answer". Jason created > a prototype patch to implement this, but gave up on it and closed the > tic