[sage-devel] Re: bool() and SymbolicEquation

2017-07-05 Thread Ralf Stephan
Since we cannot easily translate this to Maxima---and what do you do if there is one real and one complex variable?--- I have created a simplification ticket that will cause immediately sage: sqrt(-4*x+4) 2*sqrt(-x + 1) https://trac.sagemath.org/ticket/23368 Regards, On Tuesday, July 4, 2017 at

[sage-devel] Re: bool() and SymbolicEquation

2017-07-03 Thread Ralf Stephan
That is not the right way to compare. Actually: (%i2) domain:complex; (%o2) complex (%i3) is(equal(sqrt(-4*x+4),sqrt(-x+1)*2)); (%o3) unknown but indeed: sage: var('x', domain='real') x sage: bool(sqrt(-4*x+4)==sqrt(-x+1)*2) False --

[sage-devel] Re: bool() and SymbolicEquation

2017-07-03 Thread Emmanuel Charpentier
Indeed. But compare : ;; Maxima (%i1) is(equal(sqrt(-4*x+4),sqrt(-x+1)*2)); (%o1)true ## Sage (%i1) is(equal(sqrt(-4*x+4),sqrt(-x+1)*2)); (%o1)true Maxima, in this case, doesn't need the help required by Sage... -- Emmanuel Charpen

[sage-devel] Re: bool() and SymbolicEquation

2017-07-03 Thread Ralf Stephan
On Monday, July 3, 2017 at 5:34:58 PM UTC+2, Emmanuel Charpentier wrote: > > sage: sqrt(4-4*x).canonicalize_radical() > 2*I*sqrt(x - 1) > That comes directly from Maxima and is not wrong: (%i2) radcan(sqrt(-4*x + 4)); (%o2) 2 %i sqrt(x - 1) -- You received this message

[sage-devel] Re: bool() and SymbolicEquation

2017-07-03 Thread Ralf Stephan
On Monday, July 3, 2017 at 12:00:03 PM UTC+2, LudJam wrote: > > I think I discovered a case where bool() of a symbolic expression returns > false while it is true : > > bool(sqrt(-4*x+4)==sqrt(-x+1)*2) > >>false > That is not a bug. False can mean False and Unknown here. Blame Python for the fact

[sage-devel] Re: bool() and SymbolicEquation

2017-07-03 Thread Emmanuel Charpentier
Moe seriously : the introduction of (some form) of three-valued (interpretation of) logic in Sage has been discussed *ad nauseam* on this list since the idea was introduced nine years ago. As seen by a relatively newbie, a general consensus seems to be that this would entail a (very long) revie

[sage-devel] Re: bool() and SymbolicEquation

2017-07-03 Thread Emmanuel Charpentier
Hmmm... Uting TLAs : sage: sqrt(4-4*x).simplify() sqrt(-4*x + 4) sage: sqrt(4-4*x).simplify_full() sqrt(-4*x + 4) sage: sqrt(4-4*x).canonicalize_radical() 2*I*sqrt(x - 1) WTF ? BTW : sage: bool(sqrt(4-4*x)==2*sqrt(1-x)) False sage: bool((sqrt(4-4*x)/(2*sqrt(1-x)))==1) False sage: bool((sqrt(4-4*

[sage-devel] Re: bool() and SymbolicEquation

2017-07-03 Thread LudJam
I think I discovered a case where bool() of a symbolic expression returns false while it is true : bool(sqrt(-4*x+4)==sqrt(-x+1)*2) >>false I think the problem is that sage can't manage to simplify sqrt(-4*x+4) in sqrt(-x+1)*2 sqrt(-4*x+4).full_simplify() >>sqrt(-4*x+4) P.S. : I tried with th

[sage-devel] Re: bool() and SymbolicEquation

2008-04-02 Thread Jason Grout
Timothy Clemans wrote: > +1 > > On Wed, Apr 2, 2008 at 12:12 PM, Jason Grout > <[EMAIL PROTECTED]> wrote: >> Currently, False is returned when bool() is called on a SymbolicEquation >> when the equation is really false *or* when it is not known whether it >> is true or false. This, of course

[sage-devel] Re: bool() and SymbolicEquation

2008-04-02 Thread Timothy Clemans
+1 On Wed, Apr 2, 2008 at 12:12 PM, Jason Grout <[EMAIL PROTECTED]> wrote: > > Currently, False is returned when bool() is called on a SymbolicEquation > when the equation is really false *or* when it is not known whether it > is true or false. This, of course, makes a return value of False